12 Commits

Author SHA1 Message Date
John Reilly Pospos
408d4019b3 Fix git commits re-populating dirty-files in default mode (#22)
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.
2026-02-14 12:57:33 +10:00
John Reilly Pospos
58d9cbc25a Consolidate hook handlers into trigger.py and bump to v0.8.1 (#21)
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.
2026-02-10 21:06:45 +10:00
severity1
b37186c502 Fix README.md documentation inaccuracies
- 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
2025-12-10 01:42:57 +13:00
severity1
f459e1d56c Enforce template structure in codebase-analyzer skill
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
2025-12-09 23:43:12 +13:00
severity1
dd640a37fe Add subtree CLAUDE.md files and fix status command path
- Regenerate root CLAUDE.md with fresh codebase analysis
- Add scripts/CLAUDE.md for hook script conventions
- Add tests/CLAUDE.md for pytest patterns
- Fix dirty-files path in status.md (.claude/.dirty-files -> .claude/auto-memory/dirty-files)
2025-12-05 21:55:08 +13:00
severity1
9afa7eaead Fix linting errors and add git commit context tests
- Fix line length violation in post-tool-use.py (112 -> 80 chars)
- Remove unused imports in test_hooks.py (io, tempfile, patch, pytest)
- Fix incorrect path in sync.md (.claude/.dirty-files -> .claude/auto-memory/dirty-files)
- Add 3 tests for git commit context enrichment feature
2025-12-05 20:12:40 +13:00
severity1
83e246db6e Fix deduplication: update existing entries with commit context 2025-12-04 01:14:24 +13:00
severity1
e68fa5c36d Implement inline commit context, sync command, and trigger modes
- 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
2025-12-04 01:09:18 +13:00
severity1
8883041008 v0.5.0: Instant memory refresh + Python 3.8 compatibility
- 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
2025-12-01 21:42:46 +13:00
severity1
45ff2fb6dd Fix bash command parsing to stop at shell operators
- Stop parsing file arguments when encountering &&, ||, ;, |, >, etc.
- Prevents tracking tokens after shell operators as file paths
- Add 4 tests for shell operator handling
- Bump version to 0.2.0
2025-11-30 10:23:50 +13:00
severity1
f34c6392f0 Add Bash file operation tracking and remove spec docs
- Track rm, mv, git rm, git mv, unlink commands via Bash tool
- Update PostToolUse hook matcher to Edit|Write|Bash
- Add command parsing with shlex to extract file paths
- Skip non-file commands (git status, npm, etc.)
- Add 8 new tests for Bash tracking
- Update README with new features
- Remove PRD.md and SPEC.md (implementation complete)
2025-11-29 17:41:12 +13:00
severity1
a76c9b3404 Implement claude-code-memory plugin
Add core plugin infrastructure:
- PostToolUse hook for zero-token file tracking
- Stop hook for end-of-turn agent spawning
- memory-updater agent (haiku model)
- memory-processor and codebase-analyzer skills
- /memory-init, /memory-sync, /memory-status commands
- CLAUDE.md templates with auto-managed markers
- 57 passing tests (hooks, skills, integration)
2025-11-29 09:19:33 +13:00