Dream-briefing for AI coding agents: a cognitive checkpoint at session end, a 'while you were away' briefing at session start.

version
0.68.0
GitHub stars
21

Install

/plugin install daimon@daimon

Run it inside Claude Code after adding the marketplace with /plugin marketplace add Daily-Nerd/daimon.

Contents

Discovered from source

Skills 2

Daimon Dream-Briefing

This plugin keeps continuity across sessions. At the end of each session it serializes the transcript into a cognitive checkpoint (open loops, decisions, beliefs, with extractively-pinned verbatim quotes). At the start of the next session it injects a skimmable briefing so you resume from a faithful prior state instead of a confident guess.

What it surfaces, in order

  1. Decisions made: explicit choices, including assistant-side fixes/diagnoses. The newest ones from the last session are always shown.
  2. Verify before trusting: items whose state may have changed outside this session (a PR you said you'd merge, a deploy, a file edited elsewhere). The gap that produces confident-but-wrong assertions, so check these before repeating them.
  3. Open loops: questions left unresolved at the end of last session.
  4. Beliefs / uncertainties / active topic / contradictions flagged.

Every section shares one size budget. When a section had to leave items out it says so in a note, for example (4 of 13 shown; 9 carried checks unverified over 7d hidden. See: daimon loops --stale); the hidden items are still in the checkpoint, and daimon loops --stale lists them with ids and ages.

Each item is marked ✓ verbatim (pinned to an exact quote — trust it) or ~ inferred (paraphrased — treat with appropriate caution).

A carried item that has gone unchecked for more than a week renders as [? unverified], with its stored tag and age after it ((was inferred, carried 12d)). A carried item that keeps getting restated session after session is not corroborated just because it agrees with itself, so world-check it (code, git, issue tracker) before treating it as current fact.

A carried note that names a PR, branch, file or dependency ends with (noted <UTC time>, re-check before acting): when it was first captured, not its state now. It is left off once worldcheck has answered that claim in the same brief.

Closing loops

Briefed open loops (open questions, uncertainties) carry an inline [id] handle — that id is what daimon resolve and daimon reverify take. daimon loops lists every open, addressable loop with its id.

When this session's work answers a briefed loop, close it:

daimon resolve <id> --by agent --evidence "<exact contiguous transcript quote>"

The evidence must be a verbatim copy-paste of one contiguous span of THIS transcript — the same QUOTE DISCIPLINE the serializer itself enforces (rule 17) — and it is byte-checked against the transcript at session end. A quote that cannot be found leaves the loop open; nothing is withheld until the quote verifies or a human confirms. A briefing showing a ⚠ agent claims resolved — unverified: "..." line means an earlier claim is still pending that check.

Do not resolve what you merely believe is stale — that is reverify/ worldcheck territory, not a resolve claim. forget stays human-only.

resolve closes one store. Work in a session moves others, and each has its own close verb; a store moved and never closed rides into the next briefing as work. A briefed item that advanced but did not close takes daimon amend <id> --change progressed|blocked|changed --evidence "<quote>" --by agent. An accepted request another project sent, satisfied by this session's work (a shipped fix, a merged PR), takes daimon request done <id> --evidence "<quote>" --by agent; daimon request inbox lists every one still owed. Same quote discipline, same byte-check at session end.

Closing an accepted request needs no human: run daimon request done <id> --evidence ... the moment evidence exists, in the same turn, not at session end. Only accept has an agent path, under a covering ruling; reject and needs-info are a person's. On an ask nobody accepted, an agent done is only a pending claim that lands when a person accepts.

An accepted request still in progress takes daimon request reply <id> --note "<what moved>" --by agent. It moves no state, so the request stays owed until request done. The sender sees it labeled as an unverified agent claim.

A request this project sent that no longer stands takes daimon request withdraw <id> --reason "<why>" --by agent, not reject: a verdict is the recipient's, and a sender's reject is refused. A withdrawal is final for that record (ask again with --supersedes <id>), and a recipient that had already accepted it is told once.

Request text fields (ask, why, evidence) cap at 2000 characters. Long content belongs in an artifact the request points at (a file, an issue, a PR), with the request itself carrying the pointer, not the full text.

When you open one (daimon request open --to <dir> --ask "<what>" --why "<why>" --title "<few words>" --by agent), give it a --title of at most 80 characters. It is the headline the recipient sees first; without one the headline is a guess cut from the start of the ask.

To say how much an outcome matters to you, open with --severity critical, high or low and a one-line --severity-reason "<why>" (80 characters at most, refused past that). Leave it out for normal, which is the default and carries no reason. This is not --blocking: severity says how much the outcome matters, --blocking says you are stalled until it lands. The recipient's lists, the briefing panels and daimon decide order by severity and show it with the reason. To change it later run daimon request severity <id> <level> --reason "<why>" --by agent (normal clears it): it moves no state, uses no revision and sends no nudge, and it works while the request is still open, needs-info or accepted. daimon request inbox --min-severity high shows only that level and anything more severe.

When the briefing shows an active policy: line, you may open an ask of that kind to that recipient with daimon request open --kind info; anything asking for a change or effort still stays work.

Automatic behavior

You do not need to invoke anything. The plugin wires the host's native session hooks: a checkpoint is written automatically when a session ends, and the briefing appears automatically at the start of the next session if a prior checkpoint exists. Between those, a lightweight proactive recall watches your prompts and surfaces a one-line "you worked on this before" pointer when the current prompt overlaps a prior open loop — without re-suggesting anything the start-of-session briefing already carried.

Manual trigger

To re-read the latest briefing on demand, run the bundled CLI:

daimon brief

Configuration

See the plugin README. Key knobs: DAIMON_DISABLE=1 (kill switch), DAIMON_CHECKPOINT_DIR, DAIMON_MIN_MESSAGES, DAIMON_LLM_* (falling back to LITELLM_*), DAIMON_LLM_BACKEND=command + DAIMON_LLM_COMMAND (headless-CLI fallback), DAIMON_LLM_COMMAND_INPUT=stdin|arg|file:<flag> (how the prompt reaches a command backend that doesn't read stdin, e.g. file:--prompt-file for the Devin CLI).

What ships today

Daimon is self-contained and host-agnostic — no server, no external memory backend, stdlib-only at runtime. The capabilities behind the briefing:

  • Checkpoint → briefing loop. Session end serializes the transcript into a per-project JSON checkpoint; session start reconstructs it into the briefing.
  • Chunked extraction. Long transcripts are split into overlapping chunks, serialized pass-by-pass, then merged — so recall holds up on long sessions instead of degrading as the transcript grows.
  • Deterministic carry. Unresolved open loops that still matter are carried forward into the next checkpoint by exact term overlap (no LLM in the carry step) and marked [carried] so you can see a loop survived from an earlier session rather than being freshly observed. When a carried item goes too long without anyone actually re-checking it against the world, the brief surfaces a staleness warning naming how many days it's been riding unverified.
  • Proactive recall. A per-prompt pointer to prior work when your current prompt overlaps an open loop (see Automatic behavior).
  • Trust classing. Every item is ✓ verbatim (pinned to an exact quote) or ~ inferred (paraphrased), so you know what to trust literally.
  • Trust inspector. daimon why <item-id> is the read side of that tag: it reports one item's evidence axes — capture, provenance, source, byte integrity, current support, quote-check outcome, lifecycle, corroboration — and --source adds one bounded, redacted window of the originating text. Reach for it before repeating a carried or inferred claim as true, or when someone asks where a claim came from. Ids come from daimon recall or daimon loops.
  • Read-only auditors. daimon audit quotes re-checks stored quotes against their source; daimon audit privacy proves no forgotten value survived; daimon verify-receipt checks a checkpoint's signed provenance receipt. All three answer with an exit code: 0 proven clean, 1 residue found, 3 cannot prove — never read 3 as clean.
  • Code-drift detection. daimon anchor <file> <symbol> binds a checkpoint item to a code symbol; the briefing flags it under CODE DRIFT — verify before trusting when that symbol's body changes or disappears (offline, stdlib ast).
  • Scars. An optional session-end pass harvests negative-knowledge signals (abandoned approaches, landmines) into the repo's .scars/ directory.
  • Status & self-heal. daimon status reports checkpoint/briefing health; a failed capture self-heals on the next session start.

Daimon — End-of-session self-serialization (/daimon-end)

The automatic SessionEnd hook reconstructs a checkpoint from the full transcript after exit — accurate and verbatim-capable, but it lands 4–25 min later. If you restart inside that window, the next session briefs from the previous session's stale checkpoint.

This skill closes that window: the live session writes its own checkpoint now, from state it still holds. It is provisional and never replaces the automatic path — the reconstruction still runs, supersedes this checkpoint, and keeps it as a prev pointer. So it does not need to be perfect to be useful.

What to do when invoked

  1. Close what this session moved, FIRST. Every store daimon reads back has its own close verb, and a store you moved but never closed rides into the next briefing as work. Walk daimon loops and daimon request inbox and record each close before writing the checkpoint:

    # a briefed loop this session closed
    daimon resolve <id> --by agent --evidence "<exact contiguous transcript quote>"
    # a briefed item that moved but did not close
    daimon amend <id> --change progressed|blocked|changed --evidence "<quote>" --by agent
    # an accepted inbound request this session satisfied (a shipped fix, a merged PR)
    daimon request done <id> --evidence "<quote>" --by agent
    # an accepted inbound request still in progress: tell the sender, without closing it
    daimon request reply <id> --note "<what moved>" --by agent
    

    A carried item this session re-checked against the world and found still true is a person's daimon reverify, which needs an interactive terminal. An agent cannot run it: say what you checked in your closing message.

    Closing an accepted request needs no human: run daimon request done <id> --evidence ... the moment evidence exists, in the same turn, not at session end. Only accept has an agent path, under a covering ruling; reject and needs-info are a person's. On an ask nobody accepted, an agent done is only a pending claim that lands when a person accepts. This step is the sweep for anything missed, not the first chance to close.

    (See the daimon-briefing skill's "Closing loops" section for the full quote-discipline rule.) The CLI answers claim recorded ... pending verification at session end — that is the expected output, not a failure: each claim is provisional, byte-checked against the transcript when the session ends. A request done on an ask another project sent prints no matching request in this bucket; that is the read-time join, not a miss. Skipping this step never errors: the checkpoint validates, the briefing renders, and the satisfied request stays [✓ accepted] until someone notices.

  2. Decide whether to hand off. The baton is a different instrument from the checkpoint: the checkpoint captures full state, the baton is the ONE deliberate message that leads the next briefing. If the next session should start somewhere specific — a reply to check, a play whose timing matters, a decision waiting on the human — write it now:

    daimon handoff "<where the next session should start, and why>"
    

    Skipping is a valid decision when the checkpoint alone suffices; a baton that merely restates the checkpoint is noise. But make the decision consciously — a session that captures everything and hands off nothing leaves the next session to infer its own starting point.

  3. Emit a checkpoint JSON from your in-context knowledge of THIS session, conforming exactly to the schema:

    {
      "session_id": "introspection-<short-unique-id>",
      "working_context": {
        "active_topic": {"text": "<one line, or empty>", "trust": "inferred"},
        "open_questions": [
          {"text": "<unresolved loop>", "trust": "verbatim", "quote": "<exact transcript quote>", "external_state": true}
        ],
        "recent_decisions": [
          {"text": "<decision or assistant-side fix>", "trust": "inferred"}
        ]
      },
      "epistemic_snapshot": {
        "strong_beliefs": [{"text": "<belief>", "trust": "inferred"}],
        "uncertainties": [{"text": "<open uncertainty>", "trust": "inferred"}]
      }
    }
    

    session_id above is a placeholder only. Step 5's --session flag, when your host can supply one, replaces it with this session's real id; when it cannot, the CLI itself replaces the placeholder with a fresh generated id rather than ever writing the literal text above. Leave it exactly as shown — do not spend effort inventing a better one, and never invent a session_id here as a substitute for --session.

    Every item needs text + trust. external_state: true marks items whose state may have changed outside the AI session (a PR you'll merge, a deploy) — these surface first in the briefing.

    Volume: 5–10 items per list; prefer the ones a fresh session would get wrong.

  4. HONESTY RULE (load-bearing). Quote only what you can reproduce exactly — an honest quote helps the later merge with the automatic reconstruction, and this path has no transcript to check against, so the CLI records every item as inferred either way (#511). Anything from an earlier, compacted/summarized part of the session you can no longer quote verbatim → trust: "inferred", no quote. Do not fabricate quotes.

  5. Write it via the CLI (reads JSON on stdin, validates the schema, routes to this project + global + a per-session file, atomically, with rotation). Write the JSON to a temp file, then check whether your host exposes the live session's own id (Claude Code does, as the CLAUDE_CODE_SESSION_ID environment variable) and pass it with --session when it does:

    if [ -n "$CLAUDE_CODE_SESSION_ID" ]; then
      daimon write-checkpoint --project "$PWD" --session "$CLAUDE_CODE_SESSION_ID" < /tmp/daimon-end.json
    else
      daimon write-checkpoint --project "$PWD" < /tmp/daimon-end.json
    fi
    

    --session is what lets the later SessionEnd reconstruction recognize this checkpoint as its OWN earlier state rather than a distinct witness — without it, this checkpoint and its own reconstruction could misread as two independent sessions agreeing with each other (#983). On a host with no live session id to give it, the CLI still writes the checkpoint (falling back to its own generated id, never a placeholder), but this provisional cannot be linked to its own reconstruction — accept that any item born here will never accrue a corroboration badge, on that host, and move on; that is a known and permanent limit of a host with no live session id, not a bug to work around.

    It prints wrote checkpoint: <path> (source: introspection). If it reports a schema-validation error, fix the JSON and retry — do not store garbage. If it exits with code 2 and says admission refused, the ledger that guards admissions cannot be read right now; retrying changes nothing. Do not retry: the session-end serialize will capture this session later, once the ledger is repaired, and the next briefing will say so.

  6. Confirm to the user with the printed checkpoint path.

Where things go

Seven stores, each read by a different surface. Route by what the next session must see, and never by which command is nearest. The harness's own memory file (MEMORY.md, AGENTS.md, GEMINI.md) is not one of these: daimon never reads it, so a fact placed there is lost to every other host.

What you holdWhere it goesWho reads it back
Facts, decisions, beliefs, open loops from THIS sessionthe checkpoint, step 3 above (daimon write-checkpoint)the next briefing, daimon recall, carry
The ONE thing the next session should do firstdaimon handoff "<do X first, beware Y>" (2000 chars max)the top of the next briefing
A briefed loop this session closeddaimon resolve <id> --by agent --evidence "<quote>"the briefing withholds it once byte-checked
An accepted inbound request this session satisfieddaimon request done <id> --evidence "<quote>" --by agentthe sender's brief and daimon request inbox, as a claim until byte-checked
An accepted inbound request still in progressdaimon request reply <id> --note "<what moved>" --by agentthe sender's brief and live nudge, as an unverified agent claim
A request this project sent that no longer standsdaimon request withdraw <id> --reason "<why>" --by agentthe recipient's inbox as withdrawn, and a one-line live notice if it had accepted
A rule that must never decay (a threshold, a boundary, a standing constraint)daimon ruling propose --subject ... --verdict ... --scope ... --evidence ... --by agentevery briefing, once a human ratifies; 7 active per project by default
An approach that was tried and faileddaimon refute add ... --by agentdaimon refute guard before anyone revives it
A briefed item that moved but did not close`daimon amend --change progressedblocked
A timeline fact worth an audit line and nothing moredaimon log --text "..."nothing reads it back into a briefing or recall; it is an audit trail only

If daimon handoff refuses a baton as too long, the trimmed content is not homeless: facts go in the checkpoint, rules go to ruling propose. Do not move it to the harness memory file.

Rules

  • Write-only. Do NOT exit/quit the session — that is the user's action.
  • Do not remove or disable the automatic hook. The reconstruction's verbatim fidelity is the authoritative source once it lands.
  • Routing/validation/atomic-write live in the CLI (write-checkpoint) — never hand-write checkpoint files or duplicate store logic.

MCP servers 1

Sponsors

Details

Marketplace
Daily-Nerd/daimon
Author
Daily-Nerd
Category
Productivity