cqrs-aggregate-modeling
Installation
SKILL.md
CQRS Aggregate Modeling
In CQRS, an aggregate is not a read model. It only needs the state required to decide whether a command is valid and which events to emit.
Workflow
-
Identify each command the aggregate handles.
-
List the state needed to validate and execute those commands.
-
Remove query-only projections, history lists, counters, denormalized display fields, and report data from the command aggregate.
-
Put read concerns into read models updated from events.
-
Redraw aggregate boundaries around true invariants and command contention.
Modeling Rules
- Keep state minimal, invariant-bearing, and command-oriented.