Expand description
Pure terminal rendering: the status tree, the plan review, and the pre-mission cost estimate line. No I/O here — everything returns String so tests can assert on the exact output.
Modules§
- ansi
- Raw ANSI escape codes (no color crates; callers gate on a tty check).
Constants§
- SANITIZED_
MARKER - The visible stand-in every stripped sequence and control leaves behind.
Functions§
- feature_
icon - Feature status icon: pending ○, active ◐, complete ●, skipped ⊘, failed ✗.
- milestone_
icon - Milestone status icon: pending ○, active ◐, validating ▶, complete ●, blocked ✖.
- mission_
status_ label - UPPERCASE mission status for the status headline.
- one_
line - Collapse whitespace/newlines into single spaces and truncate to
maxcharacters (char-safe; appends…when truncated). - render_
cost_ estimate - The one-line cost estimate shown at plan review time, with the provenance
of its params: calibrated from
missions_usedcompleted missions, or the built-in defaults when there are none. The range is wide on purpose; live usage is always authoritative. - render_
escalation_ metrics - Render
kranz escalation-metrics’s default text view: Autonomy (split by outcome), Rubber-stamp signal, False greens, and the Escalation ledger — unless there is no history at all, in which case only the Autonomy section plus a short note is printed (the outcomes empty-history rule). - render_
escalation_ metrics_ json - Serialize
kranz escalation-metrics --json’s output. - render_
gate_ score_ series - Render
kranz gate-scores’s default text view: the gate identity, the recorded-count line, and one row per evaluation in series order (timestamp, mission, seq, surface, verdict, score pair). The score column appears only when at least one evaluation was scored — a boolean-only gate’s series shows verdicts with NO score column, never zeros (KRZ-315: absence is the normal case, and a0.0would invent a reading the gate never stated). An unknown gate says so plainly rather than erroring (the outcomes empty-history rule). - render_
gate_ score_ series_ json - Serialize
kranz gate-scores --json’s output — byte-identical across runs over unchanged logs (the series carries no clock, no host paths). - render_
outcomes - Render
kranz outcomes’s default text view: an Autonomy section always, then Grant latency and Escalation ledger sections — unless there is no history at all (no closed missions, no escalations, no decided grants, no task-class rows), in which case only the Autonomy section (zeros) plus a short note is printed, per the spec’s empty-history rule. The industry-comparison set (KRZ-333), when folded, renders LAST as a clearly-separated secondary section after the Escalation ledger. - render_
outcomes_ json - Serialize
kranz outcomes --json’s output — the source of truth for the dashboard/Slack “identical data” claim (see the module doc for the outcomes fold). - render_
plan - Render a plan for the interactive approval prompt: contract, then the milestone/feature tree with specs and criteria.
- render_
provenance - Render
kranz provenance’s default text view: the mission identity, the gate ladder in log order, the sessions, the human decisions, and the terminal outcome. Empty sections say so plainly — a pre-gate.result log or an in-flight mission must read as “nothing recorded”, never as an error. - render_
provenance_ json - Serialize
kranz provenance --json’s output — byte-identical across runs over an unchanged log (the chain carries no clock, no host paths). - render_
standards_ metrics - render_
status - Render the
kranz statusterminal tree from a reduced state. - sanitize_
untrusted - Strip terminal control sequences from text kranz did not author.