Preventing Architecture Drift

Check whether a feature follows your architecture. Inspect mapped software units against subsystem and Unit Type guidance, then review and resolve the Findings.
Start with Reqode
Start with Reqode

Architecture Drift Is a Control Loop Problem

Working behavior can still violate architectural boundaries. Make the rules explicit and check the affected units.

1

Layer drift

Controllers start owning business logic, services become hidden use cases, models hide side effects, or queries write data.

Verifier checks Code Manifest and Unit Type rules.
Finding routes the fix to code or architecture work.
2

Ownership drift

A unit absorbs behavior that belongs elsewhere, new files are not mapped, or a unit links to specs it does not own.

Unit Discovery updates file ownership and dependencies.
Unit architects can repair relations and boundaries.
3

Convention drift

A feature violates documented UI/UX rules or API conventions.

Code Manifest and Unit Type rules make shared conventions explicit.
Findings show the expected approach and actual violation.

What Reqode Uses as the Architecture Contract

Keep architecture guidance in reviewable artifacts available to agents.

Code Manifest

Subsystem-wide rules for stack, folders, request flow, dependency direction, side effects, testing, and instructions for AI coding agents.

Unit Types

Role-specific guidance for controllers, actions, services, queries, models, jobs, integration clients, frontend components, and tests.

Software units

Logical implementation areas connected to files, dependencies, consumers, guidelines, specifications, verification state, and Findings.
Verified Architecture Rules

From written guidance to enforceable feedback

Unit Guidelines Verifier checks the guidance available to implementers and records confirmed violations on units and in Findings.

Subsystem Code Manifest defines the broad contract.
Unit Type rules define role-specific behavior.
Unit-specific guidelines protect local ownership boundaries.
FieldDesk Eloquent Model rules: explicit mass-assignment protection, local invariants, and architecture boundaries.
Eloquent Model: the rules applied to WorkOrder.
More views
U-156 WorkOrder: Eloquent Model type, app/Models/WorkOrder.php, dependencies, consumers, and guideline verification warnings.

U-156: inspect ownership, source files, and verification state.

FINDING-498: HIGH severity architecture violation in U-156 WorkOrder; workflow and concurrency fields are mass assignable, with a proposed correction.

FINDING-498: protect workflow and concurrency fields from mass assignment.

FieldDesk app/Models/WorkOrder.php, lines 21–40: the fillable list exposes state, version, blocked_reason, and cancellation_reason.

Source evidence: workflow fields in WorkOrder’s mass-assignment whitelist.

Findings Turn Drift into Work

Use Finding evidence, severity, and solution actions to choose the right repair.

Fix code

The architecture rule is valid and implementation violates it. Send the Finding, Unit, manifest, Unit Type, guidelines, and files to a coding assistant.

Performer: AI Coding Agent
Handoff: FINDING-*

Fix unit metadata

The map is stale: files, dependencies, consumers, unit-specific guidelines, or Unit-Spec relations need correction before code is judged.

Performer: Unit Discovery Agent
Handoff: unit map and dependency context

Fix architecture rules

The code is intentional, but the Code Manifest or Unit Type rules are outdated. Route the change through architecture review.

Performer: AI Architect
Handoff: manifest or Unit Type change

Decide intent

The verifier found a real conflict, but the team must decide whether product behavior, architecture guidance, or implementation should change.

Performer: Manager
Handoff: evidence and options
FINDING-498: HIGH severity architecture violation in U-156 WorkOrder; workflow and concurrency fields are mass assignable, with a proposed correction.
FINDING-498: protect workflow and concurrency fields from mass assignment.
More views
FieldDesk app/Models/WorkOrder.php, lines 21–40: the fillable list exposes state, version, blocked_reason, and cancellation_reason.

Source evidence: workflow fields in WorkOrder’s mass-assignment whitelist.

Coding Assistant Handoff

Give the assistant a Finding, not a vague cleanup task

Start the coding agent from the Finding and target Unit. MCP supplies files, manifest, type and unit guidance, dependencies, and evidence.

Review the applicable rule before editing code.

Example Prompt

Start repair from verified evidence

A good coding prompt can be short because Reqode provides the architecture context.

Use Reqode MCP as a source of truth.
Start from FINDING-123 and U-456.

Automate Discovery and Verification After Changes

Configure checks for the relevant project branch and subsystem.

1

Units Discovery

Processes files with unknown unit sync state and updates units, file assignments, dependencies, ignored files, and Unit-Spec links after backend validation.

  • Project Branch
  • Subsystem
  • Max checks per run
  • Max files per check
2

Unit Guidelines Compliance Check

Runs Unit Guidelines Verifier for units that need verification, updates the unit status/result/date, and creates or solves guideline Findings.

  • Project Branch
  • Subsystem
  • Additional prompt
  • Max checks per run
3

Specs - Code Alignment Check

Runs Unit Alignment Verifier when responsibility drift may also affect requirements, data entities, user interfaces, or API operations.

  • Project Branch
  • Subsystem
  • Model and run mode
  • Max checks per run
Dashboard

See the local Finding and the system-level picture

The Project Dashboard groups Findings by subsystem and concern: guidelines, alignment, specification consistency, and security.

A broader dashboard for coverage, stale units, unlinked files, and trends is planned.

FieldDesk requirements with Units and Findings enabled: REQ-16 has passing green units and no findings; REQ-1 has attention-needed signals.
Requirements: passing checks and rows that need attention.
More views
FINDING-313 opened from REQ-1: HIGH severity, source-file line references, linked REQ-1, API-1 and U-43, and a proposed schedule-snapshot correction.

REQ-1 → FINDING-313: trace a warning to evidence and a proposed solution.

Explore the workflow

Follow architecture guidance from implementation checks to actionable findings.

PR-46 · 1 / 8
Start with architectural expectations
1 of 8

Start with architectural expectations

TECH assigns route metadata to Pages. Components render state and emit user intent; the verifier checks these boundaries.

Keep code inside the architecture you chose

Correct the implementation or review the guidance, then run the affected checks again.

Start with Reqode
Start with Reqode