Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
179f6da
feat(hooks): add hook enhancement v2 spec and memory-assistant skill
zircote Dec 19, 2025
fba7510
feat(hooks): implement PostToolUse and PreCompact hooks with code rev…
zircote Dec 19, 2025
cd709f3
test: add E2E functional tests for commands and hooks
zircote Dec 19, 2025
3ad7651
fix(tests): resolve flaky tests from SQLite connection cleanup
zircote Dec 19, 2025
9a6ba56
fix(plugin): make hooks and commands self-contained for cross-project…
zircote Dec 19, 2025
780e86a
feat(commands): add /memory:validate diagnostic command
zircote Dec 19, 2025
0ce2502
feat(hooks): add visual indicators and fix validate cleanup
zircote Dec 19, 2025
1ae92c0
feat(index): implement per-project database isolation
zircote Dec 19, 2025
427c936
refactor(guidance): externalize templates to XML files
zircote Dec 19, 2025
e6b08e3
feat(guidance): restructure templates for behavioral prompting
zircote Dec 19, 2025
7ada7ca
fix(hooks): use explicit venv python path for hook execution
zircote Dec 19, 2025
0abcf23
chore(spec): complete hook-enhancement-v2 and move to completed
zircote Dec 19, 2025
eea02ba
refactor(guidance): restructure templates as mandatory behavioral rules
zircote Dec 20, 2025
d7b76b3
refactor(hooks): extract shared utilities and add security validation
zircote Dec 20, 2025
da79eff
refactor(templates): convert guidance templates from XML to Markdown
zircote Dec 20, 2025
7178cd1
chore: bump version to 0.3.0
zircote Dec 20, 2025
9c373e2
chore: remove duplicate marketplace.json from root
zircote Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"name": "memory-capture",
"description": "Git-backed memory system for Claude Code. Captures decisions, learnings, and context as git notes with semantic search and automatic recall.",
"version": "0.1.0",
"version": "0.3.0",
"author": {
"name": "Robert Allen",
"email": "zircote@gmail.com"
Expand Down
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@
# Override XDG data home (affects default data directory)
# Default: ~/.local/share
# XDG_DATA_HOME=~/.local/share
#
# =============================================================================
# HuggingFace tokenizer parallelism warnings (System)
# =============================================================================
# TOKENIZERS_PARALLELISM=false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ dmypy.json
.cs-session-state.json
.prompt-log.json
.prompt-log-enabled

# Memory plugin local index
.memory/
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.0] - 2025-12-19

### Added

#### Claude Code Hooks Integration
Expand Down Expand Up @@ -150,5 +152,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Developer Guide with full API reference
- README with quick start

[unreleased]: https://github.com/zircote/git-notes-memory/compare/v0.1.0...HEAD
[unreleased]: https://github.com/zircote/git-notes-memory/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/zircote/git-notes-memory/compare/v0.1.0...v0.3.0
[0.1.0]: https://github.com/zircote/git-notes-memory/releases/tag/v0.1.0
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ When used as a Claude Code plugin, the following slash commands are available:

The plugin includes hooks that integrate with Claude Code's hook system for automatic memory context:

- **SessionStart**: Injects relevant project memories at session start
- **UserPromptSubmit**: Detects capture-worthy content in user prompts (opt-in)
- **Stop**: Prompts for uncaptured content and syncs the search index
| Hook | Description |
|------|-------------|
| **SessionStart** | Injects relevant project memories and response guidance at session start |
| **UserPromptSubmit** | Detects capture markers like `[remember]` and `@memory` in prompts |
| **PostToolUse** | Surfaces related memories after file operations (Read/Write/Edit) |
| **PreCompact** | Auto-captures high-confidence content before context compaction |
| **Stop** | Prompts for uncaptured content and syncs the search index |

See [User Guide](docs/USER_GUIDE.md#hooks-integration) for configuration options.

Expand Down Expand Up @@ -114,6 +118,8 @@ Environment variables (see `.env.example` for all options):
| `HOOK_ENABLED` | Master switch for hooks | `true` |
| `HOOK_SESSION_START_ENABLED` | Enable SessionStart context injection | `true` |
| `HOOK_USER_PROMPT_ENABLED` | Enable signal detection in prompts | `false` |
| `HOOK_POST_TOOL_USE_ENABLED` | Enable file-contextual memory injection | `true` |
| `HOOK_PRE_COMPACT_ENABLED` | Enable auto-capture before compaction | `true` |
| `HOOK_STOP_ENABLED` | Enable Stop hook processing | `true` |
| `HOOK_DEBUG` | Enable debug logging to stderr | `false` |

Expand Down
3 changes: 2 additions & 1 deletion commands/capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ If `$ARGUMENTS` is empty or very short (< 10 characters):
Use Bash to invoke the Python library:

```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_capture_service

capture = get_capture_service()
Expand Down
3 changes: 2 additions & 1 deletion commands/recall.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ If query is empty:
Use Bash to invoke the Python library:

```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_recall_service

recall = get_recall_service()
Expand Down
6 changes: 4 additions & 2 deletions commands/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Use Bash to invoke the Python library:

**Semantic Search** (default - vector similarity):
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_recall_service

recall = get_recall_service()
Expand All @@ -58,7 +59,8 @@ else:

**Text Search** (keyword/FTS matching):
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_recall_service

recall = get_recall_service()
Expand Down
8 changes: 5 additions & 3 deletions commands/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Check if `--verbose` flag is present.

**Basic Status**:
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_sync_service
from git_notes_memory.index import IndexService
from git_notes_memory.config import get_embedding_model, get_index_path, get_data_path
Expand Down Expand Up @@ -61,11 +62,12 @@ print(f'| Data Directory | {get_data_path()} |')

**Verbose Status**:
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
import subprocess
from git_notes_memory import get_sync_service
from git_notes_memory.index import IndexService
from git_notes_memory.config import get_embedding_model, get_index_path, get_data_path, NAMESPACES
import subprocess

sync = get_sync_service()
index_path = get_index_path()
Expand Down
19 changes: 12 additions & 7 deletions commands/sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ Use Bash to invoke the Python library based on mode:

**Incremental Sync** (default):
```bash
uv run python3 -c "
from git_notes_memory import get_sync_service
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
import time
from git_notes_memory import get_sync_service

sync = get_sync_service()
start = time.time()
Expand All @@ -45,9 +46,10 @@ print(f'| Duration | {duration:.2f}s |')

**Full Reindex**:
```bash
uv run python3 -c "
from git_notes_memory import get_sync_service
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
import time
from git_notes_memory import get_sync_service

sync = get_sync_service()
start = time.time()
Expand All @@ -64,7 +66,8 @@ print(f'| Duration | {duration:.2f}s |')

**Verify Consistency**:
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_sync_service

sync = get_sync_service()
Expand All @@ -87,7 +90,8 @@ else:

**Repair**:
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_sync_service

sync = get_sync_service()
Expand All @@ -113,7 +117,8 @@ else:

If `--dry-run` is specified, show what would happen without making changes:
```bash
uv run python3 -c "
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(ls -d ~/.claude/plugins/cache/git-notes-memory/memory-capture/*/ 2>/dev/null | head -1)}"
uv run --directory "$PLUGIN_ROOT" python3 -c "
from git_notes_memory import get_sync_service

sync = get_sync_service()
Expand Down
Loading
Loading