Skip to content

Commit 98eb2fb

Browse files
authored
Bound speckit.clarify planning deferral to implementation details (#4507)
* Gate speckit.clarify so spec-taxonomy items are not deferred to plan The command treated "better deferred to planning" as a catch-all, so agents skipped NFRs, acceptance criteria, and edge cases. Spec hits must stay question candidates. Defer only implementation method, tech-stack comparison, or task breakdown. Fixes #1717 * Bound clarify planning deferral to implementation and tech-stack The unbounded "better deferred to planning" catch-all is gone. Spec taxonomy still lives in the command. Stage-gate procedure and defer-ratio audit belong in an opt-in wrap preset, not core. * Bound the clarify completion-report Deferred status too. The candidate-question skip was already limited to implementation method, tech-stack, or task breakdown. The coverage table still called anything "better suited for planning" Deferred. That leftover catch-all is gone, and the test now covers the report.
1 parent 3affdb2 commit 98eb2fb

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

‎templates/commands/clarify.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Execution steps:
124124
125125
For each category with Partial or Missing status, add a candidate question opportunity unless:
126126
- Clarification would not materially change implementation or validation strategy
127-
- Information is better deferred to planning phase (note internally)
127+
- The item is specifically about implementation method, tech-stack comparison, or task breakdown (note internally)
128128
129129
4. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
130130
- Maximum of 5 total questions across the whole session.
@@ -279,7 +279,7 @@ Report completion (after questioning loop ends or early termination):
279279
- Path to updated spec.
280280
- Sections touched (list names).
281281
- Spec quality checklist status (if `FEATURE_DIR/checklists/requirements.md` was re-validated): show before/after pass counts (e.g., "Spec Quality Checklist: 12/16 → 15/16 items passing") and list any items that changed state — both newly checked (unchecked → checked) and any regressions (checked → unchecked). If any items remain unchecked, list them as areas needing attention.
282-
- Coverage summary table listing each taxonomy category with Status: Resolved (was Partial/Missing and addressed), Deferred (exceeds question quota or better suited for planning), Clear (already sufficient), Outstanding (still Partial/Missing but low impact).
282+
- Coverage summary table listing each taxonomy category with Status: Resolved (was Partial/Missing and addressed), Deferred (exceeds question quota, or remaining item is specifically implementation method, tech-stack comparison, or task breakdown), Clear (already sufficient), Outstanding (still Partial/Missing but low impact).
283283
- If any Outstanding or Deferred remain, recommend whether to proceed to `__SPECKIT_COMMAND_PLAN__` or run `__SPECKIT_COMMAND_CLARIFY__` again later post-plan.
284284
- Suggested next command.
285285

‎tests/test_clarify_stage_gate.py‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""The planning deferral in ``templates/commands/clarify.md`` must stay bounded (#1717).
2+
3+
The old catch-all ("Information is better deferred to planning phase") let
4+
agents skip NFRs, acceptance criteria, and edge cases. Defer only
5+
implementation method, tech-stack comparison, or task breakdown.
6+
"""
7+
8+
from pathlib import Path
9+
10+
CLARIFY = Path(__file__).parent.parent / "templates" / "commands" / "clarify.md"
11+
12+
13+
def test_clarify_planning_deferral_is_bounded() -> None:
14+
text = CLARIFY.read_text(encoding="utf-8")
15+
assert "- Information is better deferred to planning phase (note internally)" not in text
16+
assert "better suited for planning" not in text
17+
assert (
18+
"implementation method, tech-stack comparison, or task breakdown"
19+
in text
20+
)
21+
completion = text.split("## Completion Report", 1)[1]
22+
assert (
23+
"implementation method, tech-stack comparison, or task breakdown"
24+
in completion
25+
)

0 commit comments

Comments
 (0)