[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CWP862CSBPDF1QW19P6C0F":3,"skill-same:01M6CWP862CSBPDF1QW19P6C0F":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6CWP862CSBPDF1QW19P6C0F","recall",null,"Use after any user request that might entail more than a single tool call or anything more than quick, shallow thinking. This surfaces relevant memories that are VITAL to recall for a good user experience and a greater chance at first-pass success for the user's request.","toejough\u002Fengram","toejough","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F5317312?v=4","01M6CWKZ6HJN0226G1FYVY0H0N","01M6CWKZAGT1SPMDWCZ3V8C1HZ",10,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskWriteMemory\u002Frecall-learn\u002Frecall\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26],"first","tool","user","use","good","surfaces","thinking","call","memories","2026-11-10 10:12:30",false,"---\nname: recall\ndescription: >\n  Use after any user request that might entail more than a single tool call or anything more than quick, shallow\n  thinking. This surfaces relevant memories that are VITAL to recall for a good user experience and a greater chance at\n  first-pass success for the user's request.\n---\n\n# Recall from Unified Memory\n\nSurface relevant memories — raw conversation\u002Fdoc chunks AND crystallized vault lessons in one ranking — lay your planned actions against them, and report, out loud, whether memory changed the plan.\n\n## Overview\n\nMemory 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:\n\n1. **Make your plan visible** before retrieving anything — an unstated plan cannot be tested against memory.\n2. **Sweep, then run ONE unified `engram query`.** Items tagged `kind: chunk` are raw fragments; `kind: fact`\u002F`feedback`\u002F`runbook` are crystallized lessons. They compete in the same top-N.\n3. **Crystallize** — when several near-match chunks evidence the same principle and no note states it yet, write the vault note now.\n4. **Explore-sample and ride-along** — the binary samples additional notes from vocab-term centroids near the query (budget sized to the matched-note count) and inserts superseded-note supersessors at the next rank; the agent judges the surfaced candidates, never links.\n5. **Synthesize impact on the plan** — confirm \u002F adjust \u002F contradict \u002F silent, per planned action.\n6. **Re-enter for emergent recommendations** — a recommendation conceived mid-work gets its own\n   lever-keyed query and a `Re-entry:` line directly above it before it ships (Step 3.5).\n\nThe binary resolves the vault and chunk index automatically (`$XDG_DATA_HOME\u002Fengram\u002F...`;\n`ENGRAM_VAULT_PATH` \u002F `ENGRAM_CHUNKS_DIR` override). **Do not pass `--vault` or `--chunks-dir`.**\n\n## Modes — `glance` vs `deep` (the depth dial)\n\nRecall runs in one of two **modes**, selected by the caller (the mode word is the skill argument; absent → `deep`):\n\n- **`deep` (default).** The full procedure below — all 10 phrases and the write side (Steps 2.5C, Step 4).\n  It both *applies* memory to this decision **and** *grows the vault* (crystallizes, persists synthesis).\n  Use it when the decision is weighty or irreversible, when you want recall to also learn, or when in doubt.\n- **`glance` (opt-in, cheap — for firing often).** A pass that is **read-only with respect to vault knowledge**\n  (Step 2.7 `activate` still bumps the used-notes recency metadata — that is kept, not a knowledge write). Run\n  Steps 0–3.5 with **~3 phrases** (not 10) and **keep the read side** — Step 2.5A (read candidates), **Step 2.5B\n  (apply the recency weight)**, Step 2.7 (activate used notes), the Step 3 synthesis, and Step 3.5 (the\n  re-entry query, when triggered) — but **skip the write side**: Step 2.5C (coverage amend\u002Flearn), Step 4\n  (synthesis-persist). Glance *applies* memory to this decision; it does **not** grow the vault's knowledge.\n\n**Escalate `glance` → `deep` for recency-channel standards (C5).** Glance reliably *surfaces* a recent-activity\n(Channel 2) item but does **not** elevate it to a requirement — measured: glance honors a recent-channel\nstandard **0\u002F5** where deep honors it **4\u002F5** (#661 full-bars). So if your decision turns on **honoring a\nstandard that surfaced in the recent-activity channel** (a \"use X going forward\" \u002F \"the new convention is Y\"\nitem in Channel 2), **switch to `deep`**. Glance is validated as deep-equivalent only for applying conventions\n(C3), recency *supersession within the matched set* (C4i, via 2.5B), and abduction\u002Fsynthesis (C6).\n\nEverything below is the `deep` procedure; a **[glance: …]** note marks each step that differs under `glance`.\n\n## The procedure\n\n### Step 0 — Print your upfront judgement\n\n**Before any engram call**, print three short blocks. Plain prose, no headers needed:\n\n- **Ask:** what is being asked, in your own words. One or two sentences.\n- **Situation:** the concrete context — repo, branch, the operation underway, what's loaded into your context. One short paragraph.\n- **Plan:** the action(s) you would take next absent any guidance from memory. Numbered list.\n\nSkipping Step 0 is forbidden. The whole purpose of recall is to test a stated plan against memory.\n\n### Step 0.5 — Sweep\n\n```bash\nengram ingest --auto\n```\n\nSeconds when nothing changed; guarantees the index includes the latest sessions and doc edits.\nIf it errors, say so and continue — retrieval over a slightly-stale index beats no retrieval.\nIf a sweep (`engram ingest --auto`) already ran earlier in THIS session, skip it — intra-session\nre-sweeps index turns already in your context; the closing learn's sweep preserves freshness for\nfuture sessions. This holds even under a \"something might have changed outside this session\n(another terminal, another agent)\" worry — that gets picked up by the next sweep (yours or\ntheirs), not by re-sweeping now on suspicion.\n\n### Step 1 — Phrase queries from your plan and situation\n\n> **[glance: generate ~3 phrases, not 10 — the measured retrieval floor, #661 Phase 1. Breadth is for crystallization; glance only needs this decision's lesson.]**\n\nAlways generate exactly **10** short queryable phrases, one from each of these angles:\n\n1. **Situation\u002Fsetting** — the concrete environment you are operating in.\n2. **User's intent\u002Fgoal** — what the user ultimately wants to achieve.\n3. **Current concrete action** — the specific thing you are about to do next.\n4. **Problem\u002Fblocker** — the obstacle or constraint you are addressing.\n5. **Candidate solution\u002Fapproach** — the technique or strategy you plan to apply.\n6. **Tooling\u002Ftech in play** — the specific tools, libraries, or languages involved.\n7. **Prior related work** — previous work in this area you may be building on.\n8. **Adjacent technique** — a related approach worth comparing or cross-checking.\n9. **Failure mode to avoid** — a known pitfall or anti-pattern relevant to this work.\n10. **Domain\u002Fconcept** — the broader conceptual area the task lives in.\n\nEach phrase is short and specific. No pre-filtering: you can't know what's in memory before you\nquery. Drop only obvious dross (a bare noun like \"coding\"). **Query by task, not by fear** —\n\"implementing Claude Code hooks\", not \"common mistakes when writing hooks\". The binary caps\nresults to the top-30 matches per phrase.\n\n### Step 2 — Run ONE unified `engram query` with all phrases\n\n```bash\nengram query --lazy-chunks \\\n  --phrase \"\u003Cphrase 1>\" \\\n  --phrase \"\u003Cphrase 2>\"\n  # ... one --phrase per Step 1 phrase (deep: 10; glance: ~3)\n```\n\nOne call; the binary merges ranking server-side. `engram query` always runs the unified D1\nclustering of the matched notes+chunks in one pass and emits `candidate_l2s: [{path, cosine, content}]`\nper cluster — the within-cluster top-5 notes, and nothing else; explore-sampled notes are never\ncluster members. Separately, the binary samples explore notes from vocab-term centroids near the\nquery and delivers them as top-level `items[]` entries (provenance `explore`, with `source_term`),\nbudgeted to the count of matched notes and reported in `explore_allocated` (a term → delivered-count\nmap, always present — `{}` on missing\u002Funreadable centroid data, degrading visibly to exploit-only). Do NOT\ncollapse phrases, do NOT run per-phrase calls.\n\nThe payload has **two channels**:\n\n**Channel 1 — Relevance (clustered matched items):** Items matched by your 10 phrases, bounded\nto ~300 (top-30 per phrase, unioned, relevance-floor applied). These are clustered and carry\n`candidate_l2s` per cluster (see Step 2.5). Read this channel to surface applicable lessons and\njudge coverage. The payload's `items` mix:\n\n- `kind: chunk` — raw transcript\u002Fdoc fragments with source + anchor. These are EVIDENCE:\n  extract the convention, decision, or correction they show (a reviewer correcting code, a\n  stated standard); never quote them wholesale. **Under `--lazy-chunks` (recall's default\n  invocation — confirm via `budget.lazy_chunks: true`) chunk items carry path + source\u002Fanchor\n  but NO `content` field: `engram show-chunk \u003Csource#anchor>` to read a chunk's evidence on-demand.**\n- `kind: fact` \u002F `feedback` \u002F `runbook` — crystallized lessons; apply directly (notes always carry\n  full content inline). A `runbook` note is a task-type-keyed \"how to approach X\" procedure\n  (`situation`, numbered steps, `done_when`) — it competes and ranks purely by situation-similarity\n  like `fact`\u002F`feedback`, with no dedicated Step-1 phrase or query flag of its own.\n- `provenance: explore` — notes sampled from vocab-term centroids rather than matched by a phrase\n  (see Step 2). Treat them as part of the delivered note set for judging Step 2.5\u002F3; each carries\n  `source_term` naming the centroid it came from.\n\n**Channel 2 — Recent activity (un-clustered):** Items tagged `provenance: recent` — the newest\nchunks by ingest time, appended after the matched set, NOT cluster members. Read this block\nfirst for situational continuity — re-immerse in recent work before diving into the clustered\nresults. These items are NOT used for coverage or synthesis judgment. Do not treat them as\nmatched results; they have no cluster membership and no `candidate_l2s`. Under `--lazy-chunks`\nrecent items also carry path\u002Fsource only (no content) — the paths show where your recent activity\nwas; `engram show-chunk \u003Csource#anchor>` for detail if a specific one matters.\n\n- **Recent items are your own recent activity.** Chunks from a recent source with `turn-N`\n  anchors are first-person `ASSISTANT:` narration you produced in a just-prior or\n  pre-context-clear session. Treat them as your own past actions — do not re-derive them,\n  do not express surprise at them, and dedup against what is already in your context.\n\nIf the matched items (Channel 1) are empty, say so in one sentence, skip Step 2.5, and proceed\nwith your plan. (A non-empty recent-activity block alone does not count as \"something surfaced\"\nfor coverage purposes.)\n\n### Step 2.5 — Lazy note synthesis from the clustering (agent-judged)\n\nThe query output's `clusters` list contains the unified clustering of matched chunks\nand notes. Each cluster carries `candidate_l2s: [{path, cosine, content}]` — the within-cluster\ntop-5 notes ranked from the cluster's own matched members, and nothing else. Explore-sampled notes\n(provenance `explore`, see Step 2) arrive as separate top-level `items[]` entries, not as cluster\nmembers and not in any `candidate_l2s` list — judge them alongside the clustered candidates using\nthe same criteria. A note that did not match any phrase AND was not explore-sampled will never\nappear as a candidate. Superseded-note ride-alongs are inserted at the next rank after the note\nthey supersede. A cluster with no note members yields an empty `candidate_l2s` list; skip to the\nnext cluster when that happens. **Process every cluster, then the explore items.** For each:\n\n**A. Read candidates and members**\n\n`candidate_l2s` entries carry their `content` inline — read it directly; **no `engram show` calls for\ncandidates** (the same content is also on the matching `items[]` note member). For chunk\nmembers, the content is NOT in the payload (chunks carry path\u002Fsource only under `--lazy-chunks`;\nthe cluster's `members` list never carries content) — `engram show-chunk \u003Csource#anchor>` to read the\nevidence on-demand. Do not judge coverage before you have read the candidate content.\n\n**For zero-note clusters (empty `candidate_l2s` list):** The absence of note candidates does NOT skip the chunk-reading requirement. You MUST still call `engram show-chunk` on every chunk member before stating any relevance or coverage judgment about the cluster. A metadata-only judgment (path\u002Ftitle alone, no fetched content) is a violation even when `candidate_l2s` is empty.\n\n**B. Apply the recency weight to resolve conflicts**\n\nEvidence **conflicts** when a newer member explicitly negates or reverses an older claim. Reversal\ncues: \"no longer\", \"replaced by\", \"use X not Y\", or the same subject+predicate appearing with a\ndifferent object in a newer item. When conflict is present: **recent wins**. When no conflict:\ntreat older and newer evidence as independently valid — do not demote a stable convention merely\nbecause it lacks a recent instance.\n\n> **[glance: SKIP Step 2.5C — it is the write side. Read 2.5A + apply 2.5B, do not amend\u002Flearn — continue to Step 2.7 (activate).]**\n\n**C. Judge coverage against the recency-weighted view — in this order**\n\n| Outcome | Criterion | Action |\n| --- | --- | --- |\n| **Covered** | A candidate's claim states the cluster's principle with **no material omission** vs the recency-weighted members | `engram amend --target \u003Ccandidate-path> --activate --chunk-source \u003Cnew-chunk-ids>` — provenance-enrich only; **do not rewrite content**. If this note CORRECTS\u002Fnarrows\u002Frefutes a surfaced note, also pass `--supersedes \"\u003Cbasename>\\|\u003Ctype>\\|\u003Cclaim>\"` (types: `updates\\|narrows\\|refutes`). |\n| **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 \u003Ccandidate-path> --chunk-source \u003Cchunk-ids> --subject ... --predicate ... --object ...` (or `--behavior\u002F--impact\u002F--action`) — re-synthesize content from all members, recency-weighted. Add `--supersedes \"\u003Cbasename>\\|\u003Ctype>\\|\u003Cclaim>\"` if this note corrects a surfaced note. |\n| **Absent** | No candidate addresses the situation | Run `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints, with this handoff — kind=fact or feedback (pick per the cluster's principle), situation + content fields, `--source \"\u003Cdescriptive>\"`, 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. |\n\n**One write per cluster; one representative note per cluster.** The representative is always a note\n(never a chunk). For `absent`, write exactly one note (fact *or* feedback) covering\nthe cluster's principle. Do not write one fact and one feedback note for the same cluster.\n\nPass one `--chunk-source \u003Csource#anchor>` (repeatable) for every **chunk** source in the cluster\n(provenance tracking). For `learn`, pass the same flag plus `--source` (human-readable provenance).\nVocab tags are assigned **automatically** by the binary on every write — do not hand-author them.\n\n**WAIT for each write before moving to the next cluster.** Writes are blocking and inline — the\nnote created or updated by one cluster may be a candidate for another.\n\n### Step 2.7 — Activation (use-driven, after synthesis)\n\nAfter processing all clusters, call `engram activate`\non the notes you actually drew on — the `candidate_l2s` you judged Covered or Near at the\ncoverage table, and any notes you cited in the Step 3 synthesis:\n\n```bash\nengram activate \\\n  --note \"\u003Cpath of note you judged Covered or Near>\" \\\n  --note \"\u003Cpath of note you cited in Step 3>\"\n  # ... one --note per used note only\n```\n\nDo NOT activate every returned note. Do NOT activate recent-channel items (chunks are never\nactivated). Activating only what you used lets superseded-but-surfaced notes fade via recency\nrank — bumping every returned note would defeat the recency-competition mechanism. Skip this\ncall when you drew on no notes (e.g., payload was empty or Step 2.5 was skipped).\n\n### Step 3 — Closing synthesis: did the memories change the plan?\n\n> **[glance: before synthesizing, check for a load-bearing Channel 2 (recent-activity) standard. If your decision turns on honoring a recent convention, escalate to `deep` now — glance surfaces Channel 2 items but does not elevate them to requirements (C5, #661).]**\n\nThe user sees this. Rules:\n\n- **Open with the count.** One sentence: \"Query surfaced N items (K chunks, M notes); crystallized J lessons.\"\n- **Walk the plan from Step 0 in order.** Per numbered action: **confirmed**, **adjusted** (and how), **contradicted**, or **silent**. One short bullet each.\n- **Frame load-bearing conventions as requirements.** Lead with \"Apply these as requirements:\" and list them — drawn from lessons and chunk evidence alike. A plan step memory confirms still inherits the convention's concrete specifics as requirements.\n- **Reconcile every recommendation you produce — not just the Step-0 plan (anti-displacement).** Before stating any option, lever, or recommendation the work generated, reconcile it against the ASKED TASK and decisions already in context. Substituting a prerequisite, a better test, or a \"more rigorous foundation\" as the thing to do *first* FEELS like diligence but IS relitigating the settled task. Reasoning already in context is not new evidence — reconcile against prior OUTCOMES, not mere mentions. Default to the asked task; deviate only by (a) naming a genuinely NEW fact and (b) stating you are reversing direction. If a recommendation here is new (not in the Step-0 plan), STOP — complete Step 3.5 before this reply is shown to the user.\n- **Surface contradictions inline** where they affect the action, as prose.\n- **No payload dumps** — never re-emit YAML, paste whole chunks, or list raw scores\u002Fpaths.\n- **Length:** as long as honesty about the plan requires; if memory was silent on everything, one sentence.\n\n### Step 3.5 — Re-entry: a recommendation not in the Step-0 plan\n\nBefore the Step 3 synthesis is shown to the user: if it is about to ship a recommendation, lever, or\napproach — named as the thing to do — that does **not** appear in the Step-0 plan (it was conceived\nduring the work), run ONE more query first, keyed to the recommendation itself, not the original ask:\n\n```bash\nengram query --lazy-chunks \\\n  --phrase \"\u003Cthe recommendation, in its own words>\" \\\n  --phrase \"\u003Cthe recommendation> rolled back rejected not worth it superseded\" \\\n  --phrase \"\u003Cthe recommendation> tried measured outcome\"\n```\n\nApply Step 2.5B's recency weight to what returns. The synthesis MUST carry one `Re-entry:` line\nper emergent recommendation — the line is the proof the check ran (placement rule below):\n\n```\nRe-entry: \u003Crecommendation> — clean (top hit: \u003Cbest-match basename, or \"no items\">)\nRe-entry: \u003Crecommendation> — CLOSED (\u003Cnote basename>): \u003Cone-line prior outcome> → drop\nRe-entry: \u003Crecommendation> — CLOSED (\u003Cnote basename>): \u003Cone-line prior outcome> → revisit because \u003Cnamed NEW evidence>\n```\n\nThe Re-entry line(s) go **directly above the final recommendation statement** in your reply —\nwriting the recommendation IS the moment the contract comes due. A reply that states a\nrecommendation (a `RECOMMENDATION:` line, a \"the single highest-leverage fix is…\" sentence, or\nequivalent) with no Re-entry line directly above it violates this step.\n\nA recommendation may not ship without its Re-entry line. `CLOSED → drop` means the recommendation\nis withdrawn and the synthesis says what replaces it. `revisit` is valid ONLY with named NEW\nevidence — evidence that did not exist when the note was written; re-weighing the note's own\ntradeoffs is not new evidence.\n\nThis is a new vault query, not the in-context reconcile in Step 3 — that bullet checks reasoning\nalready in your context; this step checks the vault for evidence outside it. If you cite a note\nthis query surfaced, include it in the Step 2.7 `engram activate` call (run it again if 2.7\nalready ran). Runs in both modes (a query is a read; glance keeps it). Skipping the re-entry when\nthe trigger fires is forbidden.\n\n### Step 4 — Persist the reasoned conclusion (linked to the inputs that produced it)\n\n> **[glance: SKIP Step 4 — write side. Escalate to `deep` if this decision is worth crystallizing.]**\n\nWhen your closing synthesis reaches a **sound, non-trivial conclusion that no existing note states** —\nsomething a future session (or a *less capable model* that can't re-derive it) would want, and that you\nor a human may later **inspect or correct** — crystallize it. Reasoning that is never written down\nevaporates; this records the *outcome* and grows the web.\n\nRun `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints, handing it ONE synthesis note per conclusion (kind=fact or feedback, per the conclusion's shape):\n\n- **The note IS the conclusion** (the reasoned lesson), phrased as such — not a restatement of an input.\n- **Certainty by inference mode:** deduction → state it as following necessarily; **abduction \u002F induction\n  → mark it _probable \u002F best-explanation \u002F defeasible_**, never as certain. (Note 69: a non-truth-\n  preserving inference is a hypothesis, not a fact.)\n- **Mark it as derived** in `--source`, e.g. `--source \"synthesis (abduction) from recalled memory\"`, so\n  a human or a weaker model can tell it is a reasoned conclusion to review — not a primitive fact.\n- **If the synthesis conclusion CORRECTS, narrows, or refutes an existing surfaced note**, include\n  the superseded note's basename, type (`updates|narrows|refutes`), and claim in the write-memory\n  handoff — the binary maintains the inverse automatically. Otherwise no link ritual is needed; the\n  binary auto-assigns vocab tags at write time, and recall surfaces vocab-tagged notes via explore\n  sampling at query time. **Never hand-author a `vocab\u002F\u003Cterm>` tag or a `Supersedes:` backlink** —\n  the binary writes both automatically. This does NOT restrict inline `[[full-basename]]` prose\n  citations in the synthesis body: hand-type one directly in the body whenever it cites an input\n  note's claim — ordinary authoring, no CLI mechanism does it for you (and the Gate below, plus the\n  QA-capture step after it, depend on you having written them).\n\n**Gate — do not rot the vault (notes 68\u002F69):** persist ONLY conclusions you judge sound. If it is a\nhunch, you'd hedge below \"probable\", or it merely re-aggregates one note, do NOT persist. One synthesis\nnote per conclusion; link all of its inputs.\n\n**After the synthesis note: if the synthesis body contains ≥1 `[[full-basename]]` wikilink,\nALSO run `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints** with kind=qa — verbatim question, the synthesis conclusion\nas the answer, certainty matching the synthesis note's label, contributors = the wikilink\nbasenames, source \"recall Step 4, session \u003Cdate>\".\n\nContributors are auto-extracted from the `[[full-basename]]` wikilinks you already wrote in the\nsynthesis body — do NOT free-list (\"what notes did you use?\"). If the synthesis body contains no\nwikilinks, skip the QA capture (D2 bar: ≥1 citation required).\n\n## Red flags — STOP and re-read\n\n| Sign you're off-script | What you should be doing |\n| --- | --- |\n| You never printed Step 0 | Back up — the skill is a no-op without it |\n| You skipped the Step 0.5 sweep with no prior sweep this session | It costs seconds and keeps memory current |\n| `--vault` or `--chunks-dir` on the query | `engram query --phrase ...` only — the binary always runs the unified D1 clustering and emits `candidate_l2s` |\n| Separate query calls per phrase | One call, repeatable `--phrase` flags |\n| You quoted chunks wholesale into the reply | Extract the principle a chunk evidences; paraphrase |\n| You dispatched cluster-synthesis subagents | Gone — Step 2.5 crystallizes inline from the payload's clusters |\n| You judged coverage before reading the candidate content (now inline in `candidate_l2s`) | Read first — cosine alone cannot decide coverage |\n| You applied a cosine threshold to decide covered\u002Fnear\u002Fabsent | Coverage is agent-judged from content; cosine only nominates candidates |\n| A candidate matching only the superseded content → you marked it \"covered\" | Apply the recency weight first; a candidate that misses the conflict is \"near\" |\n| You wrote two notes (a fact AND a feedback) for one cluster | One representative note per cluster — pick the right kind |\n| You called `engram learn --target` to update a note in place | Updates use `engram amend`; `engram learn` is create-only |\n| A `≥0.95` cluster → you activated without reading the candidates | Read first; high cosine nominates, it does not decide |\n| 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 \u003Csource#anchor>` to read their evidence. |\n| You assumed a chunk's content is inline and skipped its evidence | Under `--lazy-chunks` chunks carry path\u002Fsource only — `engram show-chunk \u003Csource#anchor>` on-demand before judging coverage |\n| 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 |\n| 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 |\n| You activated every returned note | Activate only the notes you actually USED — judged Covered\u002FNear or cited in Step 3 |\n| You activated recent-channel items | Chunks are never activated; recent-block items are not activation targets |\n| You skipped `engram activate` after drawing on notes | Call it after synthesis — used notes must stay warm or the recency-competition mechanism breaks |\n| You're about to write `--relation`, or hand-author a `vocab\u002F\u003Cterm>` tag or a `Supersedes:` backlink | The binary removed `--relation`; vocab tags are automatic; use `--supersedes` only when the note corrects\u002Fnarrows\u002Frefutes a surfaced note. This does NOT cover inline `[[full-basename]]` prose citations in a synthesis body — hand-type those whenever citing an input note's claim is warranted |\n| You composed an engram learn command yourself at a write site | Write sites hand off to write-memory — parents judge, the worker writes |\n| Reply is a memory dump with no plan reference | Restart Step 3: walk the plan and judge each piece |\n| 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 |\n| You wrote a recommendation line with no `Re-entry:` line directly above it | Step 3.5 — run the query, write the Re-entry line(s) directly above the recommendation |\n| You ran the write side (2.5C\u002FStep 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 |\n| 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) |\n","# Recall from Unified Memory\n\nSurface relevant memories — raw conversation\u002Fdoc chunks AND crystallized vault lessons in one ranking — lay your planned actions against them, and report, out loud, whether memory changed the plan.\n\n## Overview\n\nMemory 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:\n\n1. **Make your plan visible** before retrieving anything — an unstated plan cannot be tested against memory.\n2. **Sweep, then run ONE unified `engram query`.** Items tagged `kind: chunk` are raw fragments; `kind: fact`\u002F`feedback`\u002F`runbook` are crystallized lessons. They compete in the same top-N.\n3. **Crystallize** — when several near-match chunks evidence the same principle and no note states it yet, write the vault note now.\n4. **Explore-sample and ride-along** — the binary samples additional notes from vocab-term centroids near the query (budget sized to the matched-note count) and inserts superseded-note supersessors at the next rank; the agent judges the surfaced candidates, never links.\n5. **Synthesize impact on the plan** — confirm \u002F adjust \u002F contradict \u002F silent, per planned action.\n6. **Re-enter for emergent recommendations** — a recommendation conceived mid-work gets its own\n   lever-keyed query and a `Re-entry:` line directly above it before it ships (Step 3.5).\n\nThe binary resolves the vault and chunk index automatically (`$XDG_DATA_HOME\u002Fengram\u002F...`;\n`ENGRAM_VAULT_PATH` \u002F `ENGRAM_CHUNKS_DIR` override). **Do not pass `--vault` or `--chunks-dir`.**\n\n## Modes — `glance` vs `deep` (the depth dial)\n\nRecall runs in one of two **modes**, selected by the caller (the mode word is the skill argument; absent → `deep`):\n\n- **`deep` (default).** The full procedure below — all 10 phrases and the write side (Steps 2.5C, Step 4).\n  It both *applies* memory to this decision **and** *grows the vault* (crystallizes, persists synthesis).\n  Use it when the decision is weighty or irreversible, when you want recall to also learn, or when in doubt.\n- **`glance` (opt-in, cheap — for firing often).** A pass that is **read-only with respect to vault knowledge**\n  (Step 2.7 `activate` still bumps the used-notes recency metadata — that is kept, not a knowledge write). Run\n  Steps 0–3.5 with **~3 phrases** (not 10) and **keep the read side** — Step 2.5A (read candidates), **Step 2.5B\n  (apply the recency weight)**, Step 2.7 (activate used notes), the Step 3 synthesis, and Step 3.5 (the\n  re-entry query, when triggered) — but **skip the write side**: Step 2.5C (coverage amend\u002Flearn), Step 4\n  (synthesis-persist). Glance *applies* memory to this decision; it does **not** grow the vault's knowledge.\n\n**Escalate `glance` → `deep` for recency-channel standards (C5).** Glance reliably *surfaces* a recent-activity\n(Channel 2) item but does **not** elevate it to a requirement — measured: glance honors a recent-channel\nstandard **0\u002F5** where deep honors it **4\u002F5** (#661 full-bars). So if your decision turns on **honoring a\nstandard that surfaced in the recent-activity channel** (a \"use X going forward\" \u002F \"the new convention is Y\"\nitem in Channel 2), **switch to `deep`**. Glance is validated as deep-equivalent only for applying conventions\n(C3), recency *supersession within the matched set* (C4i, via 2.5B), and abduction\u002Fsynthesis (C6).\n\nEverything below is the `deep` procedure; a **[glance: …]** note marks each step that differs under `glance`.\n\n## The procedure\n\n### Step 0 — Print your upfront judgement\n\n**Before any engram call**, print three short blocks. Plain prose, no headers needed:\n\n- **Ask:** what is being asked, in your own words. One or two sentences.\n- **Situation:** the concrete context — repo, branch, the operation underway, what's loaded into your context. One short paragraph.\n- **Plan:** the action(s) you would take next absent any guidance from memory. Numbered list.\n\nSkipping Step 0 is forbidden. The whole purpose of recall is to test a stated plan against memory.\n\n### Step 0.5 — Sweep\n\n```bash\nengram ingest --auto\n```\n\nSeconds when nothing changed; guarantees the index includes the latest sessions and doc edits.\nIf it errors, say so and continue — retrieval over a slightly-stale index beats no retrieval.\nIf a sweep (`engram ingest --auto`) already ran earlier in THIS session, skip it — intra-session\nre-sweeps index turns already in your context; the closing learn's sweep preserves freshness for\nfuture sessions. This holds even under a \"something might have changed outside this session\n(another terminal, another agent)\" worry — that gets picked up by the next sweep (yours or\ntheirs), not by re-sweeping now on suspicion.\n\n### Step 1 — Phrase queries from your plan and situation\n\n> **[glance: generate ~3 phrases, not 10 — the measured retrieval floor, #661 Phase 1. Breadth is for crystallization; glance only needs this decision's lesson.]**\n\nAlways generate exactly **10** short queryable phrases, one from each of these angles:\n\n1. **Situation\u002Fsetting** — the concrete environment you are operating in.\n2. **User's intent\u002Fgoal** — what the user ultimately wants to achieve.\n3. **Current concrete action** — the specific thing you are about to do next.\n4. **Problem\u002Fblocker** — the obstacle or constraint you are addressing.\n5. **Candidate solution\u002Fapproach** — the technique or strategy you plan to apply.\n6. **Tooling\u002Ftech in play** — the specific tools, libraries, or languages involved.\n7. **Prior related work** — previous work in this area you may be building on.\n8. **Adjacent technique** — a related approach worth comparing or cross-checking.\n9. **Failure mode to avoid** — a known pitfall or anti-pattern relevant to this work.\n10. **Domain\u002Fconcept** — the broader conceptual area the task lives in.\n\nEach phrase is short and specific. No pre-filtering: you can't know what's in memory before you\nquery. Drop only obvious dross (a bare noun like \"coding\"). **Query by task, not by fear** —\n\"implementing Claude Code hooks\", not \"common mistakes when writing hooks\". The binary caps\nresults to the top-30 matches per phrase.\n\n### Step 2 — Run ONE unified `engram query` with all phrases\n\n```bash\nengram query --lazy-chunks \\\n  --phrase \"\u003Cphrase 1>\" \\\n  --phrase \"\u003Cphrase 2>\"\n  # ... one --phrase per Step 1 phrase (deep: 10; glance: ~3)\n```\n\nOne call; the binary merges ranking server-side. `engram query` always runs the unified D1\nclustering of the matched notes+chunks in one pass and emits `candidate_l2s: [{path, cosine, content}]`\nper cluster — the within-cluster top-5 notes, and nothing else; explore-sampled notes are never\ncluster members. Separately, the binary samples explore notes from vocab-term centroids near the\nquery and delivers them as top-level `items[]` entries (provenance `explore`, with `source_term`),\nbudgeted to the count of matched notes and reported in `explore_allocated` (a term → delivered-count\nmap, always present — `{}` on missing\u002Funreadable centroid data, degrading visibly to exploit-only). Do NOT\ncollapse phrases, do NOT run per-phrase calls.\n\nThe payload has **two channels**:\n\n**Channel 1 — Relevance (clustered matched items):** Items matched by your 10 phrases, bounded\nto ~300 (top-30 per phrase, unioned, relevance-floor applied). These are clustered and carry\n`candidate_l2s` per cluster (see Step 2.5). Read this channel to surface applicable lessons and\njudge coverage. The payload's `items` mix:\n\n- `kind: chunk` — raw transcript\u002Fdoc fragments with source + anchor. These are EVIDENCE:\n  extract the convention, decision, or correction they show (a reviewer correcting code, a\n  stated standard); never quote them wholesale. **Under `--lazy-chunks` (recall's default\n  invocation — confirm via `budget.lazy_chunks: true`) chunk items carry path + source\u002Fanchor\n  but NO `content` field: `engram show-chunk \u003Csource#anchor>` to read a chunk's evidence on-demand.**\n- `kind: fact` \u002F `feedback` \u002F `runbook` — crystallized lessons; apply directly (notes always carry\n  full content inline). A `runbook` note is a task-type-keyed \"how to approach X\" procedure\n  (`situation`, numbered steps, `done_when`) — it competes and ranks purely by situation-similarity\n  like `fact`\u002F`feedback`, with no dedicated Step-1 phrase or query flag of its own.\n- `provenance: explore` — notes sampled from vocab-term centroids rather than matched by a phrase\n  (see Step 2). Treat them as part of the delivered note set for judging Step 2.5\u002F3; each carries\n  `source_term` naming the centroid it came from.\n\n**Channel 2 — Recent activity (un-clustered):** Items tagged `provenance: recent` — the newest\nchunks by ingest time, appended after the matched set, NOT cluster members. Read this block\nfirst for situational continuity — re-immerse in recent work before diving into the clustered\nresults. These items are NOT used for coverage or synthesis judgment. Do not treat them as\nmatched results; they have no cluster membership and no `candidate_l2s`. Under `--lazy-chunks`\nrecent items also carry path\u002Fsource only (no content) — the paths show where your recent activity\nwas; `engram show-chunk \u003Csource#anchor>` for detail if a specific one matters.\n\n- **Recent items are your own recent activity.** Chunks from a recent source with `turn-N`\n  anchors are first-person `ASSISTANT:` narration you produced in a just-prior or\n  pre-context-clear session. Treat them as your own past actions — do not re-derive them,\n  do not express surprise at them, and dedup against what is already in your context.\n\nIf the matched items (Channel 1) are empty, say so in one sentence, skip Step 2.5, and proceed\nwith your plan. (A non-empty recent-activity block alone does not count as \"something surfaced\"\nfor coverage purposes.)\n\n### Step 2.5 — Lazy note synthesis from the clustering (agent-judged)\n\nThe query output's `clusters` list contains the unified clustering of matched chunks\nand notes. Each cluster carries `candidate_l2s: [{path, cosine, content}]` — the within-cluster\ntop-5 notes ranked from the cluster's own matched members, and nothing else. Explore-sampled notes\n(provenance `explore`, see Step 2) arrive as separate top-level `items[]` entries, not as cluster\nmembers and not in any `candidate_l2s` list — judge them alongside the clustered candidates using\nthe same criteria. A note that did not match any phrase AND was not explore-sampled will never\nappear as a candidate. Superseded-note ride-alongs are inserted at the next rank after the note\nthey supersede. A cluster with no note members yields an empty `candidate_l2s` list; skip to the\nnext cluster when that happens. **Process every cluster, then the explore items.** For each:\n\n**A. Read candidates and members**\n\n`candidate_l2s` entries carry their `content` inline — read it directly; **no `engram show` calls for\ncandidates** (the same content is also on the matching `items[]` note member). For chunk\nmembers, the content is NOT in the payload (chunks carry path\u002Fsource only under `--lazy-chunks`;\nthe cluster's `members` list never carries content) — `engram show-chunk \u003Csource#anchor>` to read the\nevidence on-demand. Do not judge coverage before you have read the candidate content.\n\n**For zero-note clusters (empty `candidate_l2s` list):** The absence of note candidates does NOT skip the chunk-reading requirement. You MUST still call `engram show-chunk` on every chunk member before stating any relevance or coverage judgment about the cluster. A metadata-only judgment (path\u002Ftitle alone, no fetched content) is a violation even when `candidate_l2s` is empty.\n\n**B. Apply the recency weight to resolve conflicts**\n\nEvidence **conflicts** when a newer member explicitly negates or reverses an older claim. Reversal\ncues: \"no longer\", \"replaced by\", \"use X not Y\", or the same subject+predicate appearing with a\ndifferent object in a newer item. When conflict is present: **recent wins**. When no conflict:\ntreat older and newer evidence as independently valid — do not demote a stable convention merely\nbecause it lacks a recent instance.\n\n> **[glance: SKIP Step 2.5C — it is the write side. Read 2.5A + apply 2.5B, do not amend\u002Flearn — continue to Step 2.7 (activate).]**\n\n**C. Judge coverage against the recency-weighted view — in this order**\n\n| Outcome | Criterion | Action |\n| --- | --- | --- |\n| **Covered** | A candidate's claim states the cluster's principle with **no material omission** vs the recency-weighted members | `engram amend --target \u003Ccandidate-path> --activate --chunk-source \u003Cnew-chunk-ids>` — provenance-enrich only; **do not rewrite content**. If this note CORRECTS\u002Fnarrows\u002Frefutes a surfaced note, also pass `--supersedes \"\u003Cbasename>\\|\u003Ctype>\\|\u003Cclaim>\"` (types: `updates\\|narrows\\|refutes`). |\n| **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 \u003Ccandidate-path> --chunk-source \u003Cchunk-ids> --subject ... --predicate ... --object ...` (or `--behavior\u002F--impact\u002F--action`) — re-synthesize content from all members, recency-weighted. Add `--supersedes \"\u003Cbasename>\\|\u003Ctype>\\|\u003Cclaim>\"` if this note corrects a surfaced note. |\n| **Absent** | No candidate addresses the situation | Run `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints, with this handoff — kind=fact or feedback (pick per the cluster's principle), situation + content fields, `--source \"\u003Cdescriptive>\"`, 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. |\n\n**One write per cluster; one representative note per cluster.** The representative is always a note\n(never a chunk). For `absent`, write exactly one note (fact *or* feedback) covering\nthe cluster's principle. Do not write one fact and one feedback note for the same cluster.\n\nPass one `--chunk-source \u003Csource#anchor>` (repeatable) for every **chunk** source in the cluster\n(provenance tracking). For `learn`, pass the same flag plus `--source` (human-readable provenance).\nVocab tags are assigned **automatically** by the binary on every write — do not hand-author them.\n\n**WAIT for each write before moving to the next cluster.** Writes are blocking and inline — the\nnote created or updated by one cluster may be a candidate for another.\n\n### Step 2.7 — Activation (use-driven, after synthesis)\n\nAfter processing all clusters, call `engram activate`\non the notes you actually drew on — the `candidate_l2s` you judged Covered or Near at the\ncoverage table, and any notes you cited in the Step 3 synthesis:\n\n```bash\nengram activate \\\n  --note \"\u003Cpath of note you judged Covered or Near>\" \\\n  --note \"\u003Cpath of note you cited in Step 3>\"\n  # ... one --note per used note only\n```\n\nDo NOT activate every returned note. Do NOT activate recent-channel items (chunks are never\nactivated). Activating only what you used lets superseded-but-surfaced notes fade via recency\nrank — bumping every returned note would defeat the recency-competition mechanism. Skip this\ncall when you drew on no notes (e.g., payload was empty or Step 2.5 was skipped).\n\n### Step 3 — Closing synthesis: did the memories change the plan?\n\n> **[glance: before synthesizing, check for a load-bearing Channel 2 (recent-activity) standard. If your decision turns on honoring a recent convention, escalate to `deep` now — glance surfaces Channel 2 items but does not elevate them to requirements (C5, #661).]**\n\nThe user sees this. Rules:\n\n- **Open with the count.** One sentence: \"Query surfaced N items (K chunks, M notes); crystallized J lessons.\"\n- **Walk the plan from Step 0 in order.** Per numbered action: **confirmed**, **adjusted** (and how), **contradicted**, or **silent**. One short bullet each.\n- **Frame load-bearing conventions as requirements.** Lead with \"Apply these as requirements:\" and list them — drawn from lessons and chunk evidence alike. A plan step memory confirms still inherits the convention's concrete specifics as requirements.\n- **Reconcile every recommendation you produce — not just the Step-0 plan (anti-displacement).** Before stating any option, lever, or recommendation the work generated, reconcile it against the ASKED TASK and decisions already in context. Substituting a prerequisite, a better test, or a \"more rigorous foundation\" as the thing to do *first* FEELS like diligence but IS relitigating the settled task. Reasoning already in context is not new evidence — reconcile against prior OUTCOMES, not mere mentions. Default to the asked task; deviate only by (a) naming a genuinely NEW fact and (b) stating you are reversing direction. If a recommendation here is new (not in the Step-0 plan), STOP — complete Step 3.5 before this reply is shown to the user.\n- **Surface contradictions inline** where they affect the action, as prose.\n- **No payload dumps** — never re-emit YAML, paste whole chunks, or list raw scores\u002Fpaths.\n- **Length:** as long as honesty about the plan requires; if memory was silent on everything, one sentence.\n\n### Step 3.5 — Re-entry: a recommendation not in the Step-0 plan\n\nBefore the Step 3 synthesis is shown to the user: if it is about to ship a recommendation, lever, or\napproach — named as the thing to do — that does **not** appear in the Step-0 plan (it was conceived\nduring the work), run ONE more query first, keyed to the recommendation itself, not the original ask:\n\n```bash\nengram query --lazy-chunks \\\n  --phrase \"\u003Cthe recommendation, in its own words>\" \\\n  --phrase \"\u003Cthe recommendation> rolled back rejected not worth it superseded\" \\\n  --phrase \"\u003Cthe recommendation> tried measured outcome\"\n```\n\nApply Step 2.5B's recency weight to what returns. The synthesis MUST carry one `Re-entry:` line\nper emergent recommendation — the line is the proof the check ran (placement rule below):\n\n```\nRe-entry: \u003Crecommendation> — clean (top hit: \u003Cbest-match basename, or \"no items\">)\nRe-entry: \u003Crecommendation> — CLOSED (\u003Cnote basename>): \u003Cone-line prior outcome> → drop\nRe-entry: \u003Crecommendation> — CLOSED (\u003Cnote basename>): \u003Cone-line prior outcome> → revisit because \u003Cnamed NEW evidence>\n```\n\nThe Re-entry line(s) go **directly above the final recommendation statement** in your reply —\nwriting the recommendation IS the moment the contract comes due. A reply that states a\nrecommendation (a `RECOMMENDATION:` line, a \"the single highest-leverage fix is…\" sentence, or\nequivalent) with no Re-entry line directly above it violates this step.\n\nA recommendation may not ship without its Re-entry line. `CLOSED → drop` means the recommendation\nis withdrawn and the synthesis says what replaces it. `revisit` is valid ONLY with named NEW\nevidence — evidence that did not exist when the note was written; re-weighing the note's own\ntradeoffs is not new evidence.\n\nThis is a new vault query, not the in-context reconcile in Step 3 — that bullet checks reasoning\nalready in your context; this step checks the vault for evidence outside it. If you cite a note\nthis query surfaced, include it in the Step 2.7 `engram activate` call (run it again if 2.7\nalready ran). Runs in both modes (a query is a read; glance keeps it). Skipping the re-entry when\nthe trigger fires is forbidden.\n\n### Step 4 — Persist the reasoned conclusion (linked to the inputs that produced it)\n\n> **[glance: SKIP Step 4 — write side. Escalate to `deep` if this decision is worth crystallizing.]**\n\nWhen your closing synthesis reaches a **sound, non-trivial conclusion that no existing note states** —\nsomething a future session (or a *less capable model* that can't re-derive it) would want, and that you\nor a human may later **inspect or correct** — crystallize it. Reasoning that is never written down\nevaporates; this records the *outcome* and grows the web.\n\nRun `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints, handing it ONE synthesis note per conclusion (kind=fact or feedback, per the conclusion's shape):\n\n- **The note IS the conclusion** (the reasoned lesson), phrased as such — not a restatement of an input.\n- **Certainty by inference mode:** deduction → state it as following necessarily; **abduction \u002F induction\n  → mark it _probable \u002F best-explanation \u002F defeasible_**, never as certain. (Note 69: a non-truth-\n  preserving inference is a hypothesis, not a fact.)\n- **Mark it as derived** in `--source`, e.g. `--source \"synthesis (abduction) from recalled memory\"`, so\n  a human or a weaker model can tell it is a reasoned conclusion to review — not a primitive fact.\n- **If the synthesis conclusion CORRECTS, narrows, or refutes an existing surfaced note**, include\n  the superseded note's basename, type (`updates|narrows|refutes`), and claim in the write-memory\n  handoff — the binary maintains the inverse automatically. Otherwise no link ritual is needed; the\n  binary auto-assigns vocab tags at write time, and recall surfaces vocab-tagged notes via explore\n  sampling at query time. **Never hand-author a `vocab\u002F\u003Cterm>` tag or a `Supersedes:` backlink** —\n  the binary writes both automatically. This does NOT restrict inline `[[full-basename]]` prose\n  citations in the synthesis body: hand-type one directly in the body whenever it cites an input\n  note's claim — ordinary authoring, no CLI mechanism does it for you (and the Gate below, plus the\n  QA-capture step after it, depend on you having written them).\n\n**Gate — do not rot the vault (notes 68\u002F69):** persist ONLY conclusions you judge sound. If it is a\nhunch, you'd hedge below \"probable\", or it merely re-aggregates one note, do NOT persist. One synthesis\nnote per conclusion; link all of its inputs.\n\n**After the synthesis note: if the synthesis body contains ≥1 `[[full-basename]]` wikilink,\nALSO run `engram show 6a.2026-09-22.write-memory-compose-execute-verify` in Bash (a shell command — write-memory is not a Skill tool) and follow what it prints** with kind=qa — verbatim question, the synthesis conclusion\nas the answer, certainty matching the synthesis note's label, contributors = the wikilink\nbasenames, source \"recall Step 4, session \u003Cdate>\".\n\nContributors are auto-extracted from the `[[full-basename]]` wikilinks you already wrote in the\nsynthesis body — do NOT free-list (\"what notes did you use?\"). If the synthesis body contains no\nwikilinks, skip the QA capture (D2 bar: ≥1 citation required).\n\n## Red flags — STOP and re-read\n\n| Sign you're off-script | What you should be doing |\n| --- | --- |\n| You never printed Step 0 | Back up — the skill is a no-op without it |\n| You skipped the Step 0.5 sweep with no prior sweep this session | It costs seconds and keeps memory current |\n| `--vault` or `--chunks-dir` on the query | `engram query --phrase ...` only — the binary always runs the unified D1 clustering and emits `candidate_l2s` |\n| Separate query calls per phrase | One call, repeatable `--phrase` flags |\n| You quoted chunks wholesale into the reply | Extract the principle a chunk evidences; paraphrase |\n| You dispatched cluster-synthesis subagents | Gone — Step 2.5 crystallizes inline from the payload's clusters |\n| You judged coverage before reading the candidate content (now inline in `candidate_l2s`) | Read first — cosine alone cannot decide coverage |\n| You applied a cosine threshold to decide covered\u002Fnear\u002Fabsent | Coverage is agent-judged from content; cosine only nominates candidates |\n| A candidate matching only the superseded content → you marked it \"covered\" | Apply the recency weight first; a candidate that misses the conflict is \"near\" |\n| You wrote two notes (a fact AND a feedback) for one cluster | One representative note per cluster — pick the right kind |\n| You called `engram learn --target` to update a note in place | Updates use `engram amend`; `engram learn` is create-only |\n| A `≥0.95` cluster → you activated without reading the candidates | Read first; high cosine nominates, it does not decide |\n| 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 \u003Csource#anchor>` to read their evidence. |\n| You assumed a chunk's content is inline and skipped its evidence | Under `--lazy-chunks` chunks carry path\u002Fsource only — `engram show-chunk \u003Csource#anchor>` on-demand before judging coverage |\n| 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 |\n| 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 |\n| You activated every returned note | Activate only the notes you actually USED — judged Covered\u002FNear or cited in Step 3 |\n| You activated recent-channel items | Chunks are never activated; recent-block items are not activation targets |\n| You skipped `engram activate` after drawing on notes | Call it after synthesis — used notes must stay warm or the recency-competition mechanism breaks |\n| You're about to write `--relation`, or hand-author a `vocab\u002F\u003Cterm>` tag or a `Supersedes:` backlink | The binary removed `--relation`; vocab tags are automatic; use `--supersedes` only when the note corrects\u002Fnarrows\u002Frefutes a surfaced note. This does NOT cover inline `[[full-basename]]` prose citations in a synthesis body — hand-type those whenever citing an input note's claim is warranted |\n| You composed an engram learn command yourself at a write site | Write sites hand off to write-memory — parents judge, the worker writes |\n| Reply is a memory dump with no plan reference | Restart Step 3: walk the plan and judge each piece |\n| 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 |\n| You wrote a recommendation line with no `Re-entry:` line directly above it | Step 3.5 — run the query, write the Re-entry line(s) directly above the recommendation |\n| You ran the write side (2.5C\u002FStep 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 |\n| 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) |\n",{"name":5,"description":7},"main","d2ce817c74ee4fc65645635887510b47b231230f","dev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskWriteMemory\u002Frecall-learn\u002Frecall",2,"https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram","https:\u002F\u002Fgithub.com\u002Ftoejough","2026-10-25 06:42:30",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add toejough\u002Fengram --skill recall",{"tool":45,"command":46},"bunx","bunx skills add toejough\u002Fengram --skill recall",{"tool":48,"command":49},"pnpm","pnpm dlx skills add toejough\u002Fengram --skill recall","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskWriteMemory\u002Frecall-learn\u002Frecall\u002FSKILL.md",true,[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"agents\u002Fopenai.yaml","REFERENCE","参考文档",397,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FSecurity-and-Compliance\u002Freverse-skill-router\u002FCTF-Sandbox-Orchestrator\u002Fcompetition-custom-protocol-replay\u002Fagents\u002Fopenai.yaml",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fcustom-protocol-replay.md",1090,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FSecurity-and-Compliance\u002Freverse-skill-router\u002FCTF-Sandbox-Orchestrator\u002Fcompetition-custom-protocol-replay\u002Freferences\u002Fcustom-protocol-replay.md",[64,69,74,96,114,132],{"skillNo":65,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":27},"01M6CWPEHWS45MANQE0JW6Z146","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Fskills_auto_l2\u002Frecall\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26],{"skillNo":70,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":27},"01M6CWPAZ9N9CE1RC754XEJ021","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Fskills_auto\u002Frecall\u002FSKILL.md",[],[5,20,23,19,18,21,22,24,25,26],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":27},"01M6CWP4XPAJYCJMZAPYNWTN3A","learn","Use after work begun with recall, or any work requiring more than one tool call or non-trivial thought. Use immediately for explicit save requests (\"remember this\", \"save that\", \"note for next time\"), and the moment a review, failing check, or user correction confirms a lesson; capture it before applying the fix. Also use at session end when a presented conclusion, design, or finding was later overturned or corrected. Use when a specific approach is confirmed: the user praises a reusable behavior, or an uncertain choice succeeds with observable evidence. This preserves lessons for future recall.","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskWriteMemory\u002Frecall-learn\u002Flearn\u002FSKILL.md",[],[76,81,82,25,83,84,85,86,21,87,88,89,90,91,92,5,19,93,94,95],"time","next","lesson","later","reusable","evidence","session","choice","fix","design","review","remember","work","check","behavior",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":27},"01M6CWP2649X2F3WZ6EBJHA4MS","write-memory","Executes a vault write handed off by another skill (recall, learn): composes the engram command from the provided fields, runs it, verifies the result, and reports the written note path. Requires a handoff — do not fire on your own judgment that something is worth remembering.","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskWriteMemory\u002FWM-S\u002Fskills\u002Fwrite-memory\u002FSKILL.md",[],[103,104,105,106,107,76,108,5,109,110,111,112,113],"write","write memory","memory","command","handoff","vault","reports","do","engram","another skill","judgment",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":125,"publishedAt":27},"01M6CWNYJCGD4B180MM5852D1N","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskTDD\u002FTDD-S\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":123,"taxonomyTypeDesc":124},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[126,127,128,129,130,21,131],"test","test driven development","development","writing","code","implementation",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":27},"01M6CWNTQ5K1QXT21JAN2ZQ5KR","route","Use when you are about to dispatch a subagent and must decide its agent type, model, and effort level. Triggers on any delegation decision, and when you recognize a unit is too large for one focused agent and needs decomposition before dispatch.","https:\u002F\u002Fgithub.com\u002Ftoejough\u002Fengram\u002Fblob\u002Fmain\u002Fdev\u002Feval\u002Fcumulative\u002Frunbook_vs_skill\u002Fphase2\u002Fencodings\u002FtaskRoute\u002FRoute-S\u002Fskills\u002Froute\u002FSKILL.md",[],[134,139,140,141,142,21,143,144],"subagent","model","decision","decide","dispatch","delegation"]