[ OPERATIONS · OPERATOR UTILITY ]
/dream
Transcripts (JSONL) live at: `C:\Users\faris\.claude\projects\<id>\`
ACME Agency, <id> and you@example.com mark values that are per-agency — your install fills them with YOUR clients and accounts. If a section references a helper script you don't have yet, it ships with that workflow's install.Dream — Memory Consolidation
Triggers
/dream— consolidate project memory only/dream all— consolidate project + user (global) memory
Paths
| Scope | Memory dir | Index file | Max index lines |
|---|---|---|---|
| Project | C:\Users\faris\.claude\projects\<id>\memory\ | MEMORY.md in that dir | 200 |
Global (all) | C:\Users\faris\.claude\memory\ | MEMORY.md in that dir | 100 |
Transcripts (JSONL) live at: C:\Users\faris\.claude\projects\<id>\
Phase 1 — Orient
- List the memory directory to see what files exist
- Read the INDEX_FILE (
MEMORY.md) to understand the current index - Skim each existing topic file so you improve them rather than creating duplicates
- If
logs/orsessions/subdirectories exist, ACME Agencyw recent entries there
The goal is to build a mental map of what's already known before looking for new signal.
Phase 2 — Gather recent signal
Look for new information worth persisting. Work through these sources in order, stopping when you have enough:
- Daily logs (
logs/YYYY/MM/YYYY-MM-DD.md) — if present, these are the append-only stream of what happened - Drifted memories — facts in existing files that contradict what you see in the codebase right now (e.g., a file path that no longer exists, an integration status that changed)
- Transcript search — only if you suspect something specific is missing. Grep narrowly:
``bash grep -rn "<narrow term>" "C:\Users\faris\.claude\projects\<id>\" --include="*.jsonl" | tail -50 `` Don't exhaustively read transcripts — look only for things you already suspect matter.
What's worth saving (from the auto-memory system prompt):
user— role, goals, preferences, knowledgefeedback— guidance on how to approach work (corrections AND confirmations)project— ongoing work, goals, bugs, decisions with contextreference— pointers to external systems and resources
What NOT to save: code patterns, git history, debugging recipes, anything already in CLAUDE.md, or ephemeral task details.
Phase 3 — Consolidate
For each piece of new signal:
- Check for an existing file to update rather than creating a duplicate
- Write or update the memory file using this format:
```markdown
name: <memory name> description: <one-line description — specific enough to judge relevance> type: <user | feedback | project | reference>
<memory content> `` For feedback and project` types, structure as: rule/fact first, then Why: and How to apply: lines.
- Convert relative dates to absolute dates (e.g., "yesterday" → "2026-03-25")
- Delete contradicted facts — if today's investigation disproves an old memory, fix it at the source rather than adding a correction note
Phase 4 — Prune and index
Update the INDEX_FILE so it stays under the line limit AND under the 24.4 KB load cap — aim for ≤ 22 KB so there's margin. This is a HARD limit: above it, the harness loads only PART of the index and silently drops the rest, so future sessions lose memory pointers. If you can't get under 22 KB by tightening lines, the index has too many entries — consolidate related memories into one file and remove the redundant pointers.
Index format — each entry is one line:
- [Title](file.md) — one-line hook under ~150 chars
Rules:
- Index is a pointer list, not a content dump — never write memory content directly into it
- Remove pointers to memories that are stale, wrong, or superseded
- Hard cap 150 chars for the hook (the text after the
—; the[name](name)link overhead doesn't count). Over that, the hook carries detail that belongs in the topic file — shorten it, move the specifics (IDs, dates, repro steps) into the file it points to - Add pointers to newly important memories
- Resolve contradictions — if two files disagree, fix the wrong one
For /dream all
Repeat all four phases twice:
- First for the project scope (paths above)
- Then for the global scope (
C:\Users\faris\.claude\memory\)
The global memory dir may not exist yet — if it doesn't, skip it silently (don't create an empty structure).
Output
Return a brief summary:
- What you consolidated or updated
- What you pruned or removed
- What you added as new memories
If nothing changed (memories are already tight and accurate), say so explicitly.