code-reviewer
GitHub代码审查技能,用于检查实现是否符合规范和代码质量。支持请求审查和接收反馈,涵盖从获取Git范围、分发子代理到生成报告及处理严重问题的完整流程。
Trigger Scenarios
Install
npx skills add MageByte-Zero/spec-superflow --skill code-reviewer -g -y
SKILL.md
Frontmatter
{
"name": "code-reviewer",
"description": "Review completed implementation batches for spec compliance and code quality. Invoke after execution batches complete, before merging, or when a review gate is reached in the workflow."
}
Code Reviewer
Two responsibilities: reviewing the recorded Git range and acting on findings with technical rigor. Review according to the persisted policy; verify feedback before implementing it.
Part 1: Requesting Review
Mandatory: one whole-range review for Native final; one review per planned wave for wave and legacy plans. Avoid redundant per-task or final reviews of unchanged evidence.
Optional: when stuck, before refactoring, after fixing complex bugs.
Procedure
-
Get the review range from recorded execution evidence. For final review use the immutable
review_basein recorded isolation context, orgit merge-base <target-branch> HEADfor a legacy/manual branch with an unambiguous target; head isgit rev-parse HEAD. The CLI verifies this complete range. A failed final review retains the same base across fixes; wave repairs use the prior wave head. For a wave review use the recorded wave-start base. Never substituteHEAD~1; it misses earlier commits in multi-commit work. -
For Native
final, the current executor reviews the complete diff locally and writes the report; do not dispatch a reviewer subagent. For user-authorized SDD withwavereview, dispatch at most one reviewer for that wave usingskills/code-reviewer/code-reviewer-prompt.md. If dispatch is unavailable, review locally. -
When dispatching, fill only
[DESCRIPTION],[PLAN_OR_REQUIREMENTS],[BASE_SHA],[HEAD_SHA],[WAVE_ID], and[REVIEW_REPORT_FILE]. Do not send the whole planning bundle. -
Write a non-empty report at
.superpowers/sdd/reviews/<wave-id>.md, then record that path withssf execution review <change-dir> --wave <wave-id> --base <base-sha> --head <head-sha> --report .superpowers/sdd/reviews/<wave-id>.md --verdict <pass|fail>. For schema-2 plans, failed receipts also require--issue <stable-finding-id>for the blocking defect being repaired; reuse its ID across retries. Other findings keep their own IDs in the report. Identical failed input cannot consume another attempt. -
Critical/Important findings require a
failreceipt, focused repair, one focused re-review, and replacementpass. Note Minor for later. -
At
adjudication-required, wait for human authorization before another review.
Minimality And Scope
For unrequested complexity, cite the missing task requirement and diff line. Use Important for merge-blocking complexity and Minor for safe, behavior-neutral redundancy; never score by line count.
Part 2: Receiving Review Feedback
The Response Pattern
- READ feedback without reacting
- UNDERSTAND and restate requirement
- VERIFY against codebase reality
- EVALUATE: technically sound for THIS codebase?
- RESPOND: technical acknowledgment or reasoned pushback
- IMPLEMENT: one item at a time, test each
Severity Levels
| Level | Meaning | Action |
|---|---|---|
| Critical | Bugs, security, data loss, broken functionality | Fix immediately |
| Important | Architecture problems, missing features, poor error handling, test gaps | Fix before next batch |
| Minor | Code style, optimization, documentation polish | Note for later |
Forbidden Responses
Never: performative agreement ("You're right!", "Great point!"), blind implementation before verification, thanking the reviewer. Instead: restate the requirement, ask clarifying questions, push back with reasoning, or just fix it (actions > words).
Handling Unclear Feedback
Ask only about unclear findings that change a material decision; continue independent, already-understood repairs within scope. Do not turn an unclear optional comment into a global stop.
Source-Specific Rules
From user: Trusted — implement after understanding. Still ask if scope unclear. No performative agreement.
From external reviewer: Before implementing, check: technically correct for this codebase? breaks existing functionality? reason for current implementation? works on all platforms? reviewer understands full context? If suggestion seems wrong, push back with technical reasoning.
When to Push Back
Suggestion breaks existing functionality, reviewer lacks context, violates YAGNI, technically incorrect for this stack, legacy/compatibility reasons, conflicts with user's architectural decisions. Push back with technical reasoning, not defensiveness.
Implementation Order
- Clarify only the material uncertainty that blocks a repair
- Fix blocking issues (breaks, security)
- Fix simple issues (typos, imports)
- Fix complex issues (refactoring, logic)
- Test each fix individually, verify no regressions
Common Mistakes
| Mistake | Fix |
|---|---|
| Performative agreement | State requirement or just act |
| Blind implementation | Verify against codebase first |
| Batch without testing | One at a time, test each |
| Proceeding without a wave receipt | Record pass/fail via ssf execution review before the next dependent wave |
| Assuming reviewer is right | Check if breaks things |
| Avoiding pushback | Technical correctness > comfort |
| Unclear feedback | Clarify the blocked finding while continuing independent repairs |
Exception Handling
- Parse failures: Report specific file, request regenerated review package
- Missing files: Regenerate via
scripts/review-package. Empty diff = nothing to review - User interruption: Re-read review report on resume, continue from next unreviewed batch
Version History
-
10d5f08
Current 2026-09-22 02:00
重构为v2流程:默认使用Native执行,简化执行流与恢复逻辑,新增独立审查提示文档,修复Windows路径问题。
-
1bf565a
2026-09-02 22:22
新增裁决恢复机制,记录裁决审查过程,保留作用域内的审查回执,并根据裁决审查反馈加固修复证据与重同步回滚逻辑。
-
fd8cf86
2026-08-04 19:02
变更了审查报告存储路径规则:强制报告必须写入指定的审计安全目录 .superpowers/sdd/reviews/<wave-id>.md,拒绝其他路径;简化了命令参数占位符描述。
-
9105098
2026-08-02 21:57
更新命令包名称从 spec-superflow@0.12.1 移除版本号限制(隐含变更)
- 1970fe7 2026-07-30 20:20


