Search docs

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

Transitive circular module dependency detected

Flags dependency cycles that emerge through multiple module hops.

errorviolationNo auto-fix

How to fix

  1. Identify the smallest edge that breaks the cycle.
  2. Move shared behavior into a lower-level module or explicit interface.
  3. 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 validate
  • archpilot validate --ci
AP-DEP-008 - Transitive circular module dependency detected | ArchPilot Docs