Skip to content

πŸ’« Toolkit to help you get started with SDD or any other process!

Bound speckit.clarify planning deferral to implementation details (#4507)

Gyanu Mayank98eb2fb4fc9f
diff --git a/templates/commands/clarify.md b/templates/commands/clarify.md
index 8663b6908..f48d8bd70 100644
--- a/templates/commands/clarify.md
+++ b/templates/commands/clarify.md
@@ -124,7 +124,7 @@ Execution steps:
For each category with Partial or Missing status, add a candidate question opportunity unless:
- Clarification would not materially change implementation or validation strategy
- - Information is better deferred to planning phase (note internally)
+ - The item is specifically about implementation method, tech-stack comparison, or task breakdown (note internally)
4. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
- Maximum of 5 total questions across the whole session.
@@ -279,7 +279,7 @@ Report completion (after questioning loop ends or early termination):
- Path to updated spec.
- Sections touched (list names).
- 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.
-- 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).
+- 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).
- If any Outstanding or Deferred remain, recommend whether to proceed to `__SPECKIT_COMMAND_PLAN__` or run `__SPECKIT_COMMAND_CLARIFY__` again later post-plan.
- Suggested next command.
diff --git a/tests/test_clarify_stage_gate.py b/tests/test_clarify_stage_gate.py
new file mode 100644
index 000000000..5ecf3410e
--- /dev/null
+++ b/tests/test_clarify_stage_gate.py
@@ -0,0 +1,25 @@
+"""The planning deferral in ``templates/commands/clarify.md`` must stay bounded (#1717).
+
+The old catch-all ("Information is better deferred to planning phase") let
+agents skip NFRs, acceptance criteria, and edge cases. Defer only
+implementation method, tech-stack comparison, or task breakdown.
+"""
+
+from pathlib import Path
+
+CLARIFY = Path(__file__).parent.parent / "templates" / "commands" / "clarify.md"
+
+
+def test_clarify_planning_deferral_is_bounded() -> None:
+ text = CLARIFY.read_text(encoding="utf-8")
+ assert "- Information is better deferred to planning phase (note internally)" not in text
+ assert "better suited for planning" not in text
+ assert (
+ "implementation method, tech-stack comparison, or task breakdown"
+ in text
+ )
+ completion = text.split("## Completion Report", 1)[1]
+ assert (
+ "implementation method, tech-stack comparison, or task breakdown"
+ in completion
+ )