Skip to main content

Module humanize

Module humanize 

Source
Expand description

v0.9 Pilier 2 — « zéro jargon ».

One table, used by every surface (CLI, TUI, console, gateways), that turns each engine Event into a plain-language status line for simple mode. The transcript should read like a sentence — tu as dit · je fais · voilà — never run a3f2 · route … · tier T1.

§The anti-regression lock

humanize matches every Event variant with no wildcard arm. Adding a new variant to the contract therefore fails to compile here until someone gives it a human phrase (or an explicit None). That is stronger than a test: you cannot ship an un-humanized event.

Events that are pure telemetry or internal continuity (token counts, cost deltas, opaque reasoning) return None — in simple mode they belong to the HUD, not the conversation.

Enums§

Lang
Display language for the human layer. Only two are shipped on purpose (the structure allows more); see PLAN_v0.9.0 §8.

Functions§

humanize
Translate an engine event into a plain-language status line for simple mode.
risk_phrase
Plain-language label for a risk level (used in approval contracts).
status_phrase
Plain-language label for an agent status (used by the cockpit’s simple view).