Resolving Spec ↔ Code Divergence

Investigate a feature’s mismatch between intent and implementation. Use Finding evidence to decide whether code, specifications, or Unit mappings need correction.
Start with Reqode
Start with Reqode

Divergence Happens in Both Directions

Check direct Unit–Specification relations and review whether the implementation map is current.

1

Code is behind specs

A requirement, UI flow, data rule, or API contract changed, but implementation still follows the old behavior.

Fix code and tests.
Run Unit Alignment Verifier again.
Solve the Finding when evidence no longer applies.
2

Specs are behind code

Implementation contains intended product logic, but the linked requirements, data, UI, or API specs do not describe it.

Route the Finding to AI Analyst.
Prepare minimal spec changes.
Review, apply, and verify again.
3

The unit map is stale

Files moved, new code appeared, dependencies changed, or a unit is linked to the wrong specification.

Run Unit Discovery.
Review file assignment and relations.
Verify affected units after the map is current.
Unit Alignment Verifier

Every Unit-Spec relation gets its own status

The Unit has an aggregate result; each direct relation records its state, explanation, checked date, and both revisions.

A Unit may be aligned with an API, underspecified against data, and misaligned with a requirement.

FieldDesk REQ-1: linked Units with Aligned, Misaligned, Failed, Underspecified, and Unknown relation states.
FieldDesk REQ-1: linked Units with Aligned, Misaligned, Failed, Underspecified, and Unknown relation states.
More views
REQ-1: implementation relations and recorded commits for the OFFICE and BACKEND subsystems.

REQ-1: implementation relations and recorded commits for the OFFICE and BACKEND subsystems.

Findings Become Work Starters

Use the Finding’s evidence to choose a repair.

Fix code

The spec is correct. Give the coding assistant the Finding, affected unit, linked specs, app manifest, unit type rules, and source files.

Performer: AI Coding Agent
Handoff: FINDING-*
Finish: tests and verification

Fix specs

The implementation is intended, but the product model is incomplete or outdated. Start AI Analyst from the Finding context.

Performer: AI Analyst
Handoff: affected specs + evidence
Finish: review, apply, verify

Fix unit mapping

The behavior belongs to another unit, the links are wrong, or dependencies changed. Repair the implementation map first.

Performer: AI Unit Discovery Agent
Handoff: unit, relation, dependency context
Finish: Unit Discovery or relation cleanup
Coding Agent Handoff

Start from evidence, not a vague prompt

Give the coding agent the Finding and affected Unit. It reads their linked MCP context before editing.

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

Automate the Checks After Changes

Schedule discovery and alignment checks as specifications and synchronized code change.

1

Units Discovery

Process files with unknown Unit sync state to update assignments, dependencies, and specification links.

  • Project Branch
  • Subsystem
  • Model and run mode
  • Max checks per run
  • Max files per check
2

Specs ↔ Code Alignment Check

Check eligible units and update their results, relation states, and misalignment Findings.

  • Project Branch
  • Subsystem
  • Model and run mode
  • Additional prompt
  • Max checks per run
FieldDesk Scheduling & Dispatch: compare linked Units, Findings, and Test Cases; REQ-53, REQ-54, and REQ-58 have no linked test cases.
FieldDesk Scheduling & Dispatch: compare linked Units, Findings, and Test Cases; REQ-53, REQ-54, and REQ-58 have no linked test cases.
More views
REQ-1 connects the assignment requirement to User Interfaces, Data Entities, and the assignment API.

REQ-1 connects the assignment requirement to User Interfaces, Data Entities, and the assignment API.

Dashboard

Watch alignment risk across the project

The Project Dashboard shows alignment Findings by subsystem.

Broader coverage and trend views are a development direction.

Explore the workflow

Explore two FieldDesk resolution paths: correct the code or review a change to the specification.

PR-39 · 1 / 9
Inspect the failed implementation
1 of 9

Inspect the failed implementation

FINDING-326 links U-110 to a missing required input: visit duration. Follow REQ-53 to establish the intended behavior.

Resolve the mismatch and check again

Choose the correction from evidence, review the change, and verify the affected relations again.

Start with Reqode
Start with Reqode