Search docs
Docs searchValidation rule
Back to Rule CatalogAP-APP-005Application LayeringService has oversized responsibility
Flags services that appear to own too many workflows or responsibilities.
warningviolationNo auto-fix
How to fix
- Group methods by workflow or domain responsibility.
- Extract focused services for distinct responsibilities.
- Keep public module exports aligned after extraction.
What the rule validates
A service has grown broad enough that it likely represents multiple responsibilities.
Why it matters
Oversized services are harder to test, change, and assign to a clear owner.
Common causes
- Many workflows were added to one service over time.
- Shared orchestration was centralized too aggressively.
- A module boundary needs to be split.
Typical violation example
OrganizationService owns billing, invitations, token management, and onboarding side effects.Typical compliant example
Focused services own billing, invitations, token management, and onboarding separately.Related rules
AP-APP-001 - Controller contains business logicAP-APP-002 - Repository contains business logicAP-APP-003 - Service bypasses repository layerAP-APP-004 - Package responsibility mismatch
Adjacent categories
Related files/config
apps/api/srcapps/webpackages
Related CLI commands
archpilot validatearchpilot validate --ci