Search docs

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

Modular monolith folder structure exists

Checks that the configured module root exists and contains the expected module directories.

errorsetup-gapNo auto-fix

How to fix

  1. Check the configured module root.
  2. Move modules back under the configured root or update the architecture configuration.
  3. Run validation again after the filesystem and configuration agree.

What the rule validates

ArchPilot could not confirm the configured modular-monolith structure on disk.

Why it matters

Module validation depends on a stable module root. Without it, dependency and boundary checks cannot be trusted.

Common causes

  • The module root path is wrong.
  • Modules were moved without updating ArchPilot configuration.
  • The repository is not using the expected modular-monolith layout.

Typical violation example

"moduleRoot": "apps/api/src/modules" but modules live under src/features.

Typical compliant example

"moduleRoot": "apps/api/src/modules" and each module has a matching directory under that root.

Related rules

Adjacent categories

Related files/config

  • .archpilot/architecture.json
  • apps/api/src/modules

Related CLI commands

  • archpilot validate
  • archpilot validate --ci

VS Code / Inspector action

Open Smart Init or Inspector configuration review and confirm the detected module root.

AP-ARCH-001 - Modular monolith folder structure exists | ArchPilot Docs