Skip to content
Prwarden

Prwarden

github.com • November 26, 2026

A self-hosted pull-request reviewer with pluggable AI CLI engines. It discovers pull requests with GitHub CLI, reviews the exact PR head in a temporary worktree, posts confirmed findings or approvals to GitHub, routes self-review feedback to Slack, and keeps single-host delivery state in a local JSON file.

Delivery is disabled by default. A live run requires both a configuration gate and a command-line flag.

On every run, for each repository you list, PR Warden:

lists the open pull requests with GitHub CLI, skipping drafts, excluded labels, and heads it has already reviewed;

fetches the exact head of each one into a temporary detached worktree, so the review reads the code as it is in that pull request and nothing else;

reviews it with your AI CLI in up to three levels: the solution design and the documentation, which only ever , and the code, which reports line-level defects and is the only level that can approve;

hands every candidate finding to a verifier, ideally another model, whose job is to refute it, while the controller checks that each cited line really says what the finding quotes;

delivers only what survived: inline on lines the pull request added, or an approval when the review was complete, found nothing, and the pull request can merge. Results on your own pull requests go to Slack, or to the pull request as , because GitHub does not let you approve your own;

records what it delivered for that head in a local state file, so running it again never posts twice.

The models propose and the controller decides: eligibility, validation, duplicates, and delivery are plain code, the same for every engine. Kiro, Claude Code, Codex, and Antigravity can each review, verify, or stand in when another's provider fails, and a command of your own can review.

PR Warden is one command, prwarden , with no Python packages of its own to pull in. Install it with Homebrew on macOS or Linux, or from PyPI anywhere Python 3.11 or newer runs.

This adds the bruha/homebrew-tap tap and installs PR Warden together with GitHub CLI and the Python it runs on.

The prwarden package runs on any Python 3.11 or newer; the python3 that comes with the macOS Command Line Tools is 3.9 and too old, while Homebrew's is current. Install it with pipx , which gives it an environment of its own and puts prwarden on your PATH :

GitHub CLI is not a Python package, so pipx does not install it; prwarden setup checks for it and offers to.

prwarden --version shows the installed release. Configuration and review records live outside the installation, in ~/.config/prwarden and ~/.local/state/prwarden (see where configuration and state live ), so an upgrade keeps them and a schedule keeps working: Homebrew and pipx both keep prwarden at one path. Install it one way only: prwarden schedule install schedules the first prwarden on your PATH .

Uninstalling leaves the configuration and records behind. To remove everything, run prwarden schedule remove before uninstalling, then delete ~/.config/prwarden , ~/.local/state/prwarden , and ~/.local/ /prwarden , which holds the clones PR Warden made.

With PR Warden installed , run:

prwarden setup first checks GitHub CLI and the AI CLIs PR Warden can drive, Kiro CLI, Claude Code, Codex, and Antigravity, and shows which are installed and signed in. It offers to install what is missing, with Homebrew on macOS and the vendor's own installer otherwise, showing each command and running it only when you agree, and then runs each tool's own sign-in. Then it asks which GitHub account reviews, which AI CLI reviews and which verifies, and which repositories to watch. A repository you have no clone of is cloned by PR Warden on its first review; setup says where, and roughly how large, before you agree.

It then asks whether the reviews of your own pull requests, which GitHub does not let you approve, should go to Slack. Without a webhook yet, it opens Slack's page for a new app already filled in: pick the workspace and the channel, and paste the webhook URL Slack shows. Setup sends a test message through it before keeping it, and asks which repositories report there, so a repository whose team is in another workspace stays out of it. prwarden setup --slack does this step alone later.

it asks whether your pull requests name Jira work items. If they do, setup checks for Atlassian's own CLI, acli , offers to install it, and signs it in to Jira, either in the browser or with an API token: setup opens Atlassian's page for making one and hands the token you paste straight to acli , which keeps it. Then it asks for the project keys your pull requests use and which repositories use them. prwarden setup --jira does this step alone later.

