Search docs

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

Declared module dependency not used

Flags a module contract dependency that no longer appears in implementation imports.

warningviolationNo auto-fix

How to fix

  1. Remove stale dependsOn entries.
  2. If the dependency is intentional but dynamic, document the reason.
  3. Run validation after contract cleanup.

What the rule validates

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.

Typical violation example

billing declares notifications but no billing code imports notifications.

Typical compliant example

billing only declares modules it actually depends on, or documents intentional dynamic dependency evidence.

Related rules

Adjacent categories

Related files/config

  • .archpilot/architecture.json
  • .archpilot/contracts/*.json

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-DEP-006 - Declared module dependency not used | ArchPilot Docs