Skip to content

docs: rewrite getting-started.md with current CLI and trailers info#44

Merged
TonyCasey merged 2 commits intomainfrom
git-64-docs-update
Feb 13, 2026
Merged

docs: rewrite getting-started.md with current CLI and trailers info#44
TonyCasey merged 2 commits intomainfrom
git-64-docs-update

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Feb 13, 2026

Summary

  • Full rewrite of docs/getting-started.md to match current codebase
  • Added Git Trailers subsection to "How it works" explaining AI-* trailer metadata
  • Fixed sessionStop config key in JSON example (was incorrectly Stop)
  • Reorganized sections: Quick Start → Claude hooks → How it works → MCP → CLI
  • Removed outdated init-mcp standalone docs and architecture diagrams

Test plan

  • Verify all CLI flags match src/cli.ts
  • Verify init behavior matches src/commands/init.ts
  • Verify JSON config example matches src/hooks/utils/config.ts

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Reworked Getting Started into a Quick Start focused on npm install, repo init, and Claude setup
    • Replaced CLI-centric detail with an init/remember/extract workflow and a "Not using Claude" path
    • Added Claude integration guidance and a concise hooks table (SessionStart, Stop, UserPromptSubmit)
    • Replaced diagrams with example-driven explanations for memory storage, context, and sync (push/pull)
    • Simplified command examples and environment variable guidance

- 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>
Copilot AI review requested due to automatic review settings February 13, 2026 13:42
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Getting 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

Cohort / File(s) Summary
Getting Started Guide Restructuring
docs/getting-started.md
Full replacement of CLI-focused content with a Quick Start flow; adds Claude integration and hook descriptions (SessionStart, Stop, UserPromptSubmit); provides a "Not using Claude" path with MCP tool guidance; reworks init/remember/extract narratives, context/sync sections, and environment variable guidance; removes many prior diagrams in favor of example-driven explanations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: a rewrite of the getting-started.md documentation with updates to CLI information and trailers info, which aligns with the substantial restructuring of that file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch git-64-docs-update

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: 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 sessionStop config key (was incorrectly documented as Stop)
  • Removed outdated architecture diagrams and standalone init-mcp documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

### Manual setup
Options:
- `-y, --yes` — Accept defaults without prompting
- `--commit-count <n>` — Number of commits to extract (default: 30)
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- `--commit-count <n>` — Number of commits to extract (default: 30)
- `--commit-count <n>` — Number of commits to extract (default: 100)

Copilot uses AI. Check for mistakes.

### Generate MCP config
Trailers are:
- **Natively queryable** — `git log --grep-reflog` or `git log --trailer`
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
- **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`)

Copilot uses AI. Check for mistakes.
Comment on lines +111 to +112
- `--hooks` — Install prepare-commit-msg git hook
- `--uninstall-hooks` — Remove the prepare-commit-msg git hook
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
- `--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

Copilot uses AI. Check for mistakes.
- 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>
@TonyCasey TonyCasey merged commit 84d257a into main Feb 13, 2026
2 of 3 checks passed
@TonyCasey TonyCasey deleted the git-64-docs-update branch February 13, 2026 13:50
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: 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.

Comment on lines +30 to 47
| 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 }
}
}
```
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

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.

TonyCasey added a commit that referenced this pull request Feb 13, 2026
)

* 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
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.

2 participants