eventmodeling-optimizing-stream-design
Installation
SKILL.md
Optimizing Stream Design
Interview Phase (Optional)
When to Interview: Skip if the user has specified: expected event frequency, stream lifetime, and growth patterns. Interview when stream length concerns exist but growth estimates are unclear.
Interview Strategy: Establish growth expectations and performance requirements before recommending snapshotting. Most snapshotting proposals stem from poor stream boundary design, not genuine volume — surface the estimates first to distinguish real performance concerns from design problems.
Critical Questions
-
Growth Estimates (Impact: Determines if snapshotting is needed or if stream design should change)
- Question: "Estimate events: (A) Per entity per day, (B) Lifetime total, (C) Growth over years. Example: 5-10 events/order, 1-10 million orders/year?"
- Why it matters: Growth estimates reveal if streams will genuinely be too long or if design is wrong
- Follow-up triggers: If estimates exceed 300 events per stream lifetime → ask "Is the stream identity correct? Could this stream be split by a narrower business entity?"
-
Performance SLAs (Impact: Determines acceptable latency and snapshotting decisions)
- Question: "Performance requirements? (A) <100ms read latency, (B) <1s acceptable, (C) Eventual consistency OK?"
- Why it matters: Strict SLAs might need snapshotting; loose SLAs often don't
- Follow-up triggers: If (A) → ask "Which commands specifically need sub-100ms replay? Are those commands reading from a read model or replaying the stream directly?"