designing-event-modelslisted
Install: claude install-skill msewell/agent-stuff
# Designing Event Models
## Workflow: Design an Event Model
1. **Clarify scope.** Ask what system or feature to model. Identify actors, key business processes, and external systems.
2. **Brainstorm events.** List all domain events. Group into swimlanes by business capability.
3. **Build the timeline.** Order events chronologically within each swimlane.
4. **Apply the four patterns** to each step:
- **State Change:** Screen → Command → Event
- **State View:** Event(s) → Read Model → Screen
- **Automation:** Event → Read Model → ⚙️ → Command → Event
- **Translation:** External Event → ⚙️ → Command → Event
5. **Define slices.** Each pattern application = one slice. Name it after the business action or view.
6. **Write GWTs** (Given/When/Then scenarios) for each slice. Minimum: one happy path + one error/edge case. Use concrete example data ("Jane Doe", "$4.50"), never abstract placeholders.
7. **Run the Information Completeness Check.** For every field in every read model, trace it to a source event. For every command field, trace it to user input or a prior event. Flag gaps.
8. **Output the model as YAML** using the format below.
## Workflow: Review an Event Model
1. **Check completeness.** Every read model field must trace to a source event. Flag orphan data.
2. **Check anti-patterns:**
- Events in present tense (should be past tense)
- God slice (>10 GWTs in one slice — decompose)
- Horizontal over-orchestration (UI firing sequential commands — use au