Search docs

Docs search
Back to Rule Catalog
AP-DEP-011Dependency

Cross-component dependency policy violation

Flags dependencies between components that violate the configured cross-component policy.

errorviolationNo auto-fix

How to fix

  1. Route the dependency through an allowed API, package, or event boundary.
  2. Move shared code into an approved shared component.
  3. Update policy only when the architecture decision changed and is documented.

What the rule validates

A component depends on another component in a way that the architecture policy does not allow.

Why it matters

Cross-component policy keeps service, app, and package boundaries aligned with ownership and deployment expectations.

Common causes

  • A shared package imports an app-specific module.
  • A service reaches into another component instead of using an API/event boundary.
  • Component policy changed without updating imports.

Typical violation example

apps/web imports implementation files from apps/api/src/modules/billing.

Typical compliant example

apps/web consumes the billing API contract or a shared typed contract package.

Related rules

Adjacent categories

Related files/config

  • .archpilot/architecture.json
  • .archpilot/dependency-rules.json
  • .archpilot/architecture.json
  • .archpilot/contracts/*.json

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-DEP-011 - Cross-component dependency policy violation | ArchPilot Docs