Configuring Cerbie for a repository
Shape how Cerbie reviews your repository with a .cerbie/ folder: config, instructions, rules and checks.
Cerbie reviews every pull request in repositories where the Cerbie GitHub App is installed. It works with no configuration at all. Everything in this guide is optional and lives in a .cerbie/ directory in the repository being reviewed, so anyone who can open a PR can improve how their project is reviewed.
.cerbie/
├── config.yaml # settings: triggers, ignored paths, review profile, approvals
├── instructions.md # always-on guidance for reviewing this repository
├── rules/ # guidance scoped to paths (one topic per file)
│ └── api-handlers.md
├── checks/ # custom checks: each file becomes its own GitHub check run
│ └── migration-safety.md
└── escalation/ # high-risk categories that need an approver's sign-off
└── identity-access.md
apps/billing/.cerbie/instructions.md # nested instructions apply to apps/billing/** only
Cerbie reads .cerbie/ from the PR’s base branch, not from the PR itself. A pull request cannot weaken the rules it is reviewed against. Changes to .cerbie/ take effect for PRs opened after they are merged. Comment @cerbieai config on any PR to see the configuration Cerbie is using.
How Cerbie decides what to say
Three layers of guidance are combined for every review:
- The Cerbie review policy (in the Cerbie repository,
apps/worker/src/review/prompts/policy.md). This holds the organisation-wide standards: what counts as critical, the evidence a finding needs and when to ask for tests. Change it with a PR tolleverage-ai/cerbie. - Organisation instructions, edited by Cerbie admins in the dashboard (Settings).
- Repository guidance: everything in this guide, plus the convention files your coding agents already read:
AGENTS.md,AGENT.mdandCLAUDE.md, at the root and in any directory above a changed file.cursor/BUGBOT.md, at the root and nested.github/copilot-instructions.md.github/instructions/*.instructions.md, honouringapplyTo. Files withexcludeAgent: code-revieware skipped.
Repository guidance can add standards and context. It cannot switch off the review policy’s safety rules. For example, it cannot tell Cerbie to approve without reviewing.
config.yaml
Every key is optional. This shows all keys with their defaults:
version: 1
reviews:
enabled: true # false turns Cerbie off for this repository
auto_review: true # review on open and push; when false, only on `@cerbieai review`
drafts: false # review draft PRs automatically
base_branches: [] # globs of base branches to review; empty = default branch only
ignore_authors: ["dependabot[bot]", "renovate[bot]"]
ignore_labels: ["cerbie:skip"]
ignore_title_patterns: ["^\\[?WIP\\]?\\b", "^DO NOT MERGE"]
debounce_seconds: 15 # wait this long after a push before reviewing, to batch pushes
# risk_acceptors: [alice, acme/leads] # who may accept a risk in a reply; unset = anyone's reasoned deferral is judged. See "Replies"
# command_bots: ["my-agent[bot]"] # other Apps' bots whose commands and thread replies Cerbie takes; unset = none. See "Commands"
paths:
ignore: [] # globs Cerbie does not review (still listed in the summary)
risk: # globs that always get a deep review with a security pass
- pattern: "apps/app/src/server/auth/**"
reason: authentication
summary:
enabled: true # post the sticky summary comment
walkthrough: true
diagrams: auto # auto | always | never
description: "off" # off | append (managed block at the end) | placeholder (replaces "@cerbieai summary")
review:
profile: balanced # chill | balanced | assertive
block_on: should_fix # critical | should_fix | never: which findings request changes; the rest approve with comments
min_confidence: 80 # findings below this confidence are dropped
max_suggestions: 3 # optional suggestions per review
language: en-GB
ticket:
enabled: true # read the linked Linear ticket and check requirements
pattern: "\\b[A-Z][A-Z0-9]+-\\d+\\b"
approval:
mode: approve # approve: submit GitHub approvals; comment: never approve
trusted_authors: [] # authors whose PRs Cerbie may approve at any size (empty = everyone)
human_approval_line_limit: 1001 # untrusted authors at or above this many changed lines need a human
checks: # built-in deterministic checks (no LLM, no installs)
dependencies: true # new npm packages: existence, age, deprecation, licence, unpinned sources;
# known vulnerabilities (OSV) in the versions of added or changed ones
lockfile: true # dependency changes without a lockfile update
secrets: true # high-confidence credential patterns in added lines
migrations: true
workflows: true # zizmor and actionlint on changed GitHub Actions workflows and actions
context:
guidelines: ["AGENTS.md", "AGENT.md", "CLAUDE.md", ".cursor/BUGBOT.md", ".github/copilot-instructions.md"]
escalation: # high-risk changes; see "escalation/*.md" below
mode: "off" # off | advisory | enforce
# approvers: my-org/approvers # the team that signs off, as org/team-slug; no default
label: risk:high # label for a high-risk PR
The secrets check recognises private keys and credentials with a distinctive prefix or shape: AWS, GitHub, Slack (tokens and webhook URLs), Stripe live keys, Anthropic, OpenAI, Google API keys, Cloudflare, Linear, Sentry, PostHog personal keys, npm, PyPI, GitLab, SendGrid, Azure AD client secrets and storage account keys, Hugging Face, Databricks, Doppler, Shopify, DigitalOcean, Grafana, HashiCorp Vault, age, Postman, Pulumi, Notion and Heroku. Most formats come from the Gitleaks and Betterleaks rule sets; keyword-and-entropy rules are left out as too noisy. Stand-ins (test, xxxx, runs such as abcdef) are ignored, and a value that does not look generated is reported at should-fix in tests.
The vulnerability check asks OSV about each npm dependency the PR adds or changes, at the version it will install: the version the PR’s lockfile change shows for that dependency, else an exact specifier, else the lower bound of a simple range (^, ~, >=). It skips a dependency when that version is uncertain, and never reports on dependencies the PR leaves alone. A critical or high advisory is should-fix, anything else a suggestion, and so is a range’s lower bound, since the lockfile may install a later version. Withdrawn advisories are ignored. If OSV can’t be reached, the coverage table says so and the review goes on.
Lockfiles are never reviewed line by line. Unknown keys are reported rather than silently ignored: a typo shows up in the review’s coverage section and in @cerbieai config. A mistake in the escalation key is reported the same way and switches escalation off, but leaves the rest of the file in force.
Review profiles
| Profile | Reports |
|---|---|
chill |
Critical issues and clearly important should-fix issues; suggestions rarely. |
balanced |
Verified critical and should-fix issues, and a few valuable suggestions. |
assertive |
Every verified should-fix issue and up to three suggestions. Small PRs still get a full (non-light) pass. |
instructions.md
Plain markdown that every review of this repository reads. Write it for a senior engineer joining the project who needs to review a PR tomorrow: what matters here, what tends to go wrong, and which conventions are deliberate.
# Reviewing the Lleverage app
- Every tRPC procedure that reads organisation data must go through `organisationProcedure`;
a plain `protectedProcedure` on org data lets one organisation read another's.
- Money is stored as integer cents. A float anywhere in billing ends in invoices that are a cent out.
- We deliberately use `void promise` for fire-and-forget analytics; do not flag it.
Good instructions are specific, testable and explain why. Avoid style preferences that a linter could enforce: put those in the linter.
Say what goes wrong when the guidance is broken, not how severe a violation is. Instructions and rules tell Cerbie what to look for and what a violation leads to; they don’t set a finding’s severity. Wording such as “Severity for violations: should_fix” is read as what your team cares about, and each violation is still graded by its own consequence and reach (see Severity): a dropped authorisation check holds the merge, a leftover local style is a suggestion. To give every violation of a policy one severity, write a check.
Nested instructions: apps/billing/.cerbie/instructions.md applies only when files under apps/billing/ change. This keeps area-specific knowledge next to the code it describes.
rules/*.md: guidance scoped by path
Use rules for guidance that only applies to some files. The frontmatter paths (or applyTo, for Copilot compatibility) takes globs:
---
description: tRPC handlers
paths: ["apps/app/src/server/api/routers/**/*.ts"]
---
- Input must be validated with zod at the procedure boundary.
- Never return Prisma models directly; map them to an API type so new columns don't leak.
A rule is included in a review only when at least one changed file matches its paths. Like instructions, a rule doesn’t set the severity of its violations; only a check does.
checks/*.md: custom checks
A check is a rule your team wants enforced on every relevant PR and reported separately, such as “migrations must be backwards compatible” or “new endpoints must have rate limiting”. Each check file becomes its own GitHub check run named Cerbie (<title>), next to Cerbie (Review), so you can see at a glance which policies pass, and make important ones required in branch protection. (Before 2026-10-10 they were named Cerbie: <title>; a branch protection rule that requires one by that name needs updating.)
---
title: Migration safety
description: Database migrations must be safe to deploy while old code is running
include: ["packages/db/prisma/migrations/**"]
exclude: []
severity: critical # severity of each violation: critical | should_fix | suggestion
conclusion: failure # check-run conclusion when violated: neutral (default) | failure
enabled: true
---
Fail when a migration:
- drops or renames a column or table that the currently deployed code still reads;
- adds a NOT NULL column without a default to an existing table;
- creates an index on a large table without `CONCURRENTLY`.
Pass when the migration is additive, or when the PR description explains the multi-step rollout.
| Field | Default | Meaning |
|---|---|---|
title |
file name | Check-run name (max 60 characters). Review (any case) is reserved for Cerbie’s own check run: a check with that title is reported as a configuration problem and gets no check run, though its findings are still in the review. |
description |
— | One line shown in the dashboard. |
include |
["**"] |
Globs of files the check applies to. The check runs only when a changed file matches. |
exclude |
[] |
Globs to leave out. |
severity |
should_fix |
Severity of each violation in the review. |
conclusion |
neutral |
neutral reports problems without blocking. failure fails the check run, which blocks merging if the check is required in branch protection. |
enabled |
true |
Set to false to switch a check off without deleting it. |
Write the body as pass/fail criteria. Checks are for team policy. Don’t duplicate general bug-finding, which every review already does.
escalation/*.md: high-risk changes
Some changes need a sign-off from a particular team before they merge: authentication, secrets, billing, deployment controls. Each file in .cerbie/escalation/ describes one such category of change, and escalation in config.yaml says what Cerbie does about it:
mode |
Effect |
|---|---|
off (default) |
Nothing. Category files are read, and @cerbieai config shows them and any problems with them, but reviews are exactly as they would be without them. |
advisory |
Changes to a category’s paths get a deep review with a security pass, as with paths.risk (documentation and test-only changes still get a light one). A high-risk PR is labelled, the approvers team is asked to review it, and its review explains why (below). Cerbie approves as usual. The Approver sign-off check reports, but never blocks. |
enforce |
As advisory, and the Approver sign-off check fails a high-risk PR until an approver approves its head. Cerbie’s own review, approvals and verdicts are the same as in advisory: the check is the gate. |
approvers is the team, as org/team-slug, whose approval a high-risk PR needs; a leading @ is fine. With mode on and no approvers, Cerbie reports a problem. label (default risk:high) is the label for high-risk PRs.
A PR is high risk once a changed file is in a category’s fixed paths, or someone puts label on it, and it stays high risk for the rest of its life. While mode isn’t off, after each review of a high-risk PR Cerbie:
- adds
labeland onerisk:<category>label per category, creating any the repository lacks; - asks the
approversteam to review it, once per PR (the team must be in the repository’s organisation and able to see it); - opens its review with an escalation note: the categories, each trigger with its reason and file and line, and each category’s approver checklist. A carried-forward verdict and the run’s page in the dashboard show it too, and an approval of a high-risk PR is never posted without a comment.
Someone adding label makes the PR high risk straight away, and Cerbie asks the team then. If someone outside the team removes it while the PR is high risk, Cerbie puts it back. If a member of the team (other than the PR’s author) removes it, that clears the label’s part of the classification: a PR that was high risk only because of the label no longer is, but one with a changed file in a category’s paths stays high risk, and Cerbie puts the label back. Cerbie keeps a record of every trigger, the cleared ones included.
---
title: Identity and access
iso_controls: ["5.15", "8.5"]
paths:
- "packages/auth/src/**"
- "apps/app/src/server/api/trpc.ts"
- "!**/*.test.ts"
- "!**/test/**"
---
Who someone is and what they can reach: sign-in, sessions, tokens, roles and tenant isolation.
## Escalate when
- A route becomes reachable without authentication.
- A permission check or tenant filter is removed, loosened or bypassed.
## Not on its own
- Tests, fixtures and documentation.
## Approver checklist
- [ ] Every new or changed entry point authenticates the caller and checks the organisation.
- [ ] Failure paths deny access rather than allow it.
| Field | Default | Meaning |
|---|---|---|
title |
— | Required. The category’s name (max 80 characters). Its id is the file name, so this one is identity-access. |
iso_controls |
[] |
Controls the category evidences, for audit records. Quote them: unquoted, YAML reads 8.10 as the number 8.1. |
paths |
— | Required. The category’s fixed paths, below. |
paths use the format of a .gitignore file, which is also the format of the file patterns in a GitHub ruleset’s required reviewers, so the same list can go in both. Patterns apply in order, and the last one that matches a file decides: a pattern starting with ! takes back files that earlier patterns matched, and a later pattern can take them back again. A pattern with a / at the start or in the middle is relative to the repository root; one without, such as CODEOWNERS or *.pem, matches at any depth (/CODEOWNERS matches only the root one). * matches within a directory and ** across any number of them, and a pattern that names a directory covers everything in it. Braces and other extended globs aren’t supported, as in .gitignore. Every list needs at least one pattern without !.
The body has a short description of the category and three sections, matched by heading (in any case):
## Escalate when: what a change does that makes it high risk. Required.## Not on its own: what is not enough on its own.## Approver checklist: what the approver confirms. Required.
Problems are reported per file, like checks, and never affect the other files. A file whose frontmatter is invalid is left out; one with a missing or unknown section is kept, since its paths still apply. While mode is off, problems show only in @cerbieai config and the dashboard, not in reviews.
The Approver sign-off check
While mode isn’t off, Cerbie puts a check run named Approver sign-off on each PR’s head, separate from its review’s check. It is worked out again from scratch whenever something it depends on changes: a push, the label added or removed, a review submitted or dismissed, each Cerbie review once it has recorded what it found, and every 15 minutes for open PRs that changed since (in case GitHub didn’t deliver an event). Nothing about it is stored; each time it reads the PR as it is.
| PR | advisory |
enforce |
|---|---|---|
| Not high risk | neutral: would pass | success |
| High risk, with an eligible approval of the head | neutral: would pass, naming the approver | success, naming the approver |
| High risk, without one | neutral: would block, and why | failure: approver sign-off required |
| Cerbie’s escalation check didn’t finish on the head, without an eligible approval | neutral: would block | failure: escalation not verified |
An approval is eligible when its author is in the approvers team, isn’t the PR’s author, didn’t push the head commit to the PR’s branch, didn’t write or commit it, and approved that commit itself. No app’s approval counts, Cerbie’s included. A reviewer’s latest review is the one that counts: a later request for changes, or a dismissal, takes their approval back. A push needs a new approval of the new head. In advisory mode the check is neutral whatever it finds, and GitHub treats a neutral check as passing, so it never blocks a merge.
Who pushed the head comes from GitHub’s own record of pushes to the branch (the repository activity API, which needs the App’s existing read access to repository contents), read each time the check is worked out: everyone whose push, force push or branch creation made the commit the head counts, so a branch reset to an earlier commit excludes each person who pushed it. For a PR from a fork, that is the fork’s record. If the record can’t be read, has no push of the head, or is longer than the 500 entries Cerbie reads, no approval of the head counts and enforce fails the check: “Couldn’t verify who pushed the head”. The head commit’s author and committer (as GitHub links them to accounts; a rebase makes whoever rebased the committer, and GitHub’s web-flow committer is ignored) are excluded too. As defence in depth, keep the branch ruleset’s pull request rule requiring approval of the most recent push by someone other than the pusher (require_last_push_approval).
Until a review of the head has recorded the PR’s classification, the check knows only what earlier reviews and the label recorded. A review that carries or reuses an earlier one, or reviews only what changed since it, keeps that review’s escalation check: if it didn’t finish, the head stays unverified until a full review’s check does, or an approver signs it off. A chain of more than 100 such reviews counts as unverified. A changed file in a category’s fixed paths is covered meanwhile by the ruleset’s required review below.
At the switch to enforce, add Approver sign-off as a required status check in the default branch’s ruleset (Cerbie’s app as its source), alongside the existing ones. Until it is required, a failing check is only a warning. Add it at the switch, not before: in advisory mode it is neutral, which passes.
With a merge queue, the required check has to report on each commit the queue builds as well as on the PR’s head, or the queue waits for it until it times out. Cerbie hears of those commits from the push to the queue’s branch (gh-readonly-queue/<base>/pr-<number>-<sha>) and puts the PR’s result on them, and it brings them up to date whenever it works the PR’s check out again while they are in the queue. This needs nothing beyond the App’s existing push event; if your App is subscribed to merge_group, Cerbie handles that event the same way. Re-running the check from GitHub works it out again.
GitHub keeps one check of a name per commit. When a commit is the head of more than one open PR, Cerbie asks GitHub which open PRs have it as their head each time it writes the check, works out each one’s result with the settings at its own base, and writes the strictest (a failure, then neutral, then success), naming each PR’s result. Every write to a commit’s check, whichever PR or event asks for it, reads and publishes one after another, so a PR that needs a sign-off keeps the commit failing however the writes interleave. When a PR moves to another commit or closes, the check on the commit it left is worked out again from the PRs still on it. A PR’s merge-queue commits are its own, so they always carry its own result.
Keeping the ruleset in step
Cerbie’s escalation works alongside a GitHub ruleset on the default branch whose pull request rule requires a review by the approvers team for the same paths (required_reviewers), so those paths need the team even if Cerbie is down. cerbie ruleset prints that required_reviewers value from your clone’s category files (CLI docs); an organisation admin applies it.
While mode isn’t off, Cerbie compares the two. It reads the default branch’s rules (with the App’s read access to repository metadata), takes the file patterns of each required review by the approvers team, from every ruleset on the branch, and compares them with what cerbie ruleset prints: every category pattern that isn’t a negation, then every negation, each once. Two patterns count as the same only if their text is identical; Cerbie doesn’t work out whether different patterns cover the same files, so /src/** and src/** differ. It reports:
- patterns the ruleset lacks. Each required review stands on its own, so a negation counts only if every required review that lists one of the categories’ paths has it too;
- patterns no category lists;
- negations a required review puts before a pattern they should take files back from, since a negation only applies to the patterns before it (where a pattern repeats, its last occurrence counts).
The order of the other patterns doesn’t matter.
A difference is a warning only, never a hold or a block. It shows as one line under the coverage table of reviews of PRs to the default branch, and in full on the repository’s page in the dashboard. Reviews make no extra GitHub request while mode is off. If the rules or the team can’t be read, the dashboard says so and reviews say nothing.
The audit record
While mode isn’t off, Cerbie keeps a record of each high-risk PR for audit evidence:
- when it was classified and why: every trigger, with the file and line, or who added the label, and whether an approver cleared it;
- the mode;
- when the Approver sign-off check first failed it on a head (enforce mode), and who signed it off on which commit;
- the merge, with its head and merge commit.
Within the hour after a merge, Cerbie checks from GitHub whether an eligible approval stood on the merged head: from a member of the approvers team who is neither the PR’s author nor whoever pushed the head, on that exact commit. No app’s approval counts, Cerbie’s included. It checks again until a check runs 30 minutes or more after the merge, so a trigger a review records as the PR merges still counts. A failed check is tried again the next hour. A PR merged without an eligible approval is flagged; nothing is blocked or undone. Who pushed the head comes from the push’s webhook, so it is best effort, and the record says where it came from.
The dashboard’s Escalations page lists the records with filters for repository, date range, category and status, and exports them as CSV, one row per PR. Each export is written to the audit log. The repository page shows the escalation mode, approvers, label, categories and any problems with the category files.
Built-in behaviour worth knowing
-
Incremental reviews. After the first review, Cerbie reviews only the files whose part of the PR’s diff changed since the last reviewed commit. It re-checks its earlier findings, lists fixed ones in the new review (and, separately, any it withdraws as no longer holding up) and resolves their threads. Earlier comments are never edited; if someone replied on a fixed finding’s thread, Cerbie adds a “✅ Addressed in
abc1234” reply there first (unless it already answered last). A force-push or rebase that rewrites the last reviewed commit triggers a full review, as does changing the PR’s base branch, re-running the Cerbie check, and@cerbieai reviewon a commit that was already reviewed. If nothing in the PR’s own diff changed (you merged the base branch in, say, or the new commits touch only ignored files), there is nothing new to review: Cerbie keeps its last verdict for the new commit, moves its checks there and posts no new review. It posts a short one only if its standing review no longer says the same, for example when the push dismissed its approval. If Cerbie’s own review logic was updated since that verdict, it reviews the whole PR again instead of keeping it. Changes that arrive from the base branch are left to your CI. Before each incremental review, a cheap check (no model call) decides whether a full review is needed instead:- the merge base moved and Cerbie can’t tell what that did to the PR’s diff (a review recorded before this check existed);
- the PR now needs a deeper review or a specialist (security, data, contracts) it hasn’t had;
- the new commits change at least half the PR’s lines.
Neither the number of incremental reviews so far nor the age of the last full review is one of them: a PR isn’t read again in full for having been reviewed often or long ago.
A change to this repository’s review rules (
.cerbie/, guidelines, org instructions) is not one of them: what the next review covers is reviewed under the new rules, and the rest of the PR isn’t read again. Only the rules that apply to the PR’s files count (guideline files at the root and in the directories above a changed file, and.cerbie/rules, instructions and checks whose paths match). A custom check that is new or was changed since the last review is the exception: it runs over the whole PR, since none of it was checked against it. Every custom check that applies to the PR reports at every reviewed commit: one with nothing new to read keeps its last result, so a requiredCerbie (<check>)status is never missing after a push.If the new commits change exports that unchanged PR files import, those files are reviewed too, for how they use what changed, however many there are (the whole PR only if its files can’t be searched for the imports). The review says when and why its scope changed, and every review of the whole PR after the first says what caused it (
Full review: …); the dashboard shows the same reason on the run.@cerbieai full reviewalways reviews everything.Late findings. Reading the same code again keeps turning something up, so a follow-up review that finds a problem in code the last complete review had already read, on lines unchanged since, posts it as a suggestion marked Found late instead of asking for changes. A critical one still blocks. It is posted on top of
max_suggestions, and stays a suggestion in later reviews while its file stays unchanged. This doesn’t apply to a finding with any place on lines changed since that review, to a custom check’s finding, to one that cites written guidance when the rules that apply to the PR have changed since its file was last read, to one from a specialist reviewer the PR didn’t have before, to a file reviewed only because the push changed what it imports, or to a full review you asked for (@cerbieai full review, a re-run of the check), which blocks on whatever it finds. The first review of a PR is never affected.Fix-only pushes. When the last review requested changes and every line the new commits change (outside tests and ignored files) is within 15 lines of a finding it left open, Cerbie reviews only the fixes (after you merge the base branch in, only your own changes since the last review count, not what came in from the base): each finding’s fix is checked against its rule and the cases it must keep working, and nothing else is reviewed again, however large the fix or many the rounds. The review rules must be the same as at the last review, the PR mustn’t need a deeper review or a specialist it hasn’t had, no file may have left the PR, and the fix mustn’t change exports other PR files use; otherwise the push gets the review above. Something new the fix introduces blocks only if it’s critical; anything else is posted as a suggestion, within
max_suggestions(a fix that breaks its finding’s rule or one of its cases keeps that finding open). When every fix holds and nothing blocking is left, Cerbie approves. If you already got Cerbie to confirm every finding fixed in reply at the new commit, it approves without checking them again. A fix review that doesn’t finish never approves. -
Independent verification. Candidate findings are challenged by a separate verifier, in a fresh context, before they are posted. Unverifiable findings are dropped. The verifier compares each one with the base: a problem the base already has is dropped unless the PR makes it newly reachable or worse, or leaves unmet an explicit requirement to change that behaviour. Code that came in with a PR this one is stacked on counts as the base. A concern already settled or deferred on the PR isn’t raised again in other words.
-
No builds or tests. Cerbie does not install dependencies, compile or run tests. Your CI does that, and Cerbie reads its status. Cerbie spends its time on behaviour, security, data and contracts.
-
Replies. Reply to any Cerbie comment. Your reply is context for a focused re-review of that finding: Cerbie checks your claims against the code and replies with its conclusion. It withdraws a finding that doesn’t apply, confirms one you’ve fixed, or upholds it with evidence. If your reply shows the finding’s premise is wrong (the base already behaves this way, or the repository documents the trust model or limitation the code follows), Cerbie checks that and withdraws or defers the finding rather than restating it. For should-fix findings and suggestions it can also accept a reasoned deferral, such as a linked follow-up ticket or a sound scope decision. A bare “won’t do” doesn’t clear anything, and a critical clears only if it’s shown wrong or fixed. Cerbie confirms a fix of a should-fix or critical finding only when a commit since it raised the finding changes the code the finding points at or something it names; otherwise the finding stays open and the reply says so (if a change elsewhere makes it moot, say which change and why). A critical finding is checked a second time before it is cleared, fixed or wrong, and stays open if that check doesn’t confirm it. The same bar applies to everyone; maintainers who want to merge past Cerbie do so through their own merge rules. A repository can instead name who may accept a risk, with
reviews.risk_acceptors: GitHub logins and teams (org/team-slug; a leading@is fine). Then only a comment written by one of them, on the thread or on the PR, defers a should-fix finding or a suggestion, and their decision is taken as given rather than judged. Cerbie goes by the GitHub account that posted the comment, never by what a comment says: “X approved this” from anyone else leaves the finding open, and Cerbie replies saying who needs to confirm. A bot never counts, listed or not. The summary comment lists each accepted risk with who accepted it: straight away when the PR’s current head has a completed review, otherwise from the next review (the acceptance itself is recorded at once, and Cerbie’s reply on the thread says so). Anyone can still show a finding is wrong or fixed, a critical can’t be accepted by anyone, and a finding that the PR doesn’t do what it set out to keeps the limits above. The list is read from the base branch, so a PR can’t add its own author. A team has to be one Cerbie can read (in the organisation it is installed on); an entry that names nobody is reported as a configuration problem, and the list still applies without it. Left out, any person’s reasoned deferral is judged as described above; an empty list lets nobody accept. A bot’s deferral is never taken, with or without the list: where the repository reads a bot’s replies (reviews.command_bots, see Commands), the bot can show a finding is wrong or fixed, and Cerbie replies that a person needs to confirm anything it asks to defer. For a comment on the PR itself (@cerbieai …), the acceptor also has to be someone whose commands Cerbie takes (see Commands); a reply on the finding’s thread has no such limit. A top-level@cerbieaicomment can address several findings at once. You don’t have to repeat an answer on every thread: when Cerbie withdraws or defers a finding on your reasoning, it applies the same decision to its other open findings on the PR that the reasoning settles too (after checking each one), and leaves a short note on each of their threads linking to your answer. A critical is never settled this way, a confirmed fix is always checked thread by thread, and anything Cerbie isn’t sure the answer covers stays open for a reply of its own. Findings Cerbie withdrew or deferred aren’t raised again unless they come back more severe; one that does keeps its thread, and if that thread was resolved, Cerbie reopens it with a reply saying why. A a review filtered by one PR’s decisions is never reused for another PR. Cerbie resolves the thread of a finding it withdrew or confirmed fixed; a deferred finding’s thread is left for you. A suggestion’s thread is resolved as soon as it is posted, so it never blocks a merge that needs every conversation resolved; reply on it all the same and Cerbie answers. Resolving a thread yourself is just housekeeping: it doesn’t clear the finding. -
Opting out. Add the
cerbie:skiplabel, or putcerbie: skipon its own line in the PR description.
Commands
| Comment | Effect |
|---|---|
@cerbieai review |
Review new commits now (incremental). |
@cerbieai full review |
Review the whole PR again from scratch. |
@cerbieai pause / @cerbieai resume |
Stop or restart automatic reviews on this PR. |
@cerbieai resolve |
Close all Cerbie threads. Tidying up only: it doesn’t clear findings or change the verdict. |
@cerbieai config |
Show the effective configuration, the escalation mode, approvers and categories, and any problems with them. |
@cerbieai help |
List commands. |
@cerbieai <question> |
Ask anything about the PR; Cerbie answers with the code in hand. |
Commands are accepted from the PR author and from organisation members or collaborators.
Another GitHub App’s bot is ignored unless the repository names it in reviews.command_bots, by the login GitHub shows for its comments (my-agent[bot]; a leading @ is fine). GitHub gives a bot no membership to go by, so writing the PR isn’t enough: an unlisted bot’s comments get no answer, on the PR or on a finding’s thread. A listed bot’s @cerbieai commands are taken as a member’s, and its replies on Cerbie’s threads are read like anyone’s; Cerbie answers at most three times on a thread, whoever replies, so two bots can’t keep each other talking. Three things stay with people: a bot never accepts a risk or defers a finding, whether or not the repository names its risk acceptors (see Replies), anything it teaches Cerbie (@cerbieai remember, or a learning taken from its reply) waits for approval on the dashboard, and Cerbie never answers its own comments. List only bots you would take a command from as you would from a member: whoever can make the bot comment can ask for reviews, pause them, and argue a finding. The list is read from the base branch, so a PR can’t add the bot that comments on it. An entry that isn’t a bot’s login is reported as a configuration problem, and the list still applies without it.
Severity
Severity says what the author has to do with a finding:
- Critical: must be fixed before merging, or shown to be wrong. A reply cannot defer it.
- Should fix: holds the merge until it is fixed, shown wrong, or deferred with a reason Cerbie accepts (a tracked follow-up, or a scope decision where shipping without it is safe).
- Suggestion: never holds the merge. Minor real defects and improvements worth a follow-up.
The verifier settles each finding’s severity from two judgements: its consequence (what goes wrong) and its reach (how readily ordinary use, or any attacker, gets there). A fixed table maps them, so the line between holding the merge and a follow-up falls in the same place on every review:
| Consequence | Ordinary | Plausible | Rare |
|---|---|---|---|
| Security (exposes data, grants authority) | critical | critical | should fix |
| Data loss, or a flow the user cannot complete | critical | should fix | suggestion |
| Wrong result | should fix | should fix | suggestion |
| Degraded (works, with friction) | should fix | suggestion | suggestion |
| Quality (no behavioural defect) | suggestion | suggestion | suggestion |
A wrong result means it ends wrong even if nothing errors (a stale status, items silently missing); degraded means the user still ends up with the right outcome. Violations of a repository check keep the severity the check sets: the verifier only decides whether they are real. Nothing else fixes a severity. A violation of an instruction or rule, and a requirement of the ticket the change leaves unmet, are graded by what is actually left in the code. Take a migration to a shared button that its ticket says is complete: a Delete action that lost its destructive look is a wrong result and holds the merge, while a leftover local size or spacing override, where the button still works and reads correctly, is quality, so a suggestion that lists every remaining place.
Plausible means realistic but needing a specific sequence, timing, data shape, configuration or rollout state; rare means several unlikely conditions, or a path nothing reaches yet.
Verdicts
Like a human reviewer, Cerbie either approves or requests changes; there is no in-between.
| Verdict | When | GitHub effect |
|---|---|---|
| ✅ Approved | No open findings | Approval, without a comment (the review is in the check run and on the run page) |
| ✅ Approved with comments | Only non-blocking findings (below block_on; suggestions never block) |
Approval, with the findings as comments |
| 🔴 Changes requested | An open blocking finding (block_on, default critical and should-fix) |
Request changes |
| ⚪ Review incomplete | A required review stage failed and nothing blocking was found | Comment; never an approval |
The fast path to approval. A block clears once Cerbie has cleared every blocking finding: after a push (the incremental review re-checks earlier findings) or after a reply it agrees with. When the change comes from discussion, Cerbie re-reviews only the findings in question, not the whole PR. If that leaves nothing blocking, it approves (without a comment; what was cleared is listed in the check run). The approval replaces its earlier “changes requested” on GitHub, so those are left as they are rather than dismissed one by one; only a comment that no longer blocks (an approval held for a human, or findings left to a person) dismisses them, since a comment replaces nothing. Approvals still follow the approval settings below.
The Cerbie (Review) check run mirrors the verdict: failure for changes requested, neutral for incomplete, success otherwise. Make it a required check to gate merging on Cerbie.
Approval doesn’t wait for CI. Cerbie reads CI status as context but doesn’t wait for it: it can approve while the head commit’s CI is still running, and a CI failure afterwards doesn’t retract the approval. Keeping broken builds out of the base branch is the job of your own required CI checks in branch protection. Requiring only Cerbie (Review) gates merging on Cerbie’s verdict, not on CI, so require your CI checks alongside it.
Learnings
Cerbie also learns from the team. When a developer explains in a thread why a finding doesn’t apply, and Cerbie agrees and withdraws it, Cerbie can record the general fact behind it as a learning for that repository. You can also teach it directly with @cerbieai remember <fact>, or add a learning in the dashboard.
Learnings from people with write access take effect immediately. Others are proposed and wait for approval on the dashboard’s Learnings page, where anyone signed in can approve or reject them and admins can delete them. Approved learnings are included in every future review of the repository, and organisation-wide ones in every review.
Facts that belong in version control (conventions, architecture) are better added to .cerbie/instructions.md or .cerbie/rules/ in a PR, so they are reviewed like code. Learnings are for the small, discovered facts that would otherwise be lost in PR threads.
Cerbie also proposes suggested guidance changes as learnings, once an hour. It proposes one when, over the last 14 days, its reviews raised the same concern on two or more pull requests in a repository, or relied on .cerbie guidance (a rule or check) that coding agents can’t see on two or more pull requests. The proposal drafts the line to add to the repository’s AGENTS.md and says why it was suggested. Cerbie doesn’t open a pull request, so copy the text in yourself if you agree. Approving it also makes it a learning reviews use, as with any other. Each concern or rule is proposed once per repository: a pending, approved or rejected proposal is never made again, and deleting one rejects it.