Expand description
CLI surfaces for the firstpass binary (SPEC §7.3/§7.4): doctor validates a setup before
you route real traffic through it, and trace reads recent audit records from the store. Both
are kept here (not in the binary) so the judgment is unit-tested.
Structs§
- Check
- One line of the doctor report.
- Doctor
Report - The result of
firstpass doctor. - Evals
Summary - Per-gate and per-rung evaluation summary computed from receipts — the operator’s live eval suite: how each gate is verdict-ing, how often routing escalates, where serves land.
- Savings
Summary - Aggregated spend/savings over a set of traces — the number the operator screenshots.
Pure so it’s unit-testable;
firstpass savingsfeeds it the trace store.
Enums§
- Check
Status - A single doctor check outcome.
Functions§
- command_
on_ path - Whether
programis runnable: an explicit path (contains a separator) that exists, or a bare name found in one ofPATH’s directories. - doctor
- Validate a loaded config against the environment: routing sanity, provider key presence, and
that every configured gate’s command actually exists.
envlooks up environment variables (injected so this is testable). - format_
evals - Render an
EvalsSummaryfor humans (--jsoncallers serialize the struct instead). - format_
savings - Render a
SavingsSummaryfor humans (--jsoncallers serialize the struct instead). - format_
traces - Render the most recent
limittraces as JSON lines — machine-first (SPEC §0.2): each line is a fullTrace, newest last. - summarize_
evals - Aggregate gate verdicts + routing behavior over
traces(enforce only). - summarize_
savings - Aggregate spend vs the always-top counterfactual over
traces.