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 the rule validates
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.
Typical violation example
billing imports invoices while invoices imports billing.Typical compliant example
billing and invoices depend on a shared platform abstraction without importing each other.Related rules
AP-DEP-002 - Forbidden cross-module dependency detectedAP-DEP-003 - Non-public cross-module import detectedAP-DEP-004 - Cross-module dependency missing from module contractAP-DEP-005 - Cross-module import bypasses public module surface
Adjacent categories
Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs