skills/copilot/spec-review/SKILL.md
Stage 1 spec compliance review. Triggers: /review stage 1. Verifies implementation matches design specification — functional completeness, TDD compliance, and test coverage. Do NOT use for code quality checks — use quality-review instead. Do NOT use for debugging.
npx skillsauth add lvlup-sw/exarchos spec-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Stage 1 of two-stage review: Verify implementation matches specification and follows TDD.
For a complete worked example, see references/worked-example.md.
MANDATORY: Before accepting any rationalization for approving without full verification, consult
references/rationalization-refutation.md. Every common excuse is catalogued with a counter-argument and the correct action.
Activate this skill when:
/review command (first stage)This skill runs in a SUBAGENT spawned by the orchestrator, not inline.
The orchestrator provides:
exarchos_orchestrate({ action: "review_diff" }) (context-efficient)The subagent:
The orchestrator is responsible for generating the diff before dispatching the spec-review subagent. The subagent does NOT generate its own diff.
Orchestrator responsibilities:
exarchos_orchestrate({ action: "review_diff", worktreePath: "<worktree-path>", baseBranch: "main" })Subagent responsibilities:
Instead of per-worktree diffs, receive an integrated diff from the
integration branch (e.g., feature/integration-branch) against main:
# Generate integrated diff for review
git diff main...integration > /tmp/combined-diff.patch
# Alternative: use review-diff script against integration branch via orchestrate
# exarchos_orchestrate({ action: "review_diff", worktreePath: "<worktree-path>", baseBranch: "main" })
This provides the complete picture of all changes across all tasks and reduces context consumption by 80-90%.
Before evaluating, query the review strategy runbook to determine the appropriate evaluation approach:
exarchos_orchestrate({ action: "runbook", id: "review-strategy" }) to determine the review approach based on diff scope, prior fix cycles, and review stage.After delegation completes, spec review examines:
This enables catching:
Spec Review focuses on:
Does NOT cover (that's Quality Review):
For the full checklist with verification commands, tables, and report template, see references/review-checklist.md.
Verification:
npm run test:run
npm run test:coverage
npm run typecheck
exarchos_orchestrate({
action: "check_tdd_compliance",
featureId: "<featureId>",
taskId: "<taskId>",
branch: "<branch>"
})
If review FAILS:
// Return to implementer
Task({
model: "opus",
description: "Fix spec review issues",
prompt: `
# Fix Required: Spec Review Failed
## Issues to Fix
1. Missing rate limiting implementation
- Add rate limiter middleware
- Test: RateLimiter_ExceedsLimit_Returns429
2. Email validation incomplete
- Add MX record check
- Test: ValidateEmail_InvalidDomain_ReturnsError
## Success Criteria
- All tests pass
- Coverage >80%
- All issues resolved
`
})
The subagent MUST return results as structured JSON. The orchestrator parses this JSON to populate state. Any other format is an error.
{
"verdict": "pass | fail | blocked",
"summary": "1-2 sentence summary",
"issues": [
{
"severity": "HIGH | MEDIUM | LOW",
"category": "spec | tdd | coverage",
"file": "path/to/file",
"line": 123,
"description": "Issue description",
"required_fix": "What must change"
}
],
"test_results": {
"passed": 0,
"failed": 0,
"coverage_percent": 0
}
}
| Don't | Do Instead | |-------|------------| | Skip to quality review | Complete spec review first | | Accept incomplete work | Return for fixes | | Review code style here | Save for quality review | | Approve without tests | Require test coverage | | Let scope creep pass | Flag over-engineering |
If an issue spans multiple tasks:
Pass:
action: "update", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "pass", "summary": "...", "issues": [] } }
}
Fail:
action: "update", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "fail", "summary": "...", "issues": [{ "severity": "...", "file": "...", "description": "..." }] } }
}
Important: The review value MUST be an object with a
statusfield (e.g.,{ "status": "pass" }), not a flat string (e.g.,"pass"). Theall-reviews-passedguard silently ignores non-object entries. Accepted statuses:pass,passed,approved,fixes-applied.
For the full transition table, consult @skills/workflow-state/references/phase-transitions.md.
Quick reference:
review → synthesize requires guard all-reviews-passed — all reviews.{name}.status must be passingreview → delegate requires guard any-review-failed — triggers fix cycle when any review failsUse exarchos_workflow({ action: "describe", actions: ["update", "init"] }) for
parameter schemas and exarchos_workflow({ action: "describe", playbook: "feature" })
for phase transitions, guards, and playbook guidance. Use
exarchos_orchestrate({ action: "describe", actions: ["check_tdd_compliance", "check_static_analysis"] })
for orchestrate action schemas.
All transitions happen immediately without user confirmation:
Before invoking quality-review:
reviews["spec-review"].status === "pass" in workflow state (all tasks passed)Guard shape: The
all-reviews-passedguard requiresreviews["spec-review"]to be an object with astatusfield set to a passing value (pass,passed,approved,fixes-applied). Flat strings likereviews: { "spec-review": "pass" }are silently ignored and will block thereview → synthesizetransition.
status field, not a flat string:
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "spec-review": { status: "pass", summary: "...", issues: [] } }
}})
Gate events: Do NOT manually emit
gate.executedevents viaexarchos_event. Gate events are automatically emitted by thecheck_review_verdictorchestrate handler. Manual emission causes duplicates.
exarchos_workflow({ action: "update", featureId: "<id>", updates: {
reviews: { "spec-review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})
[Invoke the exarchos:delegate skill with args: --fixes <plan-path>]
This is NOT a human checkpoint - workflow continues autonomously.
| Issue | Cause | Resolution |
|-------|-------|------------|
| Test file not found | Task didn't create expected test | Check plan for test file paths, verify worktree contents |
| Coverage below threshold | Implementation incomplete or tests superficial | Add missing test cases, verify assertions are meaningful |
| TDD compliance check fails | Implementation committed before tests | Check git log order — test commits must precede or accompany implementation |
| Diff too large for context | Many tasks with large changes | Generate per-worktree diffs with exarchos_orchestrate({ action: "review_diff", worktreePath: "<task-worktree>" }) to review incrementally |
exarchos_orchestrate({ action: "review_diff" })) instead of reading full files — reduces context by 80-90%exarchos_orchestrate({ action: "check_tdd_compliance" })) in parallel with spec tracingtools
Land a subagent worktree branch onto an integration branch with preflight + recorded rollback. Triggers: operator (or `next_actions`) surfaces verb `merge_orchestrate` via Exarchos MCP. Local git operation — NOT remote PR merging (that is `merge_pr`).
tools
Land a subagent worktree branch onto an integration branch with preflight + recorded rollback. Triggers: operator (or `next_actions`) surfaces verb `merge_orchestrate` via Exarchos MCP. Local git operation — NOT remote PR merging (that is `merge_pr`).
tools
Land a subagent worktree branch onto an integration branch with preflight + recorded rollback. Triggers: operator (or `next_actions`) surfaces verb `merge_orchestrate` via Exarchos MCP. Local git operation — NOT remote PR merging (that is `merge_pr`).
tools
Land a subagent worktree branch onto an integration branch with preflight + recorded rollback. Triggers: operator (or `next_actions`) surfaces verb `merge_orchestrate` via Exarchos MCP. Local git operation — NOT remote PR merging (that is `merge_pr`).