Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-002DependencyForbidden cross-module dependency detected
Flags dependencies blocked by dependency rule configuration.
errorviolationNo auto-fix
How to fix
- Remove or reroute the forbidden dependency.
- Use an allowed public module boundary.
- Only update the rule if the architecture decision changed and is documented.
What it means
A module depends on another module that dependency rules explicitly forbid.
Why it matters
Forbidden dependencies encode architectural decisions that should fail fast when bypassed.
Common causes
- A new import violates dependency policy.
- The rule config is stricter than the current implementation.
- A module boundary changed without updating policy.
Example bad pattern
A domain module imports a UI module despite a forbidden dependency rule.Example good pattern
The domain module exposes behavior through an allowed lower-level boundary.Related files/config
.archpilot/dependency-rules.json.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci