Step 5: Open a Clean PR & Bound GitHub Copilot#
What Usually Goes Wrong#
Using an independent external AI reviewer like GitHub Copilot Code Review on pull requests is a great second pair of eyes until three defaults bite you:
- Noisy style nitpicks: Without repo instructions, Copilot leaves subjective
"Consider renaming..."comments and re-audits untouched files on every push. - Surprise quota burn: Each Copilot PR review uses premium request quota on
your GitHub plan. If a repo enables automatic review on every
git pushand an agent pushes 6 WIP commits while fixing CI, one PR burns 6 paid reviews, mostly on broken code. - Piecemeal review loops: Fixing one comment triggers another round that spots one more comment in the same file, spinning for 5+ rounds.
What to Do Instead#
Even after Step 4's local review passes clean, GitHub Copilot Code Review
almost always spots new edge cases worth knowing about because it runs a
separate review pipeline in a true cold-room context (seeing only your final
PR diff and REVIEW.md on GitHub, with zero shared blind spots from your local
session or authoring model family; see
The 5-Role Model Roster).
Local finish-issue clears the noisy first ~80% of bugs and missing docs before
spending any CI runs or PR review quota, so Copilot can spend 100% of its Round
1 attention on the subtle remaining 20%, paired with repo review files,
credit-saving triggers, and hard circuit breakers:
finish-issue Passes
Clears ~80% of bugs & missing docs locally (0 PR review quota used)./pr-create
Opens ready-for-review PR and triggers Round 1 Copilot review once./pr-review
Reads inline review threads, top-level review bodies, general PR comments, and CI checks./review-buster on a second model brand./last-look & Human Clicks Merge
60-second plain-English merge brief + 1 to 2 core files to eyeball before clicking Merge.How the Pieces Work Together#
1. Give Copilot a Repo Rulebook (REVIEW.md)#
Check two files at the root of this repository:
.github/copilot-instructions.md: GitHub Copilot reads this file automatically and follows its pointer straight toREVIEW.md.REVIEW.md: Tells Copilot to skip style nits already handled bygofmt/golangci-lint, check callers outside the diff, report an entire class of bug at once, and on re-reviews, inspect only what changed since its last review (<last_reviewed_commit>..HEAD).
2. Protect Your GitHub Copilot Quota#
Turn off
review_on_push! In GitHub Repository Settings -> Rules -> Rulesets (or automatically via thescafctlconfigure-githubaction), setreview_on_push: falseandreview_draft_pull_requests: false.
With those two settings in place, follow three simple habits:
- Let Round 1 run on a clean PR: Because you ran
/finish-issuelocally in Step 4, Round 1 often comes backNo issues foundon the first pass. - CI-Green First: If you push a fix, wait until every GitHub Actions CI check turns green before requesting a Copilot re-review. Broken builds spend zero review credits.
- Skip re-reviews on pure rebases or docs tweaks: Once Copilot reports
No issues found, do not re-request it after a plainmainrebase. Only request a re-review when you pushed code fixes to clear prior open findings.
3. Enforce Hard Circuit Breakers & Human Stops#
Never let an AI loop on a pull request unattended without an exit condition.
The /pr-create, /pr-review, /pr-autopilot, /review-buster, and
/last-look commands enforce four non-negotiable stops:
| Safeguard | Rule |
|---|---|
| Design trade-offs | If a review comment questions an API shape, flag name, or behavior choice with two reasonable answers, stop immediately and ask the human. |
| 3-round circuit breaker | Cap PR fix loops at 3 rounds maximum. If Round 3 still raises new comments, stop or run /review-buster, which reads the entire review history with a different model family, diagnoses the shared root cause, and waits for your approval on one comprehensive plan. |
| Quota-error check | Never treat a Copilot comment saying "unable to review" or "insufficient remaining quota" as a clean pass. |
Human owns Merge (/last-look + your final call) | gh pr merge is set to "deny" in opencode.jsonc. Once a PR is green and drained, ask "walk me through this PR to merge" (or run /last-look): the AI checks live CI, prod vs. test size, post-review drift or bloat, 3-way conflicts against origin/main, and links the 1 to 2 core files worth reading on GitHub before you click Merge. |
Try the Commands on Your Own Fork#
When working in your own repository or fork:
# 1. Create a <type>/<issue#>-<slug> branch, open a PR, or keep the PR body synced
/pr-create feat: add optional link expiration and click stats to shorty
# 2a. One-shot interactive review: inspect all 4 PR feedback surfaces and choose what to do
/pr-review
# 2b. Hands-off convergence loop: wait for green CI, batch mechanical fixes, resolve nits,
# and stop automatically when merge-ready, on a design call, or after 3 strikes
/pr-autopilot
# 3. If an external reviewer ever nitpicks one line per round, diagnose the root cause
/review-buster
# 4. Final 60-second human merge brief (what changes, prod/test size, review drift,
# 1 to 2 core files to spot-check, squash-commit check, and 3-way conflict check)
/last-look(Need to pause mid-task and pick up tomorrow in a fresh window? Run /handoff
to write a secret-redacted summary note to /tmp/opencode/.)