Files
superpowers-lite/skills/requesting-code-review/SKILL.md
2026-05-13 15:29:23 +08:00

104 lines
3.0 KiB
Markdown

---
name: requesting-code-review
description: Manual-only skill. Activate only after an explicit user request for superpowers-lite:requesting-code-review.
---
# Requesting Code Review
Dispatch a code reviewer subagent to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.
**Core principle:** In Superpowers Lite default plan execution, review once after the full implementation is complete. Request earlier reviews only when the user asks, risk is unusually high, or you are stuck.
## When to Request Review
**Mandatory:**
- After completing all tasks in an implementation plan
- After completing a major feature
- Before merge to main
**Optional but valuable:**
- When stuck (fresh perspective)
- Before refactoring (baseline check)
- After fixing complex bug
## How to Request
**1. Get git SHAs:**
```bash
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
HEAD_SHA=$(git rev-parse HEAD)
```
**2. Dispatch code reviewer subagent:**
Use Task tool with `general-purpose` type, fill template at `code-reviewer.md`
**Placeholders:**
- `{DESCRIPTION}` - Brief summary of what you built
- `{PLAN_OR_REQUIREMENTS}` - What it should do
- `{BASE_SHA}` - Starting commit
- `{HEAD_SHA}` - Ending commit
**3. Act on feedback:**
- Fix Critical issues immediately
- Fix Important issues before proceeding
- Note Minor issues for later
- Push back if reviewer is wrong (with reasoning)
## Example
```
[Just completed all tasks in .superpowers-lite/plans/deployment-plan.md]
You: Let me request the overall code review.
BASE_SHA=<commit-before-plan-execution>
HEAD_SHA=$(git rev-parse HEAD)
[Dispatch code reviewer subagent]
DESCRIPTION: Completed deployment verification workflow
PLAN_OR_REQUIREMENTS: Full plan from .superpowers-lite/plans/deployment-plan.md
BASE_SHA: a7981ec
HEAD_SHA: 3df7661
[Subagent returns]:
Strengths: Clean architecture, real tests
Issues:
Important: Missing progress indicators
Minor: Magic number (100) for reporting interval
Assessment: Ready to proceed
You: [Fix progress indicators]
[Re-run relevant verification, re-review if substantial]
```
## Integration with Workflows
**Subagent-Driven Development:**
- Default to one overall review after all phases are complete
- Use phase reviews only when the user asks or a phase is unusually risky
- Fix Critical and Important findings before finishing
**Executing Plans:**
- Review once after all tasks are implemented and verified
- Get feedback, apply fixes, re-run relevant verification
**Ad-Hoc Development:**
- Review before merge
- Review when stuck
## Red Flags
**Never:**
- Skip review because "it's simple"
- Ignore Critical issues
- Proceed with unfixed Important issues
- Argue with valid technical feedback
**If reviewer wrong:**
- Push back with technical reasoning
- Show code/tests that prove it works
- Request clarification
See template at: requesting-code-review/code-reviewer.md