event-sourcing
Installation
SKILL.md
Event Sourcing
Build auditable systems by storing complete history of state changes as immutable events rather than current values.
Context
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.
Domain Context
Based on Greg Young's event sourcing work and CQRS patterns:
- Event Store: Append-only log of domain events; immutable, ordered
- Aggregate Reconstruction: Replay events to reconstruct current state on-demand
- Snapshots: Optimize replay by storing intermediate state; trade storage for speed
- Event Versioning: Events evolve; handle schema changes in replays
- Projections: Materialize different views from event stream (CQRS read models)