Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-001DependencyCircular module dependency detected
Flags direct circular dependencies between modules.
errorviolationNo auto-fix
How to fix
- Move shared behavior into a lower-level module.
- Introduce a public interface or event boundary.
- Remove one dependency edge and rerun validation.
What it means
Two or more modules depend on each other in a direct cycle.
Why it matters
Cycles make ownership unclear and increase the cost of changing either module.
Common causes
- Shared behavior lives in one of the feature modules.
- Two modules call each other directly.
- A quick import was added to avoid defining a public boundary.
Example bad pattern
billing imports invoices while invoices imports billing.Example good pattern
billing and invoices depend on a shared platform abstraction without importing each other.Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs