Search docs

Docs search
Back to Rule Catalog
AP-ARCH-008Architecture

Module public entrypoints are aligned

Checks that registered module public entrypoints match the public surfaces declared in module contracts.

errorsetup-gapNo auto-fix

How to fix

  1. Open the affected module contract.
  2. Update the public entrypoints to match the files that should be imported by other modules.
  3. Update imports to use the public entrypoint and rerun validation.

What it means

A module contract and the registered architecture model disagree about the files that form the module's public surface.

Why it matters

Dependency checks use public entrypoints to tell legitimate module usage apart from internal bypasses.

Common causes

  • A module entrypoint was renamed or moved.
  • The module contract was updated but the architecture registry was not.
  • Code imports internals because no stable public entrypoint exists.

Example bad pattern

A contract lists src/modules/billing/index.ts while consumers import src/modules/billing/internal/ledger.ts.

Example good pattern

The contract lists the module index file, and cross-module imports go through that index file.

Related files/config

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

Related CLI commands

  • archpilot validate
  • archpilot validate --ci

VS Code / Inspector action

Use Inspector findings to jump from the rule result to the affected module contract.

AP-ARCH-008 - Module public entrypoints are aligned | ArchPilot Docs