Fix Report — Skill
Purpose
Defines the structure, conventions, and quality standards for diagnosing validation failures and producing a FIX_REPORT.md within the agentic spec-driven development workflow.
When to Use
Load this skill whenever an agent needs to diagnose validation failures and produce a fix plan or fix report. Primary user: Phase 5 (Fix). Secondary user: any agent reviewing fix outcomes.
Conventions
Diagnosis Standards
- Read all failures before fixing any. Multiple scenario failures may share one root cause. Fixing in isolation risks duplicate effort or conflicting patches.
- Trace to origin. Every failure must be traced: failed scenario → violated requirement → responsible component → specific function/line. If you can't point to a line, you haven't diagnosed it.
- Classify every failure. Use exactly these root cause categories:
- code-bug: Logic error, wrong algorithm, incorrect data transformation
- data-issue: Wrong test data, missing sample files, incorrect fixture setup
- setup-issue: Missing dependency, wrong version, broken install step
- spec-ambiguity: Spec language allows multiple interpretations
- design-gap: Design didn't account for this case or scenario
- validation-error: The test script itself has a bug (wrong expected value, wrong comparison method)
- Group by root cause. One root cause may manifest as multiple scenario failures. The fix plan addresses root causes, not individual scenarios.
Fix Plan Standards
- Plan before executing. The fix plan is a separate deliverable presented to the user before any code changes are made.
- Each fix item includes:
- Root cause ID (RC-001, RC-002, ...)
- Classification (from the categories above)
- Affected scenarios (which ones fail because of this)
- Affected requirements (which REQs are impacted)
- Diagnosis (what's wrong and why)
- Proposed fix (what specific change to make, in which file, in which function)
- Files modified (exact list)
- Blast radius (which passing scenarios could be affected by this change)
- Fixable: Yes / No (with rationale if No)
- Order by independence. Fix items that don't affect each other come first. Fixes to shared code come last.
- Separate fixable from unfixable. Unfixable items (spec-ambiguity, design-gap, validation-error) are documented but not actioned. They become recommendations for upstream revision.
Fix Execution Standards
- Minimal diff. Change the fewest lines possible. No refactoring, no improvements, no style changes.
- Verify after each fix. After addressing one root cause, re-run the affected scenarios. Record pass/fail.
- Do not modify validation scripts.
validate.sh and demo.sh are QA artifacts. If they contain errors, flag them as validation-error — do not edit them.
- Do not modify upstream documents. SPEC.md, DESIGN.md, RESEARCH.md are upstream contracts. If they need changes, document the recommendation.
Git Standards
- Single branch. All fixes go on
fix/validation-fixes branched from develop.
- One commit per root cause. Commit message format:
fix(component): description — fixes Scenario 6.X, 6.Y
- Merge with --no-ff. Back into develop when all fixable items are addressed.
- Do not merge to main. The re-validation phase decides if main gets updated.
Output Templates
Fix Plan (presented to user BEFORE executing)
# Fix Plan — [Project Name]
## Summary
| Metric | Count |
|--------|-------|
| Total Failures | [N] |
| Unique Root Causes | [N] |
| Fixable | [N] |
| Unfixable (upstream) | [N] |
## Fixable Items
### RC-001: [Short description]
- **Classification**: [code-bug / data-issue / setup-issue]
- **Affected Scenarios**: 6.X, 6.Y, 6.Z
- **Affected Requirements**: REQ-XX-001, REQ-XX-002
- **Diagnosis**: [What's wrong. Specific file, function, line if possible. Why it produces wrong output.]
- **Proposed Fix**: [Exact change. "In `file.py`, function `parse_query()`, change the comparison from `>` to `>=` on line 47."]
- **Files Modified**: [`src/file.py`]
- **Blast Radius**: [Which passing scenarios touch this code path. "Scenarios 6.1 and 6.4 also use `parse_query()` — will re-verify after fix."]
### RC-002: [Short description]
[Same structure]
## Unfixable Items (Require Upstream Changes)
### RC-003: [Short description]
- **Classification**: [spec-ambiguity / design-gap / validation-error]
- **Affected Scenarios**: 6.X
- **Affected Requirements**: REQ-XX-003
- **Diagnosis**: [What's wrong and why it can't be fixed at the code level.]
- **Recommendation**: [What upstream document needs to change and how. E.g., "SPEC.md §4.2 should clarify whether results are sorted by relevance or alphabetically."]
## Execution Order
1. RC-001 — isolated, no blast radius
2. RC-002 — touches shared utility, verify Scenarios 6.1, 6.4 after
FIX_REPORT.md (produced AFTER executing fixes)
# FIX_REPORT.md — [Project Name]
## 1. Diagnosis Summary
### 1.1 Input
- **Validation Report**: VALIDATION_REPORT.md dated [date]
- **Total Scenario Failures**: [N] of [M] scenarios
- **Failing Scenarios**: 6.X, 6.Y, 6.Z, ...
### 1.2 Root Cause Analysis
| Root Cause ID | Classification | Affected Scenarios | Fixable |
|--------------|---------------|-------------------|---------|
| RC-001 | [category] | 6.X, 6.Y | ✅ Yes |
| RC-002 | [category] | 6.Z | ✅ Yes |
| RC-003 | [category] | 6.W | ❌ No — [reason] |
## 2. Fixes Applied
### 2.1 RC-001: [Short description]
- **Classification**: [category]
- **Scenarios Fixed**: 6.X, 6.Y
- **Change**: [Exact description of what was changed]
- **Files Modified**: [`src/file.py` lines 45-48]
- **Commit**: `[hash] fix(component): description`
- **Verification After Fix**:
- Scenario 6.X: ✅ PASS (was ❌ FAIL)
- Scenario 6.Y: ✅ PASS (was ❌ FAIL)
- Scenario 6.1: ✅ PASS (blast radius check — still passes)
### 2.2 RC-002: [Short description]
[Same structure]
## 3. Unfixable Items
### 3.1 RC-003: [Short description]
- **Classification**: [spec-ambiguity / design-gap / validation-error]
- **Affected Scenarios**: 6.W
- **Why Unfixable**: [Detailed explanation]
- **Recommendation**: [Specific upstream change needed]
- **Impact**: [What remains broken and what the user should know]
## 4. Post-Fix State
### 4.1 Scenario Status After Fixes
| Scenario | Before Fix | After Fix | Root Cause |
|----------|-----------|-----------|------------|
| 6.1 | ✅ PASS | ✅ PASS | (blast radius check) |
| 6.2 | ❌ FAIL | ✅ PASS | RC-001 |
| 6.3 | ❌ FAIL | ✅ PASS | RC-001 |
| 6.4 | ✅ PASS | ✅ PASS | (blast radius check) |
| 6.5 | ❌ FAIL | ❌ FAIL | RC-003 (unfixable) |
### 4.2 Summary
| Metric | Before | After |
|--------|--------|-------|
| Passing | [N] | [N] |
| Failing | [N] | [N] |
| Pass Rate | [N%] | [N%] |
| Remaining Failures | — | [N] (all unfixable at code level) |
## 5. Git History
[Paste: git log --oneline --graph develop]
## 6. Recommendation
[One of:]
- **Ready for re-validation.** All fixable issues addressed. [N] unfixable items remain — [summary].
- **Partial fix.** [N] of [M] root causes addressed. Remaining fixes require [upstream changes]. Recommend re-validation to confirm fixes don't introduce regressions.
- **Upstream revision needed.** [N] failures require changes to [SPEC.md / DESIGN.md] before code fixes are possible. Recommend returning to Phase [1/2].
Quality Checklist
1---2name: fix-report3description: Fix report format and conventions for diagnosing validation failures and producing a fix plan. Use when creating or reviewing a fix report within the agentic spec-driven development workflow.4---5
6# Fix Report — Skill
7
8## Purpose
9
10Defines the structure, conventions, and quality standards for diagnosing validation failures and producing a `FIX_REPORT.md` within the agentic spec-driven development workflow.
11
12## When to Use
13
14Load this skill whenever an agent needs to **diagnose validation failures** and **produce** a fix plan or fix report. Primary user: Phase 5 (Fix). Secondary user: any agent reviewing fix outcomes.
15
16---
17
18## Conventions
19
20### Diagnosis Standards
21
221. **Read all failures before fixing any.** Multiple scenario failures may share one root cause. Fixing in isolation risks duplicate effort or conflicting patches.
232. **Trace to origin.** Every failure must be traced: failed scenario → violated requirement → responsible component → specific function/line. If you can't point to a line, you haven't diagnosed it.
243. **Classify every failure.** Use exactly these root cause categories:
25 - **code-bug**: Logic error, wrong algorithm, incorrect data transformation
26 - **data-issue**: Wrong test data, missing sample files, incorrect fixture setup
27 - **setup-issue**: Missing dependency, wrong version, broken install step
28 - **spec-ambiguity**: Spec language allows multiple interpretations
29 - **design-gap**: Design didn't account for this case or scenario
30 - **validation-error**: The test script itself has a bug (wrong expected value, wrong comparison method)
314. **Group by root cause.** One root cause may manifest as multiple scenario failures. The fix plan addresses root causes, not individual scenarios.
32
33### Fix Plan Standards
34
355. **Plan before executing.** The fix plan is a separate deliverable presented to the user before any code changes are made.
366. **Each fix item includes:**
37 - Root cause ID (RC-001, RC-002, ...)
38 - Classification (from the categories above)
39 - Affected scenarios (which ones fail because of this)
40 - Affected requirements (which REQs are impacted)
41 - Diagnosis (what's wrong and why)
42 - Proposed fix (what specific change to make, in which file, in which function)
43 - Files modified (exact list)
44 - Blast radius (which passing scenarios could be affected by this change)
45 - Fixable: Yes / No (with rationale if No)
467. **Order by independence.** Fix items that don't affect each other come first. Fixes to shared code come last.
478. **Separate fixable from unfixable.** Unfixable items (spec-ambiguity, design-gap, validation-error) are documented but not actioned. They become recommendations for upstream revision.
48
49### Fix Execution Standards
50
519. **Minimal diff.** Change the fewest lines possible. No refactoring, no improvements, no style changes.
5210. **Verify after each fix.** After addressing one root cause, re-run the affected scenarios. Record pass/fail.
5311. **Do not modify validation scripts.** `validate.sh` and `demo.sh` are QA artifacts. If they contain errors, flag them as `validation-error` — do not edit them.
5412. **Do not modify upstream documents.** SPEC.md, DESIGN.md, RESEARCH.md are upstream contracts. If they need changes, document the recommendation.
55
56### Git Standards
57
5813. **Single branch.** All fixes go on `fix/validation-fixes` branched from develop.
5914. **One commit per root cause.** Commit message format: `fix(component): description — fixes Scenario 6.X, 6.Y`
6015. **Merge with --no-ff.** Back into develop when all fixable items are addressed.
6116. **Do not merge to main.** The re-validation phase decides if main gets updated.
62
63---
64
65## Output Templates
66
67### Fix Plan (presented to user BEFORE executing)
68
69```markdown
70# Fix Plan — [Project Name]
71
72## Summary
73
74| Metric | Count |
75|--------|-------|
76| Total Failures | [N] |
77| Unique Root Causes | [N] |
78| Fixable | [N] |
79| Unfixable (upstream) | [N] |
80
81## Fixable Items
82
83### RC-001: [Short description]
84
85- **Classification**: [code-bug / data-issue / setup-issue]
86- **Affected Scenarios**: 6.X, 6.Y, 6.Z
87- **Affected Requirements**: REQ-XX-001, REQ-XX-002
88- **Diagnosis**: [What's wrong. Specific file, function, line if possible. Why it produces wrong output.]
89- **Proposed Fix**: [Exact change. "In `file.py`, function `parse_query()`, change the comparison from `>` to `>=` on line 47."]
90- **Files Modified**: [`src/file.py`]
91- **Blast Radius**: [Which passing scenarios touch this code path. "Scenarios 6.1 and 6.4 also use `parse_query()` — will re-verify after fix."]
92
93### RC-002: [Short description]
94[Same structure]
95
96## Unfixable Items (Require Upstream Changes)
97
98### RC-003: [Short description]
99
100- **Classification**: [spec-ambiguity / design-gap / validation-error]
101- **Affected Scenarios**: 6.X
102- **Affected Requirements**: REQ-XX-003
103- **Diagnosis**: [What's wrong and why it can't be fixed at the code level.]
104- **Recommendation**: [What upstream document needs to change and how. E.g., "SPEC.md §4.2 should clarify whether results are sorted by relevance or alphabetically."]
105
106## Execution Order
107
1081. RC-001 — isolated, no blast radius
1092. RC-002 — touches shared utility, verify Scenarios 6.1, 6.4 after
110```
111
112### FIX_REPORT.md (produced AFTER executing fixes)
113
114```markdown
115# FIX_REPORT.md — [Project Name]
116
117## 1. Diagnosis Summary
118
119### 1.1 Input
120
121- **Validation Report**: VALIDATION_REPORT.md dated [date]
122- **Total Scenario Failures**: [N] of [M] scenarios
123- **Failing Scenarios**: 6.X, 6.Y, 6.Z, ...
124
125### 1.2 Root Cause Analysis
126
127| Root Cause ID | Classification | Affected Scenarios | Fixable |
128|--------------|---------------|-------------------|---------|
129| RC-001 | [category] | 6.X, 6.Y | ✅ Yes |
130| RC-002 | [category] | 6.Z | ✅ Yes |
131| RC-003 | [category] | 6.W | ❌ No — [reason] |
132
133## 2. Fixes Applied
134
135### 2.1 RC-001: [Short description]
136
137- **Classification**: [category]
138- **Scenarios Fixed**: 6.X, 6.Y
139- **Change**: [Exact description of what was changed]
140- **Files Modified**: [`src/file.py` lines 45-48]
141- **Commit**: `[hash] fix(component): description`
142- **Verification After Fix**:
143 - Scenario 6.X: ✅ PASS (was ❌ FAIL)
144 - Scenario 6.Y: ✅ PASS (was ❌ FAIL)
145 - Scenario 6.1: ✅ PASS (blast radius check — still passes)
146
147### 2.2 RC-002: [Short description]
148[Same structure]
149
150## 3. Unfixable Items
151
152### 3.1 RC-003: [Short description]
153
154- **Classification**: [spec-ambiguity / design-gap / validation-error]
155- **Affected Scenarios**: 6.W
156- **Why Unfixable**: [Detailed explanation]
157- **Recommendation**: [Specific upstream change needed]
158- **Impact**: [What remains broken and what the user should know]
159
160## 4. Post-Fix State
161
162### 4.1 Scenario Status After Fixes
163
164| Scenario | Before Fix | After Fix | Root Cause |
165|----------|-----------|-----------|------------|
166| 6.1 | ✅ PASS | ✅ PASS | (blast radius check) |
167| 6.2 | ❌ FAIL | ✅ PASS | RC-001 |
168| 6.3 | ❌ FAIL | ✅ PASS | RC-001 |
169| 6.4 | ✅ PASS | ✅ PASS | (blast radius check) |
170| 6.5 | ❌ FAIL | ❌ FAIL | RC-003 (unfixable) |
171
172### 4.2 Summary
173
174| Metric | Before | After |
175|--------|--------|-------|
176| Passing | [N] | [N] |
177| Failing | [N] | [N] |
178| Pass Rate | [N%] | [N%] |
179| Remaining Failures | — | [N] (all unfixable at code level) |
180
181## 5. Git History
182
183```
184[Paste: git log --oneline --graph develop]
185```
186
187## 6. Recommendation
188
189[One of:]
190- **Ready for re-validation.** All fixable issues addressed. [N] unfixable items remain — [summary].
191- **Partial fix.** [N] of [M] root causes addressed. Remaining fixes require [upstream changes]. Recommend re-validation to confirm fixes don't introduce regressions.
192- **Upstream revision needed.** [N] failures require changes to [SPEC.md / DESIGN.md] before code fixes are possible. Recommend returning to Phase [1/2].
193```
194
195---
196
197## Quality Checklist
198
199- [ ] Every scenario failure from VALIDATION_REPORT.md is accounted for (either fixed or flagged as unfixable)
200- [ ] Every fix traces back to a specific root cause with classification
201- [ ] Fix plan was presented to user before execution
202- [ ] No changes were made to `validate.sh` or `demo.sh`
203- [ ] No changes were made to SPEC.md, DESIGN.md, or RESEARCH.md
204- [ ] Each fix was verified by re-running affected scenarios
205- [ ] Blast radius scenarios were re-checked after each fix
206- [ ] No passing scenarios were broken by fixes (or breakage is documented)
207- [ ] Git history shows one commit per root cause on `fix/validation-fixes` branch
208- [ ] Unfixable items include specific recommendations for upstream changes
209- [ ] FIX_REPORT.md §4 shows before/after comparison for all scenarios
210- [ ] FIX_REPORT.md §6 gives a clear next-step recommendation