Review PR
Overview
Perform a thorough review-only PR assessment and return a structured recommendation.
Inputs
- •Ask for PR number or URL.
- •If missing, always ask. Never auto-detect from conversation.
Safety
- •Never push to
mainororigin/main. - •Do not run
git pushat all during review. Treat as read only.
Setup: Use a Worktree
sh
WORKTREE_DIR=".worktrees/pr-<PR>" git fetch origin main git worktree add "$WORKTREE_DIR" -b temp/pr-<PR> origin/main cd "$WORKTREE_DIR" mkdir -p .local
Steps
- •Identify PR meta and context via
gh pr view - •Check if the change already exists in main before looking at PR branch
- •Claim the PR (assign yourself)
- •Read the PR description carefully
- •Read the diff thoroughly via
gh pr diff <PR> - •Validate the change is needed and valuable
- •Evaluate implementation quality
- •Perform a security review
- •Review tests and verification
- •Check docs
- •Check changelog
- •Answer: can /preparepr fix issues or must contributor update?
- •Save findings to
.local/review.md
Output Sections (A-J)
- •A) TL;DR recommendation: READY | NEEDS WORK | NEEDS DISCUSSION | CLOSE
- •B) What changed
- •C) What is good
- •D) Security findings
- •E) Concerns (BLOCKER / IMPORTANT / NIT with file references)
- •F) Tests
- •G) Docs status
- •H) Changelog
- •I) Follow ups (optional)
- •J) Suggested PR comment (optional)
Guardrails
- •Worktree only. Do not delete the worktree after review.
- •Review only: do not merge, do not push.