feat: add /speckit.review command β staff-level code review#2043
feat: add /speckit.review command β staff-level code review#2043arunt14 wants to merge 2 commits intogithub:mainfrom
Conversation
Add a new core command for thorough, staff-engineer-level code review of implementation changes with 5 review passes: 1. Correctness & Logic 2. Security 3. Performance & Scalability 4. Spec Compliance & Architecture 5. Test Quality Generates structured review report with severity levels (Blocker/Warning/Suggestion) and verdicts (APPROVED / APPROVED WITH CONDITIONS / CHANGES REQUIRED). Inspired by GStack's /review command.
0470263 to
1724bdb
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new /speckit.review command template and an accompanying review report template to introduce a structured, staff-level implementation review step in the spec-driven workflow.
Changes:
- Added
templates/commands/review.mddefining a 5-pass review procedure plus extension hook support (before_review/after_review). - Added
templates/review-template.mdto standardize the Markdown output report structure (findings table, coverage matrix, metrics, actions).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| templates/commands/review.md | Introduces the /speckit.review command workflow and hook integration points. |
| templates/review-template.md | Provides the Markdown report skeleton used by /speckit.review. |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | ID | Severity | File | Line(s) | Category | Finding | Recommendation | | ||
| |----|----------|------|---------|----------|---------|----------------| | ||
| | R001 | π΄ Blocker | [file] | [lines] | [category] | [description] | [fix suggestion] | | ||
| | R002 | π‘ Warning | [file] | [lines] | [category] | [description] | [fix suggestion] | | ||
| | R003 | π’ Suggestion | [file] | [lines] | [category] | [description] | [fix suggestion] | |
There was a problem hiding this comment.
The tables use a leading double pipe (|| ... |), which renders as an extra empty column in Markdown (and may fail markdownlint). Use a single leading pipe and ensure the header separator row has the same number of columns as the header.
| | Requirement | Status | Implementation Notes | | ||
| |-------------|--------|---------------------| | ||
| | FR-001: [requirement] | β Implemented | [notes] | | ||
| | FR-002: [requirement] | β οΈ Partial | [what's missing] | | ||
| | FR-003: [requirement] | β Missing | [recommendation] | |
There was a problem hiding this comment.
This spec coverage matrix table has the same || leading-pipe issue as the findings table, which breaks table rendering. Replace || with | for the header, separator, and data rows.
| | Area | Tests Exist? | Coverage | Gaps | | ||
| |------|-------------|----------|------| | ||
| | [Module/Feature] | β /β | [%] | [untested paths] | |
There was a problem hiding this comment.
The test coverage assessment table header starts with ||, which adds an unintended blank column in Markdown table rendering. Use a single leading | consistently.
| | Metric | Value | | ||
| |--------|-------| | ||
| | Files reviewed | [count] | | ||
| | π΄ Blockers | [count] | | ||
| | π‘ Warnings | [count] | | ||
| | π’ Suggestions | [count] | |
There was a problem hiding this comment.
The metrics summary table has an extra leading pipe (|| Metric | Value |), which will misalign the table (extra empty column). Use the standard single leading pipe format to keep columns consistent.
templates/commands/review.md
Outdated
| - π’ **Suggestion**: Code clarity improvement, refactoring opportunity, documentation gap, minor style inconsistency. **Nice to fix but non-blocking.** | ||
|
|
||
| 10. **Generate Review Report**: | ||
| Create the review report at `FEATURE_DIR/reviews/review-{timestamp}.md` using the review report template. The report must include: |
There was a problem hiding this comment.
Step 10 references "the review report template" but doesnβt name the concrete template file (unlike other commands that reference templates/*-template.md). Point explicitly to templates/review-template.md and ensure FEATURE_DIR/reviews/ is created if missing. Also specify a filesystem-safe timestamp format (e.g., YYYYMMDD-HHMMSS) to avoid characters like : that break on Windows.
| Create the review report at `FEATURE_DIR/reviews/review-{timestamp}.md` using the review report template. The report must include: | |
| Create the review report in a new file at `FEATURE_DIR/reviews/review-{YYYYMMDD-HHMMSS}.md` using the `templates/review-template.md` review report template. Ensure the `FEATURE_DIR/reviews/` directory exists (create it if necessary). The report must include: |
|
Please deliver this as an extension. See https://github.com/github/spec-kit/tree/main/extensions |
- Reference templates/review-template.md explicitly in step 10 - Ensure FEATURE_DIR/reviews/ directory exists before writing - Use filesystem-safe timestamp format (YYYYMMDD-HHMMSS) - Note: tables already use correct single-pipe format (no double-pipe issue)
|
Thanks for the review! Addressed in the latest push: 1-4. Double-pipe table issue: Investigated and confirmed the tables in |
|
Please review https://github.com/github/spec-kit/blob/main/extensions/EXTENSION-PUBLISHING-GUIDE.md for publishing a community hosted extension |
|
Thanks @mnriem! I've reviewed the Extension Publishing Guide. Will restructure this as a community extension following the extension.yml manifest pattern and resubmit as an extension contribution to catalog.community.json. |
|
Re: the double-pipe (||) table comments - I've re-inspected the raw file content of review-template.md line by line and confirmed there are no double leading pipes anywhere. All tables consistently use single | format. This appears to have been a rendering artifact in the diff view. Happy to take another look if you can point to a specific line that still shows the issue. |
|
Closing in favor of PR #2049 β restructured as a community extension per maintainer feedback. Extension repo and v1.0.0 release are available. |
Description
Problem
Spec-Kit guides teams through spec β plan β tasks β implement, but has no built-in code review step after implementation. Once
/speckit.implementcompletes, there is no structured way to validate that the code is correct, secure, performant, and faithful to the specification. Teams either skip review entirely or rely on ad-hoc processes, creating a quality gap between implementation and shipping.The community
reviewextension exists but is not part of core, meaning most users don't benefit from it. A core review command ensures every spec-driven project has a quality gate built into the workflow.Industry context: GStack's
/reviewcommand demonstrates that embedding a staff-engineer-level review directly in the AI workflow catches issues that informal review misses β particularly security vulnerabilities, spec deviations, and performance regressions.Solution
Adds
/speckit.reviewβ a new core command that performs a thorough, staff-engineer-level code review through 5 structured passes:Output: Structured review report with severity levels (π΄ Blocker / π‘ Warning / π’ Suggestion), spec coverage matrix, and verdict (APPROVED / APPROVED WITH CONDITIONS / CHANGES REQUIRED).
Business Value
Workflow Position
Files Added
templates/commands/review.mdbefore_review,after_review)templates/review-template.mdTesting
uv run specify --helpuv sync && uv run pytestβ 878/972 pass (44 failures are pre-existing, unrelated to this change)specify initAI Disclosure
implement.mdandanalyze.md. All content was reviewed and validated against the project's template conventions.