pr-audit
PR Audit
Answer: Is this PR ready to merge? If not, what must change? Correctness, maintainability and complexity, and test quality are independent merge gates. All three must pass. Require evidence for blockers and sufficient inspection for approval; a clean audit is valid.
Scope and actions
A request to run this audit includes one PR conversation comment unless the user requests preview-only or no-comment mode. Only the lead publishes. Do not edit reviewed files, implement fixes, commit, push, resolve threads, submit a formal review, or merge.
Review the full contribution and relevant consumers outside the diff. Report code and test defects introduced or materially worsened by the PR. Unrelated debt does not block it. Existing merge requirements or verification failures may prevent readiness; distinguish those blockers from defects caused by the PR.
The review criteria are self-contained here and in TESTS.md. Do not depend on other skills, their helpers, or external prompts. Consult authoritative external documentation only for current facts required by the change.
Establish one pinned comparison
- Resolve the PR URL, repository, and GitHub host from the user's target or current branch. Preserve the host throughout, including for forks. Ask only if ambiguity could select the wrong PR.
- Fetch metadata, relevant linked requirements, comments, review threads, changed files, and verification results through GitHub tools or
gh. Follow pagination and detect incomplete diffs or conversations. Record state, title, description, base and head repositories and commit IDs, target branch, and the content and source identities of the requirements used. If the PR is closed or merged, report its state to the user and stop here, before creating any resource or publishing anything. - Inspect the exact head in a suitable existing checkout or a new isolated worktree, following the resource lifecycle below; preserve the user's branch and unrelated work. Calculate the merge base and record
git diff <merge-base>..<head> --and its commit list. Do not substitute working changes for the pinned PR. Investigate an unexpectedly empty or unavailable comparison before judging it. - Read governing instructions, standards, surrounding code, callers, and behavior-defining tests. Account for every changed file. Assess generated or mechanical files through their source and generation contract when that establishes correctness.