SKILL.md
$27
- List all possible states
- List all events/triggers
- Define valid transitions
- Identify impossible states to prevent
- Add guards for conditional transitions
- Define entry/exit actions per state
Benefits
- Eliminates impossible states (no loading + error simultaneously)
- Makes edge cases visible
- Shared language between design and engineering
- Testable behavior specification
Best Practices
- Start with the happy path, then add error states
- Every state should have a way out (no dead ends)
- Keep state machines focused (one per concern)
- Document with visual diagrams
- Map each state to a UI representation