From engram
Retrieves relevant memories (raw chunks and crystallized vault notes) to inform multi-step plans. Supports glance (read-only) and deep (also learns) modes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/engram:recallThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Surface relevant memories — raw conversation/doc chunks AND crystallized vault lessons in one ranking — lay your planned actions against them, and report, out loud, whether memory changed the plan.
Surface relevant memories — raw conversation/doc chunks AND crystallized vault lessons in one ranking — lay your planned actions against them, and report, out loud, whether memory changed the plan.
Memory has two layers retrieved in ONE call: raw chunks (every past conversation and doc, embedded mechanically) and vault notes (lessons crystallized from them). Recall's jobs, in order:
engram query. Items tagged kind: chunk are raw fragments; kind: fact/feedback are crystallized lessons. They compete in the same top-N.The binary resolves the vault and chunk index automatically ($XDG_DATA_HOME/engram/...;
ENGRAM_VAULT_PATH / ENGRAM_CHUNKS_DIR override). Do not pass --vault or --chunks-dir.
glance vs deep (the depth dial)Recall runs in one of two modes, selected by the caller (the mode word is the skill argument; absent → deep):
deep (default). The full procedure below — all 10 phrases and the write side (Steps 2.5C, Step 4).
It both applies memory to this decision and grows the vault (crystallizes, persists synthesis).
Use it when the decision is weighty or irreversible, when you want recall to also learn, or when in doubt.glance (opt-in, cheap — for firing often). A pass that is read-only with respect to vault knowledge
(Step 2.7 activate still bumps the used-notes recency metadata — that is kept, not a knowledge write). Run
Steps 0–3 with ~3 phrases (not 10) and keep the read side — Step 2.5A (read candidates), Step 2.5B
(apply the recency weight), Step 2.7 (activate used notes), and the Step 3 synthesis — but skip the write
side: Step 2.5C (coverage amend/learn), Step 4 (synthesis-persist). Glance
applies memory to this decision; it does not grow the vault's knowledge.Escalate glance → deep for recency-channel standards (C5). Glance reliably surfaces a recent-activity
(Channel 2) item but does not elevate it to a requirement — measured: glance honors a recent-channel
standard 0/5 where deep honors it 4/5 (#661 full-bars). So if your decision turns on honoring a
standard that surfaced in the recent-activity channel (a "use X going forward" / "the new convention is Y"
item in Channel 2), switch to deep. Glance is validated as deep-equivalent only for applying conventions
(C3), recency supersession within the matched set (C4i, via 2.5B), and abduction/synthesis (C6).
Everything below is the deep procedure; a [glance: …] note marks each step that differs under glance.
Before any engram call, print three short blocks. Plain prose, no headers needed:
Skipping Step 0 is forbidden. The whole purpose of recall is to test a stated plan against memory.
engram ingest --auto
Seconds when nothing changed; guarantees the index includes the latest sessions and doc edits. If it errors, say so and continue — retrieval over a slightly-stale index beats no retrieval.
[glance: generate ~3 phrases, not 10 — the measured retrieval floor, #661 Phase 1. Breadth is for crystallization; glance only needs this decision's lesson.]
Always generate exactly 10 short queryable phrases, one from each of these angles:
Each phrase is short and specific. No pre-filtering: you can't know what's in memory before you query. Drop only obvious dross (a bare noun like "coding"). Query by task, not by fear — "implementing Claude Code hooks", not "common mistakes when writing hooks". The binary caps results to the top-30 matches per phrase.
engram query with all phrasesengram query --lazy-chunks \
--phrase "<phrase 1>" \
--phrase "<phrase 2>"
# ... one --phrase per Step 1 phrase (deep: 10; glance: ~3)
One call; the binary merges ranking server-side. engram query always runs the unified D1
clustering of the matched notes+chunks in one pass and emits candidate_l2s: [{path, cosine, content}]
per cluster. The candidate pool includes the within-cluster top-5 plus tag-nominated notes — notes
sharing a vocab term with the top-3 delivered notes (budget fields tag_nominations_added/dropped
report the pool size). Do NOT collapse phrases, do NOT run per-phrase calls.
The payload has two channels:
Channel 1 — Relevance (clustered matched items): Items matched by your 10 phrases, bounded
to ~300 (top-30 per phrase, unioned, relevance-floor applied). These are clustered and carry
candidate_l2s per cluster (see Step 2.5). Read this channel to surface applicable lessons and
judge coverage. The payload's items mix:
kind: chunk — raw transcript/doc fragments with source + anchor. These are EVIDENCE:
extract the convention, decision, or correction they show (a reviewer correcting code, a
stated standard); never quote them wholesale. Under --lazy-chunks (recall's default
invocation — confirm via budget.lazy_chunks: true) chunk items carry path + source/anchor
but NO content field: engram show-chunk <source#anchor> to read a chunk's evidence on-demand.kind: fact / feedback — crystallized lessons; apply directly (notes always carry full content inline).Channel 2 — Recent activity (un-clustered): Items tagged provenance: recent — the newest
chunks by ingest time, appended after the matched set, NOT cluster members. Read this block
first for situational continuity — re-immerse in recent work before diving into the clustered
results. These items are NOT used for coverage or synthesis judgment. Do not treat them as
matched results; they have no cluster membership and no candidate_l2s. Under --lazy-chunks
recent items also carry path/source only (no content) — the paths show where your recent activity
was; engram show-chunk <source#anchor> for detail if a specific one matters.
turn-N
anchors are first-person ASSISTANT: narration you produced in a just-prior or
pre-context-clear session. Treat them as your own past actions — do not re-derive them,
do not express surprise at them, and dedup against what is already in your context.If the matched items (Channel 1) are empty, say so in one sentence, skip Step 2.5, and proceed with your plan. (A non-empty recent-activity block alone does not count as "something surfaced" for coverage purposes.)
The query output's clusters list contains the unified clustering of matched chunks
and notes. Each cluster carries candidate_l2s: [{path, cosine, content}] — the within-cluster
top-5 notes ranked from the cluster's own matched members, plus any tag-nominated notes whose
vocab terms overlap the top-3 delivered notes (nominated notes may cross cluster boundaries). A note
that did not match any phrase AND was not nominated will never appear as a candidate. Superseded-note
ride-alongs are inserted at the next rank after the note they supersede. A cluster with no note
members yields an empty candidate_l2s list; skip to the next cluster when that happens.
Process every cluster. For each:
A. Read candidates and members
candidate_l2s entries carry their content inline — read it directly; no engram show calls for
candidates (the same content is also on the matching items[] note member). For chunk
members, the content is NOT in the payload (chunks carry path/source only under --lazy-chunks;
the cluster's members list never carries content) — engram show-chunk <source#anchor> to read the
evidence on-demand. Do not judge coverage before you have read the candidate content.
B. Apply the recency weight to resolve conflicts
Evidence conflicts when a newer member explicitly negates or reverses an older claim. Reversal cues: "no longer", "replaced by", "use X not Y", or the same subject+predicate appearing with a different object in a newer item. When conflict is present: recent wins. When no conflict: treat older and newer evidence as independently valid — do not demote a stable convention merely because it lacks a recent instance.
[glance: SKIP Step 2.5C — it is the write side. Read 2.5A + apply 2.5B, do not amend/learn — continue to Step 2.7 (activate).]
C. Judge coverage against the recency-weighted view — in this order
| Outcome | Criterion | Action |
|---|---|---|
| Covered | A candidate's claim states the cluster's principle with no material omission vs the recency-weighted members | engram amend --target <candidate-path> --activate --chunk-source <new-chunk-ids> — provenance-enrich only; do not rewrite content. If this note CORRECTS/narrows/refutes a surfaced note, also pass --supersedes "<basename>|<type>|<claim>" (types: updates|narrows|refutes). |
| Near | A candidate addresses the same situation but omits ≥ 1 substantive claim the members evidence (judge against the recency-weighted view — a candidate that only matches the superseded content is near, not covered) | engram amend --target <candidate-path> --chunk-source <chunk-ids> --subject ... --predicate ... --object ... (or --behavior/--impact/--action) — re-synthesize content from all members, recency-weighted. Add --supersedes "<basename>|<type>|<claim>" if this note corrects a surfaced note. |
| Absent | No candidate addresses the situation | Invoke the write-memory skill with this handoff — kind=fact or feedback (pick per the cluster's principle), situation + content fields, --source "<descriptive>", the cluster's chunk-source IDs, plus supersedes details if the new note corrects a surfaced note. write-memory composes, executes, and reports the note path. |
One write per cluster; one representative note per cluster. The representative is always a note
(never a chunk). For absent, write exactly one note (fact or feedback) covering
the cluster's principle. Do not write one fact and one feedback note for the same cluster.
Pass one --chunk-source <source#anchor> (repeatable) for every chunk source in the cluster
(provenance tracking). For learn, pass the same flag plus --source (human-readable provenance).
Vocab tags are assigned automatically by the binary on every write — do not hand-author them.
WAIT for each write before moving to the next cluster. Writes are blocking and inline — the note created or updated by one cluster may be a candidate for another.
After processing all clusters, call engram activate
on the notes you actually drew on — the candidate_l2s you judged Covered or Near at the
coverage table, and any notes you cited in the Step 3 synthesis:
engram activate \
--note "<path of note you judged Covered or Near>" \
--note "<path of note you cited in Step 3>"
# ... one --note per used note only
Do NOT activate every returned note. Do NOT activate recent-channel items (chunks are never activated). Activating only what you used lets superseded-but-surfaced notes fade via recency rank — bumping every returned note would defeat the recency-competition mechanism. Skip this call when you drew on no notes (e.g., payload was empty or Step 2.5 was skipped).
[glance: before synthesizing, check for a load-bearing Channel 2 (recent-activity) standard. If your decision turns on honoring a recent convention, escalate to
deepnow — glance surfaces Channel 2 items but does not elevate them to requirements (C5, #661).]
The user sees this. Rules:
[glance: SKIP Step 4 — write side. Escalate to
deepif this decision is worth crystallizing.]
When your closing synthesis reaches a sound, non-trivial conclusion that no existing note states — something a future session (or a less capable model that can't re-derive it) would want, and that you or a human may later inspect or correct — crystallize it. Reasoning that is never written down evaporates; this records the outcome and grows the web.
Hand ONE synthesis note per conclusion to the write-memory skill (kind=fact or feedback, per the conclusion's shape):
--source, e.g. --source "synthesis (abduction) from recalled memory", so
a human or a weaker model can tell it is a reasoned conclusion to review — not a primitive fact.updates|narrows|refutes), and claim in the write-memory
handoff — the binary maintains the inverse automatically. Otherwise no link ritual is needed; the
binary's vocab-tag assignment connects the new note to related notes structurally. Do not
hand-author wikilinks for structural linking.Gate — do not rot the vault (notes 68/69): persist ONLY conclusions you judge sound. If it is a hunch, you'd hedge below "probable", or it merely re-aggregates one note, do NOT persist. One synthesis note per conclusion; link all of its inputs.
After the synthesis note: if the synthesis body contains ≥1 [[full-basename]] wikilink,
ALSO invoke the write-memory skill with kind=qa — verbatim question, the synthesis conclusion
as the answer, certainty matching the synthesis note's label, contributors = the wikilink
basenames, source "recall Step 4, session ".
Contributors are auto-extracted from the [[full-basename]] wikilinks you already wrote in the
synthesis body — do NOT free-list ("what notes did you use?"). If the synthesis body contains no
wikilinks, skip the QA capture (D2 bar: ≥1 citation required).
| Sign you're off-script | What you should be doing |
|---|---|
| You never printed Step 0 | Back up — the skill is a no-op without it |
| You skipped the Step 0.5 sweep | It costs seconds and keeps memory current |
--vault or --chunks-dir on the query | engram query --phrase ... only — the binary always runs the unified D1 clustering and emits candidate_l2s |
| Separate query calls per phrase | One call, repeatable --phrase flags |
| You quoted chunks wholesale into the reply | Extract the principle a chunk evidences; paraphrase |
| You dispatched cluster-synthesis subagents | Gone — Step 2.5 crystallizes inline from the payload's clusters |
You judged coverage before reading the candidate content (now inline in candidate_l2s) | Read first — cosine alone cannot decide coverage |
| You applied a cosine threshold to decide covered/near/absent | Coverage is agent-judged from content; cosine only nominates candidates |
| A candidate matching only the superseded content → you marked it "covered" | Apply the recency weight first; a candidate that misses the conflict is "near" |
| You wrote two notes (a fact AND a feedback) for one cluster | One representative note per cluster — pick the right kind |
You called engram learn --target to update a note in place | Updates use engram amend; engram learn is create-only |
A ≥0.95 cluster → you activated without reading the candidates | Read first; high cosine nominates, it does not decide |
You called engram show on a note already in items[] | NOTE members in items[] carry content — use it directly. CHUNK items carry no content under --lazy-chunks (budget.lazy_chunks: true) — engram show-chunk <source#anchor> to read their evidence. |
| You assumed a chunk's content is inline and skipped its evidence | Under --lazy-chunks chunks carry path/source only — engram show-chunk <source#anchor> on-demand before judging coverage |
| You grouped chunks by eye instead of using the payload's clusters | The binary's k-means grouping is the ground truth; read every cluster |
| You skipped Step 2.5 or read chunk-only results as "nothing surfaces" | Processing every cluster IS the step; "nothing surfaces" means an EMPTY payload — clusters present means Step 2.5 runs |
| You activated every returned note | Activate only the notes you actually USED — judged Covered/Near or cited in Step 3 |
| You activated recent-channel items | Chunks are never activated; recent-block items are not activation targets |
You skipped engram activate after drawing on notes | Call it after synthesis — used notes must stay warm or the recency-competition mechanism breaks |
You're about to write --relation or hand-author wikilinks for structural linking | The binary removed --relation; vocab tags are automatic; use --supersedes only when the note corrects/narrows/refutes a surfaced note |
| You composed an engram learn command yourself at a write site | Write sites hand off to write-memory — parents judge, the worker writes |
| Reply is a memory dump with no plan reference | Restart Step 3: walk the plan and judge each piece |
| You're recommending a prerequisite or better test as the first step, not the asked task | That displacement IS relitigating the settled task — old reasoning isn't new evidence. Do the asked task; displace only on a NEW fact, stated as a reversal |
You ran the write side (2.5C/Step 4) while in glance mode | Glance is read-only w.r.t. vault knowledge — skip the write side; switch to deep if you need to crystallize |
A recency-channel (Channel 2) standard is load-bearing and you stayed in glance | Escalate to deep — glance surfaces the recent item but won't elevate it to a requirement (C5, #661) |
npx claudepluginhub toejough/engramGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Reference for writing and editing skills with predictable behavior, covering invocation models, description writing, and information hierarchy.