Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DEP-003DependencyNon-public cross-module import detected
Flags cross-module imports that do not use a public module entrypoint.
errorviolationNo auto-fix
How to fix
- Export the supported symbol from the target public entrypoint.
- Change consumers to import through that entrypoint.
- Keep internal-only code inside the owning module.
What the rule validates
A module imports another module through a path ArchPilot does not consider public.
Why it matters
Non-public imports couple consumers to internals and make refactors risky.
Common causes
- Editor auto-import chose an internal file.
- The public entrypoint does not export the needed symbol.
- A public entrypoint declaration is stale.
Typical violation example
import from ../payments/services/internal-ledgerTypical compliant example
import from ../paymentsRelated rules
AP-DEP-001 - Circular module dependency detectedAP-DEP-002 - Forbidden cross-module dependency detectedAP-DEP-004 - Cross-module dependency missing from module contractAP-DEP-005 - Cross-module import bypasses public module surface
Adjacent categories
Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs