Skip to content

docs: Update MOTIVATION.md#13

Merged
eannchen merged 1 commit intomainfrom
refactor/motivation-doc
Jan 1, 2026
Merged

docs: Update MOTIVATION.md#13
eannchen merged 1 commit intomainfrom
refactor/motivation-doc

Conversation

@eannchen
Copy link
Copy Markdown
Owner

@eannchen eannchen commented Jan 1, 2026

Description

Type of Change

  • New feature
  • Bug fix
  • Refactor
  • Documentation update
  • Build/CI-related change
  • Other (specify):

Checklist

  • My code follows the project's style.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • All new and existing unit tests pass locally with my changes.
  • I have manually tested the new functionality in the CLI.

Summary by CodeRabbit

  • Documentation
    • Reorganized and restructured motivation documentation with updated formatting and content flow
    • Clarified design philosophy and learning approach throughout
    • Updated and simplified explanations of data structures and algorithms
    • Removed storage and caching-related sections
    • Enhanced emphasis on efficiency and implementation fundamentals

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

The pull request updates the MOTIVATION.md document, restructuring its table of contents, refining wording throughout multiple sections, removing verbose code examples and sections on storage and atomic file writes, and clarifying the zero dependencies philosophy and design pattern rationales.

Changes

Cohort / File(s) Summary
Documentation restructuring and content refinement
document/MOTIVATION.md
Updated metadata (author date: 2026-01-01); restructured table of contents with adjusted formatting; rewrote introductory paragraphs removing "AI vibe coding" references; expanded motivation sections with updated timeframes; clarified Zero Dependencies Philosophy section; removed verbose code examples from Trie and Data Structures sections; removed entire Storage, Atomic File Write, and Caching sections; refined Stack and Heap section descriptions; adjusted closing note emphasis on efficiency and fundamentals.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With quill in paw, I've trimmed the fat,
Removed the code, the storage chat,
Restructured prose with crystal sight,
Now MOTIVATION shines so bright! ✨

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'docs: Update MOTIVATION.md' is vague and generic, using a non-specific term 'Update' that doesn't convey the substantive nature of the changes. Consider a more descriptive title that highlights a specific change, such as 'docs: Refactor MOTIVATION.md with simplified examples and restructured content' or similar that conveys the main intent.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bf294c and aaff327.

📒 Files selected for processing (1)
  • document/MOTIVATION.md
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
document/MOTIVATION.md

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


8-8: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


8-8: Hard tabs
Column: 1

(MD010, no-hard-tabs)


9-9: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


9-9: Hard tabs
Column: 1

(MD010, no-hard-tabs)


10-10: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


10-10: Hard tabs
Column: 1

(MD010, no-hard-tabs)


11-11: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


11-11: Hard tabs
Column: 1

(MD010, no-hard-tabs)


12-12: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


12-12: Hard tabs
Column: 1

(MD010, no-hard-tabs)


13-13: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


13-13: Hard tabs
Column: 1

(MD010, no-hard-tabs)


14-14: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


14-14: Hard tabs
Column: 1

(MD010, no-hard-tabs)


15-15: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


15-15: Hard tabs
Column: 1

(MD010, no-hard-tabs)


16-16: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


16-16: Hard tabs
Column: 1

(MD010, no-hard-tabs)


17-17: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


17-17: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🔇 Additional comments (1)
document/MOTIVATION.md (1)

5-5: Content improvements are well-executed.

The rewording throughout the document improves clarity and concision. Notable strengths:

  • Line 5: Clearer, more direct opening statement.
  • Lines 33-37: Refined explanation of zero-dependencies philosophy with added context ("rare chance because in real jobs...").
  • Lines 65-66: More pragmatic Data Structures intro that frames efficiency learning within the project's scope.
  • Lines 71-84: Added concrete JSON example for indexing structure (helpful for visualization).
  • Lines 88-90: Removed verbose code snippet but retained clear explanation of trie performance benefits.
  • Line 214: Fixed typo "owning" → "owing".
  • Removed sections: Deletion of Storage, Atomic File Write, and Caching sections appropriately reduces noise without losing essential design rationale.

