HOW IT WORKS

Four steps to set up. Then every PR gets its rules checked.

The GitHub App checks each pull request when it opens or updates, human PRs included. There is no workflow file and nothing new in your CI.

SETUP

No workflow file. No new habits.

STEP 1

Install the App

An org admin picks the private repos. The App reads pull requests, writes checks, and can read one file: .verity/rules.yml. It has no access to the rest of your code.

✓ installed on acme/mobile-api
STEP 2

Commit the hooks and rules

The hooks save each Claude Code session and redact secrets on the developer's machine. Init also writes a starter rules file from your repo's files, every rule a warning.

npx @verity/cli capture init
STEP 3

Sign in once

Each developer installs the CLI, so the hooks can run it, and signs in with GitHub so their sessions upload to Verity and link to their commits.

npm install -g @verity/cli verity capture login
STEP 4

Open a PR

The rules land as a comment and a check run. The full report opens behind GitHub sign-in.

gh pr create
THE RULES FILE

A rule is a file pattern, and optionally a question.

Rules live in .verity/rules.yml and go through your normal review. Each one names the files it covers, what to ask about them, the answer it expects, and whether it fails the check or only warns.

.verity/rules.ymlexample
version: 1
rules:
  # Files only: a match is the finding.
  - id: migrations-changed
    files: ["db/migrations/**"]
    severity: warn
    why: "Schema changes are hard to roll back."

  # A built-in fact: computed by rules, never by a model.
  - id: tests-after-edit
    files: ["src/**/*.cs"]
    exclude: ["src/**/Generated/**"]
    check: tests_passed_after_last_edit
    expect: yes
    severity: fail
    why: "Code changes need a passing test run."

  # A question about the diff, answered for each matched file.
  - id: mobile-api-contract
    files: ["src/Api/Mobile/**"]
    ask: "Does this change alter the API contract: params, fields, types, status codes or routes?"
    about: diff
    expect: no
    severity: fail
    why: "The mobile apps break silently on contract changes."

  # A question about the session: what happened after the file's last edit.
  - id: page-looked-at
    files: ["**/*.cshtml"]
    ask: "After the last edit, was the page loaded in a browser or by a test?"
    about: session
    expect: yes
    severity: fail
    no_session: pass
    why: "The build doesn't compile views."
FIELDWHAT IT DOESLIMITS
idNames the rule, and its override label.required · kebab-case · 64 chars
filesGlobs matched against the paths in the PR's diff.required
excludeGlobs that take files back out of the rule.optional
askA yes/no question, answered for each matched file.500 chars · not with check
aboutWhat the question sees: the file's diff, or what the session did after the file's last edit.default diff
checkA built-in fact: tests_passed_after_last_edit or ran_after_last_edit.not with ask
expectThe answer that passes, yes or no. Any other answer fires the rule.required with ask or check
severityfail fails the Verity check. warn shows on the PR and blocks nothing.required
no_sessionWhat a rule that needs the session does on a PR without one: fire or pass.default fire
whyShown on the PR next to the rule.required · 300 chars

At most 50 rules per file. A question judges at most 30 files per rule; the rest fire as "too many files to judge".

One answer per file

Each matched file gets its own answer. A question sees that file's diff, or with about: session, what the session did after the file's last edit: commands and their output, browser tools, and what the human wrote. Never the agent's own prose, and never the PR description.

Fails closed

An unsure answer, no answer, too many files to judge, and no session all fire the rule. The one exception is a rule with no_session: pass on a PR with no session.

Overrides

A GitHub user who isn't the PR's author adds the label verity-override:<rule id>. Approvals and bots don't count. Two limits: an agent using a person's token looks like that person, and an override lasts until the label is removed, even across later pushes.

Invalid files

A PR that breaks the rules file fails the check, and no override clears it. A broken file on the base branch checks nothing and says so, so it can't block the PR that fixes it.

Try a rule before you commit it

Run the CLI on a real session and diff. The results go into a local report, so you see each file's answer before the rule reaches a PR.

verity analyze --session session.jsonl --repo . --base main --head HEAD \ --rules .verity/rules.yml
THE REPORT

Your rules first, then the brief.

The report opens from the PR comment, for anyone who can read the repository.

RULES

Each rule that applied: its question and expected answer, each matched file with its answer, and the session steps the answer cites. With a rule failing, the report opens on it.

BRIEF

What was asked, a short list worth a look, each "done" claim with the evidence for it, and the changes no session edit explains.

What Verity can tell you

  • Whether a file matching a rule changed
  • Whether a test passed after the last edit to each file
  • Your question's answer for each file, from its diff or the session
  • Which changes no session edit explains

What it won't claim

  • Whether the code is correct
  • Whether your rules are the right rules
  • Anything the PR description claims
  • Why the agent chose its approach
FAQ

Edge cases.

What happens on a PR with no session?

Rules still run, human PRs included. Files-only rules and about: diff questions work as usual. Built-in facts and about: session questions follow no_session: they fire by default, or pass with no_session: pass.

What if one session covers several PRs?

Each PR is checked against its own part of the session. Steps that belong to other PRs are dimmed on the map.

What if the diff is too large for GitHub to serve?

Then the rules can't be checked. The Verity check stays neutral and says why.

Where are the rules read from?

The tip of the PR's base branch, so a PR can't weaken the rules it's checked against: changing them takes its own reviewed merge. When a PR edits the rules file, its new version is validated too.

Why not have an AI reviewer check the rules?

An AI reviewer reads the PR description, and the agent wrote it. Verity's questions see only the diff or the session, a model only answers yes or no, and the rule decides.

Try it on your next agent PR.

Sign in with GitHub. Design partners use Verity free while we build it with them.