SESM β€” watch a state machine teach itself

A Pydantic model bounds a 75-combination state space. The FSM starts with 7 hand-written states. Live events drive it into uncharted combinations; each discovery is judged by gpt‑5.4‑mini (reasoning off) β€” add a state, or flag a bug. Click through the turns.

Why this matters

Every real system carries more state than anyone wrote down β€” the combinations of payment, fulfillment, and dispute flags that nobody enumerated. A traditional state machine handles exactly what you predicted; everything else lands in an incident channel, a silent else branch, or corrupted data. SESM inverts that: a Pydantic model bounds what's possible, you map only what you know, and every unmapped-but-real situation becomes a first-class discovery β€” triaged by a cheap AI analyst, then either taught to the machine or flagged as the bug it is.

πŸ”­ Unknown unknowns become a queue

Instead of surfacing as incidents, situations the system was never taught arrive as deduplicated discovery events β€” ranked by how often reality hits them.

πŸ“ Coverage is a real number

A bounded space makes "how much of what's possible do we handle?" measurable. Watch it climb in the ticker above as the machine learns.

πŸ€– Cheap AI does the triage

A mini model (reasoning off, ~a hundredth of a cent per discovery) drafts the judgment: legitimate new state, or impossible β€” so it's a bug. Its reasoning is recorded on every turn you're about to click through.

⛨ Safety is structural, not model-dependent

Rules you already know go in validate=. Then even a wrong analyst cannot admit a rule-violating state β€” compare the blind run's red cells with the guarded run's clean map.

πŸ“Ό The domain model explains itself

Every expansion carries what triggered it, who judged it, and why β€” the state machine's history is its own audit trail. Lifecycles that fit: orders, billing, agent/VM sessions, document workflows β€” anywhere reality outruns the enum.

β€”coverage
β€”states
β€”LLM analyses
β€”of 200 events
base (hand-written) added by the analyst added but oracle-invalid flagged as bug blocked by validate= rule
event 1event 200