Also applies to: 22-37, 65-90, 145-148, 209-209, 214-214, 225-228

# Motivation & Design Notes

*Author: Ian Chen, Last Update: 2025-08-24*
*Author: Ian Chen, Last Update: 2026-01-01*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find the MOTIVATION.md file
fd -t f "MOTIVATION.md" --full-path

Repository: eannchen/leetsolv

Length of output: 83


🏁 Script executed:

# Examine the MOTIVATION.md file
cat -n document/MOTIVATION.md | head -20

Repository: eannchen/leetsolv

Length of output: 956


🏁 Script executed:

# Check for markdown linting configuration in the project
fd -t f -e ".markdownlint" -e ".markdownlintrc" -e ".markdownlint.json" -e ".markdownlint.yaml" -e ".markdownlint.yml"

Repository: eannchen/leetsolv

Length of output: 43


🏁 Script executed:

# Also check for linting config in root or common locations
ls -la | grep -i lint

Repository: eannchen/leetsolv

Length of output: 146


🏁 Script executed:

# Examine the markdown linting configuration
cat -n coderabbit.markdownlint-cli2.jsonc

Repository: eannchen/leetsolv

Length of output: 707


🏁 Script executed:

# Search for information about MD036 rule in markdown linting
# This will help us understand what the rule covers
rg "MD036" --type json --type jsonc -B 2 -A 2

Repository: eannchen/leetsolv

Length of output: 90


🏁 Script executed:

# Search for MD036 in the configuration file using text search
rg "MD036" coderabbit.markdownlint-cli2.jsonc

Repository: eannchen/leetsolv

Length of output: 43


🏁 Script executed:

# Also check if there's any reference to emphasis or md036 rules
rg "emphasis|MD036|md036" coderabbit.markdownlint-cli2.jsonc

Repository: eannchen/leetsolv

Length of output: 43


🏁 Script executed:

# Let me get more context about the linting config and check if MD036 is mentioned
cat coderabbit.markdownlint-cli2.jsonc | grep -i "036\|emphasis"

Repository: eannchen/leetsolv

Length of output: 43


🌐 Web query:

MD036 markdown linting rule emphasis emphasis-as-heading

💡 Result:

Summary — MD036 (emphasis-as-heading)

  • What it checks: Flags single-line paragraphs that consist only of emphasized text (bold/italic) that appear to be section headings — i.e., emphasis used instead of a Markdown heading. [1][2]

  • Why: Headings have semantic meaning and should be used to separate sections instead of emphasis. [2]

  • Example (fails):
    My document

    Another section
    — Should be:

    My document

    Another section. [1][2]

  • Behavior/details:

    • Only triggers for single-line paragraphs made entirely of emphasis; it won’t fire for emphasis inside normal sentences or multi-line emphasized paragraphs. It typically ignores emphasized lines that end with configured punctuation. [1][2]
    • Aliases: no-emphasis-as-heading / no-emphasis-as-header. [2][3]
  • Configurable option: punctuation — characters treated as sentence-ending so an emphasized line that ends with one of these is not flagged (default includes: . , ; : ! ? and full-width equivalents). You can disable the rule or adjust punctuation in your markdownlint config. [3][2]

Sources:
[1] MD036 — markdown-lint / Up & Down Press documentation.
[2] Rule MD036 — PyMarkdown Linter docs.
[3] markdownlint default config / gist (shows MD036 punctuation setting and aliases).


Remove the emphasis from the metadata line.

Line 3 contains italicized text (*Author: Ian Chen, Last Update: 2026-01-01*) which triggers the MD036 rule (emphasis-as-heading) since it's a single-line paragraph consisting entirely of emphasized text. Instead of using a setext-style heading (which is meant for actual section headings, not metadata), simply remove the asterisks to display it as plain text: Author: Ian Chen, Last Update: 2026-01-01.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

3-3: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🤖 Prompt for AI Agents
In document/MOTIVATION.md around lines 3 to 3, the metadata line is wrapped in
asterisks causing it to be treated as emphasis (triggers MD036); remove the
leading and trailing asterisks so the line reads as plain text e.g. Author: Ian
Chen, Last Update: 2026-01-01 and save the file.