Setup writes .env , repositories.json , and reviews.json , which holds the engines it chose and, unless you decline them, two recommended rules : a change to documentation alone gets its documentation review and a lighter code review, on the engine you chose at no more than medium effort, and a pull request labelled dependencies gets the code review alone. It writes them to ~/.config/prwarden , then offers a dry-run preview of one pull request, which spends credits and posts nothing, live delivery, and a schedule. prwarden doctor checks the result at any time and spends nothing.

An installed copy can also be configured from the three examples:

To run from a clone instead, which keeps its configuration in the clone, type python3 -m prwarden in place of prwarden :

prwarden setup --import later moves a clone's configuration and delivery records to an installed copy, so nothing is reviewed twice.

In reviews.json , set each type's review.engines to the AI CLI you are signed in to, such as kiro or claude , with the model you want, and its verify.engines to a second one; remove any engine you are not signed in to. See review types in reviews.json .

In reviews.json , set each type's review.engines to the AI CLI you are signed in to, such as kiro or claude , with the model you want, and its verify.engines to a second one; remove any engine you are not signed in to. See review types in reviews.json .

In repositories.json , list each repository's owner/name slug, and the path to a local clone of it if you have one; without a path PR Warden clones it itself. Add "slack": false to an entry if you do not use Slack.

In repositories.json , list each repository's owner/name slug, and the path to a local clone of it if you have one; without a path PR Warden clones it itself. Add "slack": false to an entry if you do not use Slack.

Check the setup with prwarden doctor , which reads everything and spends nothing. Then review one pull request as a dry run. Nothing is posted, but the model runs and uses your quota: prwarden --repo your-org/example-app --pr 123

Check the setup with prwarden doctor , which reads everything and spends nothing. Then review one pull request as a dry run. Nothing is posted, but the model runs and uses your quota:

When the result looks right, set AUTO_REVIEW_DRY_RUN=0 in .env and add --live to post it.

When the result looks right, set AUTO_REVIEW_DRY_RUN=0 in .env and add --live to post it.

To review on a schedule, run prwarden schedule install , which sets up a LaunchAgent on macOS or a systemd user timer on Linux; see scheduling .

To review on a schedule, run prwarden schedule install , which sets up a LaunchAgent on macOS or a systemd user timer on Linux; see scheduling .

PR Warden posts as the account GitHub CLI is signed in as, and never approves that account's own pull requests, so a separate reviewer account works best.

How much GitHub access it needs

PR Warden reads code, pull requests, checks, and the issues they close, and posts reviews and . It never pushes, merges, or changes settings, and the review engines never receive the token. An approval counts towards a branch's required reviews only from an account with write access, so a dedicated account with write access, not an administrator's own login, is the narrowest identity that still approves.

GitHub CLI's own login usually carries the repo , workflow , gist , and read:org scopes, and workflow lets the token rewrite CI. A fine-grained token limited to the reviewed repositories, with Contents read, Pull requests read and write, Issues read, Checks read, Commit statuses read, and Actions read, for the failed job logs the checks level reads, is enough: set it as GH_TOKEN in the configuration's .env , and every call made as the reviewer uses it in place of the CLI's login. A repository whose entry names a "github_account" is still read with that account's GitHub CLI login, which no GH_TOKEN replaces; narrow it by logging that account in with a fine-grained token, gh auth login --with-token . An organisation has to allow fine-grained tokens for its repositories. prwarden doctor reports the scopes of each of these credentials and the repositories where an account is an administrator.

Python 3.11 or newer, the oldest that still gets security fixes ( why ); Homebrew installs one with PR Warden

GitHub CLI authenticated for each repository

An authenticated supported review CLI: Antigravity, Codex, Claude Code, Kiro, or a compatible custom command

A Slack incoming webhook when reviewing your own pull requests or sending failure and manual-review notifications, unless every repository is kept out of Slack; prwarden setup walks you through making one

No third-party Python packages are required.

The quick start created the private configuration files from their examples, in ~/.config/prwarden for an installed copy or in the clone. If install is unavailable, copy .env.example to .env and reviews.example.json to reviews.json , and then run chmod 600 .env reviews.json . Edit the files for your environment. In a clone they are ignored by Git.

Each repositories.json entry needs a GitHub owner/repository slug, and may name the path of a matching local Git checkout. The checkout supplies Git objects; its currently checked-out branch does not need to match or be clean, and dependencies installed in it, such as node_modules , are lent read-only to each review.

