docs: rewrite getting-started.md with current CLI and trailers info#44
docs: rewrite getting-started.md with current CLI and trailers info#44
Conversation
- Full rewrite to match current codebase (8 CLI commands, unified init) - Add Claude Code hooks section with .git-mem.json config example - Add Git Trailers subsection to "How it works" (AI-* trailer details) - Fix sessionStop config key in JSON example - Remove outdated init-mcp standalone section and architecture diagrams - Reorganize: Quick Start → Claude hooks → How it works → MCP → CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughGetting Started is rewritten from CLI-centric docs into a Quick Start focused guide: npm install, repo init, and Claude integration. Content reorganized into Quick Start, Using Claude, Not using Claude, init/remember/extract, context, and sync with streamlined examples and reduced diagramming. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@docs/getting-started.md`:
- Around line 56-58: The fenced code blocks in docs/getting-started.md that
display git notes and trailers are missing a language tag and must be marked
(e.g., text) to satisfy MD040; update the two fenced blocks (the block showing
"refs/notes/mem ..." and the block with the
AI-Decision/AI-Confidence/AI-Memory-Id/AI-Tags trailers) to use ```text instead
of ``` so both code fences include the language identifier (also apply the same
change to the similar block around lines 70-75).
- Around line 24-26: The markdown headings like "## Using Claude?" are not
surrounded by blank lines and fail markdownlint MD022; update the document to
add a blank line before and after each level-2 heading (e.g., the "## Using
Claude?" heading and the other headings around the same sections) so every
heading is separated by an empty line above and below to satisfy MD022 and
similar markdownlint rules.
- Around line 101-178: Docs mismatch: the init command's --commit-count default
is listed as 30 but the code (init command and CLI setup in src/cli.ts and
src/commands/init.ts) defaults to 100, and the remember command supports an
undocumented --no-trailers flag (defined in src/cli.ts) that suppresses writing
AI-* trailers. Update the getting-started.md init section to show --commit-count
default as 100 (or change the implementation if you prefer 30) and add the
--no-trailers option to the remember command options with a short description
("Skip writing AI-* trailers to the commit message"), including its CLI aliases
if present.
There was a problem hiding this comment.
Pull request overview
This PR completely rewrites the getting-started documentation to reflect the current state of the codebase. The rewrite adds comprehensive coverage of Git Trailers (a dual-write storage mechanism alongside Git Notes), fixes configuration key errors, and reorganizes content into a more logical flow: Quick Start → Claude integration → Architecture → MCP/CLI alternatives.
Changes:
- Restructured documentation with clearer section hierarchy and user-journey focus
- Added Git Trailers subsection explaining AI-* trailer metadata and native git queryability
- Fixed
sessionStopconfig key (was incorrectly documented asStop) - Removed outdated architecture diagrams and standalone init-mcp documentation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
docs/getting-started.md
Outdated
| ### Manual setup | ||
| Options: | ||
| - `-y, --yes` — Accept defaults without prompting | ||
| - `--commit-count <n>` — Number of commits to extract (default: 30) |
There was a problem hiding this comment.
The default commit count is incorrect. According to src/cli.ts line 29, the default for --commit-count in the init command is 100, not 30. This should be updated to match the actual implementation.
| - `--commit-count <n>` — Number of commits to extract (default: 30) | |
| - `--commit-count <n>` — Number of commits to extract (default: 100) |
|
|
||
| ### Generate MCP config | ||
| Trailers are: | ||
| - **Natively queryable** — `git log --grep-reflog` or `git log --trailer` |
There was a problem hiding this comment.
The git command --grep-reflog is incorrect for querying trailers. The correct git commands for working with trailers are: git log --grep=<pattern> to search commit messages, or git log --trailer=<key> to filter by trailer keys. Additionally, git-mem provides a dedicated git mem trailers command for inspecting AI-* trailers (see src/cli.ts lines 80-87).
| - **Natively queryable** — `git log --grep-reflog` or `git log --trailer` | |
| - **Natively queryable** — `git log --grep="AI-Decision"` or `git log --trailer=AI-Decision` (or use `git mem trailers`) |
| - `--hooks` — Install prepare-commit-msg git hook | ||
| - `--uninstall-hooks` — Remove the prepare-commit-msg git hook |
There was a problem hiding this comment.
The --hooks flag description is incomplete. According to src/cli.ts line 30 and src/commands/init.ts lines 189-196, this flag installs the prepare-commit-msg git hook for AI-Agent trailers. The description should clarify what specific git hook is being installed and its purpose.
| - `--hooks` — Install prepare-commit-msg git hook | |
| - `--uninstall-hooks` — Remove the prepare-commit-msg git hook | |
| - `--hooks` — Install a `prepare-commit-msg` git hook to automatically add AI-Agent trailers to commit messages | |
| - `--uninstall-hooks` — Remove the `prepare-commit-msg` git hook |
- Add blank lines around headings (MD022) - Add text language tag to fenced code blocks (MD040) - Document --no-trailers flag on remember command - Fix init --commit-count default to 100 (matches src/cli.ts) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@docs/getting-started.md`:
- Around line 30-47: The hook names in the docs table (SessionStart, Stop,
UserPromptSubmit) do not match the actual config keys in .git-mem.json
(sessionStart, sessionStop, promptSubmit); update the table entries to use the
exact config key names (sessionStart, sessionStop, promptSubmit) or add a brief
parenthetical mapping next to each table name (e.g., "SessionStart
(sessionStart)") so readers can directly correlate the table to the JSON keys;
ensure you reference the same keys used in the sample `.git-mem.json` section to
keep them consistent.
| | Hook | What it does | | ||
| |------|-------------| | ||
| | **SessionStart** | Loads stored memories into Claude's context on startup | | ||
| | **Stop** | Extracts knowledge from commits made during the session | | ||
| | **UserPromptSubmit** | Surfaces relevant memories per prompt (disabled by default) | | ||
|
|
||
| ### Extract knowledge from history | ||
| Settings are stored in `.git-mem.json`: | ||
|
|
||
| ```bash | ||
| git mem extract --since 2024-01-01 --dry-run | ||
| git mem extract --threshold 5 --commit-count 100 | ||
| git mem extract --enrich --dry-run --commit-count 10 | ||
| ```json | ||
| { | ||
| "hooks": { | ||
| "enabled": true, | ||
| "sessionStart": { "enabled": true, "memoryLimit": 20 }, | ||
| "sessionStop": { "enabled": true, "autoExtract": true, "threshold": 3 }, | ||
| "promptSubmit": { "enabled": false, "recordPrompts": false, "surfaceContext": true } | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Hook names in table don't match config keys.
The hook names in the table (lines 30-34) are inconsistent with the JSON config keys (lines 42-44):
- Table: SessionStart → Config:
sessionStart - Table: Stop → Config:
sessionStop❌ - Table: UserPromptSubmit → Config:
promptSubmit❌
For clarity, use the exact config key names in the table, or add a note explaining the mapping.
📝 Proposed fix to align names
| Hook | What it does |
|------|-------------|
-| **SessionStart** | Loads stored memories into Claude's context on startup |
-| **Stop** | Extracts knowledge from commits made during the session |
-| **UserPromptSubmit** | Surfaces relevant memories per prompt (disabled by default) |
+| **sessionStart** | Loads stored memories into Claude's context on startup |
+| **sessionStop** | Extracts knowledge from commits made during the session |
+| **promptSubmit** | Surfaces relevant memories per prompt (disabled by default) |🤖 Prompt for AI Agents
In `@docs/getting-started.md` around lines 30 - 47, The hook names in the docs
table (SessionStart, Stop, UserPromptSubmit) do not match the actual config keys
in .git-mem.json (sessionStart, sessionStop, promptSubmit); update the table
entries to use the exact config key names (sessionStart, sessionStop,
promptSubmit) or add a brief parenthetical mapping next to each table name
(e.g., "SessionStart (sessionStart)") so readers can directly correlate the
table to the JSON keys; ensure you reference the same keys used in the sample
`.git-mem.json` section to keep them consistent.
) * docs: rewrite getting-started.md with current CLI and trailers info - Full rewrite to match current codebase (8 CLI commands, unified init) - Add Claude Code hooks section with .git-mem.json config example - Add Git Trailers subsection to "How it works" (AI-* trailer details) - Fix sessionStop config key in JSON example - Remove outdated init-mcp standalone section and architecture diagrams - Reorganize: Quick Start → Claude hooks → How it works → MCP → CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: address review - markdown lint, --no-trailers flag, init default - Add blank lines around headings (MD022) - Add text language tag to fenced code blocks (MD040) - Document --no-trailers flag on remember command - Fix init --commit-count default to 100 (matches src/cli.ts) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> AI-Fact: Changed initial commit count AI-Confidence: high AI-Memory-Id: a0b9475f-6014-477e-ad81-584f7c72fd61
Summary
docs/getting-started.mdto match current codebasesessionStopconfig key in JSON example (was incorrectlyStop)init-mcpstandalone docs and architecture diagramsTest plan
src/cli.tssrc/commands/init.tssrc/hooks/utils/config.ts🤖 Generated with Claude Code
Summary by CodeRabbit