Verify

From melodic-software/claude-code-plugins · View interactive version

Verify is an AI agent skill from the GitHub repository melodic-software/claude-code-plugins. Fresh-context re-derivation of a performance result that does not inherit the implementer's numbers, reporting the target as met or not met without rounding a miss into a win. Use when: 'verify this speedup', 'is this result real', 'independent verification', 'write up the performance result'. Final

How to use this skill

Skill file

Arguments. [<claim or target>]. e.g. /performance:verify the 4-to-1 spawn reduction

Purpose

Answers "is this result real, and what does it actually say?"

This phase catches **blocking correctness defects that the implementer, the implementer's own test

suite, and a full green CI run all missed**, so it is a separate phase, not a step inside

measurement.

Read CODE0 first.

1. Fresh context, and adversarial by construction

Dispatch a verifier that does not inherit the implementer's numbers. Give it the trees and the

claim; withhold the reasoning that produced the figures. A verifier shown the expected answer

verifies the answer, not the work.

Dispatch it with the Agent tool. Re-deriving the numbers in this context is not this phase; only

when the Agent tool is unavailable or denied, say so and report `Reproduced by an independent

verifier: no`.

The brief should say, in substance: distrust the reported numbers, re-derive them yourself, and

report what you actually observe including the ways you could not reproduce it.

The brief also sets a turn budget, a limit the verifier keeps for itself: 30 turns, stop gathering and

re-measuring by turn 22, and spend the remaining turns writing the report. Run the highest-value

checks first: re-derive the headline number and the differential before any secondary check. A

report that ends short names what it did not reach under Not covered:. A verification that ran out

of turns is not complete, so anything unreached stays NOT MET or unverified.

Two independent verifiers routinely find different defects, so one verifier is the floor, not the

target.

2. Prove behavior did not change, with a differential

A passing test suite is not a behavior proof. It proves nothing asserted broke, not that

behavior is unchanged.

Run a differential: the pre-change and post-change subject over a harvested corpus of real inputs,

requiring byte-identical output. Use the bundled one rather than writing one:

`python3 "${CLAUDE_PLUGIN_ROOT}/scripts/differential.py" --baseline <path> --candidate <path>

--config <json>. Its config takes a matrix` of modes, and it refuses a run where neither arm ever

produced output. Run it from the Bash tool, whose shell resolves python3 (command -v python3 names

the one it found); a bare name inside another process's subprocess call searches a different

PATH (harness-integrity rule 6). The module docstring documents the config.

Cover every mode the subject runs in. A differential that covers one of two modes can miss

a deny -> ask downgrade in the other and still report byte-identical output. Enumerate the modes

first and record which the differential actually exercised; an unexercised mode is an unverified

mode, and it is reported as such rather than assumed fine.

3. Record whether the measured build is the deployed build

The verdict is a statement about the measurement. Whether the measured build is the one the user

runs is a separate disposition, the Deployed: line. The flow measures a worktree before merge, so

a difference at this point is expected and cannot be resolved before the PR: record it, never report

the change as done, and do not change the verdict for it.

This applies to a subject that runs from an installed copy, such as a Claude Code plugin. A subject

with no install record gets Deployed: n/a (no install record for this subject) and the report

proceeds, so a target-agnostic run is not blocked.

  1. Record what was measured: plugin or component version (from the tree or worktree path the

harness used), and whether a worktree override, --plugin-dir, or project-scope install path

was in play.

  1. Record what is deployed where the user actually runs: read the install record for the

plugin under test and quote its version and install path. Choose the record for the scope the

subject runs under; for a project-scope record also require its project path to equal the

subject project's root, both resolved to absolute paths, since one plugin can hold project

records for several repositories, and

fall back to the user-scope record when none matches. A plugin loaded only through

--plugin-dir has no record.

  1. Set the disposition. Versions agree: Deployed: same as measured. Versions differ:

Deployed: differs: <installed version/path>, re-measure after install, plus an `Open

follow-up: line (install the measured build, then /performance:snapshot post` and

/performance:verify again). With an open follow-up the report says the change is measured,

never that it is done, shipped, or live.

Check which stage a plugin reached

and Find plugins on disk

live. The project-path match rests on a probe, not that page: the source-control plugin's

project-scope reap probe

observed one project-scope record per plugin per directory, keyed by that directory's path.

4. Check the harness before believing the result

Every gate in the harness-integrity checklist. In particular, for any discrimination

check involved, confirm it asserts that its two arms differ, not merely that each produced its

expected string. A harness that exits identically in both arms and still reports a confident verdict

never exercised the subject. python3 "${CLAUDE_PLUGIN_ROOT}/scripts/discriminate.py" --config <json>

runs such a check with all three assertions, restores from a sidecar copy, and exits 2 rather than 1

when the harness never ran; prefer it to a hand-built pair of arms.

5. Report

State the target as met or not met, with the measurement that explains why.

Before the verdict: what limits the number

Nothing in a printed figure tells a sound run from a broken one. Before the report states MET or

