01 / DECIDE
Architecture decision
Use it for CI, bots, repeatable reviews, and parallel tasks whose results must be resumed or exported.
Headless runs need a fixed task, bounded permission mode, machine-readable output, session identity, isolated writes, and cleanup ownership. Map input, output, state, tools, and side effects as one observable path, then name the owner of operate headless work with sessions and isolated worktrees.
02 / OPERATE
Three-step field procedure
- 01
Lock the contract
Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it for CI, bots, repeatable reviews, and parallel tasks whose results must be resumed or exported.
- 02
Run one bounded path
Build one end-to-end path with correlation, typed state, and reversible failure handling. Headless runs need a fixed task, bounded permission mode, machine-readable output, session identity, isolated writes, and cleanup ownership.
- 03
Verify the signal
Turn acceptance into a repeatable fixture, contract test, or browser test. Artifacts prove task ownership, permission decisions, structured output, tests, diff, session lineage, and cleanup.
03 / BOUND
Operational boundary
Untrusted changes must not receive privileged secrets; worktrees need explicit lifecycle and deletion checks.
04 / PROVE
Acceptance evidence
Artifacts prove task ownership, permission decisions, structured output, tests, diff, session lineage, and cleanup.
SOURCE / HTTP
Reproducible source probe
curl -fsSI 'https://docs.x.ai/build/cli/headless-scripting' | sed -n '1,5p'