Comment on lines +8 to +17
- [Motivation](#motivation)
- [Zero Dependencies Philosophy](#zero-dependencies-philosophy)
- [Why SM-2 Algorithm](#why-sm-2-algorithm)
- [Custom Adaptations to SM-2](#custom-adaptations-to-sm-2)
- [Data Structures](#data-structures)
- [Indexing for Lookup](#indexing-for-lookup)
- [Trie for Text Search](#trie-for-text-search)
- [Heap for Top-K Problems](#heap-for-top-k-problems)
- [Stack for Undo](#stack-for-undo)
- [Closing Note](#closing-note)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix hard tabs and indentation depth in table of contents.

The TOC uses hard tabs and inconsistent indentation that violate markdown style rules (MD007, MD010). Markdown lists expect 2-space indentation per level, not tabs.

🔎 Proposed fix for TOC formatting
- [Motivation \& Design Notes](#motivation--design-notes)
-	- [Motivation](#motivation)
-		- [Zero Dependencies Philosophy](#zero-dependencies-philosophy)
-	- [Why SM-2 Algorithm](#why-sm-2-algorithm)
-		- [Custom Adaptations to SM-2](#custom-adaptations-to-sm-2)
-	- [Data Structures](#data-structures)
-		- [Indexing for Lookup](#indexing-for-lookup)
-		- [Trie for Text Search](#trie-for-text-search)
-		- [Heap for Top-K Problems](#heap-for-top-k-problems)
-		- [Stack for Undo](#stack-for-undo)
-	- [Closing Note](#closing-note)
+  - [Motivation](#motivation)
+    - [Zero Dependencies Philosophy](#zero-dependencies-philosophy)
+  - [Why SM-2 Algorithm](#why-sm-2-algorithm)
+    - [Custom Adaptations to SM-2](#custom-adaptations-to-sm-2)
+  - [Data Structures](#data-structures)
+    - [Indexing for Lookup](#indexing-for-lookup)
+    - [Trie for Text Search](#trie-for-text-search)
+    - [Heap for Top-K Problems](#heap-for-top-k-problems)
+    - [Stack for Undo](#stack-for-undo)
+  - [Closing Note](#closing-note)

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

8-8: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


8-8: Hard tabs
Column: 1

(MD010, no-hard-tabs)


9-9: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


9-9: Hard tabs
Column: 1

(MD010, no-hard-tabs)


10-10: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


10-10: Hard tabs
Column: 1

(MD010, no-hard-tabs)


11-11: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


11-11: Hard tabs
Column: 1

(MD010, no-hard-tabs)


12-12: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


12-12: Hard tabs
Column: 1

(MD010, no-hard-tabs)


13-13: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


13-13: Hard tabs
Column: 1

(MD010, no-hard-tabs)


14-14: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


14-14: Hard tabs
Column: 1

(MD010, no-hard-tabs)


15-15: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


15-15: Hard tabs
Column: 1

(MD010, no-hard-tabs)


16-16: Unordered list indentation
Expected: 4; Actual: 2

(MD007, ul-indent)


16-16: Hard tabs
Column: 1

(MD010, no-hard-tabs)


17-17: Unordered list indentation
Expected: 2; Actual: 1

(MD007, ul-indent)


17-17: Hard tabs
Column: 1

(MD010, no-hard-tabs)

🤖 Prompt for AI Agents
In document/MOTIVATION.md around lines 8 to 17, the table of contents uses hard
tabs and inconsistent indentation causing markdownlint violations (MD007,
MD010); replace every hard tab with two spaces per list level (use 2 spaces for
first-level bullets, 4 for nested level, etc.), normalize all list markers to
consistent hyphens or asterisks, remove any trailing spaces, and ensure
indentation depth matches each nesting level so the TOC conforms to Markdown
list style rules.

@eannchen eannchen merged commit ea2bd8b into main Jan 1, 2026
8 checks passed
@eannchen eannchen deleted the refactor/motivation-doc branch January 1, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant