Saphan StudioDocs
Working with git

The order

What an order is, who writes it, which keys are read into the record, and what happens when one is missing.

_MASTER_ORDER.md — the order

What it is

The instruction one agent works from, and the record of why that work was authorized. The order is the brief: there is no second document an agent is expected to find.

Who writes it, who reads it

Written by the coordinator before the agent exists. Read by the agent, and parsed into the record — so the branch, the base and the ceilings it declares are facts anyone can audit later.

The keys that are read into the record

keyclasswhat it carries
worktreeatomicabsolute path of the worktree this agent works in — ground truth, never inferred
branchatomicthe branch the agent commits to
repoatomicthe local repository path
baseatomicthe named base and the commit this worktree forked from — the fork point gets no key of its own
taskprosewhat this agent does. ⚠ This value reaches the merge commit's subject
reasonprosewhy this work exists
modelvocabularythe model displayed for this agent
backendvocabularywhich agent backend it is spawned on
cap-usdatomicthe spend ceiling
wallatomicthe wall-clock ceiling
reviewvocabularythe review class — whether this stream owes a named review verdict
capabilitiesmanifestwhat this work requires; the older spelling requires is read as the same key

A number of other keys are grammatical and dropped: legal in the file, and nothing downstream receives them. They are there because real orders carry them as notes for human readers — the round number, the declared quote, the actor, the machine, the workspace, the permission class, a rebase rationale, a coordinator's note, and several others.

Two of them are worth naming, because reading them as mandates is a real error:

  • effort — the operative value comes from the dispatch flag or your configuration. An agent reading this bullet reads a declaration, not a mandate.
  • role and profile — the spawn's own record decides both. The bullet restates them for a human.

There is no state key on an order. An order does not have a state; the stream does.

What happens when a key is missing

An order with no H1 is refused (doc-h1-missing) and nothing about it is read. An order missing a read key does not fail validation — but the fact that key carried is then simply absent from the record, and every verb that needs it refuses later, by name and further from the cause. The clearest example is in Pull requests and forge integrations: a stream whose order named no repository, branch or base cannot have its local preconditions measured at all, and that is a refusal rather than a skip precisely because a skipped check produces a plan indistinguishable from a verified one.

An order, in the shape a real one takes


- worktree: /srv/workspace/worktrees/wt-invoice-export-csv
- branch: feature/invoice-export-csv
- repo: billing-service
- base: main — the MERGE TARGET. Fork point `4b19c7ae0f2`. Merge nothing.
- task: add a CSV export to the invoice report, with the column set the finance team specified
- reason: finance currently re-types the quarterly figures by hand; the report already
  computes every column the export needs.
- model: claude-opus-5
- backend: claude-code
- cap-usd: 12
- wall: 60m
- review: named
- capabilities:
  - go-toolchain

## Measure where you stand

Run these before you change anything and report what you actually got:

    git rev-parse --abbrev-ref HEAD    → feature/invoice-export-csv
    go build ./...                     → expect clean

If a number here disagrees with your own measurement, YOUR READING WINS — say so in your
return and say what you measured.

## Definition of done — every item names its instrument

1. The export produces the specified columns, proven by a test that fails when a column is
   dropped.
2. `go build ./...` and the package suite clean; report the counts.

## Refutation field

> "The order was wrong about ____. Here is the measurement."

Two things in that example are deliberate and are worth copying. The order labels its own measurements as claims to be tested, so the agent knows what it is allowed to doubt — a number stated without an owner reads as physics. And contradicting the order is a completed field rather than an act of insubordination, which is what stops one author's mistake from being laundered into a merged artifact.

On this page