eventmodeling-designing-event-models
Installation
SKILL.md
Designing Event Models
Interview Phase (Optional)
When to Interview: Skip if the user has specified: stream identity strategy, command-specific state needs, and read model requirements. Interview when stream boundaries or state design are unclear.
Interview Strategy: Establish stream identity and per-command state boundaries before designing. Ambiguous boundaries are the primary cause of the DDD aggregate anti-pattern appearing in event-sourced models.
Critical Questions
-
Stream Identity (Impact: Determines how events are grouped into streams)
- Question: "What's the entity that owns events? (e.g., orderId, reviewId, customerId) What's the lifetime? Single transaction or years?"
- Why it matters: Wrong stream identity causes design problems; correct identity keeps streams appropriately scoped
- Follow-up triggers: If multiple candidates → ask "Which entity's identity would you use to load events for a single command decision?"
-
Minimal State vs Bundled State (Impact: Prevents DDD aggregate anti-pattern)
- Question: "Will different commands need different state? Or does every command need the same full state?"
- Why it matters: Each command should have minimal, command-specific state—not bundled DDD aggregates
- Follow-up triggers: If "same full state" → walk through two commands and ask what each actually reads during validation