Help us improve
Share bugs, ideas, or general feedback.
From data-architecture
Store state as immutable event log instead of current values. Build auditable, event-driven systems with full history. Use when auditability, temporal queries, or event-driven processing matters.
npx claudepluginhub sethdford/claude-skills --plugin architect-data-architectureHow this skill is triggered — by the user, by Claude, or both
Slash command
/data-architecture:event-sourcingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build auditable systems by storing complete history of state changes as immutable events rather than current values.
Designs event-sourced systems with event store, projections, versioning patterns. Guides when to use for audits, complex domains, collaboration, event-driven architectures.
Designs event-sourced systems with CQRS, event stores, projections, sagas, snapshotting, and eventual consistency. Use for audit trails, temporal queries, and complex domain modeling.
Share bugs, ideas, or general feedback.
Build auditable systems by storing complete history of state changes as immutable events rather than current values.
You are designing a system requiring auditability, temporal analysis, or replay capability. Event sourcing provides complete history and enables powerful event-driven architectures. Read domain requirements and existing event-driven patterns.
Based on Greg Young's event sourcing work and CQRS patterns:
Identify Core Events: What state changes matter? Order placed, payment received, shipment dispatched. Each event is fact about domain; captured in past tense.
Design Event Schema: Each event contains timestamp, aggregate ID, type, data. Include enough context to understand intent (who, when, why).
Plan Aggregate Boundaries: Group related events into aggregates. Order aggregate: contains all events for single order. Enables consistent snapshots and replay.
Implement Snapshot Strategy: Full replay from beginning gets slow. Snapshot order state every 100 events; replay only from last snapshot. Balance storage and speed.
Create Read Projections: Maintain materialized views (current-state, analytics) from event stream. These are caches; can be rebuilt from events anytime.