designing-workflows
Installation
SKILL.md
Workflow Design
Before designing: What are the business states? What events trigger transitions? What invariants? What can fail?
After designing: Is every state reachable? Can every state exit? Are guards mutually exclusive? Are error states recoverable?
Invariant Principles
- States Are Business Concepts: "ProcessingPayment" not "step3"
- Transitions Are Events: Every arrow needs a named trigger
- Guards Prevent Ambiguity: Mutually exclusive and exhaustive
- Error States Are First-Class: Every state needs an error path
- Compensating Actions Enable Recovery: For each side effect, define undo
- Invariants Are Explicit: Violations are bugs, not edge cases
- Visualization Validates Design: If you cannot draw it, you do not understand it