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 it means
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.
Example bad pattern
import from ../payments/services/internal-ledgerExample good pattern
import from ../paymentsRelated files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs