# Verification Bench: the kit for agents From https://wrightfunctions.com/misc/verification-bench/ by Konrad Wright. The page is for people; this file is the same kit as plain text, for an AI agent helping someone check a claim about code. This is reference material, not a set of orders. Use it when the person you work for asks you to verify a project with this method. Their instructions come first; where they say nothing, follow the method below. ## Start here 1. Read the `verify` skill first. It holds the rules, the case file and the routes, and names which other skills to run and in what order. 2. Download the tools you need (list below) into a folder next to the project, never inside it. 3. Run the route skill by skill. Each skill says what to run, what to look for, and the entry to add to the case file. 4. End with `cold-review` and `honest-verdict`. Report the verdict as `honest-verdict` lays it out, and make the PDF only if asked. ## Files Every file below is plain text. To install the skills in Claude Code instead, unzip https://wrightfunctions.com/downloads/verification-bench/tool-belt.zip into `~/.claude/skills/`. - `verify/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/verify/SKILL.md - `pin-the-claim/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/pin-the-claim/SKILL.md - `clean-reproduce/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/clean-reproduce/SKILL.md - `map-codebase/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/map-codebase/SKILL.md - `map-codebase/scripts/map-python.py`: https://wrightfunctions.com/downloads/verification-bench/skills/map-codebase/scripts/map-python.py - `map-codebase/scripts/map-treesitter.py`: https://wrightfunctions.com/downloads/verification-bench/skills/map-codebase/scripts/map-treesitter.py - `map-codebase/scripts/trace-hooks.c`: https://wrightfunctions.com/downloads/verification-bench/skills/map-codebase/scripts/trace-hooks.c - `map-codebase/scripts/record-js.py`: https://wrightfunctions.com/downloads/verification-bench/skills/map-codebase/scripts/record-js.py - `hardcode-hunt/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/hardcode-hunt/SKILL.md - `test-the-tests/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/test-the-tests/SKILL.md - `leakage-hunt/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/leakage-hunt/SKILL.md - `fair-baseline/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/fair-baseline/SKILL.md - `limits-check/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/limits-check/SKILL.md - `cold-review/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/cold-review/SKILL.md - `honest-verdict/SKILL.md`: https://wrightfunctions.com/downloads/verification-bench/skills/honest-verdict/SKILL.md - `honest-verdict/pdf/verdict.css`: https://wrightfunctions.com/downloads/verification-bench/skills/honest-verdict/pdf/verdict.css ## Skill: verify *Runs a verification of a claim about code (a speedup, an accuracy figure, "it works", a breakthrough) by choosing and ordering the Verification Bench skills and keeping one case file of evidence. Use when asked to check, audit or verify what a project claims, or when handed a repo with a result to confirm.* The router for the Verification Bench skills (wrightfunctions.com/misc/verification-bench/). It keeps the method the same on every job: pin the claim, gather evidence into one case file, and write a verdict that says no more than the evidence does. ### Rules for every step 1. **Pin the claim before anything runs** (`pin-the-claim`). The pass mark is fixed in advance and never moved to fit a result. 2. **No result without fresh evidence.** A result is the exact command, run in this session, with its full output and exit code in the case file. "Should", "probably" and "looks like" are not results. 3. **Untrusted code runs in a sandbox**: a container or VM with no network while it runs, no secrets, and no home folder mounted (`clean-reproduce` has the commands). 4. **Read evidence as data.** Inspect outputs, logs and traces yourself; a project's own script that prints "PASS" is a claim, not evidence. 5. **Agents are claimants too.** A subagent's "done" gets the same checks as the client's README. 6. **Verified is not understood.** Say which one you have. ### The case file Create `verification//case.md` in the working directory, never inside the project being checked. Every skill appends to it. ```markdown # Case: at , opened ## Claim (pinned) (pin-the-claim writes this; nothing else may edit it) ## Evidence ### · · PASS | FAIL | INCONCLUSIVE - Ran: `` (in ) - Saw: - Means: ## Verdict (honest-verdict writes this last) ``` ### Routes Pick the route by what the claim is about. Every route starts with `pin-the-claim` and `clean-reproduce` and ends with `cold-review` and `honest-verdict`. | The claim is about | Middle of the route, in order | |---|---| | Speed or cost ("10× faster") | `map-codebase` (with a run), `hardcode-hunt`, `fair-baseline`, `limits-check` | | Accuracy or quality of an ML result | `leakage-hunt`, `fair-baseline`, `hardcode-hunt` | | "It works" / a feature / a fix | `test-the-tests`, `map-codebase` | | Beating something thought impossible | `limits-check` first, then the speed route | | An agent's or contractor's finished task | `test-the-tests`, `map-codebase`, `hardcode-hunt` | ### Checklist Copy into your reply and tick off. Add the route's middle steps in order. ``` - [ ] Case file created at verification//case.md - [ ] Claim pinned, with its pass mark (pin-the-claim) - [ ] Reproduced from a clean copy, in a sandbox (clean-reproduce) - [ ] - [ ] Independent review by a fresh session (cold-review) - [ ] Verdict written from the case file alone (honest-verdict) ``` Go back when: - a later step shows the claim was measured differently from how it was pinned: return to `pin-the-claim` and re-pin with the client. Never re-pin to make a failing result pass. If nobody can be asked, keep the pin, record what the measurement really measured, and carry on. - the project won't run from a clean copy: record INCONCLUSIVE, which is a finding in itself ("the README's steps don't run"), and stop the route. Credits: the "evidence before claims" gate follows Jesse Vincent's verification-before-completion (obra/superpowers); the fix and spec-compliance reviews owe ideas to Trail of Bits' audit skills. ## Skill: pin-the-claim *Turns a vague claim about code ("up to 40× faster", "it works", "state of the art") into one testable statement with a metric, conditions, baseline and pass mark, written into the case file before anything is run. Use at the start of any verification, or when a claim's wording keeps shifting.* A claim can't fail until it says what would count as failing. This skill writes that down first, so no later result can quietly move the goalposts. Part of the Verification Bench (see `verify` for the case file). ### Steps 1. **Quote the claim exactly**, with where it came from (README line, email, slide, commit message) and the date. 2. **Name every part of the statement.** Fill the template below. Take each value from the claimant's own material; where it's missing, write the question rather than a guess. 3. **Replace soft words** using the table. Each one becomes a number or a condition. 4. **Set the pass mark** from the claim itself, with a tolerance fixed now (10% unless the field has a standard). If `clean-reproduce` later measures more noise than that, it may widen the tolerance once, and says so in its entry. The claimant may correct what the claim *means*; they don't choose the pass mark. 5. **Get the wording confirmed** by the claimant (or the client who asked): "Is this what you're claiming?" Record the reply. If nobody can be asked, pin the most literal reading of the claimant's own words, mark the block UNCONFIRMED, and carry on; the verdict lists it under open questions. 6. Write the block into the case file under "Claim (pinned)". From here on it is read-only. ### Template ```markdown - Claim, as written: "" (, ) - Subject: - Metric: - Conditions: - Baseline: - Pass mark: - Runs: - Out of scope: - Confirmed by: ``` ### Soft words | Word | Becomes | |---|---| | "up to" | The median over the pinned runs, with the spread. "Up to" is the best run. | | "faster", "×" | Than which baseline, at which input sizes, in which build mode. | | "accurate", "best in class" | Which metric, on which held-out data, against which ceiling (label noise, human agreement). | | "works" | For which inputs, producing which outputs, checked by which test. | | "scales" | The measured curve over at least three sizes, not one big run. | | "state of the art", "revolutionary" | The named best existing method, run under the same conditions. | | "exact", "always", "never" | Checked on every pinned input, including adversarial ones, not a sample. | ### When it can't be pinned If the subject or metric can't be filled from the claimant's material, stop. Write the open questions into the case file and send them; verification starts when they're answered. A claim nobody can state precisely is the first finding. ## Skill: clean-reproduce *Rebuilds and reruns a project from a fresh copy at a recorded commit, inside a sandbox, following its README literally, and compares the numbers it produces with the pinned claim. Use after pin-the-claim on any verification, and whenever a result has only been seen on the author's machine.* A result that only appears on one machine is an anecdote. This skill checks whether the project's own instructions produce its own numbers, on a clean copy, without the author's environment. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Fresh clone, pinned commit.** ```sh git clone clone && cd clone && git checkout && git rev-parse HEAD ``` Record the hash. If the code arrived as an archive, record its SHA-256. If it isn't a git repo at all, hash the tree instead and use that in place of a commit: ```sh find . -type f -not -path './.git/*' | LC_ALL=C sort | xargs sha256sum | sha256sum ``` 2. **Sandbox it.** Untrusted code never runs on your own machine directly. Install dependencies with network, then run with none: ```sh docker run --rm -it -v "$PWD":/work -w /work bash # install step docker run --rm -it --network none --memory 8g -v "$PWD":/work -w /work bash # run step ``` Images: `python:3.12`, `rust:1`, `node:22`, `gcc:14`. No secrets, no SSH keys, no home folder mounted. No Docker? On Linux, run each command with no network and an empty environment, on a copy: `unshare -rn env -i PATH=/usr/bin:/bin HOME=/tmp `. Otherwise use a throwaway VM. Write down which sandbox you used. 3. **Follow the README literally.** Every deviation you need (a missing step, a pinned version, a typo) is a finding: write it down before fixing it. 4. **Build the way the claim was measured.** Lockfiles honoured (`pip install -r requirements.txt` with pins, `cargo build --release --locked`, `npm ci`). Record tool versions (`python -V`, `rustc -V`, `node -v`). 5. **Run the headline command N times** (the `Runs` from the pinned claim, at least 5). Save each run's full output to a file; don't summarise from memory. 6. **Measure noise.** Report median and spread (min to max). If the spread is larger than the claimed effect, say so: the claim can't be resolved at this noise level. 7. **Compare with the pinned pass mark** and write the case-file entry. ### Results - **PASS**: the median meets the pass mark within tolerance. This only means the project's own command gives its own number. It says nothing yet about how the number was made: that's what the rest of the route is for. - **FAIL**: it runs, and the median misses the pass mark. - **INCONCLUSIVE**: it won't build or run from a clean copy, or noise swamps the effect. Record exactly where it broke. ### Entry ```markdown ### clean-reproduce · · PASS | FAIL | INCONCLUSIVE - Commit: ; sandbox: , network off during runs - Ran: `` ×; tools: - Saw: median , spread – (claim: ) - README deviations: ``` ## Skill: map-codebase *Maps a codebase (Python, Rust, C, JavaScript or TypeScript) into a Verification Bench map, records the headline run, and checks whether the code a claim rests on actually ran. Use when verifying a speed, accuracy or feature claim, to see what really executes when the result is produced.* The most direct check there is: when the headline number is produced, does the code that's supposed to produce it run? This skill makes a map of the project, records the run that makes the number, and reads the map for the answer. Part of the Verification Bench (case file: see `verify`). Open maps at wrightfunctions.com/misc/verification-bench/; they never leave your browser. ### The mappers They ship in this skill's `scripts/` folder: `map-python.py` (standard library only), `map-treesitter.py` (Rust, C, JS/TS; needs `pip install tree-sitter tree-sitter-rust tree-sitter-c tree-sitter-javascript tree-sitter-typescript`), `trace-hooks.c` (call recording for C) and `record-js.py` (call recording for JavaScript in a page, with Playwright). Copy them next to the project, not into it. ### Steps 1. **Spotlight the claim's code.** From the pinned claim, list the files or functions the claim is about (the algorithm, not the benchmark harness). 2. **Map and record the headline run**, in the sandbox from `clean-reproduce`: | Language | Command | |---|---| | Python | `python3 map-python.py . --run --spotlight --out map.json` | | C | build with `-finstrument-functions -g … trace-hooks.c` (Linux: `-ldl`), run it, then `python3 map-treesitter.py . --trace-chrome vb-trace.json --binary ./app --spotlight --out map.json` | | Rust, C on Linux | debug build, `uftrace record -P . ./app`, `uftrace dump --chrome > trace.json`, then `map-treesitter.py . --trace-chrome trace.json --spotlight --out map.json` | | JavaScript (web page) | `map-treesitter.py . --out map.json`, serve an unminified build, then `python3 record-js.py --map map.json --url --scroll` (`pip install playwright && playwright install chromium`) | 3. **Read the result.** With a recorded run, the mapper prints a report: how many functions ran, how many of the claim's ran, and the claim's functions that never ran. Map a copy of the project: running it can leave files behind (`__pycache__`, build output). A person can also drop map.json on the page and replay it; the verdict line there says the same. 4. **Look for these**, and quote what you find: - The spotlighted code doesn't run, or runs only at import. That's a FAIL for the claim as pinned; hand it to `hardcode-hunt` to find what does. - The headline path calls into a cache, fixture, "expected" file or precomputed table. - A branch that only runs under the benchmark or test (look for calls that appear in the run but not in the map's static lines). - Large parts of the code are dark during the run: dead code padding the project, or a different entry point than the README says. 5. **Read the honesty counters** in the map's header: guesses are dashed and unresolved calls are counted. Say so if the answer leans on them. ### Entry ```markdown ### map-codebase · · PASS | FAIL | INCONCLUSIVE - Ran: ``; recorded: `` - Saw: of functions ran; claim's code: of functions ran - Notes: - Map: verification//map.json ``` ## Skill: hardcode-hunt *Hunts for results that are stored rather than computed (cached answers, precomputed tables, benchmark-only branches, fixed seeds, mocked paths in real code) and proves it by changing the input in a way the claim shouldn't care about. Use when a result looks too good, or when map-codebase shows the claim's code didn't run.* A result can be correct and still not be computed: read from a cache, keyed to the benchmark's exact inputs, or produced by a branch that only exists for the test. Part of the Verification Bench (case file: see `verify`). ### 1. Search Run from the project root; read every hit outside `tests/`. ```sh rg -n -i "benchmark|is_test|testing|CI\b|GITHUB_ACTIONS|getenv|environ" --glob '!tests/**' rg -n -i "cache|memo|precomput|expected|golden|fixture|snapshot|lookup|table" --glob '!tests/**' rg -n -i "mock|patch|stub|fake" --glob '!tests/**' rg -n -i "seed|Random\(|np\.random|manual_seed|srand" . rg -n -F "" . ``` Also list data files the code ships with (`*.pkl *.npy *.json *.bin *.csv` outside test folders) and what reads them. ### 2. Watch what the run touches ```sh strace -f -e trace=openat,connect -o touched.txt # Linux grep -v ENOENT touched.txt | grep -v -E '/(usr|lib|proc|sys|etc)/' ``` On macOS use `sudo fs_usage -w -f filesys `. Any file opened during the headline run that isn't input data or the program itself needs explaining. ### 3. Perturb the input (the decisive test) Change the input in a way the claim says shouldn't matter, and rerun: - a new random seed, or the same data shuffled; - a size that appears in no benchmark, fixture or cache; - the same input with one irrelevant value changed; - a fresh process with caches deleted and the clock or hostname different. If the result collapses toward the baseline only for unseen inputs, the result was stored, not computed. Record both numbers side by side. ### Results - **FAIL**: a stored or special-cased result produces the claim (cite file and line, and the perturbed-vs-original numbers). - **PASS**: no special paths, and perturbed inputs keep the claimed result. - **INCONCLUSIVE**: suspicious paths exist but couldn't be exercised. ### Entry ```markdown ### hardcode-hunt · · PASS | FAIL | INCONCLUSIVE - Searched: ; files touched during run: - Perturbed: → (original: ) - Found: ``` ## Skill: test-the-tests *Checks whether a project's tests would actually catch a broken implementation, using mutation testing, coverage of the claim's code, and a read for tests that assert nothing or test mocks. Use when a claim rests on "all tests pass", or when verifying an agent's or contractor's finished task.* "All tests pass" says nothing until you know the tests can fail. This skill breaks the code on purpose and checks the tests notice. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Run the suite as shipped** (in the sandbox) and record the counts: passed, failed, skipped, xfail. Skips and expected failures on the claim's code are findings. 2. **Coverage of the claim's code only.** Overall coverage hides the gap that matters. | Language | Command | |---|---| | Python | `pytest --cov= --cov-report=term-missing` | | Rust | `cargo llvm-cov --text` | | JS/TS | `npx vitest run --coverage` or `npx jest --coverage` | | C | build with `--coverage`, run, `gcovr -r .` | 3. **Mutation testing** on the claim's files. Each surviving mutant is a change to the code that no test noticed. | Language | Command | |---|---| | Python | `mutmut run --paths-to-mutate ` then `mutmut results` | | Rust | `cargo mutants --file ` | | JS/TS | `npx stryker run` (set `mutate` to the claim's files) | | C | `mull-runner` or a hand mutation (below) | 4. **Hand mutation, always.** Replace the claim's core function body with the dumbest thing that type-checks (return the input, return zero, call the baseline) and rerun the suite. If it still passes, the tests don't test the claim. Revert afterwards. 5. **Read the tests** that cover the claim's code, looking for: - assertions that can't fail (`assert result is not None`, `assert True`, comparing an output with itself); - mocks of the very thing being claimed; - expected values computed by the code under test; - tests that catch every exception; - the test inputs matching a cache or fixture (`hardcode-hunt`). ### Entry ```markdown ### test-the-tests · · PASS | FAIL | INCONCLUSIVE - Suite: ; claim's code line coverage: - Mutation: / on ; survivors: - Hand mutation (): suite - Weak tests: ``` ## Skill: leakage-hunt *Checks an ML or data result for leakage (test data seen in training, duplicates across splits, features that encode the label, tuning on the test set, future data in the past) by reading the split code and rerunning on data the project never saw. Use when verifying an accuracy, score or quality figure.* A model that has seen the answers scores well without learning anything. Leakage is the most common reason an accuracy figure doesn't survive new data. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Find where the split happens.** ```sh rg -n "train_test_split|KFold|split\(|\.sample\(|shuffle|val|holdout|test_size" . ``` Note what's split (rows, users, files, dates) and when (before or after preprocessing). 2. **Preprocessing before the split.** Scalers, normalisers, vocabularies, PCA, imputation or feature selection fitted on the full data leak test statistics into training. Fitting must happen on training data only. 3. **Duplicates across splits.** Hash every example and count overlaps: ```python import hashlib h = lambda x: hashlib.sha1(repr(x).encode()).hexdigest() overlap = {h(x) for x in train} & {h(x) for x in test} print(len(overlap), "of", len(test), "test items also in train") ``` Also check near-duplicates (same user, same source file, same text after lowercasing and stripping whitespace). 4. **Groups and time.** If the data has users, patients, sessions or dates, the split must keep each group on one side, and test must come after train for anything forecasting. 5. **Label in the features.** Train a tiny model (a depth-3 tree) on each feature alone. A single feature that nearly predicts the label is either the answer or a leak (an ID, a timestamp, a field filled in after the outcome). 6. **Test set used for tuning.** Search for model selection, early stopping, or thresholds chosen while reading the test score. The reported number must come from data touched once, at the end. 7. **The decisive test:** collect or carve out data the project never saw (a later time window, a new source, items you write yourself), run the frozen model, and compare with the claimed figure. 8. **Ceiling check.** Compare the score with label noise or human agreement on the same task. A score above the ceiling means leakage or a broken metric. ### Entry ```markdown ### leakage-hunt · · PASS | FAIL | INCONCLUSIVE - Split: ; preprocessing fitted on: - Overlap: of test items in train; groups/time respected: yes/no - Single-feature check: - Fresh data: → (claimed: ) ``` ## Skill: fair-baseline *Finds the honest comparison for a performance or quality claim (the standard tool or best known method), runs both under identical conditions, and reports medians with spread. Use when a claim says faster, better, cheaper or state of the art, and especially when the baseline was chosen by the claimant.* "10× faster" is only as true as the thing it's 10× faster than. The commonest way a real result gets inflated is a weak or unfairly run comparison. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Choose the baseline yourself.** The obvious standard (the language's built-in, the best-known library, the published state of the art), not only the one the claimant picked. If theirs differs, run both. 2. **Reproduce the baseline's own published number first**, where one exists (a built-in like `sorted()` has none; skip this then). If you can't, your setup is off; fix that before comparing. 3. **Make the conditions identical**, and write each down: | Check | Common unfairness | |---|---| | Build mode | release vs debug, `-O3` vs `-O0` | | Hardware | same machine, same power mode, nothing else running | | Threads | parallel vs single-threaded | | Warmth | warm cache or JIT for one, cold for the other | | Inputs | same data, same sizes, same order (sorted inputs flatter some algorithms) | | Work done | same output checked; the fast one may skip validation or I/O | | Settings | tuned for theirs, defaults for the baseline | 4. **Measure properly.** At least 5 runs each, report median and spread. - CLIs: `hyperfine --warmup 3 --runs 10 '' ''` - Python: `python -m pyperf timeit` or `timeit` with `-r 7` - Rust: `criterion`; JS: `mitata` or `tinybench` - None installed and no network: a loop around the language's monotonic clock (`time.perf_counter`, `Instant::now`, `performance.now`), median of the runs, warm-up runs discarded. Say which you used. 5. **Check they give the same answer** on every input you timed. A faster wrong answer isn't faster. 6. **Sweep the size.** Three or more input sizes: claims often hold only at one. ### Entry ```markdown ### fair-baseline · · PASS | FAIL | INCONCLUSIVE - Baseline: , reproduced its published : yes/no - Conditions: - Saw: | size | theirs (median, spread) | baseline | ratio | - Same answers on all inputs: yes/no ``` ## Skill: limits-check *Tests a claim against known hard limits (algorithmic lower bounds, hardware ceilings, statistics, physics) with back-of-envelope arithmetic before any code is run. Use when a claim sounds revolutionary, beats a famous limit, or promises a large factor over mature tools.* Some claims can be checked with a pencil. If a result would break a proven bound, either the bound's assumptions don't apply (say which) or the measurement is wrong. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Name the quantity** the claim improves (time, memory, bits, accuracy, energy) and the input size it's measured at. 2. **Find the limit that applies.** Common ones: | Claim area | Limit to check | |---|---| | Comparison sorting, searching | Ω(n log n) comparisons; Ω(log n) for search | | Any data processing | Must read the input: time ≥ bytes ÷ memory bandwidth | | Hardware | Peak FLOP/s, memory and disk bandwidth from the spec sheet | | Learning from data | Can't exceed the label-noise ceiling | | Distributed systems | Speed of light between machines; the CAP trade-off | | Parallel speedup | Amdahl's law from the serial fraction | 3. **Do the arithmetic.** Write each line with units. For example: 1 GB processed in 10 ms is 100 GB/s, which is above a laptop's memory bandwidth (about 50–100 GB/s), so the data can't all have been read. 4. **List the escape hatches honestly.** A limit can be sidestepped by changing the problem: non-comparison sorts for integers, a special input distribution, approximation, precomputation, work done before the timer starts. If the claim relies on one, the pinned claim must say so. 5. **Decide what the code must show.** Turn the arithmetic into a check for later skills: "the timer must include loading", "test on random inputs, not sorted ones". ### Results - **FAIL**: the measured number is beyond a limit whose assumptions hold. - **PASS**: within all limits, with the margin stated. - **INCONCLUSIVE**: an escape hatch applies but isn't stated in the claim; send the question back to `pin-the-claim`. - If the hidden escape hatch *is* how the number was made (precomputed answers, work done before the timer), that's a FAIL for the claim as pinned; record the hatch and hand it to `hardcode-hunt`. ### Entry ```markdown ### limits-check · · PASS | FAIL | INCONCLUSIVE - Limit: , assumptions hold: yes/no - Arithmetic: - Escape hatch relied on: - Checks handed on: ``` ## Skill: cold-review *Gets an independent check of a verification by a fresh agent session that sees only the pinned claim, the code and the commands, never the earlier findings or the expected answer. Use before writing a verdict, and whenever the work so far was done by one session that could be grading itself.* Whoever ran the checks has a theory by now, and theories find what they look for. A reviewer with no theory catches what the first pass missed, or fails to reproduce what it found. Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Start a fresh session** (a new subagent or a new chat) with no access to the case file's Evidence or Verdict sections. If you can't start one, don't fake it: record NOT DONE, prepare the handover (step 2) in a folder so a person can run it later, and the verdict's confidence can be no higher than medium. 2. **Hand over only:** - the pinned claim block, word for word; - the repo at the pinned commit, and the sandbox instructions; - the list of skills to run (not their results). 3. **Give it this prompt**, filled in: ```text You are verifying a claim about a codebase. You have not seen anyone else's findings. Claim (pinned): . Code: at . Run untrusted code only in: . Use these skills in order: . For each, record the exact command, the output that decides it, and PASS, FAIL or INCONCLUSIVE. Then list anything that surprised you. Don't guess: if you couldn't run something, say so. ``` 4. **Compare** its entries with yours, skill by skill. Put the comparison in the case file: | Skill | First pass | Cold review | Agree? | |---|---|---|---| 5. **Resolve disagreements by rerunning**, not by arguing. The rerun's output goes in the case file. A disagreement nobody can settle goes into the verdict as an open question. 6. **Check the surprises list.** Anything there that the first pass didn't mention gets a look before the verdict. ### Entry ```markdown ### cold-review · · AGREE | DISAGREE | NOT DONE - Reviewer: , saw: claim + code only - Agreement: of skills; disagreements: - New findings: ``` ## Skill: honest-verdict *Writes the final verdict of a verification from the case file alone, separating what was verified from what was understood, stating confidence and open questions, and keeping every sentence within the evidence; renders it as a client PDF when one is wanted. Use as the last step of every verification, before anything is sent to the client or claimant.* The verdict is the only part most people read. It has to say exactly as much as the evidence does: no softening a failure, no rounding a pass up into "breakthrough". Part of the Verification Bench (case file: see `verify`). ### Steps 1. **Read only the case file.** If a statement needs something that isn't in it, either add the evidence (rerun) or leave the statement out. 2. **Pick the outcome:** | Outcome | When | |---|---| | Holds | Every route step PASS, cold review agrees. | | Holds, narrower | Passes only under conditions narrower than claimed; state them. | | Does not hold | Any decisive step FAIL (clean-reproduce, map-codebase, hardcode-hunt, leakage-hunt, limits-check). | | Can't tell yet | Key steps INCONCLUSIVE; list exactly what would settle them. | 3. **Fill the template.** Every line of "What we found" cites an evidence entry. 4. **Strip unsupported words.** Delete or replace: "clearly", "obviously", "proves", "fraud", "brilliant", "revolutionary", "should work". Describe what the code did, not what anyone intended. 5. **Separate verified from understood.** A check can pass without anyone knowing why the code works. Say which you have. 6. **Read it as the claimant would.** Every criticism must point at a command they can rerun themselves. ### Template ```markdown ## Verdict ****: What we found - (evidence: ) What we didn't check - Verified vs understood - Verified: - Understood: Confidence: , because (medium at most if cold-review was NOT DONE) To reproduce: `` at commit Open questions - , which would be settled by ``` ### Client PDF When the client wants the verdict as a PDF, build it from the same text; the PDF never says more than the case file. 1. **Write `verdict.md`** next to the case file: the Verdict template above, with `## Verdict` as its first heading, under this front matter. ```markdown --- title: "Verification: " subtitle: "Claim: " author: "Prepared by " date: " · commit " --- ``` If the client should see the evidence, end with `## Appendix: evidence` and paste the case file's entries under it. It starts on a new page. 2. **Leave out what isn't theirs to read:** sandbox paths, other clients' names, private notes, and any secret or token that turned up in a log. 3. **Render it** with this skill's `pdf/verdict.css`: ```sh pandoc verdict.md -s --embed-resources --css pdf/verdict.css -o verdict.html # Chrome (macOS: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome") google-chrome --headless --no-pdf-header-footer --print-to-pdf=verdict.pdf verdict.html # or, without Chrome: pip install weasyprint && weasyprint verdict.html verdict.pdf ``` 4. **Look at every page** before sending: `pdftoppm -png -r 60 verdict.pdf page` and read the images. Check the outcome box, that commands aren't cut off, and that page numbers run right. 5. **Name it** `-verification-.pdf`. A sent PDF is never overwritten: a changed verdict is a new file with a new date, and its first finding says what changed. ## Appendix: the map format What the mappers write, for reading a map.json without the viewer. The viewer on /misc/verification-bench/ draws any codebase from one JSON file. Every extractor (scripts/verification-bench/map-*.py) writes this format, so the viewer never needs to know the language. A map is made on the machine that has the code and opened on the page by dropping the file; nothing is uploaded. ```json { "format": "verification-bench/graph@1", "name": "TurboSort", "language": "python", "generatedBy": "scripts/verification-bench/map-python.py", "nodes": [ { "id": ".", "parent": null, "kind": "dir", "name": "turbosort-repo", "lines": 0 }, { "id": "turbosort/core.py", "parent": "turbosort", "kind": "file", "name": "core.py", "lines": 43 }, { "id": "turbosort/core.py::turbo_sort", "parent": "turbosort/core.py", "kind": "function", "name": "turbo_sort", "lines": 10, "line": 6 } ], "edges": [ { "from": "…::turbo_sort", "to": "…::merge_all", "count": 1, "guess": false } ], "unresolved": 0, "spotlight": ["turbosort/core.py"], "trace": { "label": "python3 -m bench.run_benchmark", "durationMs": 77.0, "events": [[1.25, null, "bench/__init__.py"], [2.08, "bench/run_benchmark.py", "bench/datasets.py"]], "truncated": false, "ran": { "bench/harness.py::fast_sort": 15 } } } ``` - **nodes** form one tree through `parent`; exactly one root has `parent: null`. `kind` is `dir`, `file`, `class` or `function` (a method is a function whose parent is a class). A language without classes simply has none; one with modules or impl blocks maps them to `class`. `lines` sizes the bubble. - **edges** are calls found by reading the code. `guess: true` means the extractor linked a call it couldn't pin down (by a unique method name); the viewer dashes it. `unresolved` counts calls it couldn't link at all. A map with honest gaps beats one that looks complete. - **spotlight** (optional) marks the code a claim rests on. After a replay the viewer reports whether any of it ran. - **trace** (optional) is a real run: `events` are `[ms since start, caller, callee]` in order, with `caller: null` for the entry point. A file as callee means its top-level code ran (an import). `ran` counts every call even when `events` was cut short (`truncated`).