Module 9 · Lesson 115 min
The aggregate owns invariants
The domain layer holds the rules. An aggregate root is the object that owns a consistency boundary and its invariants: you load it whole, call an action on it, and it either succeeds or returns a failed Result. The application layer is a thin orchestrator: load the aggregate, call the action, save. It must not pre-compute domain decisions and hand them in; that would make the aggregate a hollow validator over caller-supplied data (convention D1).
Try it yourself
Do
Trace a use case end to end
See the load / act / save shape and the injected clock.
Tick every step to confirm you did it.