analyze
CommandAnalyze user corrections and log them into the error notebook
Store information so the next session's Claude knows about it. The core mission: **make sure the next conversation doesn't lose this knowledge.**
Store information so the next session's Claude knows about it. The core mission: **make sure the next conversation doesn't lose this knowledge.**
1. **Dedup check** -- Search existing memory files (`memory/*.md`) for related content. If found, update that section instead of creating a new entry 2. **Route to the right file** -- Determine which memory file this belongs to based on topic. If unclear, ask the user 3. **Skip if already in CLAUDE.md** -- CLAUDE.md is auto-loaded every session, so don't duplicate its content 4. **Never write directly to MEMORY.md** -- MEMORY.md is an index of pointers, not a content store. Save content to topic-specific files in `memory/` 5. **Report** -- Tell the user: "Saved to {filename}, section {section name}" or "Updated {filename}, changed {what}"
Memory uses a **hub-and-spoke** model:
When MEMORY.md exceeds 170 lines, proactively suggest moving content to separate files.
Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.
Analyze user corrections and log them into the error notebook
Pause the SessionEnd auto-commit hook when refactoring core engine files.
Help decide when to use `/compact` based on the current conversation state.
Review the error notebook — flip through past corrections before working
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.