Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-010DependencyDependency violates architecture layer direction
Flags dependencies that point against the configured architecture layer direction.
errorviolationNo auto-fix
How to fix
- Move shared code to an allowed lower-level module.
- Reverse the dependency through an interface or event.
- Update layer configuration only if the architecture decision changed.
What it means
A module imports or declares a dependency from a layer it is not allowed to depend on.
Why it matters
Layer direction rules prevent lower-level code from becoming coupled to higher-level workflows.
Common causes
- A utility was placed in an application layer.
- Domain or platform code imports a feature module.
- Layer configuration does not match the intended module graph.
Example bad pattern
platform imports repositories because a helper lives there.Example good pattern
repositories imports platform, or the helper is moved into platform.Related files/config
.archpilot/dependency-rules.json.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci