feat(cli): add specify validate command for deterministic verification#1894
Closed
mvanhorn wants to merge 1 commit intogithub:mainfrom
Closed
feat(cli): add specify validate command for deterministic verification#1894mvanhorn wants to merge 1 commit intogithub:mainfrom
mvanhorn wants to merge 1 commit intogithub:mainfrom
Conversation
Adds a new CLI command that verifies completed tasks have corresponding implementations through deterministic checks: file existence verification, spec-to-task traceability mapping, and keyword extraction. No AI required, can run in CI/CD pipelines. Options: --feature (target specific feature), --ci (non-zero exit on failure), --json (machine-readable output), --strict (warnings = failures) Includes 19 unit tests covering task parsing, keyword extraction, file verification, spec requirement parsing, and traceability mapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mnriem
requested changes
Mar 18, 2026
Collaborator
mnriem
left a comment
There was a problem hiding this comment.
Can you deliver this as an extension? See https://github.com/github/spec-kit/tree/main/extensions
Contributor
Author
|
Got it - will repackage these as an extension. Closing these and will submit a PR with a bundled extension that provides resume, doctor, and validate as extension commands. |
mvanhorn
added a commit
to mvanhorn/spec-kit
that referenced
this pull request
Mar 18, 2026
…lidate Packages three SDD utility commands as an extension per maintainer feedback on PRs github#1892, github#1893, github#1894. Commands: - speckit.speckit-utils.resume: detect feature state, suggest next command - speckit.speckit-utils.doctor: validate project health (templates, agent config, scripts, constitution, feature artifacts) - speckit.speckit-utils.validate: verify spec-to-task traceability and check that completed tasks produced expected files Hooks into after_specify (doctor) and after_plan (validate) optionally. This contribution was developed with AI assistance (Claude Code). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
specify validate- a CLI command that verifies completed tasks have corresponding implementations through deterministic checks. No AI required - runs in CI/CD pipelines with machine-readable output.Why this matters
Multiple issues request verification that marked-done tasks were actually implemented. The existing spec-kit-verify extension relies on an AI agent, costs money per invocation, and can't run in CI.
The comment on #1862 by @raye-deng captures it: "AI agents generate code that satisfies explicit test assertions but fails in ways the tests never thought to check." Deterministic verification catches what AI verification misses.
Key differentiator from spec-kit-verify extension: This command is deterministic and CI-runnable. It checks file existence, parses task descriptions for file references, and maps spec requirements to tasks by keyword overlap. No LLM calls, no cost, reproducible results.
Changes
specify validatecommand to the CLI (src/specify_cli/__init__.py)_parse_tasks(),_extract_keywords(),_verify_task_files(),_parse_spec_requirements(),_trace_requirement_to_tasks()- [x]/- [ ]items from tasks.md with keyword extraction--feature(target specific),--ci(exit 1 on failure),--json(machine-readable),--strict(warnings become failures)tests/test_validate.pyTesting
Sample output:
The
--ciflag makes this usable in GitHub Actions:This contribution was developed with AI assistance (Claude Code).