Package what this session produced into durable memory — but propose, don't write. Goal: the next session should not have to rediscover what we already know. This is the human-in-the-loop version of the self-evolving memory pattern: no auto-extraction on a Stop hook, no automatic writes, no shipping the whole transcript anywhere.
When to run
- At the end of a larger multi-step task, when a decision / lesson / new fact / task came out of it.
- On explicit request ("capture session", "what should I remember", "zapiš session").
- Not after a trivial session (one question → one answer, nothing durable) — propose nothing there, just say so.
Procedure
1. Sweep the session and sort into 4 categories
Go through what this session actually produced (not what you wish it had). For
detecting corrections, use the same signals as this pack's session-evaluate hook
(hooks/hook-session-evaluate.sh): "wrong / not like that / don't / redo / undo…".
Sort into:
| Category | What it is | Write target |
|---|---|---|
| Decision | A choice between options + why (what/why/status) | your decisions log (e.g. notes/decisions.md) |
| Correction / lesson | The user corrected you, or a general rule emerged | a lesson note + a memory/feedback_*.md entry |
| New reference | Durable technical fact, URL, path, mechanism | memory/reference_*.md |
| Pending task | What remains to be done (follow-up) | your inbox or today's note (e.g. inbox/) |
Skip empty categories. Fewer and precise beats everything and vague.
2. Verify before proposing (anti-hallucination)
- Every fact/URL/path in the proposal comes from this session, not from imagination. Whatever you are not sure about, mark as unverified — do not present it as fact.
- Check for duplicates: does a
memory/file or lesson already cover this? Then propose an update to the existing one, not a new duplicate.
3. Present the proposal and wait for OK (human gate)
For each category list: the target path + the exact content to write. Then ask what to write. Write nothing without an explicit OK.
4. After the OK, write in exact formats
Decision → prepend a new entry at the top of your decisions log (newest first):
## YYYY-MM-DD: Short decision title
- **What:** …
- **Why:** …
- **Status:** Decided YYYY-MM-DD. …
Lesson → a short note in your notes plus a compact memory entry
memory/feedback_<slug>.md (Claude Code auto-memory format):
---
name: feedback_<slug>
description: <one-line summary>
---
<the rule>
**Why:** <the reason>
**How to apply:** <when/where it kicks in>
Reference → memory/reference_<slug>.md, same frontmatter style (just the fact
plus any links — no Why/How needed).
Task → append to your inbox or today's note. If none exists, offer to create one.
5. Update the index
For every new memory/ file add a one-line pointer to memory/MEMORY.md
(- [Title](file.md) — one-line hook). Without it the memory will not load in the
next session.
Conventions (keep)
- File names kebab-case without diacritics. No
{{}}placeholders — always concrete values. - Absolute dates (YYYY-MM-DD), never "today/yesterday".
- Follow your project's frontmatter conventions for notes files.
- After writing, you can suggest running
verify-before-doneas a final check.