---
name: rjv-verify
description: "How-to: prove a change works phase by phase—pick the proof before code, run the change, stop after three failed fix rounds, run cheap checks before commit or PR, review once, and turn missed bugs into rules. Points to rjv-test-types, rjv-verify-skill, rjv-diff-checklist, rjv-code-review and rjv-laravel-hooks; small fixes use rjv-work-plan's simple lane."
---

# Verify: evidence before done

Your job is to bring evidence that a change works. The user's job is to
define done and read that evidence. A change is verified when it ran
the way a user or caller would run it, and every check stayed honest.

This skill holds the phases. Each phase points to the material it needs.

| Phase | Do | Material |
|---|---|---|
| 1. Before code | pick the proof | `rjv-test-types` |
| 2. Building | run the change | the repo's `verify` skill, or `rjv-verify-skill` |
| 3. A check fails | fix it, at most three rounds | below |
| 4. Before commit or PR | cheap checks first, record what ran | below |
| 5. Review | one reviewer, diff-triggered checklist | `rjv-code-review`, `rjv-diff-checklist` |
| 6. After a miss | turn it into a rule | `rjv-diff-checklist` |

A small fix through `rjv-work-plan`'s `simple` lane (`/rjv-fast-code`)
skips phases 1, 5 and 6. Phase 3 and the live look still apply.

## 1. Before code: pick the proof

Name the proof before writing the code, so the code cannot shape the
test. Read `rjv-test-types` to choose between an end-to-end flow, a
property test and a differential test. On a spec-driven branch each
proof maps to a criterion ID (`rjv-spec-driven`).

Done when every behaviour the change promises has a named proof.

## 2. Building: run the change

Running the app end to end beats any test. Use the repo's `verify`
skill (or `verify-<app>`) to boot, drive and inspect the app.

| The repo | Do |
|---|---|
| has a verify skill | run only the flows the change touches, once, before you report done |
| has an app, no verify skill | write one with `rjv-verify-skill`, then run it |
| has nothing to run (a library, a script) | run the public entry point on a real input |

**The repo's test-tier rule wins.** When a repo says browser runs
happen only on request or before a release, follow it, and say in the
report that the changed flow was not driven. Never put a verify run in
a git hook; hooks run the cheap checks in phase 4.

Done when you have seen the changed behaviour happen, with a
screenshot, a response or a log line, or the report says the tier rule
deferred it.

## 3. A check fails

Fix the code, never the check. **Never edit a test, assertion,
snapshot or checklist to make your own change pass.** If the check is
wrong, say so to the user and change it in its own commit.

**Three rounds, then stop.** When the same check still fails after
three fix attempts, stop and bring the user the failing output and
what you tried. A fourth guess costs more than their minute.

A flaky test: **never retry it until it passes, add a sleep, or skip
it.** Find the root cause. If you cannot, delete the test and write
why in the commit body. A flaky test teaches every later agent to
rerun instead of fix.

Done when the check passes for the reason you expect, or the user has
the failing output.

## 4. Before commit or PR

Run the cheap checks before anything that spends shared time:

lint and types on touched files -> touched tests -> verify skill -> commit -> push -> CI

In a Laravel repo, `rjv-laravel-hooks` installs these as a pre-push hook.
Heavy suites (full unit, browser) run before the commit, never after
every edit. An agent that pushes before testing locally spends
reviewer and CI time on a bug it could have caught.

Record what ran in the commit body as one plain sentence, never a
`Key: value` line at the end, which git reads as a trailer:

```text
Verified by running the checkout flow in the verify skill and the cart unit tests.
Verified by nothing; docs only.
```

A hook run counts when you name what it ran ("Verified by the pre-push
smoke: types, lint, touched tests."). A hook-only line says no
behaviour was seen, so it reads the same on most commits; that is
intended.

Write "nothing" when nothing ran, so unverified commits can be found
with `git log --grep "Verified by nothing"`.

Done when the commit body says what ran.

## Speed: why fast checks matter

Verification is what lets you hand off more work: with checks you
trust, many agents run at once and you read evidence, not every diff.
A slow check shrinks that: fewer runs per batch, and a failure is
harder to place. So keep the loop fast:

- Run only the checks the diff triggers: touched files, the slice's
  own scenarios, the checklist items whose trigger matches.
- One heavy run per merge batch, before the commit, never per edit.
- On a loaded machine, run test files one at a time with a longer
  timeout. A timeout under load is not a pass: rerun the file alone
  once to place the cause, and say in the commit body that the first
  failure was load.
- A check that is slow every time is a defect: make it faster, or
  move it to the batch run.

Done when every check that ran was triggered by the diff, and no
heavy suite ran per edit.

## 5. Review

- **One correctness reviewer, several rounds.** Never add a second
  correctness reviewer to catch what the first missed. Checks along
  other lines (design craft, accessibility, security) sit beside it
  when the repo requires them. Tune the first: its brief, the repo's
  `REVIEW.md`, the diff checklist. Rounds build on each other: give
  each round the earlier findings and past failures
  (`rjv-code-review`).
- **Checks sit out of reach.** `REVIEW.md` and the diff checklist are read
  from the base branch: `rjv-diff-checklist`. Read the spec from the base
  branch too.
- **Review a commit.** A review result belongs to one SHA. A push
  during the review makes the result stale; review the new SHA.
- Run the diff checklist from `rjv-diff-checklist`: only items whose
  trigger matches the diff.

Done when the verdict names its SHA and every matching checklist item.

## 6. After a miss

A bug that reached review, QA or production becomes a rule only when
it can be seen in a diff. Add it as a checklist item with
`rjv-diff-checklist`, or as a test with `rjv-test-types`. Prune on a
routine: rules and suites only grow if nobody removes them.

Done when the miss has a checklist item, a test, or a written reason
it cannot be caught from a diff.