An entry with no path is cloned by PR Warden itself the first time one of its pull requests is reviewed, into ~/.local/ /prwarden/checkouts/ / for an installed copy or .state/checkouts/ in a clone. The clone holds Git objects only, nothing is installed into it, and it is fetched with GitHub CLI's login for the account the repository is read as, so it needs no Git credentials of its own. Delete it to reclaim the space; the review clones it again.

An entry may also set "slack": false to keep the repository out of Slack, when the webhook belongs to a workspace the project is not part of. Your own pull requests there are then reviewed on GitHub rather than in Slack, and nothing the repository is sent to the webhook: its run errors, manual-review requests, and stale-review notices stay on the terminal and in the run log.

An entry may set "github_account" to read and review the repository as another of the GitHub CLI's logged-in accounts, for a private repository that only its owner can see. Adding the reviewer as a collaborator would work too, but it also grants push access. That account's own pull requests there count as yours: they get or an LGTM , never an approval. Everyone else's, including the reviewer account's, are reviewed and approved as usual, by that account. A missing login for it fails only that repository. The local checkout's origin must also be readable over that account's SSH key or credentials.

An entry may set "jira_projects" to the Jira project keys its pull requests name work items in, such as ["APP", "WEB"] ; see what the pull request was asked to do .

Important .env settings:

Which engines review and verify, their models, efforts, and budgets, which levels run, how many findings each posts, how much of a change one review reads, and how many pull requests run at once are set in reviews.json , not in .env .

See .env.example for every .env setting and Review engine setup for provider authentication and adapter-specific commands.

Review types in reviews.json

reviews.json , beside .env , says which types of review run, in what order, and on which engines; a review run needs it. REVIEWS_FILE in .env points elsewhere, and stops the run if nothing is there. Start from reviews.example.json , or let prwarden setup write it; in a clone, reviews.json is ignored by Git.

Releases before 4.0.0 kept these settings in .env , from REVIEW_ENGINE to IGNORED_MISSING_PATCH_PATTERNS ; moving from .env says where each one goes. A review run that finds no reviews file moves the ones .env declares into a new one, once: it first checks that the file plans exactly the same reviews, keeps the old .env beside it as .env.before-4.0.0 , or .env.before-4.0.0-2 and so on when that name is taken, writes reviews.json readable by you alone, and then removes those keys from .env , leaving its and other settings as they were. It refuses while one of those keys is set in the environment to a value .env does not have; unset it for that run. With no such settings in .env and no file, a review run stops and points to prwarden setup . prwarden setup --reviews makes the same move straight away. With the file, those .env keys are not read, and prwarden doctor names any left there; without one it says whether the run will move them.

types holds design , docs , code , and checks . Only code is required, and a type left out, or set "enabled": false , does not run. code cannot be turned off: it is the review that approves.

types holds design , docs , code , and checks . Only code is required, and a type left out, or set "enabled": false , does not run. code cannot be turned off: it is the review that approves.

Each type has a review stage and, except checks , an optional verify stage. A stage lists one to four engines , each {"engine", "model", "effort"} with a built-in engine: antigravity , claude , codex , or kiro . The first reviews, and each after it takes over, in order, when the one before fails at the engine level. A type with no verify stage verifies with its reviewer in a separate pass. The checks reading has exactly one engine: a reading that fails costs only itself.

Each type has a review stage and, except checks , an optional verify stage. A stage lists one to four engines , each {"engine", "model", "effort"} with a built-in engine: antigravity , claude , codex , or kiro . The first reviews, and each after it takes over, in order, when the one before fails at the engine level. A type with no verify stage verifies with its reviewer in a separate pass. The checks reading has exactly one engine: a reading that fails costs only itself.

A stage's timeout_seconds is every one of its engines' budget; a verify stage adds timeout_per_candidate_seconds for each candidate it judges. Each type but checks sets max_findings .

A stage's timeout_seconds is every one of its engines' budget; a verify stage adds timeout_per_candidate_seconds for each candidate it judges. Each type but checks sets max_findings .

