/dream:dream (optional) project dir, or session id to focus onfrom dream
Mines Claude Code session logs into proposed memories, CLAUDE.md rules, docs, skills, and DECISIONS.md entries. Two-stage process: deterministic distillation plus consolidation pass.
Ships in dream. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn accumulated session traces into durable project improvements. Two stages: cheap deterministic distillation, then an Opus consolidation pass that you run.
Read references/MARKER-CONTRACT.md to also
fold in any structured markers producers left for you.
Use Glob to find the entry wrapper, then use its full literal path for every call:
Glob: **/plugins/dream/scripts/dream (clone) OR **/dream/*/scripts/dream (installed)
Run everything from the target project directory (so paths derive correctly),
or pass DREAM_PROJECT_DIR=/path/to/project. The tool needs nothing project-specific
— it derives the log dir, repo, ~/.dream/<slug>/ home, and the known-corpus
(CLAUDE.md/AGENTS.md + the project's memory dir + every DECISIONS.md under the
git root, auto-discovered) from context. $DREAM_EXTRA_CORPUS still appends more.
<scripts>/dream distill # all un-distilled sessions (cached by source hash)
<scripts>/dream distill --no-model # heuristic only (fast, skips ollama)
<scripts>/dream stats # friction + candidate-insight tallies
Distillation extracts friction (denials, corrections, tool errors) and runs a
local ollama model (install, then ollama pull the model;
WYRD_OLLAMA_URL, default http://localhost:11434; DREAM_MODEL, default
qwen2.5:7b) to emit per-session candidate insights. The
live (most-recent) session is skipped unless --include-live. Digests are cached
in ~/.dream/<slug>/digests/ — only new sessions re-distill.
dream box)<scripts>/dream box --days 7 # every session on this box from the last 7 days
Distills every session under ~/.claude/projects modified in the window,
grouped by repo: a worktree that still exists folds into its main checkout,
nested repos stay separate, and a non-git directory, or one that no longer
exists, is its own group. Live sessions are
included. Sessions
whose cwd is under /tmp are skipped unless --include-tmp. The local model
is off unless --with-model. Writes
~/.dream/box/<YYYYMMDD>-box.json: each repo with its sessions (digest path,
human-turn, correction and denial counts) and its memory dirs, the first place
to dedup against.
In every digest, user_turns holds only the human's own words, each with the
assistant text it answered (after). Relayed messages from other sessions,
task and Monitor notices, and Stop-hook feedback are dropped.
<scripts>/dream synth # → ~/.dream/<slug>/review/queue.json + QUEUE.md
Pools all candidate insights and lexically pre-flags likely-already-captured ones. This is a HINT only — local clustering under-merges; you do the real consolidation next.
Local embeddings/lexical clustering are too weak for semantic dedup, so the
judgment is yours. Read review/queue.json + the known corpus (defined in step 0).
If the project has DECISIONS.md file(s), read each one IN FULL before
consolidating — start to finish, do NOT skim or sample despite their length.
They are the authoritative architectural record and your single best dedup
reference: most "new architecture insight" candidates are already a numbered
decision (with its motivating example and a regression test), and you can only
see that — and spot when the log has drifted from shipped behavior — by holding
the whole log. Then:
DECISIONS.md:NNNN / the decision number).memory — one-off preference, OR any lesson seen in only 1 session.CLAUDE.md — a behavior rule recurring across ≥2 sessions (frequency gates this).doc / skill — deeper explanation / repeatable procedure.decisions-log — a PRODUCT/architecture decision that belongs in a project
DECISIONS.md, in one of two flavors: (a) a decision made or shipped in a
session but never recorded, or (b) an existing entry now stale or
contradicted by what shipped (drift). Cite the commits/code that prove it.
Anti-manufacture bar: propose one ONLY when a session shows a real
decision or reversal — never because something merely "looks undocumented."
A well-maintained log (inline supersession tombstones) legitimately yields
zero here; that is the correct, honest output, not a gap to fill.product-decision — a product decision better tracked as an issue/ticket
(e.g. a bd decision) than a DECISIONS.md entry. NEVER agent instructions.~/.dream/<slug>/review/pending/<YYYYMMDD>-dream.md (today's date; overwrite
it if a run already wrote it today — latest consolidation wins, do NOT append/
accrete). This is the human review unit: everything from this run in one file
the user can read in a sitting, then archive whole.For a large backlog, spawn this step as a Task to keep main context lean.
review/pending/<YYYYMMDD>-dream.md. These are shared
and load-bearing; never auto-edit — and DECISIONS.md especially is append-with-
supersession by hand, so route every decisions-log proposal to the pending
file, never an edit.Pending → reviewed lifecycle. Proposals live in review/pending/; the
SessionStart hook warns about anything there. The user dismisses a run by moving
its file into review/reviewed/ (or deleting it) once actioned — so keep each
run's proposals in its own file and never write into review/reviewed/ yourself.
Report what you auto-wrote and what you propose (with a per-bucket count, including
a decisions-log count even when it is 0).
Run headlessly on the local machine (it needs local session logs, ~/.dream/
state and a reachable ollama, so not a cloud scheduler). See
references/SCHEDULING.md for the headless
command (claude -p ... --permission-mode auto) and systemd, launchd and cron
setups. For a whole box, use scripts/dream-nightly, which runs dream box
and then a headless lesson pass over the result.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub devonjones/devon-claude-skills --plugin dream2 skills in this plugin
Other plugins' skills for the same job