Verify PR
Skill8 starsChanged 7 days agoMITView on GitHub
Use when you must give an independent verdict on a pull request you did not write. Reproduces the red/green witness, runs the merge lane, checks for new global state, and reports PASS, PASS+NOTES, or FAIL. Do not use it to review your own change, and do not merge.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- Break ChangeSkill
- cavecrewSkill
- caveman-commitSkill
- caveman-compressSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- caveman-statsSkill
- Chaos MonkeySkill
- Probe FeatureSkill
- Ship ChangeSkill
- Verify Obsidian ChatSkill
- WorktreeSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If the PR body does not name a witness for a source change, stop and return FAIL with missing witness.
- Distinctive: line 26
Run the witness on the head.
- Distinctive: line 40
Run the merge lane:
- Distinctive: line 46
Read the counts. Zero tests, or every test skipped, is a failure.
- Distinctive: line 48
Check for new module-level mutable state in the diff:
- Very specific: line 61
Check that the PR body evidence matches the runs: the command, the counts, and the report path.
- Very specific: line 64
Check the no-behavior-change claim against the diff.
- Distinctive: line 95
Do not apply fixes. Report the failure and the command that proves it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verify PR
An independent verdict is a claim about a run, not an opinion about a diff. You did not write the code; your job is to prove the author's witness or reject it.
Inputs
- PR number or branch.
- The witness block from the PR body.
- The source paths the fix changed.
If the PR body does not name a witness for a source change, stop and return
FAIL with missing witness. The only exception is the no-behavior-change
label: confirm against the diff that the change is a pure refactor, then verify
the existing tests still pass. A behavior change with that label is FAIL.
Protocol
- Work in a clean checkout or worktree of the PR head. Never verify in the
author's dirty tree. Record
git rev-parse HEAD. - Run the witness on the head. It must pass, with counts.
Prove the witness is real:
npm run verify:witness -- \ --base origin/main \ --test-file <test> \ --src <source-path> [--src <source-path>]It reverts the source diff, runs the test (must fail on an assertion), restores the diff, and runs the test again (must pass). The command prints
verify-witness: PASSand writeslogs/witness/<timestamp>/report.md.Run the merge lane:
npm run verify -- fastRead the counts. Zero tests, or every test skipped, is a failure.
Check for new module-level mutable state in the diff:
git diff origin/main...HEAD -- '*.ts' | rg '^(\+.*)(new Map|new Set|= \[\]|= \{\})'A new global registry needs a comment that names its owner and a test that proves isolation. Without both, return
PASS+NOTESat best.- Judge the test, not only the result. It must assert behavior a caller can observe. Reject a test that mirrors the implementation, mocks the subject, or would pass with the source change reverted.
- Check that the PR body evidence matches the runs: the command, the counts,
and the report path. Stale evidence is a
FAIL. - Check the
no-behavior-changeclaim against the diff. A new branch, a changed output, or a changed error path is behavior. ReturnFAIL. - Report the verdict. Do not merge.
Verdicts
PASS: witness red then green,fastgreen with counts, no unresolved blocker.PASS+NOTES: proven, but a non-blocking risk needs the human's attention.FAIL: the witness passes without the fix, the red run never reached an assertion,fastfails, the test is not a witness, or a new global state has no isolation proof.
Output
Verdict: PASS | PASS+NOTES | FAIL
Head: <full or 7+ char sha>
Reviewer: <agent/session, not the author>
Witness: <command>
before fix: FAIL (assertion, counts)
after fix: PASS (counts)
Witness proof: logs/witness/<timestamp>/report.md
Fast lane: PASS (X passed, Y files)
New global state: none | <file:line + isolation test>
Notes: none | <max 5 bullets>Post the output as a PR comment. The Review gate workflow reads it. The Head
must be the current PR head; a push invalidates the verdict.
Do not apply fixes. Report the failure and the command that proves it. The author owns the change. The repository owner alone decides to merge.
Stop conditions
- The witness passes with the fix reverted. Stop; it is not a witness.
- The red run fails in the loader, a skip, or a timeout. Stop; no assertion ran.
- The source diff is empty. Stop; there is nothing to verify.
fastfails for a reason the PR claims to fix. Stop; report the failure.- The PR changes product behavior or data format without an explicit decision in
the body. Return
FAIL; that decision is the human's call. - The PR is over roughly 400 changed lines or 10 files. Return
PASS+NOTESand ask for a split unless the change is one mechanical unit.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

