In default mode, after the memory-updater processes files and SubagentStop
clears dirty-files, a git commit via Bash would re-trigger PostToolUse,
extract committed files via git diff-tree, and re-add them to dirty-files.
This caused the Stop hook to fire again for already-processed files.
Add early-return guard so default mode skips git commit processing (files
are already tracked via Edit/Write hooks). Also fix existing test to run
commit context enrichment in gitmode where it belongs.
Merge stop.py into trigger.py to handle PreToolUse, Stop, and
SubagentStop hooks via a single entry point routed by hook_event_name.
Add PreToolUse hook for gitmode commit gating, SubagentStop hook for
automatic dirty-files cleanup, and update tests and docs accordingly.
- Update dirty-files path references to .claude/auto-memory/dirty-files
- Clarify commit context is stored inline, not in separate JSON file
- Fix Data Files table with correct locations
- Update test docstring with correct path
The /auto-memory:init command was generating CLAUDE.md files that didn't
follow the defined templates - using wrong marker format like
"BEGIN AUTO-MANAGED" instead of "AUTO-MANAGED:" and wrong section names.
Root cause: The skill referenced templates with @templates/... import syntax
which provides context but not enforcement. The algorithm lacked explicit
instructions about marker format and required sections.
Changes:
- Add Marker Format section to guidelines.md as shared reference
- Update codebase-analyzer description to third-person with trigger phrases
- Add explicit Marker Syntax section with format and anti-patterns
- Add Section Definitions tables for root and subtree CLAUDE.md
- Rewrite Algorithm Step 7 with prescriptive generation instructions
- Format code files with ruff
- Consolidate commit-context.json into dirty-files with inline format:
/path/to/file [hash: commit message]
- Switch memory-updater agent from haiku to sonnet (fixes#7)
- Add /auto-memory:sync command for manual file changes (fixes#5)
- Add configurable trigger modes: default vs gitmode (fixes#6)
- Update tests for new paths and model expectation
- Stop hook now instructs Claude to read CLAUDE.md after memory-updater
completes, giving the main session fresh memory immediately
- Added `from __future__ import annotations` for Python 3.8 compatibility
(fixes TypeError: 'type' object is not subscriptable)
- Standardized "memory" terminology across commands (matches official
Claude Code docs and plugin name)
- Fixed tests for flat commands/ directory structure
- Removed name field requirement from command YAML validation