Search docs
Docs searchValidation rule
Back to Rule CatalogAP-ARCH-007ArchitectureModule contract identity matches registry
Checks that module contract identity and field shape align with the registry.
errorsetup-gapNo auto-fix
How to fix
- Update the contract identity to match the registry.
- Fix missing or malformed contract fields.
- Avoid copying contracts without changing module-specific values.
What the rule validates
A contract file exists, but its declared module identity or expected fields do not match the architecture registry.
Why it matters
Identity mismatches can make a finding look like it belongs to the wrong module.
Common causes
- A contract was copied between modules.
- A module was renamed without updating contract identity.
- The contract schema is incomplete.
Typical violation example
The billing module contract still declares id: payments.Typical compliant example
The billing contract identity, path, and registry entry all match.Related rules
AP-ARCH-001 - Modular monolith folder structure existsAP-ARCH-002 - Implementation profile not fully supportedAP-ARCH-003 - Architecture overview artifact existsAP-ARCH-004 - Module baseline files exist
Adjacent categories
Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs