reference

Commands, exit codes, compiler diagnostics, walker refusal codes. The contracts behind them live in the repo: spec/trajectory.schema.json (the compiled plan), spec/brief.schema.json (the work packet), and spec/conformance/ (walker behaviour).

Command surface

marionette helpexit 0
$ marionette helpmarionette — compiled project trajectories for AI agentsUsage:  marionette compile   <plan.mar> [-o out.trajectory.json]   Compile to trajectory JSON  marionette validate  <plan.mar> [--strict]                 Check only; print diagnostics  marionette render    <plan.mar|.json> [--state f] [-o out.mmd] [--lr]  marionette summarize <plan.mar|.json> [--state f] [-o out.md]  marionette brief     <plan.mar|.json> [--state f] [--json]    Work packet for the executor  marionette start     <plan.mar|.json> --run <id> [--store dir]                       [--principal id] [--role agent|human] [--principal-uri uri]  marionette stop      <plan.mar|.json> --run <id> [--store dir]  marionette state init    <plan.mar|.json> [--state f] [--force]  marionette state show    <plan.mar|.json> [--state f]  marionette state choose  <plan.mar|.json> <choice> --actor <name> --rationale <text> [--state f]  marionette state advance <plan.mar|.json> --actor <name> [--rationale <text>] [--state f]  marionette state rebind  <plan.mar|.json> [--state f]         Migrate state onto an edited planOptions:  -o, --out <file>    Output file ('-' for stdout; default varies by command)  --state <file>      State file (default: <plan>.state.json)  --strict            Treat warnings as errors (exit 1)  --json              Emit the machine-readable form (brief)  --lr                Render left-to-right instead of top-down  --force             Overwrite an existing state file on init  --actor <name>      Who takes the step ("agent" may not pass @human gates)  --rationale <text>  Why the step was taken (required for choices)  --run <id>           Run id (required by start/stop)  --store <dir>        Run store (default: <plan-dir>/.marionette)  --create             Start a new run; error if it already exists  --principal <id>     Connection principal id (default: agent)  --role <role>        Bound connection role: agent or human (default: agent)  --principal-uri <u>  Optional provenance URI for decision records

Exit codes

CodeMeaning
0success (warnings allowed unless --strict)
1validation errors (or warnings with --strict); refused walk operations
2usage or I/O errors
3plan/state drift detected — reconcile with state rebind (or state init --force)

Compiler diagnostics

Errors fail the build. Warnings pass unless --strict; zero errors is the authoring bar, and a plan whose only diagnostics are expected MAR014 dynamic-fact warnings is a legitimate end state.

CodeSeverityMeaningUsual fix
MAR001errorparse errorfix the line the message points at
MAR002errorduplicate phase idrename one of the phases
MAR003errorundefined divert/choice targettypo — take the did you mean suggestion, or define the phase
MAR004errorundefined variable in a gate or mutationdeclare it with VAR in the preamble
MAR005errorduplicate variable declarationremove the extra VAR
MAR006errordead end: phase with no choices and no divertadd an exit choice or -> END
MAR007errorunreachable phaselink it from a real decision, or delete it
MAR008errorundeclared cycleif the loop is intentional, add ~loop~ to the returning choice; otherwise re-point the edge
MAR009errordeclared loop with no exitadd a counter-gated or @human sibling exit
MAR010errorloop exit gate provably unsatisfiablefix the gate so the counter can actually reach it
MAR011warningconstant-false gatethe choice can never be taken — fix or remove it
MAR012error@human choice with no escalation pathgive the choice a -> target
MAR013warning~loop~ on an edge that isn't part of a cycledrop the mark, or point the edge where you meant
MAR014warningunverified gate (dynamic fact the compiler can't decide)expected for real-world facts — review manually, don't churn the plan to silence it
MAR015errortype mismatch in an expression or mutationalign the literal/variable types
MAR016warningunused variablegate on it, or delete it
MAR017warningonce-only (*) loop edgemake it sticky (+) so the loop can repeat
MAR018warningmalformed external ref (github:/jira:/linear:/ref:)fix the value to the namespace's expected shape
MAR019warningunknown delivery:/report: valueuse a listed value; typos fall back to defaults loudly

Walker refusal codes

Refusals are machine-coded so executors can react programmatically, and a refused operation never mutates state. (The runtime protocol carries its own error codes on the same principles — e.g. forbidden for an agent connection at an @human checkpoint, stale-revision for an outdated expectedRevision — see spec/runtime-protocol.schema.json.)

CodeMeaning
completedthe plan has already reached END
unknown-nodestate points at a node absent from the compiled plan
unknown-choiceno choice matches the given reference
ambiguous-choicea label prefix matched more than one choice
gate-blockedthe choice's gate is currently false (or failed to evaluate)
once-exhausteda once-only (*) choice was already taken
human-checkpointan agent tried to take an @human choice
rationale-requiredthe step is missing its auditable rationale
no-divertadvance called on a node without a fallthrough divert
migration-blockedstate cannot be rebound onto the edited plan (current phase gone) — needs a human

Files on disk

FileWhat it is
plan.marthe script — durable, diffable source of truth
plan.trajectory.jsoncompiled contract (marionette compile); content-hashed
plan.state.jsontraversal state + decision log, bound to the trajectory hash
.marionette/graphs/<hash>.trajectory.jsonruntime store: compiled trajectories archived by content hash
.marionette/runs/<run-id>/events.jsonlruntime store: append-only event journal (authoritative)
.marionette/runs/<run-id>/snapshot.jsonruntime store: fsynced snapshot, rebuilt from the journal on resume