# Rule 1: Protecting Invariants
> [!Note]
> By enforcing that only the [[Aggregate Root]] can modify its internal state through **centralized validation** and **strict encapsulation**, all **business invariants** remain consistently honored.
The first rule mandates that the [[Aggregate Root]] acts as the sole guardian of its cluster, preventing any direct alterations to internal [[Entities]] or [[Value Objects]]. Every operation must funnel through the root, enabling **centralized validation** to verify the correctness of each state change against defined invariants. Furthermore, **strict encapsulation** ensures that internal components are inaccessible from outside the aggregate, safeguarding against inadvertent breaches of business rules. This approach guarantees a single entry point for modifications, preserving the aggregate’s global consistency.
---
## References
- Vernon, V. (2016). _Domain-driven design distilled_. Addison-Wesley Professional.
- Vernon, V. (2013). _Implementing domain-driven design_. Addison-Wesley Professional.
- Khononov, V. (2021). _Learning domain-driven design: Aligning software architecture and business strategy_. O’Reilly Media.
- Alammar, J., & Grootendorst, M. (2024). _Hands-on large language models: Language understanding and generation_. O’Reilly Media.
- Evans, E. (2003). _Domain-driven design: Tackling complexity in the heart of software_. Addison-Wesley Professional.
- Millett, S., & Tune, N. (2015). _Patterns, principles, and practices of domain-driven design._ Wrox.