Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DOM-003Domain Model QualityOversized aggregate/service boundary
Flags domain or service boundaries that appear too broad for one aggregate responsibility.
warningviolationNo auto-fix
How to fix
- Identify cohesive responsibility groups.
- Extract separate aggregates or services for unrelated behavior.
- Keep coordination in application services, not oversized domain objects.
What it means
One boundary owns many unrelated concepts or workflows.
Why it matters
Oversized boundaries hide model shape and make changes risky across unrelated behavior.
Common causes
- A central service became the default place for new workflows.
- Multiple aggregates are managed as one object.
- Ownership boundaries were not revisited as the product grew.
Example bad pattern
WorkspaceService owns billing, invitations, repository upload, and policy exceptions.Example good pattern
Separate services or aggregates own each bounded responsibility with a coordinator where needed.Related files/config
apps/api/src/modulespackages
Related CLI commands
archpilot validatearchpilot validate --ci