Skip to main content

Module output

Module output 

Source
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 max characters (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_used completed 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 a 0.0 would 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 status terminal tree from a reduced state.
sanitize_untrusted
Strip terminal control sequences from text kranz did not author.