memory curator hook + /memory-audit (0.12.0)#5
Merged
Conversation
The auto-memory twin of the CLAUDE.md curator — 5th nudge-hook + judgment-skill pair. Auto memory's MEMORY.md loads only its first 200 lines / 25 KB each session; the rest is SILENTLY not loaded (a hard truncation, not a soft budget), and Claude grows the file itself across sessions. - memory-curator/ (PostToolUse): fires only on MEMORY.md edits inside a memory dir. Warns when over MEMORY_LINE_BUDGET (200) or MEMORY_BYTE_BUDGET (25 KB) — the tail is now silently dropped — and nudges /memory-audit. Debounced; MEMORY_AUDIT_DISABLED off-switch; never auto-edits; fail-open. Topic-file edits and a bare repo MEMORY.md (not in a memory/ dir) don't fire. - skills/memory-audit: reads MEMORY.md + topic files; reports what's below the cutoff (dropped now), staleness, contradiction, index<->topic split; on approval tightens MEMORY.md to a lean index and moves detail to topic files. - catalog: memory-index-overflow, sibling of context-doc-bloat. - Wire hooks.json + CI test line; README section + layout; plugin + marketplace -> 0.12.0. memory-audit-DESIGN.md sibling design note. Verified: memory-curator 12/12; all 6 hook suites green; ruff clean; manifests valid; claude plugin validate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D6pwpBdoug4tJRxxVrNNeL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The auto-memory twin of the CLAUDE.md curator — the 5th nudge-hook + judgment-skill pair, suggested from a review of the official memory docs.
Why
Auto memory's
MEMORY.md(in~/.claude/projects/<project>/memory/) loads only its first 200 lines / 25 KB each session — the rest is silently not loaded. A hard truncation, not a soft budget (the same shape as a scan dropping rows past page 1). And Claude writes this file itself across sessions, so it grows on its own, leaving tail entries that look stored but never reach context.What's here
memory-curator/hook (PostToolUse) — fires only onMEMORY.mdedits inside a memory dir (line + byte count, no LLM). OverMEMORY_LINE_BUDGET(200) orMEMORY_BYTE_BUDGET(25 KB) → warns the tail is silently dropped, nudges/memory-audit. Debounced;MEMORY_AUDIT_DISABLEDoff-switch; never auto-edits; fail-open. Topic-file edits and a bare repoMEMORY.md(not in amemory/dir) don't fire./memory-auditskill — reports what's below the cutoff (dropped now), staleness, redundancy/contradiction, and the index↔topic split; on approval tightensMEMORY.mdto a lean index and moves detail to on-demand topic files (same index/chapters principle as CLAUDE.md).memory-index-overflowcatalog entry (hard-cutoff sibling ofcontext-doc-bloat).hooks.json+ CI; README section + layout; plugin & marketplace → 0.12.0;memory-audit-DESIGN.md.Verification
memory-curator12/12 (line + byte cutoff, debounce, memory-dir detection incl. no false-fire on a repo MEMORY.md or topic files, disable, fail-safes).claude plugin validatepasses.🤖 Generated with Claude Code