Work Graph
What you'll learn
- What the work graph is and why it exists.
- The node types and edge types Craik connects.
- How to export the graph, what's redacted, and what it can and can't do.
- How the graph is queried by operator views and downstream tooling.
Work graph
The connected, queryable view of runtime objects that would otherwise be scattered across case files, receipts, handoffs, memory proposals, evidence, assumptions, and contradictions.
The graph isn't a separate data store — it's a projection over the existing
typed objects in $CRAIK_HOME/state/. Every node and edge is derivable from
the records Craik already keeps.
Why a graph?
Tasks don't end in one act. A real piece of agent work produces:
- A case file built from project state, evidence, and assumptions.
- One or more receipts as the runtime takes governed actions.
- A handoff that closes (or pauses) the run and proposes memory.
- Sometimes a contradiction when new facts collide with old ones.
- Sometimes a memory proposal that needs reviewer approval.
These pieces only become useful when you can ask cross-cutting questions: "Which receipts contributed to this handoff?" · "Which case files cite this ADR as evidence?" · "Which contradictions are still open against this project?"
The work graph is what makes those questions tractable.
Node types
task
A unit of work with an objective and an intent lock.
case_file
The per-task pre-run brief — evidence, assumptions, verification plan.
handoff
The post-run continuity record. One per task per run.
receipt
A capability receipt for a governed action.
memory_proposal
A fact a run wants written to memory, pending review.
fact
An approved fact in memory — Stigmem or local memory backend.
evidence
An evidence reference: file, GitHub issue, prior handoff, memory fact.
assumption
An open or resolved assumption recorded in a case file or handoff.
contradiction
A surfaced conflict between facts, evidence, or assumptions.
Edge types
Edges explain how nodes relate. Common ones:
has_case_filehas_receiptrecords_receiptreceipts list.proposes_memorysupported_bycontains_assumptioncontains_contradictionresolvesExport the graph
craik graph export --task task_review_docs
craik graph export --project Example
The graph export emits a typed JSON payload by default, with a Graphviz DOT export available for visualization tooling:
craik graph export --project Example --format dot
Output is deterministic — running export twice on the same state produces byte-identical payloads. This makes the graph diffable in review and stable for downstream consumers.
What export is and isn't
Graph export is
- Read-only. Never writes a fact, never mutates GitHub, never resolves a contradiction.
- Deterministic. Same state → same bytes.
- Redacted. Receipts and proposals are filtered through the same redaction guard the receipt store uses.
- Joinable. Every node id is the same id you'd query in
craik receipts show,craik handoff show, etc.
Graph export isn't
- Authority. Exporting the graph doesn't grant a capability.
- A memory write. Memory still requires
memory.writeand the approval flow. - A side-effect channel. Nothing leaves the local store.
- Hidden state. The export contains only what's already addressable in
$CRAIK_HOME/state/.
How operator views consume the graph
Several operator views are graph readers:
- Work graph explorer — full project graph with filtering.
- Handoff viewer — handoff plus the receipts, proposals, and assumptions it cites.
- Receipt viewer — receipt plus the task, policy, and handoffs it participates in.
- Contradiction inbox — open contradictions, the case files and facts they collide with, and the runs that surfaced them.
See Reference · Operator surface for the full operator-view list.