| name | handoffgraph |
| description | Use when working with HandoffGraph — capturing AI coding agent sessions, verifying workstreams, recording scores/decisions/verifications, running deterministic verification gates, building checkpoints, and preparing verified cross-agent handoffs. Triggers - handoff, workstream, verify, checkpoint, session debugging, agent continuity. |
HandoffGraph agent workflow
HandoffGraph is a local-first, verified cross-agent continuity and
session-debugging layer for AI coding agents (Claude Code, Codex, Pi). Every
fact lives on an append-only event spine; read models are deterministic and
rebuildable; redaction is fail-closed. When you act through these commands,
your work becomes verifiable evidence instead of chat history.
Core rules
- Never edit or delete stored state. Everything is append-only; corrections
are new events.
- Never launch agent processes yourself beyond printing their native resume
commands —
handoffgraph continue and resume print invocations; the
human runs them.
- Cite evidence. When you claim a session state, prefer checkpoints and
verify output over memory.
Standard loop
handoffgraph init
handoffgraph workstream new "<objective>"
handoffgraph install --agent <codex|claude|pi>
handoffgraph sessions --detect
handoffgraph event import <session.jsonl>
handoffgraph traces
handoffgraph detect
handoffgraph verify --workstream <id> --baseline <cp_id>
handoffgraph checkpoint --workstream <id> --objective "<objective>"
handoffgraph continue --to codex --workstream <id> --preview
Quality scores (use these when reviewing or judging)
handoffgraph score record --workstream <id> --name human.review \
--target-type trace --target-id <trc_...> --category approved --source human
Scores are numeric, category, or boolean, source-tagged. Record one whenever
you review a trace, checkpoint, or handoff — verify gates on them.
Datasets and experiments
handoffgraph dataset create <name> --file <fixture.jsonl> [--file ...]
handoffgraph experiment run --dataset <name>
handoffgraph experiment compare <runA> <runB>
Use datasets to pin known session fixtures; run experiments after changing
adapters, detection rules, or prompts; compare runs to prove no regression.
Prompts
handoffgraph prompt create <name> --file prompt.md
handoffgraph prompt label <name> --version 2 --label production
handoffgraph prompt show <name>
MCP
handoffgraph mcp serve exposes 12 tools over stdio (get_workstream_context,
get_trace_context, create_checkpoint, record_decision, record_verification,
get_prompt, record_score, list_scores, claim_files, handoff_workstream,
accept_handoff, complete_workstream). Prefer MCP tools over shelling out when
you are already connected.
Telemetry interop
handoffgraph otlp serve --addr 127.0.0.1:4318 accepts OTLP/JSON trace
exports (OpenLLMetry, OpenLIT, Phoenix exporters). Use --capture metadata
or minimal when session content must not land on disk.
Before handing off
handoffgraph verify --workstream <id> must pass (exit 0).
handoffgraph checkpoint --workstream <id> --objective "<objective>".
handoffgraph continue --to <agent> --workstream <id> and give the human
the printed native invocation.
- The receiving agent acknowledges via MCP
accept_handoff.