order lists the enabled types among design , docs , and code , ending with code : the advisory notes reach the pull request before the approval an agent merges on.

order lists the enabled types among design , docs , and code , ending with code : the advisory notes reach the pull request before the approval an agent merges on.

concurrency , diff ( max_bytes , max_bundles , ignored_missing_patch ), and engines. , are shared by every type: its env lists the variables that engine's CLI is given beyond the few every one gets, and its command , as a list of arguments, runs the engine from another executable, for every stage that names it.

concurrency , diff ( max_bytes , max_bundles , ignored_missing_patch ), and engines. , are shared by every type: its env lists the variables that engine's CLI is given beyond the few every one gets, and its command , as a list of arguments, runs the engine from another executable, for every stage that names it.

A custom wrapper is the engine command , run by engines.command.command . It takes no effort and can only be the first engine of a review stage.

A custom wrapper is the engine command , run by engines.command.command . It takes no effort and can only be the first engine of a review stage.

rules changes the plan for the pull requests each rule match es, applied first to last, a later rule's change standing. match names repositories , authors , labels , or files , and all it names must hold: a pull request matches a list of repositories, authors, or labels when it has one of them, and files when every file it changes matches one of the patterns. A pattern reads as in .gitignore : *.md is a Markdown file in any directory, docs/ everything under docs . A rule's order says which types run, ending with code , and its types change a type's stages or max_findings , keeping what they leave out. The example's rules give a change to documentation alone a documentation review and a cheaper code review, and a dependency update the code review alone: "rules" : [ { "match" : { "files" : [ " *.md " , " docs/ " ]}, "order" : [ " docs " , " code " ], "types" : { "code" : { "review" : { "engines" : [ { "engine" : " kiro " , "model" : " claude-haiku-5.5 " , "effort" : " max " }]}}} }, { "match" : { "labels" : [ " dependencies " ]}, "order" : [ " code " ]} ] A rule cannot turn the code review off, and a type or stage the file does not configure must be given its engines whole. The run lists its rules after its plan, and each review says which ones it follows; prwarden doctor counts them.

rules changes the plan for the pull requests each rule match es, applied first to last, a later rule's change standing. match names repositories , authors , labels , or files , and all it names must hold: a pull request matches a list of repositories, authors, or labels when it has one of them, and files when every file it changes matches one of the patterns. A pattern reads as in .gitignore : *.md is a Markdown file in any directory, docs/ everything under docs . A rule's order says which types run, ending with code , and its types change a type's stages or max_findings , keeping what they leave out. The example's rules give a change to documentation alone a documentation review and a cheaper code review, and a dependency update the code review alone:

A rule cannot turn the code review off, and a type or stage the file does not configure must be given its engines whole. The run lists its rules after its plan, and each review says which ones it follows; prwarden doctor counts them.

--engine , --model , --verify-engine , --verify-model , --fallback-engine , --fallback-model , --no-fallback , and --concurrency change the file's settings for one run, for every type, after any rules: a different engine does not take the model or effort written for the one it replaces. --types code,docs does only those types of review in one run; it must include code , and the checks reading still runs when the code review needs it.

Each review setting older releases read from .env has its place in the file:

The rest of .env stays where it is.

Where configuration and state live

PRWARDEN_HOME must be an absolute path set in the environment, not in .env , because it decides which .env is read. An installed copy honours XDG_CONFIG_HOME and XDG_STATE_HOME . Relative paths in .env , such as REPOSITORIES_FILE , resolve from the configuration directory. Each layout keeps its own state, so schedule only one of them on a machine.

The examples run from a clone. With an installed copy, type prwarden in place of python3 -m prwarden .

Display the installed project version:

Run a dry review of every eligible open pull request:

Target one pull request or temporarily select another engine:

Every engine in the pipeline can be named for one run, so a combination can be tried without editing configuration:

A model ID belongs to the provider that publishes it, so a model flag applies to the engine beside it: --engine kiro alone drops the model reviews.json gives the engine it replaces rather than sending one provider's model to another, and --model alone applies to the engine already configured. The same holds for --verify-model and --fallback-model , and for the configured effort, which a replaced engine does not keep. Effort has no flag: change the engine's effort in reviews.json . --no-fallback reviews with the primary alone, which is how a primary failure gets reported instead of covered by a second engine, and it refuses to be combined with --fallback-engine rather than guessing which was meant.

