-
Notifications
You must be signed in to change notification settings - Fork 0
docs: reposition messaging to lead with AI metadata (GIT-106) #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,13 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||||
|
|
||||||
| ## [Unreleased] | ||||||
|
|
||||||
| ### Changed | ||||||
|
|
||||||
| - **Documentation repositioning** — README and getting-started now lead with AI metadata tracking, memory as "level up" | ||||||
|
|
||||||
| ## [0.4.0] - 2026-02-15 | ||||||
|
|
||||||
| ### Added | ||||||
|
|
||||||
| - **Smart commit analysis** — commit-msg hook that automatically analyzes commit messages and adds AI-* trailers: | ||||||
| - Detects memory type (decision, gotcha, convention, fact) from heuristic patterns | ||||||
| - Infers tags from conventional commit scope and staged file paths | ||||||
| - **Intent extraction** — PromptSubmitHandler extracts keywords from prompts to surface relevant memories: | ||||||
| - `IIntentExtractor` interface and `IntentExtractor` service | ||||||
| - `loadWithQuery` method on `MemoryContextLoader` for targeted recall | ||||||
| - Configurable via `promptSubmit.extractIntent` in config | ||||||
| - **Commit message bodies** — memory context now includes full commit message bodies, not just subjects | ||||||
| - **YAML configuration** — `.git-mem.yaml` replaces `.git-mem.json`: | ||||||
|
||||||
| - **YAML configuration** — `.git-mem.yaml` replaces `.git-mem.json`: | |
| - **YAML configuration** — `.git-mem/.git-mem.yaml` replaces `.git-mem.json`: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ Uses **`node:test`** (native Node.js test runner) with **`tsx`** for TypeScript, | |
| - **`cwd` parameter**: Must be threaded through all service calls when operating on a repo that isn't the current working directory | ||
| - **Commit triage**: Weighted scoring based on conventional prefixes, decision keywords, diff size, PR merges | ||
| - **TypeScript config**: Relaxed strict mode for development (`strict: false` in tsconfig.json) | ||
| - **Hook config**: `.git-mem.json` at project root, loaded by `src/hooks/utils/config.ts`. Never throws — returns defaults on error | ||
| - **Hook config**: `.git-mem/.git-mem.yaml` loaded by `src/hooks/utils/config.ts`. Never throws — returns defaults on error | ||
| - **Hook stdin**: `src/hooks/utils/stdin.ts` reads JSON from stdin. Returns `{}` on TTY or parse error — hooks must never crash | ||
| - **EventBus error isolation**: Handler exceptions are caught and returned as failed `IEventResult[]` — one failing handler doesn't block others | ||
| - **Hook timeout**: 10s hard limit via `setupShutdown()` — hooks must never hang Claude Code | ||
|
|
@@ -91,6 +91,8 @@ Rules are automatically loaded as context. See `.claude/rules/`: | |
| - `code-quality-rules.md` - TypeScript/ESLint configuration, error prevention | ||
| - `git-rules.md` - Commit workflow, PR creation, memory milestones | ||
| - `testing-principles.md` - Testing pyramid, mocking strategies | ||
| - `memory-rules.md` - Handling session memory | ||
|
|
||
|
Comment on lines
91
to
+95
|
||
|
|
||
| ### TypeScript Rules | ||
| - `coding-standards.md` - Naming conventions, type safety, async patterns | ||
|
|
@@ -101,5 +103,13 @@ Rules are automatically loaded as context. See `.claude/rules/`: | |
| ## Git Workflow | ||
|
|
||
| - Branch per Linear issue, named with ticket number (e.g. `GIT-15`) | ||
| - Use the SKILL .claude/skills/github/SKILL.md for interacting with GitHub | ||
| - PR workflow use the skill .claude/skills/pr/SKILL.md | ||
| - Create the PR | ||
| - Wait for 120 seconds to allow for review from coderabbit | ||
| - Address comments directly inline to the comment | ||
| - if a fix is applied, mark the comment as resolved | ||
| - wait for another 120 seconds to allow for review from coderabbit | ||
| - repeat the steps until all comments are resolved | ||
|
Comment on lines
105
to
+113
|
||
| - PRs merge into `main` | ||
| - Clean up feature branches after merge | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,28 +1,27 @@ | ||||||
| # Git Mem | ||||||
| # git-mem | ||||||
|
|
||||||
| Your git history is the perfect context for AI. | ||||||
| It just needs to be extracted for agents.... | ||||||
| Track AI contributions in your git history. | ||||||
|
|
||||||
| ## Why? | ||||||
|
|
||||||
| Your git history already contains the decisions, conventions, and gotchas that matter — git-mem extracts them and makes them available to Claude automatically. | ||||||
| AI writes code now. Your commits should show when, which agent, and which model. | ||||||
|
|
||||||
| ## How? | ||||||
| git-mem adds AI metadata to every commit automatically — no workflow changes, no extra steps. | ||||||
|
|
||||||
| When initialized in your repo, git-mem reviews your last (n) commits and extracts knowledge automatically. | ||||||
| Each commit is updated with background AI metadata, which Claude can use to improve its understanding of your codebase. | ||||||
| ## How? | ||||||
|
|
||||||
| Every **new** commit is automatically populated with the folowing metadata.. | ||||||
| Every commit gets AI trailers: | ||||||
|
|
||||||
| - **AI-Agent:** Claude/Opus-4.5 | ||||||
| - **AI-Decision:** JWT over sessions — stateless API, scales horizontally | ||||||
| - **AI-Context:** [pattern/middleware, entity/auth-module] | ||||||
| - **AI-Confidence:** 0.95 | ||||||
| - **AI-Memory:** milestone/auth-implementation | ||||||
| ```text | ||||||
| feat: add user authentication | ||||||
|
|
||||||
| Going forward, AI knowledge will be embedded in each commit for future references | ||||||
| AI-Agent: claude-code | ||||||
| AI-Model: claude-sonnet-4-5-20250929 | ||||||
| AI-Decision: JWT over sessions — stateless API, scales horizontally | ||||||
| AI-Context: [pattern/middleware, entity/auth-module] | ||||||
|
||||||
| AI-Context: [pattern/middleware, entity/auth-module] | |
| AI-Tags: [pattern/middleware, entity/auth-module] |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,10 +2,6 @@ | |||||
|
|
||||||
| Requires Node.js >= 18 and git. | ||||||
|
|
||||||
| After install, two binaries are available: | ||||||
| - `git-mem` (also works as `git mem` — git subcommand) | ||||||
| - `git-mem-mcp` (MCP server for AI tools) | ||||||
|
|
||||||
| ## Quick Start | ||||||
|
|
||||||
| ```bash | ||||||
|
|
@@ -14,57 +10,35 @@ cd your-repo | |||||
| git-mem init | ||||||
| ``` | ||||||
|
|
||||||
| `init` walks you through setup: | ||||||
| 1. Creates `.claude/settings.json` with Claude Code hooks | ||||||
| 2. Creates `.git-mem.json` with hook configuration | ||||||
| 3. Creates `.mcp.json` for the MCP server | ||||||
| 4. Updates `.gitignore` | ||||||
| 5. Extracts knowledge from recent commits (if `ANTHROPIC_API_KEY` is set) | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Using Claude? | ||||||
| That's it. Every commit now includes AI metadata: | ||||||
|
|
||||||
| All of the processes happen automatically through Claude's hook events. | ||||||
|
|
||||||
| | 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) | | ||||||
| ```text | ||||||
| feat: add user authentication | ||||||
|
|
||||||
| Settings are stored in `.git-mem.json`: | ||||||
|
|
||||||
| ```json | ||||||
| { | ||||||
| "hooks": { | ||||||
| "enabled": true, | ||||||
| "sessionStart": { "enabled": true, "memoryLimit": 20 }, | ||||||
| "sessionStop": { "enabled": true, "autoExtract": true, "threshold": 3 }, | ||||||
| "promptSubmit": { "enabled": false, "recordPrompts": false, "surfaceContext": true } | ||||||
| } | ||||||
| } | ||||||
| AI-Agent: claude-code | ||||||
| AI-Model: claude-sonnet-4-5-20250929 | ||||||
| AI-Decision: JWT over sessions — stateless API, scales horizontally | ||||||
| AI-Context: [pattern/middleware, entity/auth-module] | ||||||
|
||||||
| AI-Context: [pattern/middleware, entity/auth-module] | |
| AI-Tags: pattern/middleware, entity/auth-module |
Copilot
AI
Feb 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs say init sets up only prepare-commit-msg and commit-msg, but init also installs a post-commit hook. Update this list to include post-commit (and briefly what it does) to match actual behavior.
| 1. **Git hooks** — `prepare-commit-msg` and `commit-msg` add AI trailers to every commit | |
| 1. **Git hooks** — `prepare-commit-msg`, `commit-msg`, and `post-commit` add and record AI trailers for every commit |
Copilot
AI
Feb 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: “Scans commit history, scores commits by interest, and extract …” should be “extracts …” (subject/verb agreement).
| Scans commit history, scores commits by interest, and extract decisions/gotchas/conventions as memories for AI context. | |
| Scans commit history, scores commits by interest, and extracts decisions/gotchas/conventions as memories for AI context. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| { | ||||||
| "name": "git-mem", | ||||||
| "version": "0.3.0", | ||||||
| "version": "0.4.0", | ||||||
|
||||||
| "version": "0.4.0", | |
| "version": "0.3.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR appears to ship 0.4.0 (version bump + 0.4.0 section), but “Documentation repositioning” is still listed under [Unreleased]. Move it into the 0.4.0 section (likely under “Changed”) or remove it from Unreleased to avoid double-counting.