What problem does it solve?
State bloat and mutation ambiguity in AI coding agents cause brittle state management; this skill promotes deriving values from existing data rather than storing redundant flags, reducing the combinatorial explosion of state. It also enforces safer data models and function contracts to prevent accidental mutation and inconsistent types.
Core Features & Use Cases
- Derive, don't store: derive values from events or existing data instead of caching flags to keep state small and predictable.
- Make wrong states impossible: use discriminated unions over optional fields, and prefer nulls over sentinels to express absence clearly.
- Enforce function contracts: keep functions pure where possible and encapsulate side effects to dedicated orchestrators.
- Data over procedure: convert long if-chains that return similar shapes into declarative data tables for easier reasoning and maintenance.
Quick Start
Start by auditing your state definitions and remove derived flags, convert optional fields into discriminated unions, and replace nested if-chains with a data-driven lookup.