saphan train
Shows and maintains trains: a train is a planned series of related work items, called wagons, declared in a train order and identified by its track name; each wagon is dispatched as its own stream.
Shows and maintains trains: a train is a planned series of related work items, called wagons, declared in a train order and identified by its track name; each wagon is dispatched as its own stream. saphan train next answers what can be started now, what is blocked and by what, and what is already in progress.
saphan train backfill
Proposes which train and wagon each stream already in the record belongs to, with the evidence for each guess: the stream's own order, the train order, or the stream's name. Without --write it only proposes; with --write it records the new placements, which fill in a train or wagon the order left empty and never override one it declares.
| flag | type | default | what it does |
|---|---|---|---|
--actor | string | The name recorded as confirming the placements under --write, taken as given; defaults to SAPHAN_ACTOR, then identity.actor. | |
--corpus | string | The checkout holding the train orders; defaults to $SAPHAN_TRAIN_CORPUS, and with neither the command refuses rather than reading the current directory. | |
--train | string | The train to place streams in, by its train order's directory name or heading slug; this spelling is what the record stores. | |
--write | bool | false | Record the proposed new placements in the record instead of only printing them; anyone who can run the command can pass it, and the named actor is recorded with each placement. |
saphan train delegation
Writes the train-delegation block for a train order from the order's own wagon headings, one row per wagon with the reason printed beside it, and prints it; --write puts it into the file. The block is checked with the delegation door's own parser first. The coordinating agent then commits the file and the owner signs the train order.
| flag | type | default | what it does |
|---|---|---|---|
--budget-usd | float64 | 0 | The train's delegated budget in USD; defaults to the sum of the wagons' quotes. |
--every-wagon | bool | false | Write one row covering every wagon of the train, including wagons added later, instead of one row per heading. |
--expires | string | An optional RFC 3339 end of the delegation; the owner's signature window still applies. | |
--master-key | string | The coordinating agent's order-signing key id (apk-…), from saphan trust master-key init (required). | |
--order | string | The train order (TRAIN_ORDER.md) to read the wagons from (required). | |
--repo | string | The repository for a wagon whose block and train order name none. | |
--write | bool | false | Write the block into the train order, replacing an existing block. |
saphan train next
For one track, lists each wagon its train order declares with its state, rounds so far, last verdict, what blocks it and whether it is independent, then sorts every wagon into dispatchable now, blocked, or in flight, each with a ready-to-run next command. It also prints the three conditions for starting another wagon — an independent unstarted wagon exists, a seat (agent slot) is free, the coordinating agent is under its concurrency cap — and only reads, so it is safe in a loop. It covers only wagons named in the train order: an order never dispatched and named in no train order is invisible to it, as the printed population line says.
| flag | type | default | what it does |
|---|---|---|---|
--corpus | string | The checkout holding the train orders; defaults to $SAPHAN_TRAIN_CORPUS, and with neither the command refuses rather than reading the current directory. | |
--ref | string | Read the train orders as of this git ref instead of the working tree; defaults to $SAPHAN_TRAIN_CORPUS_REF. | |
--track | string | The track to show, as named on the track: line of its orders. |
saphan train rename
Gives a train a display name of your own; its slug never changes, and --clear returns it to the generated name.
| flag | type | default | what it does |
|---|---|---|---|
--actor | string | The name recorded as renaming the train, taken as given; defaults to SAPHAN_ACTOR, then identity.actor. | |
--clear | bool | false | Return the train to its generated name: the order's heading, or the slug made readable. |
--name | string | The display name, at most 80 characters. |
saphan train sign
Lets a train's coordinating agent sign a wagon order with its own key, writing only <order>.sig. The signature counts only at the delegation door, and only when the owner's newest signature on the train order delegates that wagon, role and quote to this key. For a review, sign the source order you pass to dispatch place --order.
| flag | type | default | what it does |
|---|---|---|---|
--actor | string | The actor the key is enrolled under; defaults to master-<train>. | |
--key | string | The private key to sign with; defaults to ~/.saphan/trust/master-<train>.key. |
saphan train wagon-edit
Edits the design of a wagon that has not been dispatched yet — title, cost quote, time budget, review mode, vendor and model, dependencies, allowed machines and preferred seat — and commits the new version of its order to the workspace's bridge repository. Use --dry-run to validate and preview the new header first.
| flag | type | default | what it does |
|---|---|---|---|
--actor | string | The name recorded as making the edit, taken as given; defaults to SAPHAN_ACTOR, then identity.actor. | |
--backend | string | The agent vendor for the wagon: claude-code or codex. | |
--bridge | string | The bridge directory holding the order; defaults to <workspace>/bridge. | |
--depends-on | string | Comma-separated wagon ids this wagon waits for; an empty value clears them. | |
--dry-run | bool | false | Validate the edit and report whether the order would change, without writing anything. |
--json | bool | false | With --dry-run, print the plan as JSON (path and the SHA-256 before and after), the values a passkey-confirmed save is bound to. |
--machines | string | Comma-separated machines the wagon may run on; this narrows the choice and never pins one. An empty value clears it. | |
--model | string | The model to use, one the configuration accepts for the chosen vendor. | |
--prefer-seat | string | The seat to try first; a preference, never a pin. An empty value clears it. | |
--quote | string | The cost quote in US dollars; the wagon's spending cap is set to twice this amount. | |
--review | string | The review mode: named (a separate named review) or master-verify-only (only the coordinating agent's own verification). | |
--title | string | The wagon's one-line title. | |
--wall | string | The wall-clock budget in minutes, written like 90m. |
Global options apply to every command — see Every command.