Skip to main content
Version: MVP

Work Graph

5 min readCore conceptUpdated 2026-05-19

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:

Edge
Direction
Meaning
has_case_file
task → case_file
Every task has exactly one current case file.
has_receipt
task → receipt
The receipts produced under the task's policy envelope.
records_receipt
handoff → receipt
Receipts cited explicitly in a handoff's receipts list.
proposes_memory
handoff → memory_proposal
Memory proposals emitted by the run.
supported_by
proposal → evidence
The evidence backing a memory proposal.
contains_assumption
case_file → assumption
Open assumptions a case file recorded.
contains_contradiction
case_file → contradiction
Contradictions surfaced during case-file assembly.
resolves
handoff → contradiction
Contradictions a run closed.

Export the graph

Export the work graph for a task
craik graph export --task task_review_docs
Export the full project graph
craik graph export --project Example

The graph export emits a typed JSON payload by default, with a Graphviz DOT export available for visualization tooling:

DOT for Graphviz / d3 / Mermaid
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.write and 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.

What's next