Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-011DependencyCross-component dependency policy violation
Flags dependencies between components that violate the configured cross-component policy.
errorviolationNo auto-fix
How to fix
- Route the dependency through an allowed API, package, or event boundary.
- Move shared code into an approved shared component.
- Update policy only when the architecture decision changed and is documented.
What it means
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.
Example bad pattern
apps/web imports implementation files from apps/api/src/modules/billing.Example good pattern
apps/web consumes the billing API contract or a shared typed contract package.Related files/config
.archpilot/architecture.json.archpilot/dependency-rules.json.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci