62 lines
1.8 KiB
Markdown
62 lines
1.8 KiB
Markdown
---
|
|
name: requesting-code-review
|
|
description: Request a reviewer pass after each task or feature and before merge to catch issues early
|
|
permalink: opencode-config/skills/requesting-code-review/skill
|
|
---
|
|
|
|
# Requesting Code Review
|
|
|
|
Request a `reviewer` agent pass before changes move forward or merge.
|
|
|
|
## Core Workflow
|
|
|
|
Request review:
|
|
- After a completed task in a multi-task implementation
|
|
- After finishing a feature slice
|
|
- Before opening or merging a PR
|
|
|
|
Include all required context in the request:
|
|
- What was implemented
|
|
- Requirements or plan source (for example, `plans/<note-name>` in basic-memory)
|
|
- Brief summary of behavior and design choices
|
|
- Actual diff context (commit range and/or key changed files)
|
|
|
|
## How to Run It
|
|
|
|
1. Gather concrete diff context for the exact review scope:
|
|
|
|
```bash
|
|
BASE_SHA=$(git merge-base HEAD origin/$(git rev-parse --abbrev-ref @{upstream} | cut -d/ -f2 2>/dev/null || echo main))
|
|
HEAD_SHA=$(git rev-parse HEAD)
|
|
|
|
git diff --stat "$BASE_SHA..$HEAD_SHA"
|
|
git diff "$BASE_SHA..$HEAD_SHA"
|
|
```
|
|
|
|
2. Dispatch `reviewer` with a focused request using:
|
|
- exact implemented scope
|
|
- the relevant `plans/` note or requirement text
|
|
- a concise summary
|
|
- the concrete diff range (`BASE_SHA..HEAD_SHA`) and any key files
|
|
|
|
Use `reviewer.md` as a request template.
|
|
|
|
3. Triage feedback before continuing:
|
|
- Fix critical issues immediately
|
|
- Address important issues before merge
|
|
- Track minor issues intentionally
|
|
- If feedback appears incorrect, reply with code/test evidence and request clarification
|
|
|
|
## Red Flags
|
|
|
|
Never:
|
|
- Skip review because a change seems small
|
|
- Continue with unresolved critical issues
|
|
- Request review without plan/requirement context
|
|
- Request review without concrete diff scope
|
|
|
|
## Related Skills
|
|
|
|
- `verification-before-completion`
|
|
- `git-workflow`
|