Search docs
Docs searchValidation rule
Back to Rule CatalogAP-DQR-004Data & Query RiskCross-module direct database access bypasses module boundary
Flags database access that reaches into another module's owned data boundary directly.
warningviolationNo auto-fix
How to fix
- Use the owning module's public API or service boundary.
- Add a supported read model or event feed.
- Document temporary migration exceptions and remove them after the migration window.
What it means
One module appears to read or write another module's database artifacts directly.
Why it matters
Direct data access bypasses module contracts and makes ownership, migration, and policy decisions harder to control.
Common causes
- A read model was built by querying another module's tables.
- A migration window introduced temporary direct access.
- The owning module does not expose a public query/API surface yet.
Example bad pattern
risk imports payments ledger tables directly for scoring.Example good pattern
risk consumes a payments-owned public query or event projection.Related files/config
.archpilot/architecture.json.archpilot/contracts/*.json
Related CLI commands
archpilot validatearchpilot validate --ci