Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-008DependencyTransitive circular module dependency detected
Flags dependency cycles that emerge through multiple module hops.
errorviolationNo auto-fix
How to fix
- Identify the smallest edge that breaks the cycle.
- Move shared behavior into a lower-level module or explicit interface.
- Re-run validation to confirm the graph is acyclic.
What it means
Modules form a cycle when declared and actual dependency edges are followed transitively.
Why it matters
Transitive cycles make module ownership unclear and often create release, testing, and initialization problems.
Common causes
- Two modules coordinate through each other instead of a shared abstraction.
- A new callback path completed a cycle.
- Contracts were updated without checking the full graph.
Example bad pattern
payments -> ledger -> settlement -> payments.Example good pattern
payments and settlement depend on a shared contract or platform service without a cycle.Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci