Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-006DependencyDeclared module dependency not used
Flags a module contract dependency that no longer appears in implementation imports.
warningviolationNo auto-fix
How to fix
- Remove stale dependsOn entries.
- If the dependency is intentional but dynamic, document the reason.
- Run validation after contract cleanup.
What it means
The contract says a module depends on another module, but current imports do not show that relationship.
Why it matters
Stale dependency declarations make architecture diagrams and reviews noisier than they need to be.
Common causes
- A dependency was removed from code but not from the contract.
- The dependency is only used dynamically.
- The module is being prepared for a near-future change.
Example bad pattern
billing declares notifications but no billing code imports notifications.Example good pattern
billing only declares modules it actually depends on, or documents intentional dynamic dependency evidence.Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs