Skip to content

Bound speckit.clarify planning deferral to implementation details - #4507

Open
gyanu2507 wants to merge 3 commits into
github:mainfrom
gyanu2507:fix/1717-clarify-spec-stage-gate
Open

Bound speckit.clarify planning deferral to implementation details#4507
gyanu2507 wants to merge 3 commits into
github:mainfrom
gyanu2507:fix/1717-clarify-spec-stage-gate

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

/speckit.clarify treated "better deferred to planning" as a catch-all, so agents skipped NFRs, acceptance criteria, empty-state UX, and edge cases.

The command now defers only implementation method, tech-stack comparison, or task breakdown. Spec taxonomy is unchanged. Stage-gate procedure and defer-ratio audit stay out of core (those belong in an opt-in wrap preset).

Testing

  • uv run pytest tests/test_clarify_stage_gate.py

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 github#1717
@gyanu2507
gyanu2507 requested a review from mnriem as a code owner September 10, 2026 11:50
@mnriem

mnriem commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks @gyanu2507 — you've correctly identified a real bug, but I think this should be split, because most of it belongs in a preset rather than the core command.

The genuine defect is narrow: the deferral step has an unbounded escape hatch — "Information is better deferred to planning phase" — that lets the agent defer the entire (already-present) spec taxonomy and skip its spec-stage job, which is the contradictory "defer all 24 / no ambiguities" behavior in #1717. clarify.md already lists the categories you want protected (Edge Cases & Failure Handling, external-dependency failure modes, Completion Signals / acceptance testability, etc.). So the minimal core fix is just to bound that one catch-all — defer only implementation-method / tech-stack / task-breakdown; a taxonomy hit is a spec-stage question. I'd happily take that as a focused change.

The rest — the explicit stage-gate procedure, the >60% defer-ratio self-audit, and the MUST-NOT enforcement block — is prescriptive clarify methodology. That's an opinion about how aggressively to enforce and self-police the spec/plan line, and baking it into the core command imposes it on everyone. That's exactly the use case for a preset that wraps speckit.clarify, which teams opt into. Would you be up for landing the bounded-catch-all fix in core and moving the stage-gate/ratio machinery into a preset?

On the test: test_clarify_stage_gate.py pins exact phrases, so it's brittle to rewording — for the minimal core fix, asserting the unbounded catch-all phrase is absent would be the more durable invariant.

@mnriem mnriem added triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review author-needs-rescope Sprawling or batched diff — split into one focused, single-concern PR labels Sep 10, 2026
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.
@gyanu2507

Copy link
Copy Markdown
Contributor Author

Agreed. I cut this back to the catch-all.

Core now defers only implementation method, tech-stack comparison, or task breakdown. The stage-gate procedure, the >60% ratio audit, and the MUST-NOT block are out.

The test asserts the unbounded phrase is gone, and that those three defer-only cases are named.

I'll put the methodology in a wrap preset as a follow-up so teams can opt in.

@gyanu2507 gyanu2507 changed the title Gate speckit.clarify so spec-taxonomy items are not deferred to plan Bound speckit.clarify planning deferral to implementation details Sep 10, 2026
@gyanu2507

Copy link
Copy Markdown
Contributor Author

Wrap preset is #4515. Stage-gate procedure, 60% ratio, and MUST-NOT live there. specify preset add clarify-spec-gate if a team wants that enforcement.

@mnriem mnriem removed the author-needs-rescope Sprawling or batched diff — split into one focused, single-concern PR label Sep 11, 2026
@mnriem

mnriem commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks @gyanu2507 — this is exactly the split I was hoping for: the core now just bounds the deferral to implementation/tech-stack/task-breakdown, and the stage-gate methodology lives in the opt-in #4515 preset. The bounded-invariant test is the right shape too. I'll trigger CI and take a look.

(Drafted with AI assistance — GitHub Copilot.)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The completion report retains the broad planning-deferral catch-all the PR intends to remove.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Bounds /speckit.clarify planning deferrals and adds regression coverage.

Changes:

  • Restricts planning deferral to implementation-specific concerns.
  • Adds a template-content regression test.
File summaries
File Description
templates/commands/clarify.md Narrows the planning-deferral rule.
tests/test_clarify_stage_gate.py Tests required and prohibited wording.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coverage table used that catch-all for Deferred. It now uses the same three cases as the skip rule (implementation method, tech-stack comparison, or task breakdown), plus quota overflow. The test reads the Completion Report section 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.
@gyanu2507

Copy link
Copy Markdown
Contributor Author

The completion-report Deferred row still said "better suited for planning". That is the same unbounded hatch, just later in the command. 7dccc7e bounds it to quota overflow or those three implementation cases, and the test now covers the report section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage-nice-to-have Verdict: evidence-backed fix or greenlit feature — land after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants