pr-review
Final whole-branch review. It reviews, fixes and reports; it never marks a PR Ready, merges or arms auto-merge.
- Load project rules. Reuse project instructions already in context (including root
CLAUDE.md) and apply any project overlay matchingpr-review. Resolve only the configuration keys and linked reference sections needed for the reviewed diff; honor project section pointers instead of loading whole reference documents. These rules add checks and the Ready checklist, never authority. - Scope. Fetch the target branch (an open PR's base, else
pullRequest.targetBranch, elsemain) and review$(git merge-base HEAD origin/<target>)..HEADplus uncommitted changes: the whole diff that will merge, never only the last commit. Read every changed file and the callers of changed functions. - Review the project's rules first, then correctness, security, test strength and needless complexity. Report each finding with file, line, severity and a concrete failure.
- Fix loop. Fix validated findings inside the branch's scope, then review the whole updated diff again. Three rounds at most. Do not reopen decisions the user accepted, do not raise a finding already fixed, and stop early when a round finds only LOW or repeated findings.
- Report briefly: findings fixed, findings left with severity, rounds used, and each Ready checklist item the project's instructions name, with its state — done, skipped or missing.
Then stop and wait for an explicit yes before gh pr ready, merging or auto-merge.
MUST ATTENTION Core Engineering Principles — every plan, implementation and review must be Easy to change (purpose: one place per change — reuse first, one owner per rule, interface/DI at volatile boundaries, adapter/wrapper for libraries, factory/strategy for real variants, no speculative abstraction) · Easy to scale (extend by addition, bounded growth, explicit boundaries, sized to the project's real profile) · Easy to maintain (intent-named tests that fail when the rule breaks across happy/error/edge paths; harness green locally and in CI). Before done: next change → how many edit sites? 10× → what breaks? which test goes red? Full gate: .claude/skills/shared/protocols/core-engineering-principles.md.