NOT MET, the verifier fills two lines from its own runs:

harness or load driver, a lock both arms queue on, a saturated core, disk or network throughput.

For a counter it is what keeps the count at its after value, often the floor the goal recorded.

Profile an extra run, or record OS counters while it runs (a profiler slows what it watches), and

trace the busiest frames to their code path. These profiling runs locate the limiter; they are

not reported measurements.

Reading the source can suggest a limiter; only a measured run confirms one. A flat counter after

a change is a reason to look for the limiter, not proof the change did nothing: the cost it

removed may not have been the one holding the number.

excludes it. Spread between runs is checked against the snapshot's interleaved pairs; arms on

different build modes or flags against the snapshot's Rig: line, and arms that took different

code paths against its Path (<arm>): lines; a cache the after arm found warm against a

cold-start run of each arm; failed or skipped work against the error and work counts

(harness-integrity rule 8).

An untuned arm, one left on default runtime settings the Rig: line does not record (a pool or

cache size, a GC setting, a connection limit) while the other was tuned, is checked against a

diff of the settings each arm ran with. A gap that one-sided tuning buys belongs to the tuning,

not the change, so when the settings differ, re-run the default arm with the same tuning before

comparing. The exception is a claim whose change is that tuning.

Check the bound with arithmetic too: the saving is capped by how long the changed code ran in the

before arm. If the old code ran for 300 ms of a 2 s run, the after arm can be at most 300 ms

faster; a bigger saving says the after arm did less work or read from a cache, which needs

explaining before any verdict. On a /performance:climb branch, compare the limiter with the

mechanism the kept attempts named: a gain whose limiter sits elsewhere moved something the

hypothesis did not describe.

A report that cannot fill one of the two lines writes unknown on that line, lists the gap under

Not covered:, and is not MET.

Target:      <realistic> / <ideal>        Floor: <value>
Counter:     <before> -> <after>          [headline] [unproven, when Correlation is]
Correlation: <evidence, repeated from the goal> | unproven
Scaling:     <growing input, per-size result, bound, demonstrated at every size: yes | no> | n/a
Event:       <event-level metric, result vs event target> | n/a
Unit:        <unit metric, result vs unit target> | n/a
Measured:    <version/path harness used>
Deployed:    same as measured
             | differs: <installed version/path>, re-measure after install
             | n/a (no install record for this subject)
Duration:    <p50/p95 before> -> <after>  [or: REFUSED, <reason from is_measurable>]
Rig:         <hardware>, <runtime mode>, <throttling>, <run count>, <timestamp>
Limiter:     <resource or bound, the evidence, the code path> | unknown
Ruled out:   <alternative explanation: evidence that excludes it>, one or more | unknown
Verdict:     MET | NOT MET | UNMEASURABLE
Behavior:    UNCHANGED (differential: N inputs, modes covered: <list>)
             | CHANGED: <what changed>    [ranked above the performance claim]
Cost:        <diff size, new moving parts>   [optional; beside the gain]
Not covered: <percentiles, inputs, paths, modes not exercised>
Overrides:   <any recorded gate override, or none>
Open follow-up: <only when Deployed differs: install, then /performance:snapshot post and /performance:verify>
Reproduced by an independent verifier: yes/no, and what diverged

Rules that bind the report:

headline.** An unproven counter win is a counter win, not a user-perceived one.

goal says n/a.** A Scaling: bound not demonstrated at every size the goal recorded is not

MET, however well the largest or smallest size did. A goal with an Event: target is not MET

on the Unit: target alone: an unmeasured event target gives NOT MET and is named under

Not covered:. The event-level result is reported even when the unit result is good.

re-derives against them and reports the outcome in Verdict:, Not covered:, and the snapshot's

Path (<arm>): lines: an arm flagged unobserved or mismatched there is listed under

Not covered:.

ratios, with each target's row shown beside it. An arithmetic mean of ratios changes with which

arm is the reference; a geometric mean does not. See

write the result up.

human's call; the report makes the trade visible.

than the change, the report says so: a result held by the harness or a shared resource is not

evidence about the change.

the Open follow-up: line and no done, shipped, or live language until a post-install

re-measurement agrees.

claim, never folded into it.

is_measurable(), there is no duration line at all, only the refusal and its reason.

p50/p95-over-20 default, the refusal threshold, and counts-over-wall-clock for anything other than

instruction counts.

A MET change that shipped behind a flag gets a field read before /performance:protect. For

Claude Code's own hook behavior the source is /harness-ops:observability latency (if enabled); for any other

subject it is the telemetry the project's own instructions name. Take the read before the release

and again after it, and compare the two.

Field read for Claude Code hook behavior

live.

Boundary

claim.

Next

behind a flag): /performance:protect, which then hands off to /source-control:pull-request.

a field read showing no gain (flag turned off): /performance:target.

Gotchas

only checks what someone thought to assert.

conclusion.

silently reverts the fix and destroys the work. Restore from saved bytes, and verify the restore.

over real inputs answers the second, and only for the modes it ran.

number the host cannot support would be.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.