saphan doc
Checks record documents — orders, status returns, review returns, train orders, relays, notices and defect reports — against the format each family requires.
Checks record documents — orders, status returns, review returns, train orders, relays, notices and defect reports — against the format each family requires. Run it with a subcommand.
saphan doc census
Checks every *.md file in one directory against a family's rules and prints one row per file: what the file says about itself and every rule it missed. It writes nothing and exits 0 even when every file fails, because it is a report, not a gate (an unreadable directory or unsupported family exits 1); use saphan doc check to gate one document. It does not descend into subdirectories, and the limits of what it reads are printed as remark: lines.
| flag | type | default | what it does |
|---|---|---|---|
--family | string | defect | The family whose rules judge every file; only defect is supported for a directory today. |
saphan doc check
Validates one document against its family's rules and, on a refusal, prints the smallest document that would pass so you can compare. With the default --family auto it identifies the family from the document's first heading and exits 0 when it recognises none; naming a family is a claim the document must meet.
Exit codes: 0 valid (or no family recognised) · 1 bad invocation · 2 checked and failed · 3 nothing was checked, under --require-checked or --record. A document that was not checked prints UNMEASURED, never ok.
| flag | type | default | what it does |
|---|---|---|---|
--actor | string | The name recorded on the receipt --record writes, as given and not verified; defaults to SAPHAN_ACTOR, then the configured identity. | |
--as-return | bool | false | Assert that this status or review-status document is an agent's return, and refuse it (doc-skeleton-not-a-return, exit 2) if it is still the untouched template the engine wrote. ⚠ With --record, the receipt is written before this check runs, so a refused template can still leave a receipt. |
--family | string | auto | The document family to check against: auto (the default, detected from the first heading), defect, exec-status, master-order, notice, order, relay, review, review-status or train-order; a defect report is only checked when you name defect. |
--record | bool | false | After a passing check, write a receipt to the record holding the document's digest and the stream named in its first heading; needs --workspace, never records a failing document, and cannot record a defect report, which names no stream. |
--require-checked | bool | false | Refuse with doc-unmeasured (exit 3) when nothing was validated, so a script can tell "checked and clean" from "not checked". |
Global options apply to every command — see Every command.
saphan dispatch
Prepares work for an agent: on its own it renders an executor brief from a dispatch template and refuses the brief if it breaks any of the five dispatch rules.
saphan docs
Renders readable documents from a git checkout of your record documents: one train's chapter, or the whole body of work.