What problem does it solve? Stateful logic often degrades into scattered booleans, growing if/else chains, and repeated shape assumptions spread across files, making invalid states possible and refactors expensive. This Skill guides you to encode the domain directly in a structure so invalid states become unrepresentable. ## Core Features & Use Cases - Structure Selection Guidance: Recommends state machines, typed models, lookup tables, discriminated unions, reducers, and domain-organized modules matched to the problem shape. - Anti-Pattern Detection: Identifies tells like growing if/else chains, booleans that must stay in sync, and phase-named modules that repeat domain rules. - Restraint Check: Advises against forcing abstractions when the current code is already clear, local, and unlikely to grow. - Use Case: When adding a new lifecycle phase to a feature, apply this Skill to replace scattered status booleans with a state machine that makes illegal transitions impossible. ## Quick Start Ask the AI to apply the model-the-domain principle to refactor a module with branching state logic into an explicit domain structure.