Agent Wranglers

Structure Required

Allow no dependency cycles

No module may depend on itself through a chain of imports. Cycles make code impossible to test, load or change on its own.

How to do it

When two modules need each other, move the shared part into a third module, or turn one direction into an interface or an event.

How to check

A tool fails the build on any cycle. Examples are ESLint import/no-cycle, dependency-cruiser no-circular and the import-linter acyclic_siblings contract.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/structure/no-dependency-cycles.