-
Notifications
You must be signed in to change notification settings - Fork 0
docs: CHANGELOG, README, and CLAUDE.md for hooks release #29
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 | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||
| # Changelog | ||||||
|
|
||||||
| All notable changes to this project will be documented in this file. | ||||||
|
|
||||||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||||||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||||||
|
|
||||||
| ## [0.3.0] - 2026-02-12 | ||||||
|
|
||||||
| ### Added | ||||||
|
|
||||||
| - **Claude Code hooks integration** — three lifecycle hooks that give Claude persistent project memory: | ||||||
| - `session-start` — loads stored memories into Claude's context at session start | ||||||
| - `session-stop` — captures new memories from commits made during the session | ||||||
| - `prompt-submit` — surfaces relevant memories per prompt (disabled by default) | ||||||
| - **`git-mem init-hooks`** command — one-command setup for Claude Code hooks: | ||||||
|
||||||
| - **`git-mem init-hooks`** command — one-command setup for Claude Code hooks: | |
| - **`git-mem init`** command — one-command setup for Claude Code hooks: |
Copilot
AI
Feb 12, 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.
This entry describes a user-facing git-mem init-hooks command, but the current CLI only registers git-mem init (and uses init-hooks internally). If init-hooks is not meant to be a public command anymore, the changelog should reflect the actual UX (e.g., “git-mem init sets up Claude hooks …”).
Copilot
AI
Feb 14, 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.
Should reference ExtractService not LiberateService. The SessionCaptureService delegates to ExtractService (see src/application/services/SessionCaptureService.ts line 28 which injects IExtractService, and line 41 which calls extractService.extract()). There is no LiberateService in the current codebase.
| - `SessionCaptureService` — scans recent commits via `LiberateService`, extracts memories | |
| - `SessionCaptureService` — scans recent commits via `ExtractService`, extracts memories |
Copilot
AI
Feb 14, 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.
The tool name should be extract not liberate. The MCP server registers four tools: remember, recall, context, and extract (as seen in src/mcp/server.ts lines 19-22). There is no liberate tool in the current implementation.
| - MCP server (`git-mem-mcp`) with 4 tools: remember, recall, context, liberate | |
| - MCP server (`git-mem-mcp`) with 4 tools: remember, recall, context, extract |
Copilot
AI
Feb 14, 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.
The command name should be git-mem init not git-mem init-mcp. The CLI only exposes a unified init command that handles both hooks and MCP configuration. There is no separate init-mcp command (the init-mcp.ts file exists as a utility module but is not exposed as a separate command).
| - `git-mem init-mcp` command for MCP server configuration | |
| - `git-mem init` command for MCP server configuration |
Copilot
AI
Feb 14, 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.
The command name should be extract not liberate. Looking at src/cli.ts, the commands are: init, remember, recall, extract, context, sync, trailers, and hook. There is no liberate command in the CLI.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,32 +32,36 @@ Clean architecture with three layers. Dependencies point inward only: Infrastruc | |||||
|
|
||||||
| **Domain** (`src/domain/`) — Zero dependencies. Entities (`IMemoryEntity`), interfaces (`IMemoryRepository`, `INotesService`, `ITrailerService`, `IGitClient`), types (quality, lifecycle), errors (`GitMemError` hierarchy), and pure utils (deduplication). | ||||||
|
|
||||||
| **Application** (`src/application/`) — Depends on domain only. Three services: `MemoryService` (remember/recall CRUD), `ExtractService` (scan git history, score commits, extract patterns), `ContextService` (match staged changes against stored memories). | ||||||
| **Application** (`src/application/`) — Depends on domain only. Core services: `MemoryService` (remember/recall CRUD), `ExtractService` (scan git history, score commits, extract patterns), `ContextService` (match staged changes against stored memories). Hook services: `MemoryContextLoader` (loads memories with limits), `ContextFormatter` (formats memories as markdown), `SessionCaptureService` (24h rolling commit scan via ExtractService). Three event handlers: `SessionStartHandler`, `SessionStopHandler`, `PromptSubmitHandler`. | ||||||
|
|
||||||
| **Infrastructure** (`src/infrastructure/`) — Implements domain interfaces. `GitClient` wraps git CLI. `NotesService` reads/writes `refs/notes/mem`. `TrailerService` queries commit trailers. `MemoryRepository` persists `IMemoryEntity[]` as JSON in git notes. `HeuristicPatterns` provides regex-based extraction rules. | ||||||
| **Infrastructure** (`src/infrastructure/`) — Implements domain interfaces. `GitClient` wraps git CLI. `NotesService` reads/writes `refs/notes/mem`. `TrailerService` queries commit trailers. `MemoryRepository` persists `IMemoryEntity[]` as JSON in git notes. `HeuristicPatterns` provides regex-based extraction rules. `EventBus` provides pub/sub event dispatch with error isolation (failing handlers don't crash the hook). | ||||||
|
|
||||||
| **Entry points:** | ||||||
| - `src/cli.ts` — Commander.js CLI with 6 commands (remember, recall, context, extract, sync, init) | ||||||
|
||||||
| - `src/cli.ts` — Commander.js CLI with 6 commands (remember, recall, context, extract, sync, init) | |
| - `src/cli.ts` — Commander.js CLI with 8 commands (init, remember, recall, context, extract, sync, trailers, hook) |
Copilot
AI
Feb 12, 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.
Hook failures are not “reported silently”: hookCommand writes summaries and errors to stderr (e.g., git-mem: hook failed.) even though it exits 0. Consider rewording this to reflect that hooks don’t disrupt Claude Code (exit 0 / don’t throw past the entry point), but do emit stderr diagnostics.
| **Hook event flow:** `git-mem hook <event>` → `readStdin()` → `loadHookConfig()` → `createContainer()` → `eventBus.emit(typedEvent)` → handlers return `IEventResult[]` → output to stdout (context), summary to stderr. Hooks have a 10s hard timeout and never throw — failures are caught and reported silently. | |
| **Hook event flow:** `git-mem hook <event>` → `readStdin()` → `loadHookConfig()` → `createContainer()` → `eventBus.emit(typedEvent)` → handlers return `IEventResult[]` → output to stdout (context), summary to stderr. Hooks have a 10s hard timeout and never throw past the entry point — failures are caught so they don't disrupt Claude Code (exit 0), but summaries and errors are reported via stderr (for example, `git-mem: hook failed.`). |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,11 +1,11 @@ | ||||||||||||||||||||||||||||||||
| # Git Mem | ||||||||||||||||||||||||||||||||
| # git-mem | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Your git history is the perfect context for AI. | ||||||||||||||||||||||||||||||||
| It just needs to be extracted for agents.... | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Why? | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Your git history already contains the decisions, conventions, and gotchas that matter — git-mem extracts them and makes them available to Claude automatically. | ||||||||||||||||||||||||||||||||
| Your git history already contains the decisions, conventions, and gotchas that matter — git-mem extracts them and makes them available to Claude automatically. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## How? | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
@@ -14,7 +14,7 @@ Each commit is updated with background AI metadata, which Claude can use to impr | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Every **new** commit is automatically populated with the folowing metadata.. | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| Every **new** commit is automatically populated with the folowing metadata.. | |
| Every **new** commit is automatically populated with the following metadata.. |
Copilot
AI
Feb 12, 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.
The Quick Start recall example uses git-mem recall --query "...", but the CLI takes the search string as an optional positional argument (git-mem recall [query]) and does not define a --query flag. Update the example to pass the query as the argument (or add a --query option in the CLI if that’s the intended UX).
| git-mem recall --query "authentication" | |
| git-mem recall "authentication" |
Copilot
AI
Feb 12, 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.
The config table keys are inconsistent with the JSON structure shown above. Options like sessionStart.enabled / sessionStop.threshold are nested under hooks in .git-mem.json, so the documented paths should be hooks.sessionStart.enabled, hooks.sessionStop.threshold, etc. (Also promptSubmit.recordPrompts exists in the JSON but isn’t listed in the table.)
| | `sessionStart.enabled` | `true` | Load memories on session start | | |
| | `sessionStart.memoryLimit` | `20` | Max memories to load | | |
| | `sessionStop.enabled` | `true` | Capture memories on session end | | |
| | `sessionStop.autoLiberate` | `true` | Auto-scan commits for memories | | |
| | `sessionStop.threshold` | `3` | Minimum commit triage score | | |
| | `promptSubmit.enabled` | `false` | Surface context per prompt | | |
| | `promptSubmit.surfaceContext` | `true` | Include memories in prompt context | | |
| | `hooks.sessionStart.enabled` | `true` | Load memories on session start | | |
| | `hooks.sessionStart.memoryLimit` | `20` | Max memories to load | | |
| | `hooks.sessionStop.enabled` | `true` | Capture memories on session end | | |
| | `hooks.sessionStop.autoLiberate` | `true` | Auto-scan commits for memories | | |
| | `hooks.sessionStop.threshold` | `3` | Minimum commit triage score | | |
| | `hooks.promptSubmit.enabled` | `false` | Surface context per prompt | | |
| | `hooks.promptSubmit.recordPrompts` | `false` | Record user prompts as memories | | |
| | `hooks.promptSubmit.surfaceContext` | `true` | Include memories in prompt context | |
Copilot
AI
Feb 12, 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.
git-mem init-mcp is referenced here, but the CLI does not currently expose an init-mcp command (only init is registered in src/cli.ts). Update the docs to reflect how MCP configuration is actually generated (e.g., via git-mem init, or re-add init-mcp as a CLI command).
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.
The changelog introduces a
0.3.0release entry, butpackage.jsonis currently version0.2.1. Either bump the package version as part of this release documentation, or adjust the changelog entry/versioning so the repository stays consistent.