review-loop
Review Loop
Review, fix, re-review until a round finds nothing worth fixing. Fixes are new code — they need their own review.
Rules
-
Review in a fresh subagent every round. Invoke
review-codewith<target> --sub(default targetdiff). Ifreview-codeis missing, spawn a subagent to review for correctness, security, resource, and performance defects, rating each finding Yes / Judgment call / No for worth fixing. Never review your own fixes inline. -
Use
difffrom round 2 for every target, including paths. GitHub does not see unpushed fixes, re-reviewing the whole codebase wastes context, and path-scoped reviews can miss fixes in related files. Forpr <number>, rungh pr checkout <number>first. -
Fix every Yes; fix a Judgment call only if Trivial or Small. Skip No. Do not re-fix or re-argue a skipped item when a later round raises it again.
-
Run the repo's checks after each round's fixes (
make build/make test/make lint, else native commands). Fix breakage before the next review. -
Stop when a round has nothing new to fix. Cap at 5 rounds; round 5 is review-only, even if it finds actionable issues. Do not edit after that review — hand the open findings to the user. If a fixed finding comes back in any round, stop fixing and report the open findings.
-
Commit each fix unless told otherwise.
--commit each(default) — one commit per fixed finding.--commit end— one commit after the loop stops. Never push. On the default branch, branch before the first commit — otherwisediffanchors at HEAD and committed fixes drop out of the next review. -
Report at the end: rounds run and why it stopped, fixes (
path:line— what changed), skipped findings with a reason each, open findings, and check results.