pr-review-loop
PR Review Loop
Review and fix the open pull request on the current branch, up to 4 iterations. A finding drives the loop only when it carries a failure scenario; everything else is recorded as an advisory for a human.
Prerequisites
- Confirm the branch has an open PR with
gh pr view --json number,url,headRefOid. - If no PR exists, create one only when the user asked for that; otherwise ask before continuing.
- Read repo instructions that apply to the changed files before reviewing or editing.
Loop
For each iteration, announce Iteration N/4.
1. Review
Review the diff from the PR base to HEAD, running independent reviewers in parallel when subagents are available. Reviewer output feeds triage; post it to the PR only when the user asks.
Re-run the reviewers every iteration — a self-read of the delta is not a review. Give each one the commits added since the last round, what changed and why, and the findings already dropped or filed as advisories with their reasons, so they don't relitigate. Ask for the full base-to-HEAD diff re-reviewed with attention to the new delta, since fixes carry their own bugs.