Review — Specification Quality & Consistency Review
Systematically review spec-forge generated documents for quality, completeness, and internal consistency. Optionally auto-fix issues found.
Core Principles
- Evidence-based: Every finding must cite a specific file and section — no vague complaints
- Spec-focused: Review specification documents only (tech-design, feature specs, overview) — not code, not upstream idea drafts
- Upstream-aware: Use idea drafts and project manifests as reference context to validate spec accuracy, but do not review them
- Prioritized: Findings classified by severity so the user can act on what matters first
- Conservative fixes: Auto-fix only touches cited sections; when domain knowledge is missing, leave a
<!-- REVIEW: {question} --> comment instead of guessing
- Honest: Report real issues, don't inflate findings to look thorough
Severity Levels
| Severity |
Meaning |
Example |
| Critical |
Wrong, contradictory, or misleading content |
Feature spec API signature contradicts tech-design, component boundary mismatch |
| Major |
Significant gap that would block or confuse implementation |
Empty required section, missing error handling spec, undefined edge cases |
| Minor |
Quality issue that degrades usefulness but isn't blocking |
Vague description, missing cross-reference, inconsistent terminology |
Workflow
Step 1: Determine Review Scope
Parse the arguments to determine what to review:
- If a
feature_name argument is provided, look for:
docs/{feature_name}/tech-design.md
- All feature specs in
docs/features/ (glob for docs/features/*.md)
- Upstream reference:
ideas/{feature_name}/draft.md (if exists)
- Project manifest:
docs/project-{feature_name}.md (if exists, for multi-split context)
- If no argument, scan
docs/ for the most recent tech-design and all feature specs in docs/features/
- If no spec documents found, inform the user and stop
Use AskUserQuestion to ask:
- Review scope: Review all generated specs, or focus on specific documents? (Options: All / Tech design only / Feature specs only / Specific files)
- Auto-fix: Should I auto-fix issues found? (Options: Yes — fix Critical+Major automatically / Yes — fix all / No — report only)
Step 2: Document Inventory
Build the list of documents to review:
Review targets (will be reviewed):
docs/{feature_name}/tech-design.md
docs/features/overview.md
docs/features/{component-1}.md, docs/features/{component-2}.md, etc.
- For multi-split: tech-designs for all sub-features
Reference context (read for context, NOT reviewed):
ideas/{feature_name}/draft.md — upstream requirements
docs/project-{feature_name}.md — project manifest with sub-feature scope
Read each review target document fully
Display the inventory:
Review scope: {feature_name}
Review targets: {N} documents
- docs/{feature_name}/tech-design.md
- docs/features/overview.md
- docs/features/{component-1}.md
- docs/features/{component-2}.md
...
Reference context: {N} documents
- ideas/{feature_name}/draft.md
Step 3: Review
Check each review target document against the following checklist:
3.1 Completeness
- Any empty sections, TBD/TODO markers, placeholder text, or
{placeholder} template variables?
- Missing required sections per document type?
- Tech design: Goals, Non-goals, Scope, Architecture, API Design, Data Model, Component Overview
- Feature spec: Purpose, API/Interface, Logic/Behavior, Error Handling, Dependencies
- Overview: Feature index listing all generated specs, dependency graph
3.2 Internal Consistency
- Component name matching: For every feature spec file (
docs/features/{name}.md), verify there is a corresponding row in the tech-design's §8.1 Component Overview with an identical slug. Raise a Critical finding if a feature spec exists with no matching component or vice versa — this breaks the traceability chain and confuses downstream consumers like code-forge.
- Do feature spec API signatures match the tech-design's API Design section?
- Do component boundaries in feature specs align with tech-design's Component Overview?
- Are data models consistent across documents? (field names, types, relationships)
- Do feature specs reference the same architectural patterns described in the tech-design?
- For multi-split: are cross-sub-feature interfaces consistent?
3.3 Specificity
- Vague descriptions that should be concrete (e.g., "handles errors appropriately" → specific error codes/behaviors)
- Ambiguous quantifiers (e.g., "fast", "large", "many" without concrete thresholds)
- Undefined behavior for edge cases or boundary conditions
3.4 Traceability
- Do feature specs reference back to tech-design sections they implement?
- Does overview.md list ALL generated feature specs? (no missing entries)
- Are dependency relationships between feature specs documented and consistent?
3.5 Actionability
- Could a developer implement from these specs without guessing?
- Are input/output formats fully specified?
- Are error scenarios and recovery behaviors defined?
- Are configuration options and defaults documented?
Step 4: Generate Findings
For each issue found, produce a structured finding:
- [{severity}] {file_path} § {section}: {description of issue} → FIX: {concrete fix instruction}
Compile the full review result:
REVIEW_RESULT: {PASS | ISSUES_FOUND}
CRITICAL_COUNT: {N}
MAJOR_COUNT: {N}
MINOR_COUNT: {N}
FINDINGS:
- [{severity}] {file_path} § {section}: {description} → FIX: {fix instruction}
...
Step 5: Present Results
Display summary:
spec-forge review: {feature_name}
Documents reviewed: {N}
Result: {PASS | ISSUES_FOUND}
Findings: {critical} critical, {major} major, {minor} minor
{If ISSUES_FOUND, list top findings}
If REVIEW_RESULT: PASS, inform the user and stop.
If REVIEW_RESULT: ISSUES_FOUND, proceed based on user's auto-fix preference from Step 1:
- Report only: Display all findings and stop
- Auto-fix: Proceed to Step 6
If auto-fix was not pre-selected, ask now via AskUserQuestion:
- Fix Critical+Major — auto-fix significant issues
- Fix all — auto-fix everything
- Skip — just the report
Step 6: Auto-Fix (Iterative)
Maximum iterations: 2 (one fix + one re-review). If issues persist after 2 iterations, report remaining issues and stop.
6.1 Apply Fixes
For each finding to fix:
- Read the target file
- Apply the concrete fix described in the finding
- Rules:
- Only modify the specific section cited in the finding
- Do NOT restructure or rewrite entire documents
- Do NOT add new documents — only fix existing ones
- If a fix requires information you don't have (e.g., specific domain logic), add a
<!-- REVIEW: {question} --> comment instead of guessing
- Do NOT change content unrelated to the findings
6.2 Re-Review
After all fixes are applied, re-run the review (Step 3-4) on the same documents.
If REVIEW_RESULT: PASS: Display success
spec-forge review: PASS after fixes — {N} issues resolved
If REVIEW_RESULT: ISSUES_FOUND (iteration 2): Display remaining issues and stop
spec-forge review: {N} issues remain after auto-fix
Remaining issues:
- [{severity}] {file} § {section}: {description}
...
These may require manual attention or domain-specific decisions.
Step 7: Summary
Display final status:
spec-forge review complete: {feature_name}
Documents reviewed: {N}
Issues found: {total}
Issues fixed: {fixed}
Issues remaining: {remaining}
Next steps:
/code-forge:plan @docs/features/{component-name}.md → Generate implementation plan
/spec-forge:review {feature_name} → Re-run review after manual fixes
1---2name: review-163description: Review spec-forge generated documents (tech-design + feature specs) for quality, completeness, and internal consistency. Finds issues like incomplete sections, contradictions, missing traceability, and vague specs, then optionally auto-fixes them. Supports iterative review-fix cycles with a maximum of 2 iterations.4---5
6# Review — Specification Quality & Consistency Review
7
8Systematically review spec-forge generated documents for quality, completeness, and internal consistency. Optionally auto-fix issues found.
9
10## Core Principles
11
121. **Evidence-based**: Every finding must cite a specific file and section — no vague complaints
132. **Spec-focused**: Review specification documents only (tech-design, feature specs, overview) — not code, not upstream idea drafts
143. **Upstream-aware**: Use idea drafts and project manifests as reference context to validate spec accuracy, but do not review them
154. **Prioritized**: Findings classified by severity so the user can act on what matters first
165. **Conservative fixes**: Auto-fix only touches cited sections; when domain knowledge is missing, leave a `<!-- REVIEW: {question} -->` comment instead of guessing
176. **Honest**: Report real issues, don't inflate findings to look thorough
18
19## Severity Levels
20
21| Severity | Meaning | Example |
22|----------|---------|---------|
23| **Critical** | Wrong, contradictory, or misleading content | Feature spec API signature contradicts tech-design, component boundary mismatch |
24| **Major** | Significant gap that would block or confuse implementation | Empty required section, missing error handling spec, undefined edge cases |
25| **Minor** | Quality issue that degrades usefulness but isn't blocking | Vague description, missing cross-reference, inconsistent terminology |
26
27## Workflow
28
29### Step 1: Determine Review Scope
30
31Parse the arguments to determine what to review:
32
331. If a `feature_name` argument is provided, look for:
34 - `docs/{feature_name}/tech-design.md`
35 - All feature specs in `docs/features/` (glob for `docs/features/*.md`)
36 - Upstream reference: `ideas/{feature_name}/draft.md` (if exists)
37 - Project manifest: `docs/project-{feature_name}.md` (if exists, for multi-split context)
382. If no argument, scan `docs/` for the most recent tech-design and all feature specs in `docs/features/`
393. If no spec documents found, inform the user and stop
40
41Use `AskUserQuestion` to ask:
42- **Review scope**: Review all generated specs, or focus on specific documents? (Options: All / Tech design only / Feature specs only / Specific files)
43- **Auto-fix**: Should I auto-fix issues found? (Options: Yes — fix Critical+Major automatically / Yes — fix all / No — report only)
44
45### Step 2: Document Inventory
46
47Build the list of documents to review:
48
491. **Review targets** (will be reviewed):
50 - `docs/{feature_name}/tech-design.md`
51 - `docs/features/overview.md`
52 - `docs/features/{component-1}.md`, `docs/features/{component-2}.md`, etc.
53 - For multi-split: tech-designs for all sub-features
54
552. **Reference context** (read for context, NOT reviewed):
56 - `ideas/{feature_name}/draft.md` — upstream requirements
57 - `docs/project-{feature_name}.md` — project manifest with sub-feature scope
58
593. Read each review target document fully
60
61Display the inventory:
62
63```
64Review scope: {feature_name}
65 Review targets: {N} documents
66 - docs/{feature_name}/tech-design.md
67 - docs/features/overview.md
68 - docs/features/{component-1}.md
69 - docs/features/{component-2}.md
70 ...
71 Reference context: {N} documents
72 - ideas/{feature_name}/draft.md
73```
74
75### Step 3: Review
76
77Check each review target document against the following checklist:
78
79#### 3.1 Completeness
80- Any empty sections, TBD/TODO markers, placeholder text, or `{placeholder}` template variables?
81- Missing required sections per document type?
82 - Tech design: Goals, Non-goals, Scope, Architecture, API Design, Data Model, Component Overview
83 - Feature spec: Purpose, API/Interface, Logic/Behavior, Error Handling, Dependencies
84 - Overview: Feature index listing all generated specs, dependency graph
85
86#### 3.2 Internal Consistency
87- **Component name matching**: For every feature spec file (`docs/features/{name}.md`), verify there is a corresponding row in the tech-design's §8.1 Component Overview with an identical slug. Raise a Critical finding if a feature spec exists with no matching component or vice versa — this breaks the traceability chain and confuses downstream consumers like code-forge.
88- Do feature spec API signatures match the tech-design's API Design section?
89- Do component boundaries in feature specs align with tech-design's Component Overview?
90- Are data models consistent across documents? (field names, types, relationships)
91- Do feature specs reference the same architectural patterns described in the tech-design?
92- For multi-split: are cross-sub-feature interfaces consistent?
93
94#### 3.3 Specificity
95- Vague descriptions that should be concrete (e.g., "handles errors appropriately" → specific error codes/behaviors)
96- Ambiguous quantifiers (e.g., "fast", "large", "many" without concrete thresholds)
97- Undefined behavior for edge cases or boundary conditions
98
99#### 3.4 Traceability
100- Do feature specs reference back to tech-design sections they implement?
101- Does overview.md list ALL generated feature specs? (no missing entries)
102- Are dependency relationships between feature specs documented and consistent?
103
104#### 3.5 Actionability
105- Could a developer implement from these specs without guessing?
106- Are input/output formats fully specified?
107- Are error scenarios and recovery behaviors defined?
108- Are configuration options and defaults documented?
109
110### Step 4: Generate Findings
111
112For each issue found, produce a structured finding:
113
114```
115- [{severity}] {file_path} § {section}: {description of issue} → FIX: {concrete fix instruction}
116```
117
118Compile the full review result:
119
120```
121REVIEW_RESULT: {PASS | ISSUES_FOUND}
122CRITICAL_COUNT: {N}
123MAJOR_COUNT: {N}
124MINOR_COUNT: {N}
125
126FINDINGS:
127- [{severity}] {file_path} § {section}: {description} → FIX: {fix instruction}
128...
129```
130
131### Step 5: Present Results
132
133Display summary:
134
135```
136spec-forge review: {feature_name}
137
138 Documents reviewed: {N}
139 Result: {PASS | ISSUES_FOUND}
140 Findings: {critical} critical, {major} major, {minor} minor
141
142 {If ISSUES_FOUND, list top findings}
143```
144
145If `REVIEW_RESULT: PASS`, inform the user and stop.
146
147If `REVIEW_RESULT: ISSUES_FOUND`, proceed based on user's auto-fix preference from Step 1:
148- **Report only**: Display all findings and stop
149- **Auto-fix**: Proceed to Step 6
150
151If auto-fix was not pre-selected, ask now via `AskUserQuestion`:
152- **Fix Critical+Major** — auto-fix significant issues
153- **Fix all** — auto-fix everything
154- **Skip** — just the report
155
156### Step 6: Auto-Fix (Iterative)
157
158**Maximum iterations**: 2 (one fix + one re-review). If issues persist after 2 iterations, report remaining issues and stop.
159
160#### 6.1 Apply Fixes
161
162For each finding to fix:
163
1641. Read the target file
1652. Apply the concrete fix described in the finding
1663. Rules:
167 - Only modify the specific section cited in the finding
168 - Do NOT restructure or rewrite entire documents
169 - Do NOT add new documents — only fix existing ones
170 - If a fix requires information you don't have (e.g., specific domain logic), add a `<!-- REVIEW: {question} -->` comment instead of guessing
171 - Do NOT change content unrelated to the findings
172
173#### 6.2 Re-Review
174
175After all fixes are applied, re-run the review (Step 3-4) on the same documents.
176
177- **If `REVIEW_RESULT: PASS`**: Display success
178 ```
179 spec-forge review: PASS after fixes — {N} issues resolved
180 ```
181
182- **If `REVIEW_RESULT: ISSUES_FOUND`** (iteration 2): Display remaining issues and stop
183 ```
184 spec-forge review: {N} issues remain after auto-fix
185
186 Remaining issues:
187 - [{severity}] {file} § {section}: {description}
188 ...
189
190 These may require manual attention or domain-specific decisions.
191 ```
192
193### Step 7: Summary
194
195Display final status:
196
197```
198spec-forge review complete: {feature_name}
199
200 Documents reviewed: {N}
201 Issues found: {total}
202 Issues fixed: {fixed}
203 Issues remaining: {remaining}
204
205Next steps:
206 /code-forge:plan @docs/features/{component-name}.md → Generate implementation plan
207 /spec-forge:review {feature_name} → Re-run review after manual fixes
208```