Making Invalid States Unrepresentable

Analyzes existing code and guides new type design to make invalid states unrepresentable using type system techniques such as sum types, newtypes, typestate, branded types, and parse-don't-validate. Use when reviewing code for invalid-state bugs, refactoring types to eliminate impossible states, designing domain models, or applying compile-time correctness patterns. Language-agnostic.

msewell Updated

File contents

msewell/agent-stuff/tree/main/skills/making-invalid-states-unrepresentable commit 229b6c5f32

Frequently asked questions

npx skillmds@latest add msewell/making-invalid-states-unrepresentable