{
  "edges": [
    {"from": "after", "label": "sandman serve encodes it, one episode at a time", "to": "encode"},
    {"from": "after", "label": "sandman serve releases a transcript no note holds once it has been unheld for a week, while check passes", "to": "release"},
    {"from": "archive", "label": "taken", "to": "chart"},
    {"from": "archive", "label": "release's plan: what is held, what goes (check --release)", "to": "check"},
    {"from": "archive", "label": "③ reads the transcript", "to": "encode"},
    {"from": "archive", "label": "⑤ recent episodes, replayed", "to": "reflect"},
    {"from": "banks", "label": "memories", "to": "chart"},
    {"from": "banks", "label": "④ the bank's memories, whole within the budget, the rest listed", "to": "consolidate"},
    {"from": "chart", "label": "one JSON object on stdout", "to": "bifrost"},
    {"from": "check", "label": "--fix: ids and sources mended, each note by temp + rename", "to": "banks"},
    {"from": "check", "label": "--fix: one check line", "to": "ledger"},
    {"from": "consolidate", "label": "④ keeps a trace as a memory, merges one into a memory", "to": "banks"},
    {"from": "consolidate", "label": "④ folds a topic's traces into its knowledge pages and playbooks", "to": "knowledge"},
    {"from": "consolidate", "label": "④ the consolidate, with its outcome and counts", "to": "ledger"},
    {"from": "consolidate", "label": "④ each consumed trace, merged or pruned memory, and the reply, moved aside", "to": "pruned"},
    {"from": "defer", "label": "one intention, written, pushed or closed", "to": "intentions"},
    {"from": "defer", "label": "the defer, push, done or drop", "to": "ledger"},
    {"from": "defer", "label": "done on a graduation's proposal: the note moved aside, a graduate line", "to": "pruned"},
    {"from": "during", "label": "the owner runs sandman check (--fix, --release)", "to": "check"},
    {"from": "during", "label": "the agent runs sandman defer when the person puts work off", "to": "defer"},
    {"from": "during", "label": "the /delete skill or bridge's forget button runs sandman forget, in-session and again once the CLI exits", "to": "forget"},
    {"from": "during", "label": "the subether mod runs sandman mark: a guard per denied tool call", "to": "mark"},
    {"from": "during", "label": "the agent runs sandman remember", "to": "remember"},
    {"from": "during", "label": "the agent runs sandman rethink once a recalled note proves used, wrong, stale or irrelevant", "to": "rethink"},
    {"from": "encode", "label": "③ an example per verdict on a recalled note", "to": "eval"},
    {"from": "encode", "label": "③ a rethink line per verdict on a recalled note, then the encode, with its outcome", "to": "ledger"},
    {"from": "encode", "label": "③ the episode's traces, each with its session id and archive path: a memory by repository, knowledge and playbooks by topic", "to": "traces"},
    {"from": "end", "label": "the subether mod runs sandman take", "to": "take"},
    {"from": "eval", "label": "④ the recall evaluation's examples, scored before and after: a merge that lowers the score is reverted", "to": "consolidate"},
    {"from": "eval", "label": "⑤ the misses since; a proposed selection question scored on the examples", "to": "reflect"},
    {"from": "forget", "label": "removes its archived copies", "to": "archive"},
    {"from": "forget", "label": "removes a consolidate's keep of it; rewrites a merge's source without it", "to": "banks"},
    {"from": "forget", "label": "drops its examples", "to": "eval"},
    {"from": "forget", "label": "drops an intention's link to it, keeping the intention", "to": "intentions"},
    {"from": "forget", "label": "removes a page kept from it", "to": "knowledge"},
    {"from": "forget", "label": "first: drops every line naming it but a rewrite line, kept without it, under the writers' lock", "to": "ledger"},
    {"from": "forget", "label": "removes its pruned copies and the ops on them", "to": "pruned"},
    {"from": "forget", "label": "removes its traces", "to": "traces"},
    {"from": "intentions", "label": "intentions", "to": "chart"},
    {"from": "intentions", "label": "① what is due and what waits on an event: the seed's due block", "to": "recall"},
    {"from": "knowledge", "label": "knowledge", "to": "chart"},
    {"from": "knowledge", "label": "④ the topic's pages, whole within the budget, the rest listed", "to": "consolidate"},
    {"from": "later", "label": "sandman serve consolidates a quiet bank's traces when no episode waits", "to": "consolidate"},
    {"from": "ledger", "label": "active, guards", "to": "chart"},
    {"from": "ledger", "label": "rewrite lines held to invariants 4–5, releases to 7", "to": "check"},
    {"from": "ledger", "label": "⑤ the runs since the last review, remembers, recall's sends and reads", "to": "reflect"},
    {"from": "machine", "label": "the machine id", "to": "chart"},
    {"from": "mark", "label": "a call or a prompt: one line", "to": "ledger"},
    {"from": "prompts", "label": "④ the guidance, when the file holds any", "to": "consolidate"},
    {"from": "prompts", "label": "③ the guidance, when the file holds any", "to": "encode"},
    {"from": "prompts", "label": "① the selection question, when prompts/question.md holds one", "to": "recall"},
    {"from": "prompts", "label": "⑤ the guidance in force", "to": "reflect"},
    {"from": "pruned", "label": "⑤ consolidate's ops, and past banks rebuilt to replay", "to": "reflect"},
    {"from": "recall", "label": "① the start mark, before anything is recalled: one line, O_APPEND", "to": "ledger"},
    {"from": "recall", "label": "① reads the machine id, minting it once", "to": "machine"},
    {"from": "reflect", "label": "⑤ a graduation proposed: an intention due today", "to": "intentions"},
    {"from": "reflect", "label": "⑤ the review, with its outcome and replay counts", "to": "ledger"},
    {"from": "reflect", "label": "⑤ a guidance judged no worse; the one it replaces under .history/", "to": "prompts"},
    {"from": "reflect", "label": "⑤ decay: a note under the strength floor moved aside, a prune line", "to": "pruned"},
    {"from": "release", "label": "deletes the transcript, its sidecar and its pointer", "to": "archive"},
    {"from": "release", "label": "a release line per session", "to": "ledger"},
    {"from": "release", "label": "sweeps to depth 1: a copy no rollback or review needs", "to": "pruned"},
    {"from": "remember", "label": "the remember, with its trace's path", "to": "ledger"},
    {"from": "remember", "label": "one trace at once, source remember, homed by --topic for knowledge, else --about, else the cwd", "to": "traces"},
    {"from": "rethink", "label": "a judged send: one labelled (cue, note) example", "to": "eval"},
    {"from": "rethink", "label": "the verdict, with the cue of the send it judges", "to": "ledger"},
    {"from": "start", "label": "the subether mod runs sandman recall", "to": "recall"},
    {"from": "take", "label": "② the transcript moves to the archive", "to": "archive"},
    {"from": "take", "label": "② the end, with its outcome", "to": "ledger"},
    {"from": "traces", "label": "traces awaiting consolidation", "to": "chart"},
    {"from": "traces", "label": "④ a bank's or a topic's traces", "to": "consolidate"},
    {"from": "weekly", "label": "sandman serve reviews the guidance when no job has work", "to": "reflect"}
  ],
  "nodes": [
    {"col": 0, "doc": "the subether mod's session.start handler, under a 1.5 s budget", "id": "start", "kind": "moment", "label": "① session starts", "row": 0},
    {"col": 0, "doc": "the subether mod, on each tool call and each prompt the person types; the agent, when the person says something a later session needs or puts work off", "id": "during", "kind": "moment", "label": "during · calls and prompts", "row": 1},
    {"col": 0, "doc": "the subether mod's session.end handler, under a 1.5 s budget", "id": "end", "kind": "moment", "label": "② session ends", "row": 3},
    {"col": 0, "doc": "right after a take, when serve encodes the episode", "id": "after", "kind": "moment", "label": "③ after the take", "row": 4},
    {"col": 0, "doc": "any time after, when serve consolidates a bank's traces", "id": "later", "kind": "moment", "label": "④ later", "row": 5},
    {"col": 0, "doc": "once a week, when no job has work and at least five model runs followed the last review", "id": "weekly", "kind": "moment", "label": "⑤ weekly", "row": 6},
    {"col": 1, "doc": "the seed: writes the start mark first, whatever follows, then prints the instructions, what is due, the always-set and the first prompt's matches", "id": "recall", "kind": "verb", "label": "① sandman recall", "row": 0},
    {"col": 1, "doc": "writes start and end marks and a guard per denied tool call today; not built yet: one line per tool call or typed prompt, once recall and take write start and end", "id": "mark", "kind": "next", "label": "sandman mark", "row": 1},
    {"col": 1, "doc": "the agent's write: one trace at once, homed as encode homes one; recall lists it at once, marked ~, the episode's encode takes it as already remembered, consolidate as any trace", "id": "remember", "kind": "verb", "label": "sandman remember", "row": 2},
    {"col": 1, "doc": "ignores a session with no start mark; skips, holds for a job, finds it gone, or renames the transcript into the archive; marks the end with its outcome; serve's tick takes a held one once its job is gone, and ends one that never ran take", "id": "take", "kind": "verb", "label": "② sandman take", "row": 3},
    {"col": 1, "doc": "serve's tick, one episode at a time: skips a headless one, else a headless model (Claude Opus by default, $SANDMAN_ENCODER so a local model can replace it) reads the archived transcript's digest, what the session already remembered listed as done, and writes its traces, a memory for the bank of the repository it is about, else the cwd's, a knowledge page or playbook for its topic; flagged so it is never taken or encoded itself", "id": "encode", "kind": "verb", "label": "③ serve · encode", "row": 4},
    {"col": 1, "doc": "serve's tick, one quiet bank at a time when no episode waits: a headless model ($SANDMAN_CONSOLIDATOR) reads the bank's traces, memories and the verdicts they answer to, or a topic's traces and knowledge pages, and answers keep, merge or prune per trace, and merge, revise (a judged one), retitle, rehome, graduate (into a topic's trace) or prune per memory; applied with no approval, everything it replaces moved to .pruned/; it takes the place of the dream pass", "id": "consolidate", "kind": "verb", "label": "④ serve · consolidate", "row": 5},
    {"col": 1, "doc": "serve's tick, the weekly review: a headless model ($SANDMAN_REFLECTOR) reads the guidance in force and what encode, consolidate and recall did since, and may propose new guidance for encode or consolidate; recent inputs replay under the old and the new, a judge compares each pair blind, and a proposal the old never beats is adopted, the old kept under .history/; two failed runs after an adoption roll it back", "id": "reflect", "kind": "verb", "label": "⑤ serve · reflect", "row": 6},
    {"col": 1, "doc": "the agent's, when the person puts work off (later, tomorrow, after X): writes one intention, due a date or after an event; due lists it, done or drop closes it; nothing acts on one, the seed surfaces it", "id": "defer", "kind": "verb", "label": "sandman defer · due · done", "row": 7},
    {"col": 1, "doc": "the privacy ending: erases one session from every store for good, the ledger first, and records nothing naming it; what a merge folded in stays", "id": "forget", "kind": "verb", "label": "sandman forget", "row": 8},
    {"col": 2, "doc": "archived transcripts, <HHMMSS>-…-<session>.jsonl in a day dir", "id": "archive", "kind": "file", "label": ".archive/claude/<yyyy>/<mm>/<dd>/", "row": 0},
    {"col": 2, "doc": "every mod event, one per line, by UTC day: start, end, guard, call, prompt (today start, end and guard); the agent's recall, show, remember, rethink and intentions; and the daemon's encode, consolidate, rewrite and reflect", "id": "ledger", "kind": "file", "label": "ledger/<yyyy>/<mm>/<dd>.jsonl", "row": 1},
    {"col": 2, "doc": "the long-term store's episodic part, filed by repository: memory files with flat frontmatter, <type>_<slug>.md", "id": "banks", "kind": "file", "label": "memories/<bank>/<file>.md", "row": 2},
    {"col": 2, "doc": "the long-term store's semantic and procedural part, filed by topic: knowledge pages and playbooks, each revised in place as later episodes add to it", "id": "knowledge", "kind": "file", "label": "knowledge/<topic>/<file>.md", "row": 3},
    {"col": 2, "doc": "newly encoded or remembered memories, still labile, awaiting consolidation, one dir per bank, a topic's as @<topic>, apart from the banks: <type>_<slug>.md", "id": "traces", "kind": "file", "label": "traces/<bank>/<file>.md", "row": 4},
    {"col": 2, "doc": "what consolidate moved aside, recoverable: consumed traces, merged and pruned memories as they stood, each reply", "id": "pruned", "kind": "file", "label": ".pruned/<yyyy>/<mm>/<dd>/", "row": 5},
    {"col": 2, "doc": "the model jobs' guidance, read when present, else the default built in; written only by reflect, every replaced version under .history/; the contracts stay in the binary", "id": "prompts", "kind": "file", "label": "prompts/<job>.md", "row": 6},
    {"col": 1, "doc": "the agent's verdict on a recalled note: used, wrong, stale or irrelevant; a rethink line naming the send's cue, and a labelled example for the recall evaluation", "id": "rethink", "kind": "verb", "label": "sandman rethink", "row": 9},
    {"col": 2, "doc": "labelled (cue, note) examples from rethink's verdicts on sent notes, irrelevant label 0, the rest 1: the recall evaluation's growing set", "id": "eval", "kind": "file", "label": "eval/recall.jsonl", "row": 9},
    {"col": 2, "doc": "this machine's id, minted once from /dev/urandom; $SANDMAN_MACHINE overrides it", "id": "machine", "kind": "file", "label": "machine", "row": 7},
    {"col": 2, "doc": "prospective memory: work the person deferred, one file each, due a date from the local today or after an event; open until done or dropped, never closed on its own", "id": "intentions", "kind": "file", "label": "intentions/<id>.md", "row": 8},
    {"col": 3, "doc": "reads the root, never writes it (bar the machine id)", "id": "chart", "kind": "verb", "label": "sandman chart", "row": 2},
    {"col": 4, "doc": "draws active, taken and memories as a timeline", "id": "bifrost", "kind": "sink", "label": "bifrost · pipeline", "row": 2},
    {"col": 1, "doc": "holds every note, rewrite line, .pruned/ copy and archived transcript to the memory cycle's seven invariants; --fix mends what is mechanical, --release prints what release would delete", "id": "check", "kind": "verb", "label": "sandman check", "row": 10},
    {"col": 1, "doc": "a tick job after settle, only while check passes: deletes transcripts no note holds after a week unheld, a release line each, and sweeps .pruned/ to depth 1", "id": "release", "kind": "verb", "label": "serve · release", "row": 11}
  ]
}