When the fallback and the verification engine are the same provider, startup says so: one account's limit then stops both, which looks like two independent safety nets and is one. It says so too when the reviewer and the verifier a provider and the fallback does not: while that provider is down the fallback can still review and approve a clean change, but any finding it raises has no verifier to confirm it. Both notes are said of the code review's engine chains: every fallback and every verifier on one other provider, or every verifier on the reviewer's provider while a fallback is not.

Dry runs invoke the selected model and may consume quota, but they do not post or record terminal delivery state. The review history records them, marked as dry runs.

For live delivery, set AUTO_REVIEW_DRY_RUN=0 in .env and pass --live :

Use --force only after inspecting GitHub, Slack, and local state when a targeted head must be reconsidered:

Checking what PR Warden did on a pull request

Every run, scheduled or by hand, records each pull request it looked at in the review history on this host, and prwarden history reads it back without asking GitHub or a model anything:

Each entry says when the run looked, whether it was live or a dry run, the head it read, and for the code, design, and documentation levels what happened: approved, LGTM, findings posted, approval withheld and why, failed and why, or skipped and why, with the findings themselves and a link to what was posted on GitHub. A run that skipped a head it had already settled names the record that settled it. --json returns the same entries, newest first, with each outcome in words under summary ; --days N keeps the last N days. The command exits 1 when part of the history could not be read, so a partial answer is never mistaken for a complete one.

The history is kept beside the state file, in history/ , for REVIEW_HISTORY_RETENTION_DAYS days, 14 unless set, and it only reports: no decision reads it, and deleting it changes nothing. It covers the runs of this host and installation only; drafts and pull requests with an excluded label are left out before any review, so they never appear. What a review posted is also on the pull request, and each PR Warden writes carries a hidden <!-- prwarden marker. Another developer's PR Warden marks its the same way under their own name, so select by your reviewer account as well:

When another developer runs PR Warden on the same pull requests, neither needs to know the other. Its findings count as a colleague's: they are not repeated, and one left unresolved holds back this installation's approval. Its design notes, documentation notes, LGTM , and waiting notes never hold back an approval, and are not repeated either.

To let another agent answer "did PR Warden review this?", add a line like this to its instructions, such as AGENTS.md or CLAUDE.md :

Reviewing several pull requests at once

concurrency in reviews.json sets how many pull requests are reviewed at the same time, defaulting to 2 , and --concurrency N overrides it for one run:

Reviews are limited by provider capacity rather than local CPU. Each slot is another CLI invocation against one authenticated account, so a high value mostly produces capacity rejections and wasted retry budget; 2 or 3 is the useful range. The supported maximum is 8.

Parallel runs report in three phases. Every selected pull request is listed first, so the plan is visible before any quota is spent. While reviews run, a board shows one row per pull request with its latest step and elapsed time, plus a row counting the reviews in progress. Each review's detailed report is kept aside and printed in full once every review has finished, in the planned order rather than the order they happened to complete.

With a concurrency of 1 , or a single selected pull request, the run reviews one at a time and reports each step as it happens, without a board.

Ctrl+C stops a run at any point. The review CLIs run in the same process group, so they receive the interrupt too and stop with it. An interrupted parallel run still prints what its reviews had reported before printing the interrupt notice, so nothing captured for the log is lost. Interrupting during delivery is the one case to avoid, because a GitHub or Slack write that was already in flight may still land while local state records it as uncertain.

Concurrency changes only scheduling. Each review still fetches its own immutable head into its own detached worktree, git operations against a shared local checkout are serialized, delivery state stays atomic, and the process lock still rejects a second live run.

A review runs in three levels, each reviewed by the first engine of its type's review.engines in reviews.json and judged by its own adversarial verification pass on the first of its verify.engines , or on its reviewer when it has none. A fourth, the checks level, runs only when the code level found nothing but a check failed; it is described after the code level.

