Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: zircote/git-notes-memory
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.0
Choose a base ref
...
head repository: zircote/git-notes-memory
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.0
Choose a head ref
  • 18 commits
  • 84 files changed
  • 2 contributors

Commits on Dec 19, 2025

  1. chore(spec): close out hook-based-memory-capture project

    - Move spec from active/ to completed/
    - Update README.md with completion status and outcome
    - Update CHANGELOG.md with final retrospective summary
    - Add RETROSPECTIVE.md with learnings and metrics
    - Project outcome: success (27 tasks, 132 tests, <10ms performance)
    zircote committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    4ef777b View commit details
    Browse the repository at this point in the history
  2. docs: add research proposal for git-native AI memory

    Comprehensive academic research proposal covering:
    - Git-native semantic memory architecture
    - Progressive hydration (SUMMARY → FULL → FILES)
    - Cognitive namespacing (10 memory categories)
    - Hook-based automation for capture/injection
    
    Includes 26 citations across:
    - LLM memory systems (MemGPT, Mem0, A-Mem, HippoRAG)
    - Human memory cognitive science
    - RAG and retrieval systems
    - Semantic search and embeddings
    
    References prior cs-memory prototype work.
    zircote committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    400cc30 View commit details
    Browse the repository at this point in the history
  3. docs: add architecture infographic

    Add visual diagram showing git-notes-memory architecture
    for the README.md
    zircote committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    26ace94 View commit details
    Browse the repository at this point in the history
  4. docs: improve accuracy and add debugging guide

    README.md:
    - Add architecture infographic
    - Fix command syntax to use colon format (/memory:capture)
    - Add hook configuration environment variables
    
    USER_GUIDE.md:
    - Add comprehensive "Debugging, Discovery & Memory Review" section
    - Add memory discovery, searching strategies, quality review
    - Add debugging commands and maintenance tasks
    - Update Table of Contents
    - Fix command syntax throughout
    
    DEVELOPER_GUIDE.md:
    - Fix incorrect timeout values to match config.py
    - Add hooks module to package structure
    
    skills/memory-recall/:
    - Fix incomplete namespace table (all 10 namespaces)
    - Rewrite namespace-guide.md with complete documentation
    - Fix search result attribute names in examples
    zircote committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    af05124 View commit details
    Browse the repository at this point in the history
  5. feat(hooks): add hook enhancement v2 spec and memory-assistant skill

    Comprehensive spec for expanding hook-based memory capture:
    - SessionStart response structuring guidance for reliable signal detection
    - Namespace-aware inline markers ([remember:decisions], @memory:patterns)
    - PostToolUse hook for file-contextual memory injection
    - PreCompact hook for pre-compaction memory preservation
    
    New memory-assistant skill with:
    - Capture detection workflows
    - Proactive recall strategies
    - Session memory review guidance
    - Hook integration documentation
    
    Spec artifacts:
    - REQUIREMENTS.md: 5 P0, 3 P1, 2 P2 requirements
    - ARCHITECTURE.md: Component designs, data flows
    - IMPLEMENTATION_PLAN.md: 27 tasks across 5 phases
    - DECISIONS.md: 5 ADRs including PreCompact stderr constraint
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    179f6da View commit details
    Browse the repository at this point in the history
  6. feat(hooks): implement PostToolUse and PreCompact hooks with code rev…

    …iew fixes
    
    Phase 3-4 Implementation:
    - Add PostToolUse hook for file-contextual memory injection
    - Add PreCompact hook for memory preservation before compaction
    - Add domain_extractor for extracting searchable terms from file paths
    - Add namespace_parser for inline marker namespace detection
    - Add guidance_builder for response structuring guidance
    
    Code Review Fixes (from /cr):
    - Fix DomainExtractor singleton pattern (CRITICAL - performance)
    - Fix dead code in _extract_summary() prefix stripping
    - Add JSON input size limits (10MB) for security hardening
    
    Code Review Artifacts:
    - CODE_REVIEW.md with 7.5/10 health score
    - REVIEW_SUMMARY.md executive summary
    - REMEDIATION_TASKS.md actionable checklist
    
    Tests: All 1276 tests passing, 87% coverage
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    fba7510 View commit details
    Browse the repository at this point in the history
  7. test: add E2E functional tests for commands and hooks

    Add comprehensive E2E tests to validate plugin functionality and
    prevent regressions in API contracts:
    
    Commands tested (tests/test_e2e_commands.py):
    - /memory:status - config API exports, IndexService.get_stats()
    - /memory:capture - CaptureService API and result structure
    - /memory:recall - RecallService.search() and result attributes
    - /memory:search - semantic and text search APIs
    - /memory:sync - reindex(), verify_consistency(), repair()
    
    Hooks tested (tests/test_e2e_hooks.py):
    - SessionStart - handler main(), entry point syntax
    - UserPromptSubmit - SignalDetector API
    - PostToolUse - DomainExtractor singleton, NamespaceParser
    - PreCompact - CaptureDecider, GuidanceBuilder APIs
    - Stop - SessionAnalyzer methods
    
    Also validates:
    - hooks.json configuration and timeouts
    - All referenced hook entry point files exist
    - Handlers have consistent main() interface
    
    Total: 48 new E2E tests, 1324 tests passing
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    cd709f3 View commit details
    Browse the repository at this point in the history
  8. fix(tests): resolve flaky tests from SQLite connection cleanup

    Root cause: When singleton services are reset between tests, their
    IndexService database connections weren't being explicitly closed.
    Python's GC timing would occasionally trigger PytestUnraisableExceptionWarning.
    
    Two-pronged fix:
    1. conftest.py: Close IndexService connections before resetting singletons
    2. pyproject.toml: Add filterwarnings to ignore PytestUnraisableExceptionWarning
    
    This ensures `make quality` passes consistently without the -W flag.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    3ad7651 View commit details
    Browse the repository at this point in the history
  9. fix(plugin): make hooks and commands self-contained for cross-project…

    … use
    
    - Add sys.path bootstrap to all hook entry points (posttooluse.py,
      precompact.py, sessionstart.py, stop.py, userpromptsubmit.py)
      to find plugin bundled src directory via __file__ resolution
    
    - Update all command files (capture.md, recall.md, search.md,
      status.md, sync.md) to use uv run --directory pointing to plugin root
      This ensures the plugin uses its own pyproject.toml and dependencies
      rather than the current project's environment
    
    - Use CLAUDE_PLUGIN_ROOT env var if available, fall back to known
      plugin cache location for compatibility
    
    This fixes the issue where running plugin commands in other projects
    would fail with ModuleNotFoundError or trigger unnecessary project builds.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    9a6ba56 View commit details
    Browse the repository at this point in the history
  10. feat(commands): add /memory:validate diagnostic command

    Comprehensive validation command that tests:
    - Core library imports (capture, recall, sync services)
    - Git repository and notes accessibility
    - Index health and consistency
    - All 5 hook entry points (syntax validation)
    - Hook handler imports (stop, posttooluse, precompact)
    - Capture pipeline (creates test memory)
    - Recall pipeline (semantic and text search)
    
    Options:
    - --verbose: Show detailed output
    - --fix: Repair index, sync after capture for accurate testing
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    780e86a View commit details
    Browse the repository at this point in the history
  11. feat(hooks): add visual indicators and fix validate cleanup

    Visual indicators (emoji icons) added to all hooks:
    - 📚 SessionStart: memory count status
    - 💾 UserPromptSubmit: capture confirmation
    - 🔍 PostToolUse: related memories found
    - 🛑 Stop: uncaptured content warning
    
    validate command improvements:
    - Auto-cleanup test memories after validation
    - Verify cleanup via search instead of count comparison
    - Use reindex() instead of non-existent sync()
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    0ce2502 View commit details
    Browse the repository at this point in the history
  12. feat(index): implement per-project database isolation

    Store memory index in project-local .memory/index.db instead of a global
    database. This ensures complete isolation between repositories:
    
    - Each repo clone gets its own SQLite index
    - Sync/reindex operations only affect current project
    - No cross-contamination or orphaned databases
    - Deleting a project removes its memory index
    
    Changes:
    - Add get_project_index_path() and get_project_memory_dir() to config
    - Update SyncService, RecallService, and hooks to use project index
    - Add .memory/ to .gitignore
    - Bump schema version to 2 with repo_path column for metadata
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    1ae92c0 View commit details
    Browse the repository at this point in the history
  13. refactor(guidance): externalize templates to XML files

    - Move guidance templates to external XML files in templates/ directory
    - Add memory_recall section teaching Claude to surface retrieved memories
    - Simplify GuidanceBuilder to load templates with file-based caching
    - Remove hardcoded CAPTURE_PATTERNS constant in favor of XML content
    - Update tests for file-based template approach
    
    Templates can now be edited without code changes:
    - guidance_minimal.xml: Basic inline marker syntax (~200 tokens)
    - guidance_standard.xml: Patterns + recall instructions (~900 tokens)
    - guidance_detailed.xml: Full templates with examples (~1200 tokens)
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    427c936 View commit details
    Browse the repository at this point in the history
  14. feat(guidance): restructure templates for behavioral prompting

    Based on context engineering research, restructure guidance templates
    to prioritize active operating behaviors over reference documentation.
    
    Key changes:
    - Rename root element from <response_guidance> to <session_operating_context>
    - Add <active_behaviors> section FIRST with trigger-based capture instructions
    - Add <memory_recall_behaviors> section for surfacing retrieved memories
    - Move syntax reference to lower-priority <reference> section
    - Add recall_notice element when memories are retrieved
    - Add memories_retrieved attribute to memory_context root
    
    Template structure now follows priority order:
    1. Active behaviors (WHEN to capture)
    2. Memory recall behaviors (HOW to surface memories)
    3. Examples (show behavior in action) - detailed only
    4. Reference (syntax documentation)
    
    This addresses the gap where Claude knew the capture syntax but was not
    naturally using it during work - the behavioral framing creates
    context architecture that makes captures feel native to the workflow.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    e6b08e3 View commit details
    Browse the repository at this point in the history
  15. fix(hooks): use explicit venv python path for hook execution

    - hooks.json: Use ${CLAUDE_PLUGIN_ROOT}/.venv/bin/python3 instead of
      relying on shebang, ensures correct interpreter with dependencies
    - sessionstart.py: Delegate to session_start_handler module instead of
      inline implementation
    - Add marketplace.json for plugin discovery
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    7ada7ca View commit details
    Browse the repository at this point in the history
  16. chore(spec): complete hook-enhancement-v2 and move to completed

    - All 5 phases implemented: SessionStart guidance, namespace markers,
      PostToolUse hook, PreCompact hook, testing
    - 1319 tests passing, 86.20% code coverage
    - RETROSPECTIVE.md generated with lessons learned
    - Project moved from active/ to completed/
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 19, 2025
    Configuration menu
    Copy the full SHA
    0abcf23 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2025

  1. refactor(guidance): restructure templates as mandatory behavioral rules

    Based on claude-code-guide research findings, rewrite all guidance
    templates to use mandatory rule language instead of suggestions:
    
    - Change root tag from session_operating_context to session_behavior_protocol
    - Convert XML structure to markdown rules in CDATA sections
    - Use explicit MUST, REQUIRED, Do not language
    - Add 3 explicit rules: CAPTURE MARKERS, MEMORY RECALL, DEFAULT TO ACTION
    - Include enforcement sections with DO/DONT examples in detailed template
    
    This addresses the issue where Claude was ignoring injected context by
    treating it as optional suggestions rather than mandatory constraints.
    
    Generated with Claude Code (https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 20, 2025
    Configuration menu
    Copy the full SHA
    eea02ba View commit details
    Browse the repository at this point in the history
  2. refactor(hooks): extract shared utilities and add security validation

    QUAL-1: Extract ~200 lines of duplicated utilities from 5 handlers into
    hook_utils.py module with setup_logging(), setup_timeout(), cancel_timeout(),
    and read_json_input() functions.
    
    SEC-1: Add validate_file_path() function with path traversal protection
    to prevent arbitrary file access via malicious hook input.
    
    DOC-1: Document PostToolUse and PreCompact hooks in README.md and
    USER_GUIDE.md with configuration options and usage examples.
    
    Changes:
    - Create src/git_notes_memory/hooks/hook_utils.py with shared utilities
    - Update 5 handlers to use centralized utilities
    - Add path validation to session_analyzer.py
    - Add 8 security tests for path validation
    - Document all 5 hooks and their configuration options
    - Add guidance config docs (HOOK_SESSION_START_INCLUDE_GUIDANCE)
    
    Test coverage: 1327 tests passing, 86.34% coverage
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
    zircote and claude committed Dec 20, 2025
    Configuration menu
    Copy the full SHA
    d7b76b3 View commit details
    Browse the repository at this point in the history
Loading