Loading...
Loading...
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 skill4agent add lvlup-sw/exarchos spec-reviewreferences/worked-example.mdMANDATORY: Before accepting any rationalization for approving without full verification, consult. Every common excuse is catalogued with a counter-argument and the correct action.references/rationalization-refutation.md
/reviewexarchos_orchestrate({ action: "review_diff" })exarchos_orchestrate({ action: "review_diff", worktreePath: "<worktree-path>", baseBranch: "main" })feature/integration-branch# 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" })exarchos_orchestrate({ action: "runbook", id: "review-strategy" })references/review-checklist.mdnpm run test:run
npm run test:coverage
npm run typecheckexarchos_orchestrate({
action: "check_tdd_compliance",
featureId: "<featureId>",
taskId: "<taskId>",
branch: "<branch>"
})// 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
`
}){
"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 |
action: "set", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "pass", "summary": "...", "issues": [] } }
}action: "set", featureId: "<id>", updates: {
"reviews": { "spec-review": { "status": "fail", "summary": "...", "issues": [{ "severity": "...", "file": "...", "description": "..." }] } }
}Important: The review value MUST be an object with afield (e.g.,status), not a flat string (e.g.,{ "status": "pass" }). The"pass"guard silently ignores non-object entries. Accepted statuses:all-reviews-passed,pass,passed,approved.fixes-applied
@skills/workflow-state/references/phase-transitions.mdreviewsynthesizeall-reviews-passedreviews.{name}.statusreviewdelegateany-review-failedexarchos_workflow({ action: "describe", actions: ["set", "init"] })exarchos_workflow({ action: "describe", playbook: "feature" })exarchos_orchestrate({ action: "describe", actions: ["check_tdd_compliance", "check_static_analysis"] })reviews["spec-review"].status === "pass"Guard shape: Theguard requiresall-reviews-passedto be an object with areviews["spec-review"]field set to a passing value (status,pass,passed,approved). Flat strings likefixes-appliedare silently ignored and will block thereviews: { "spec-review": "pass" }transition.review → synthesize
statusexarchos_workflow({ action: "set", featureId: "<id>", updates: {
reviews: { "spec-review": { status: "pass", summary: "...", issues: [] } }
}})Gate events: Do NOT manually emitevents viagate.executed. Gate events are automatically emitted by theexarchos_eventorchestrate handler. Manual emission causes duplicates.check_review_verdict
exarchos_workflow({ action: "set", featureId: "<id>", updates: {
reviews: { "spec-review": { status: "fail", summary: "...", issues: [{ severity: "HIGH", file: "...", description: "..." }] } }
}})[Invoke the exarchos:delegate skill with args: --fixes <plan-path>]| 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" })exarchos_orchestrate({ action: "check_tdd_compliance" })