Skip to content

Re-validate spec quality checklist after clarify updates spec#2715

Merged
mnriem merged 5 commits into
github:mainfrom
mnriem:feat/2693-clarify-revalidate-checklist
May 27, 2026
Merged

Re-validate spec quality checklist after clarify updates spec#2715
mnriem merged 5 commits into
github:mainfrom
mnriem:feat/2693-clarify-revalidate-checklist

Conversation

@mnriem
Copy link
Copy Markdown
Collaborator

@mnriem mnriem commented May 26, 2026

Summary

After /speckit.clarify modifies spec.md, the existing checklists/requirements.md (generated by /speckit.specify) can become stale. Items like "No [NEEDS CLARIFICATION] markers remain" may now pass, and newly added requirements aren't reflected in the checklist evaluation.

This adds a re-validation step to the clarify command so the spec quality checklist stays in sync with spec changes.

Changes

Three modifications to templates/commands/clarify.md:

  1. New step 8 — after saving the updated spec, re-validates checklists/requirements.md if it exists, updating check marks and recording before/after pass counts
  2. Completion Report — now includes checklist status with before/after counts and lists items that changed from unchecked to checked. If any items remain unchecked, they are listed as areas needing attention
  3. Done When — added a checklist re-validation criterion

Behavior

  • If FEATURE_DIR/checklists/requirements.md does not exist, the step is skipped silently (no breaking change)
  • Items that now pass are checked (- [x]), items that still fail remain unchecked (- [ ])
  • The completion report shows before/after pass counts (e.g., "12/16 → 15/16 items passing")

Testing

This is a template-only change (AI agent prompt instructions). It requires no code changes or unit tests. Validation is through running /speckit.clarify in a project that has an existing checklists/requirements.md and confirming the checklist is updated.

Fixes #2693

cc @yag3l

After clarify modifies spec.md, the existing checklists/requirements.md
(generated by specify) can become stale. Items like 'No [NEEDS
CLARIFICATION] markers remain' may now pass, and newly added requirements
aren't reflected in the checklist evaluation.

Add step 8 to the clarify command that re-validates the spec quality
checklist against the updated spec after each clarification session:
- Check/uncheck items based on current spec state
- Report before/after pass counts in the completion report
- Skip silently if no checklist exists

Fixes github#2693
Copilot AI review requested due to automatic review settings May 26, 2026 22:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the /speckit.clarify command template so that, after spec.md is modified, an existing spec quality checklist (checklists/requirements.md) is re-validated and the completion report reflects the updated checklist status (addressing stale checklist results after clarification).

Changes:

  • Adds a new execution step to re-validate FEATURE_DIR/checklists/requirements.md (when present) and capture before/after pass counts.
  • Expands the Completion Report requirements to include checklist status and changed/remaining items.
  • Updates “Done When” criteria to include checklist re-validation and checklist status reporting.
Show a summary per file
File Description
templates/commands/clarify.md Adds checklist re-validation instructions, completion reporting details, and updated done criteria to keep the spec quality checklist aligned with clarified spec changes.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread templates/commands/clarify.md Outdated
Comment thread templates/commands/clarify.md Outdated
- Constrain re-validation to GitHub task-list checkbox lines only
  (- [ ] / - [x] outside code fences), ignoring headings, notes,
  and non-checkbox content
- Define pass counts as checked/total checkbox items
- Use FEATURE_DIR/checklists/requirements.md in Done When for
  consistency with the rest of the template
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread templates/commands/clarify.md Outdated
Comment thread templates/commands/clarify.md Outdated
- Clarify that each checkbox is set based solely on current spec state,
  regardless of prior marker (checked->unchecked is possible)
- Completion report now lists both newly passing items and regressions
  (checked->unchecked) so users see what became non-compliant
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread templates/commands/clarify.md Outdated
Comment thread templates/commands/clarify.md Outdated
- Accept [x], [X], and leading whitespace for nested task items
- Explicitly state only the [ ]/[x] marker is toggled; all other
  file content (headings, metadata, notes, ordering, whitespace)
  must remain unchanged to avoid noisy diffs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread templates/commands/clarify.md Outdated
Comment thread templates/commands/clarify.md Outdated
- Add explicit before-snapshot step to capture each item's prior
  marker state before re-evaluation
- Compute three lists for the report: newly passing, regressions,
  and still unchecked
- Only toggle markers whose checked/unchecked state actually changes;
  preserve existing case ([x]/[X]) when state is unchanged to avoid
  cosmetic diffs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

@mnriem mnriem merged commit 9816f90 into github:main May 27, 2026
11 checks passed
@mnriem mnriem deleted the feat/2693-clarify-revalidate-checklist branch May 27, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: After running clarify, the requirements.md needs to be updated automatically

2 participants