Review-Merge Workflow (RVM)
Complete code review workflow: review changes, address any issues found, then push and merge.
Workflow Steps
Step 1: Code Review
Spawn a sub-agent to perform code review using the same rubric as /review:
Review Rubric:
| Category |
Severity |
Checks |
| Correctness |
Critical |
Logic errors, unhandled edge cases, race conditions, resource leaks |
| Security |
Critical |
Input validation, injection vulnerabilities, hardcoded secrets |
| Error Handling |
High |
Uncaught exceptions, error message leaks, missing cleanup |
| Code Quality |
Medium |
Long functions (>50 lines), deep nesting, duplication, poor naming, missing types |
| Testing |
Medium |
Missing tests, untested edge cases, flaky tests |
| Documentation |
Low |
Missing docstrings, outdated comments |
The sub-agent should return issues categorized by severity with file:line references.
Step 2: Address Review Findings
For each issue found:
- Critical/High issues: Must be fixed before proceeding
- Medium issues: Fix if straightforward, otherwise note as future improvement
- Low issues: Fix only if trivial, otherwise skip
After addressing issues:
- Run tests to verify fixes don't break anything
- Run linter/formatter if available
Step 3: Commit Fixes (if any)
If changes were made to address review feedback:
git add -A
git commit -m "Address code review feedback
- [List of fixes made]
Co-Authored-By: Claude <noreply@anthropic.com>"
Step 4: Push
Push the branch to remote:
git push
Step 5: Merge
Merge the PR:
gh pr merge --squash --delete-branch
If merge fails due to CI, wait and retry or report the issue.
Output Format
Report progress through each step:
## RVM: Review-Merge Workflow
### Review Phase
[Review findings from sub-agent]
### Fixes Applied
- [x] Fixed [issue] in file:line
- [x] Fixed [issue] in file:line
- [ ] Skipped [issue] - [reason]
### Verification
- Tests: PASS/FAIL
- Lint: PASS/FAIL
### Push & Merge
- Pushed: [commit hash]
- PR merged: [PR URL]
Error Handling
- If critical issues cannot be fixed automatically, stop and report
- If tests fail after fixes, stop and report
- If merge fails, report the reason (CI failure, conflicts, etc.)
1---2name: rvm3description: Review code, address feedback, push, and merge (Review-Merge workflow). Use when the user wants to review, fix, and ship a branch in one go.4---56# Review-Merge Workflow (RVM)78Complete code review workflow: review changes, address any issues found, then push and merge.910## Workflow Steps1112### Step 1: Code Review1314Spawn a sub-agent to perform code review using the same rubric as `/review`:1516**Review Rubric:**1718| Category | Severity | Checks |19|----------|----------|--------|20| Correctness | Critical | Logic errors, unhandled edge cases, race conditions, resource leaks |21| Security | Critical | Input validation, injection vulnerabilities, hardcoded secrets |22| Error Handling | High | Uncaught exceptions, error message leaks, missing cleanup |23| Code Quality | Medium | Long functions (>50 lines), deep nesting, duplication, poor naming, missing types |24| Testing | Medium | Missing tests, untested edge cases, flaky tests |25| Documentation | Low | Missing docstrings, outdated comments |2627The sub-agent should return issues categorized by severity with file:line references.2829### Step 2: Address Review Findings3031For each issue found:32331. **Critical/High issues**: Must be fixed before proceeding342. **Medium issues**: Fix if straightforward, otherwise note as future improvement353. **Low issues**: Fix only if trivial, otherwise skip3637After addressing issues:38- Run tests to verify fixes don't break anything39- Run linter/formatter if available4041### Step 3: Commit Fixes (if any)4243If changes were made to address review feedback:44```bash45git add -A46git commit -m "Address code review feedback4748- [List of fixes made]4950Co-Authored-By: Claude <noreply@anthropic.com>"51```5253### Step 4: Push5455Push the branch to remote:56```bash57git push58```5960### Step 5: Merge6162Merge the PR:63```bash64gh pr merge --squash --delete-branch65```6667If merge fails due to CI, wait and retry or report the issue.6869## Output Format7071Report progress through each step:7273```74## RVM: Review-Merge Workflow7576### Review Phase77[Review findings from sub-agent]7879### Fixes Applied80- [x] Fixed [issue] in file:line81- [x] Fixed [issue] in file:line82- [ ] Skipped [issue] - [reason]8384### Verification85- Tests: PASS/FAIL86- Lint: PASS/FAIL8788### Push & Merge89- Pushed: [commit hash]90- PR merged: [PR URL]91```9293## Error Handling9495- If critical issues cannot be fixed automatically, stop and report96- If tests fail after fixes, stop and report97- If merge fails, report the reason (CI failure, conflicts, etc.)