Search docs

Docs search
Back to Rule Catalog
AP-APP-005Application Layering

Service has oversized responsibility

Flags services that appear to own too many workflows or responsibilities.

warningviolationNo auto-fix

How to fix

  1. Group methods by workflow or domain responsibility.
  2. Extract focused services for distinct responsibilities.
  3. 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/src
  • apps/web
  • packages

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-APP-005 - Service has oversized responsibility | ArchPilot Docs