Search docs

Docs search
Back to Rule Catalog
AP-DEP-003Dependency

Non-public cross-module import detected

Flags cross-module imports that do not use a public module entrypoint.

errorviolationNo auto-fix

How to fix

  1. Export the supported symbol from the target public entrypoint.
  2. Change consumers to import through that entrypoint.
  3. 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-ledger

Example good pattern

import from ../payments

Related files/config

  • .archpilot/architecture.json
  • .archpilot/contracts/*.json

Related CLI commands

  • archpilot validate
  • archpilot validate --ci
AP-DEP-003 - Non-public cross-module import detected | ArchPilot Docs