Skip to content

Commit db18e47

Browse files
committed
chore: update phase 4 for writing-spec skill
1 parent d948c12 commit db18e47

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.agents/skills/writing-spec/SKILL.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ Each phase ends with a human review gate. Do NOT advance to the next phase witho
2222
Collaborate with the developer to fill sections 1-3 of the template.
2323

2424
1. Ask the developer to describe the feature in 2-5 sentences (or accept what they've already provided)
25-
2. Draft the **Goal & Context** section — focus on the problem, not the solution
26-
3. Draft **Requirements** using EARS notation: `WHEN [condition] THE SYSTEM SHALL [behavior]`. Assign stable IDs (R1, R2, …)
27-
4. Draft **Non-Goals** — ask: "What should this feature explicitly NOT do?"
28-
5. Present all three sections for review
25+
2. Before drafting, ask 3-5 clarifying questions about scope boundaries, error scenarios, and unstated assumptions — only where the answer would change the spec. Skip obvious ones.
26+
3. Draft the **Goal & Context** section — focus on the problem, not the solution
27+
4. Draft **Requirements** using EARS notation: `WHEN [condition] THE SYSTEM SHALL [behavior]`. Assign stable IDs (R1, R2, …)
28+
5. Draft **Non-Goals** — ask: "What should this feature explicitly NOT do?"
29+
6. Present all three sections for review
2930

3031
**What to ask if unclear:** "What's the observable user behavior when this works correctly?" Never invent requirements — if the developer hasn't specified a behavior, ask about it.
3132

@@ -58,12 +59,16 @@ Fill sections 7-10 of the template.
5859

5960
### Phase 4 — Review & Finalize
6061

61-
1. Re-read the complete spec end-to-end
62-
2. Verify: every requirement has ≥1 task, every task traces to ≥1 requirement, boundaries are specific (file paths, not vague categories)
63-
3. Check spec length — target under 150 lines. If longer, look for content that belongs in coding standards or architecture docs instead
64-
4. Ask: "Would a staff engineer approve this spec as-is?"
65-
5. Set status to `review` in the Meta table
66-
6. Present final spec for developer sign-off
62+
1. Run a **structured self-audit** and present findings to the developer (don't silently verify — show the results):
63+
- **Coverage matrix**: for each requirement ID, list which task(s) implement it. Flag any requirement with zero tasks
64+
- **Orphan tasks**: flag any task that doesn't trace back to a requirement ID
65+
- **EARS compliance**: flag any requirement missing WHEN/THE SYSTEM SHALL or using vague language ("handle properly", "work correctly")
66+
- **Boundary specificity**: flag any boundary item (✅/⚠️/🚫) that references a vague category instead of a file path or module name
67+
- **Building block references**: flag any block in Section 4 that doesn't exist in the building-blocks catalog
68+
- **Line count**: report total. If >150, identify which section to compress or extract
69+
2. Fix any issues found in step 1 before proceeding
70+
3. Set status to `review` in the Meta table
71+
4. Present the audit results and the final spec for developer sign-off
6772

6873
## Rules & Constraints
6974

0 commit comments

Comments
 (0)