Skip to content

memory curator hook + /memory-audit (0.12.0)#5

Merged
illinigirl merged 1 commit into
mainfrom
memory-curator
Jun 22, 2026
Merged

memory curator hook + /memory-audit (0.12.0)#5
illinigirl merged 1 commit into
mainfrom
memory-curator

Conversation

@illinigirl

Copy link
Copy Markdown
Owner

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 on MEMORY.md edits inside a memory dir (line + byte count, no LLM). Over MEMORY_LINE_BUDGET (200) or MEMORY_BYTE_BUDGET (25 KB) → warns the tail is silently dropped, 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.
  • /memory-audit skill — reports what's below the cutoff (dropped now), staleness, redundancy/contradiction, and the index↔topic split; on approval tightens MEMORY.md to a lean index and moves detail to on-demand topic files (same index/chapters principle as CLAUDE.md).
  • New memory-index-overflow catalog entry (hard-cutoff sibling of context-doc-bloat).
  • Wired into hooks.json + CI; README section + layout; plugin & marketplace → 0.12.0; memory-audit-DESIGN.md.

Verification

  • memory-curator 12/12 (line + byte cutoff, debounce, memory-dir detection incl. no false-fire on a repo MEMORY.md or topic files, disable, fail-safes).
  • All 6 hook suites green; ruff clean; manifests valid; claude plugin validate passes.

🤖 Generated with Claude Code

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
@illinigirl illinigirl merged commit 2a031d5 into main Jun 22, 2026
6 checks passed
@illinigirl illinigirl deleted the memory-curator branch June 22, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant