1+ ---
2+ dun :
3+ id : F-006
4+ depends_on :
5+ - helix.prd
6+ review :
7+ self_hash : c0cc87165a06f1ff8b90f446f9ae6723319287c7645b0f1659aa3ee618eb4962
8+ deps :
9+ helix.prd : 58d3c4be8edb0a0be9d01a3325824c9b350f758a998d02f16208525949c4f1ad
10+ ---
111# Feature Spec: F-006 Doc and Code Reconciliation
212
313## Summary
414
5- Detect documentation drift across the Helix stack and propose downstream
6- changes from PRD to implementation .
15+ Detect documentation and implementation drift across the Helix stack and emit
16+ a deterministic, ordered reconciliation plan for downstream updates .
717
818## Requirements
919
10- - Compare PRD, feature specs, user stories, design docs, ADRs, test plans, and
11- implementation for drift.
12- - Emit a structured plan that lists required downstream updates.
13- - Support both documentation-only drift and implementation drift.
14- - Keep the analysis deterministic and reproducible.
20+ - Build a deterministic inventory of artifacts: PRD, feature specs, user
21+ stories, design docs, ADRs, test plans, and implementation markers.
22+ - Detect drift types: missing artifacts, stale artifacts due to upstream
23+ changes, and implementation drift relative to docs.
24+ - Emit a structured reconciliation plan as ordered issues with clear next
25+ steps per artifact.
26+ - Order the plan from upstream to downstream so operators update artifacts in
27+ dependency order.
28+ - Support automation modes for reconciliation (plan vs yolo) as part of the
29+ run context.
30+ - Keep the analysis deterministic and reproducible for the same repo state.
1531
1632## Inputs
1733
@@ -21,10 +37,33 @@ changes from PRD to implementation.
2137- ` docs/helix/02-design/**/*.md `
2238- ` docs/helix/03-test/test-plan.md `
2339- Source code paths (e.g., ` cmd/ ` , ` internal/ ` ) as needed by the agent
40+ - Automation mode configuration (CLI/config) for plan vs yolo behavior
2441
2542## Acceptance Criteria
2643
2744- When a PRD change is detected, Dun emits a drift plan listing impacted
28- artifacts in order.
45+ artifacts in deterministic dependency order.
46+ - The plan includes updates for feature specs, design docs, ADRs, test plans,
47+ and implementation artifacts; user stories are included when present.
2948- Drift output is structured as issues with clear next steps.
30- - The plan traces updates all the way to implementation and tests.
49+ - Automation mode ` plan ` emits the reconciliation plan without edits; ` yolo `
50+ allows agents to complete missing artifacts per policy.
51+
52+ ## Gaps & Conflicts
53+
54+ - Conflicts: none identified in the provided inputs.
55+ - Missing definition of the drift detection method (hashing, stamps, or diff
56+ strategy) and how implementation drift is identified.
57+ - Missing ordering rules for artifacts at the same layer and how user stories
58+ interleave with feature specs.
59+ - Missing plan schema (fields, IDs, severity) and mapping to output formats
60+ (prompt envelopes vs JSON).
61+ - Missing rules for code scope selection and how much code context to include.
62+ - Dependencies: automation mode policy (F-007), doc dependency tracking
63+ (F-016), and output format rules (F-002).
64+
65+ ## Traceability
66+
67+ - Supports PRD goals for deterministic, agent-friendly output and doc-to-code
68+ reconciliation with plan and yolo modes.
69+ - Supports US-005 by emitting ordered downstream updates from PRD changes.
0 commit comments