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 it means
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.
Example bad pattern
OrganizationService owns billing, invitations, token management, and onboarding side effects.Example good pattern
Focused services own billing, invitations, token management, and onboarding separately.Related files/config
apps/api/srcapps/webpackages
Related CLI commands
archpilot validatearchpilot validate --ci