Skip to content
sarj/graph/code-cycle

Keep code dependencies acyclic

Boundary-clean production code dependencies are acyclic.

warning

Examples

FlaggedFails
library A -> library B -> library A
PassesClean
application -> product library -> shared library

Why it matters

Cycles often conceal a missing contract, but remediation requires design judgment.

How detection works

Accepted production code dependencies form a cycle of two or more components.

What is inspected

  • boundary-clean production code dependency graph

How to fix it

Break the cycle at a stable semantic boundary.

  1. Move the smallest shared contract below the cycle.

Verify

  • Run repo-lint again and confirm the rule passes.