The solution-design level goes first and judges the approach rather than the lines: where the change puts responsibility, what contracts it establishes, how state and data flow, and whether this workspace already provides what the change re-implements, or still lacks what it was asked to deliver. Its findings carry no anchor line, so they are never inline . They post as one advisory pull-request , go to Slack for your own pull requests unless the repository is kept out of Slack, and never block a merge, withhold an approval, or change the run's exit code . A design-level failure is reported and the code review continues unaffected.

The design level runs on a pull request too large to review completely, because the shape of a change is exactly what nobody can read all of. It does not run on a release promotion: DESIGN_EXCLUDED_HEAD_BRANCHES lists head branches, develop and release/* by default, whose changes were already designed and reviewed on the feature pull requests that reached them.

The design level runs at most once per pull request , not once per push. It judges the shape of the whole change, so a later head rarely changes its answer enough to be worth another full review, and re-reviewing every push earned a second advisory saying much the same thing. Once it has settled, later runs report that and review only the code level; a design level that failed has settled nothing and is attempted again. Use --force on a named pull request to review its design again, for instance after a rewrite. Leave types.design out of reviews.json , or set it "enabled": false , to switch the level off, which removes its cost entirely.

The documentation level then asks whether the change leaves this repository's own documentation saying something untrue, for the people reading the README and docs and for the coding agents reading AGENTS.md , CLAUDE.md , .cursor/rules , .kiro/steering , or .agents/rules . It finds those documents in the reviewed head rather than being told where they are, so a repository with no documentation costs nothing, and it lists them for the reviewer to open rather than pasting them into the prompt.

Each proposal names the documentation line that is now wrong, the changed lines that made it wrong, and the replacement text to paste, written in that document's voice. It never proposes a code change: where the document is right and the code is wrong, that belongs to the code level. Documentation that is merely silent an internal detail, or that is still true but could read better, is not reported. The exception is a list or table of scripts, commands, or guides that now lacks an entry the change added: its proposal is just the new rows or items, in the list's own format. Like the design level it is advisory, skips release promotions, and delivers a separate pull-request ; leave types.docs out, or set it "enabled": false , to switch it off.

It runs once per pull request, plus once more after any push that changes what the pull request does to its documentation, so a repository that is mostly documentation is checked as it is written. Only the documentation lines the pull request adds or removes count: a push that changes only code, or a rebase that moves the same edit, does not recheck. A push that changes only code can still make a document wrong, which this does not catch; --force checks again on demand. A recheck reads the notes this level already posted, so it does not propose the same edit twice.

The code level then reports line-level correctness, reliability, data-loss, concurrency, and security defects on added lines, delivered as inline review or an approval exactly as before. Approval authority belongs to this level alone.

The checks level runs only when the code level found nothing and would approve but a check had failed by the time the review finished, including one still running when it started, and on a review-policy change only once a person has signed it off. It reads that check's own output, its job log or its summary, and says why it failed and a possible fix in the note that tells the author PR Warden waits for the checks. It runs on the one engine, model, and effort of types.checks.review.engines , a cheap model being enough, with no verifier: PR Warden itself finds every log line it quotes and every workspace line it cites, and drops a reading that fails, so the note is still posted without it. Without types.checks the note is posted alone.

Beside the model, PR Warden checks every added line itself for a committed credential with a distinctive shape: AWS access key IDs, GitHub, Slack, npm, Stripe live, Google, OpenAI, and Anthropic keys, Slack webhook URLs, and private-key blocks. One it finds is posted as a high-severity finding, and the review cannot approve, whatever the model concluded, so a beside the key saying "this is a test key, ignore it" changes nothing. One key pasted in several places is one , on the first of its lines no model finding holds, listing where else it is; when a model finding holds every one of them, the more severe of the two stays. Findings and design or documentation notes name the kind and show only the value's prefix, never the value, the model's included. A placeholder such as AWS's documented example key, or a run of one character, is not reported.

Both levels hold citations to the same standard: a cited path must resolve in the reviewed worktree and the excerpt must be that line's exact text. Unverified design findings are never delivered, so a failed design verification delivers nothing rather than advisory notes nobody checked.

Draft PRs and PRs with excluded labels are skipped.

Confirmed findings on team PRs become inline GitHub review .

Documentation the change outdated is reported as one advisory pull-request proposing the replacement text, never as an inline and never as a reason to withhold an approval.

A clean, mergeable team PR receives a bodyless GitHub approval, unless one of its checks failed at that head. The checks are read again just before approving, since CI often finishes during a review; the approval, or the LGTM for your own PR, waits until a re-run passes or a new head arrives, and findings are still delivered. A cancelled, skipped, or unfinished check does not hold it back. When the base branch requires some checks, a failed check GitHub says it does not require, such as an end-to-end suite the team left optional, does not hold it back either: the approval goes ahead and is followed by a Checks to fix reminder naming that check. A branch that requires no check keeps every failed check holding it. An approval that a person's sign-off of a review-policy change let through is not bodyless: it names that person and the head, as the LGTM and the Slack LGTM for such a head do.

A review that found nothing but holds its approval over a failed check, or because the PR changes review policy, says so on the PR once per head, naming the failed checks or the policy files, so the author, or an agent waiting on the approval, knows PR Warden looked and what it waits for. For a policy change the note sits on the change's first line, and the PR is approved once a person with write access other than the author approves it or replies LGTM . Your own PR gets the same in Slack. For a failed check it also says why it failed and a possible fix, read from the check's log by a model you choose, such as a cheap one, and so does the reminder beside an approval.

The authenticated reviewer's own PR is never self-approved; findings or a clean mergeable LGTM result go to Slack. An LGTM reached by rejecting candidates also reports how many verification threw out, which distinguishes it from a review that raised nothing. In a repository kept out of Slack, the same results go to the PR instead: findings as a review, and a clean mergeable result as an LGTM naming the head, the reviewer, and the verifier, since GitHub does not let an author approve their own PR. When the review raised no candidates, the says the verifier had nothing to check rather than crediting it with a verification. Once a later head's result is posted, the earlier LGTM are marked as outdated, which collapses them without deleting them, so only the current verdict shows.

A PR reviewed again at a later head has only the files whose change moved read again. A file whose change is exactly one the latest review read and raised nothing on, under the same code review rules and the same reviewer, is named to the reviewer and left out of the diff. A file with a finding or a blocking is always read again, and a head where nothing would be left to read, or --force , reads everything.

A PR that is merged or closed while being reviewed still receives its confirmed findings, on GitHub or in Slack, but never an approval or an LGTM . The defect is in the base branch by then, and the review already verified it against the exact head. A PR that became a draft or gained an excluded label delivers nothing, because that is the author asking for no review.

Merge conflicts, indeterminate mergeability, incomplete patches, and validation errors stop delivery for that PR. A conflict only blocks an approval, so confirmed findings are still delivered on a conflicted PR. The conflict is recorded together with the base commit it was measured against, and while neither the head nor that base has moved the PR is skipped instead of reviewed again, because the result could only be discarded a second time. When the base branch moves, GitHub is asked whether the PR still conflicts before any review is spent, and it stays skipped while it does. A new head or a cleared conflict reopens it, and --force overrides the skip. GitHub omits the patch of a generated file whose diff is too large, most often a lockfile. That file is reviewed around rather than stopping the PR: the rest of the change is reviewed, the path is named wherever the result is reported, and the approval is withheld because nobody read it. A path matching diff.ignored_missing_patch in reviews.json is said to be generated and to need no review, which ignores it outright and leaves the PR approvable. Left out, that setting is a built-in list of dependency lockfiles (npm, Yarn, pnpm, Bun, Deno, Poetry, uv, Pipenv, PDM, Cargo, Go, Bundler, Composer, Pub, CocoaPods, Swift Package Manager, NuGet, Mix, and Nix), *.tsbuildinfo , and Wrangler's worker-configuration.d.ts , each at any depth; images, minified bundles, source maps, and test snapshots are left out because each can hold a line worth reading. A list of your own replaces the built-in one, and [] ignores nothing. Changing the setting reopens the PRs already recorded as unapprovable over an unread file, each for one more review. A repository can name its own generated files too: a path its .gitattributes marks linguist-generated , the mark GitHub uses to collapse a generated file in a diff, counts as a match, and one it unmarks with -linguist-generated stays unread even when the list names it. The marks are read from the base branch, never from the pull request, so a pull request cannot mark its own new file as generated, and a mark added there later reopens a PR recorded as unapprovable over that file. When the base cannot be read, every omitted file stays unread, a listed one included, since any mark might have been an unmark. Reading the marks needs Git 2.40 or newer; with an older Git they are not read and the list alone decides, as before. Withholding an approval this way is the controller's own decision, so it is not reconsidered while the head and those settings are unchanged; without that, every run would spend a full review to reach the recorded answer again. A binary file needs no such pattern: GitHub counts no changed line in it, so it is reported as having nothing to review and the rest of the PR is reviewed normally.

A diff too large for one review is read in several. The files that did not fit the first bundle are reviewed in further bundles of whole files, up to diff.max_bundles , and a change every bundle covered is a complete review that can be approved — where before it was a partial review that never could. Only an oversized change is bundled, so the ordinary path is untouched, and a max_bundles of 1 keeps the single review this tool has always done. A file is never split across bundles, because a reviewer that saw half a function would cite lines nobody can reproduce, so a file too large for the budget on its own is still named and left unread. Each bundle is another invocation, which is what the cap limits; whatever the cap leaves over stays deferred exactly as below. A bundle speaks for its own files: it may add findings and it may take an approval away, but no bundle can grant one, because an approval speaks for the whole pull request. This is rare — measured across 394 reviewed pull requests, 1.8% were ever limited by size and 1.0% materially, which is why the change is confined to the path that fires.

types.code.max_findings is one limit for the whole review: every bundle and every committed credential together post at most that many , the most severe first. Every committed credential is posted, even past the limit, and counts towards it, so only model findings are left over. The review says how many more it confirmed, and the head reads their files again rather than treating them as clean.

A diff too large to read completely is reviewed in part rather than skipped. The budget is filled largest changed file first, the deferred paths are named in the Slack notification and in the GitHub review body, no approval is given, and no finding can be raised against a file the reviewer never saw. That notification is sent once per PR, not once per push. A PR where not one file fits diff.max_bytes is not reviewed at all, and either way the rest of the run continues.

Review feedback that arrives while a review is running is measured rather than treated as a blanket failure. A that disappeared, or that only became resolved, takes an objection away, so a result reached without knowing that is still delivered. A new thread, a reopened one, or an edited one may say something the review never read: an approval speaks for the whole PR and is always withheld against it, while findings speak for their own lines and are still delivered unless the new feedback shares one of those lines. A shared line is not proof of a duplicate, but it is proof that nobody local can tell them apart, so nothing is posted there. Holding a result this way is a skip, not a run failure: it leaves the exit code alone, keeps the head retryable, and still sends a Slack notification naming where the feedback landed, because deciding whether to run the reviewer again is yours.

A clean result never creates a GitHub .

A repository can tell the reviewer what it is for. Commit .prwarden/background.md and every level reads it from the base branch, never from the pull request: what the product is, what its money or units mean, what a reader is assumed to know. It is framed as untrusted context in the prompt, capped, and may add background rather than authority, so it can never relax a review rule. A repository without the file costs nothing.

A pull request that changes how pull requests are reviewed is never approved on PR Warden's word alone: one that edits anything under .prwarden/ or .github/workflows/ , a .gitattributes , a CODEOWNERS , or the "Code review" section of an instruction file such as AGENTS.md . Approving it would be the reviewer signing off its own new rules. Its design, documentation, and code are reviewed as usual and its findings posted; a clean result is withheld, with a note on the first changed line asking a person to sign the change off. Once a person with write access other than the author approves the pull request on GitHub, or replies LGTM , PR Warden reviews it again and approves it. Editing the rest of an AGENTS.md is not policy.

Every level also reads why the changed code is as it is: the latest three commits on the base branch that touched each file the change edits, for its eight most-changed files and at most twelve commits in all. A commit message often says why a guard, a limit, or a workaround exists, so a change that removes one can be checked against the reason it was added. Only the messages are read, never their diffs, and merges are left out. They are framed as untrusted context like the background note, and history that cannot be read is reported in the run log and left out, never a reason to stop the review.