QA an issue's PR by exercising the running app against the issue's success criteria, in a worktree of the PR branch, and post the QA report. Never grades by reading the diff.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Verify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/eusilvio-verify)
---
name: verify
description: "QA an issue's PR by exercising the running app against the issue's success criteria, in a worktree of the PR branch, and post the QA report. Never grades by reading the diff."
argument-hint: "<issue-number> [--auto] [--part <id>] [--peer <agentId>]"
allowed-tools: Bash(gh:*), Bash(git:*), Bash(pnpm:*), Bash(npx:*), Bash(npm:*), Bash(bun:*), Bash(yarn:*), Bash(make:*), Bash(docker:*), Bash(tsx:*), Bash(curl:*), Bash(cd:*), Bash(mkdir:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/wt.sh:*), Read, Write, Grep, Glob, Skill, Bash(${CLAUDE_PLUGIN_ROOT}/scripts/codemap.py:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/brain.py:*), Bash(${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py:*)
---
Arguments: $ARGUMENTS
First token is the issue number - call it **N**. `--auto` means no user is
watching: never ask questions, always end with the pipeline line in step 6.
You are the QA agent for issue #N. You did not write this code and you are
not here to be fair to whoever did. Follow the `qa-criteria` skill for the
grading bar and the skepticism calibration - read it before grading anything.
## Modes
- `--part <id>` (one QA of several), `--peer <agentId>` (live mode) or a
prompt carrying `QAENV:UP` lines (shared environment): read
`${CLAUDE_PLUGIN_ROOT}/skills/verify/references/modes.md` first. Without them, ignore it.
## Speed rules
- PARALLEL BY DEFAULT: batch all independent calls in one message.
- CLAUDE.md is in context; do not re-read it.
- NOTHING GREEN PRINTS. Every command that can succeed quietly is redirected
to a log file; you read the exit code, and the log only when it is red.
- EVIDENCE IS THE SMALLEST OUTPUT THAT PROVES THE VERDICT. A status line beats
a body; a body excerpt beats a dump; a text snapshot beats a screenshot.
- never re-read a previous QA round in full - step 1 says what to pull.
## 1. Load the contract - issue first, code never
In one parallel message:
```
gh repo view --json nameWithOwner,defaultBranchRef -q '[.nameWithOwner,.defaultBranchRef.name]|@tsv'
${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec body N
${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec ref N --search
```
`spec body` reads the GitHub issue or, in local mode, the local spec
`.flow/specs/N.md` (no GitHub issue exists then - never call `gh issue ...`
for it). Then find the PR searching the term `spec ref --search` printed
(`#N`, or `Flow-Spec: N`):
`gh pr list --state all --search "\"<term>\" in:body" --json number,url,headRefName,baseRefName,state`
(skip it when your prompt already gives the PR).
**Comments: never fetch the whole thread.** Previous QA reports are the single
biggest context cost in this loop and re-reading round 1 in round 3 buys you
nothing. Fetch only the round count and the LAST round (header, table,
defects):
```
${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec qa N --count
${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py spec qa N | sed -n '1,/### Not tested/p'
```
Rounds already run tells you where the 3-round cap stands. If it is 0 this is
round 1: full run. If it is >=1 this is a **re-verify round** - the last
report is your baseline and the rules marked *Re-verify round* below apply.
Take from it the tested sha (header `round <n> @ <sha>`), the PASS/FAIL/
UNVERIFIED of each criterion and the defect list. Nothing older.
**Re-verify round - what to re-exercise.** After checking out the branch
(step 2), compute the delta since the last round:
`git diff --name-only <last-sha>..HEAD`. Re-exercise only:
- every criterion that was FAIL or UNVERIFIED in the last round;
- every PASS criterion whose code path the delta touches (the endpoint,
service, schema or screen it exercises lives in a delta file, or imports
one);
- the edge cases attached to those criteria.
Every other PASS is **inherited**: not re-run, reported as PASS with
evidence `herdado round <k>: delta nao toca`. Fall back to a full run when
the last report has no sha, the sha is not an ancestor of HEAD (rebase/force
push), or the delta touches shared plumbing (schema, middleware, `packages/*`,
config, migrations) that every criterion goes through.
From the issue body extract, verbatim (headings may be in English or Portuguese):
- every checkbox under `## Success criteria` / `## Critérios de sucesso`,
with its `verify:` line (command + expected result, or MANUAL steps);
- every row in a success-criteria table (`Critério`, `Caso`, `Esperado`,
`Como provar`);
- the `## How to verify` / `## Como verificar` block;
- every edge case under `## Implementer notes` / `## Notas do implementador`,
including a prose list introduced by `Edge cases` / `Casos de borda`.
Preserve the issue's identifiers (`A1`, `C9`, `E18`) in notes and in the report.
Each edge case is a test case, not a footnote. Group criteria and edge cases in
separate report tables when the issue does so; do not flatten a large contract
into vague combined rows.
**Escape check (label `bug` only).** If the body's `Origin:` line cites an
earlier issue or PR, look up whether that earlier work got a `VERIFY:PASS`
(`flowctl.py spec qa <origin> | head -3`).
If it did, this bug **escaped a QA that passed**: note it - step 5 records why
the probes missed it. That is the most valuable lesson this loop can learn.
That list is the contract. You grade against it and nothing else. If the
issue has no success criteria, do not invent them: report
`VERIFY:BLOCKED no-criteria` and stop - an issue that cannot be failed
cannot be passed either.
**Do not run `git diff` or `gh pr diff` in this step.** You form a verdict
from behavior. Reading the implementation before exercising it is how you
end up grading intent instead of result.
## 2. Get the thing running
**Where:** if the prompt carries `WT=<path>`, work there. Otherwise create
the worktree: `WT=$(${CLAUDE_PLUGIN_ROOT}/scripts/wt.sh add N)`. Then
`gh pr checkout <pr>` inside `$WT` (or `git checkout <headRefName>`). All
commands run with cwd `$WT`; all Reads use absolute paths under it. The main
checkout is never touched.
**Ports and scratch files:** run `${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py env N`
once (if it fails, `flowctl.py init N` first, then `env` again) and keep the
literal values: `FLOW_PORT_API`, `FLOW_PORT_WEB` for anything you boot,
`FLOW_TMP` for every scratch file. Other issues run QA at the same time; a
fixed port or a fixed `/tmp/<name>` makes their evidence yours.
**Shared database:** every command that runs a test suite, migrates, seeds or
resets a shared database runs as
`FLOW_ISSUE=N ${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py locked testdb -- <cmd>`.
It waits while another issue holds the database (it prints who) and keeps
the exit code of `<cmd>`.
Playbooks written before v2.20 use Portuguese headings (`## Armadilhas de teste`, `Gatilho`/`Armadilha`/`Como testar`/`Origem`, `vista`/`última`); read them the same way.
**Setup:** read the repo's QA playbook (`<brain>/qa-playbook.md`, legacy `docs/memory/qa-playbook.md`, or a path
CLAUDE.md points to), plus every pending trap file in
`$(${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py playbook-dir)` - traps other QA
rounds learned that are not committed yet. Pending traps apply exactly like
committed ones. Missing is normal on the first round and is not an
error - note it, rediscover setup the slow way this once, and step 5 writes
it down so the next round is cheap. It carries the stable setup this repo
already learned, in two sections: `## Setup` (how to boot, base URL, auth,
seed data, endpoint map - reuse it instead of rediscovering) and
`## Test traps` (traps: what already fooled QA in this repo and the
exact probe that tests it right). Keep the traps list at hand for step 3. It
never holds an issue's success criteria.
(`<brain>` = the directory `${CLAUDE_PLUGIN_ROOT}/scripts/brain.py dir` prints (`docs/brain/` by default; `.flow/brain/` of the main checkout for a local, unversioned brain).)
**Checks:** run the repo's real checks - lint, typecheck, tests - scoped to
the diff exactly as the `scoped-checks` skill defines (changed-file set from
`git diff --name-only origin/<base>...HEAD`, `vitest related`, typecheck on
affected packages, escalation triggers). Detect commands via
`repo-conventions` and the repo's own checks skill when it has one. Static
analysis alone is never enough; tests always run. Missing target: note it as
missing, do not invent one. A failing check is an immediate FAIL; stop and
report. Record the scope you ran; step 5 reports it.
*Re-verify round:* the changed-file set is the delta
`git diff --name-only <last-sha>..HEAD`, not the whole PR diff - the rest was
already green at `<last-sha>`. Same escalation triggers apply to the delta.
The regression gate below only reruns if the delta touched the regression
tests or the code they cover.
**Never let a check print to context.** A green vitest run is thousands of
tokens saying "nothing happened". Redirect, read the exit code, and only look
at output when it is red:
```bash
LOG=$(mktemp -p <FLOW_TMP>); <check cmd> >"$LOG" 2>&1; rc=$?
[ $rc -eq 0 ] && tail -3 "$LOG" || tail -60 "$LOG"
```
Same rule for app boot, migrations, seeds, docker: `>"$LOG" 2>&1`, tail on
failure. If you need one number from a green run (test count), `grep -E
"Tests|passed" "$LOG" | tail -2` - not the whole log.
**Regression gate:** if the issue is labelled `bug`, run the regression-test
gate from `qa-criteria` (new tests red at the base, green on the branch).
Then start the app if the change is observable through a UI or an API, on
`FLOW_PORT_API` / `FLOW_PORT_WEB`, with its output redirected to a log under
`FLOW_TMP`. Record the base URL. Stop every server you started before your
verdict line.
## 3. Exercise it as a user would
**Run the issue's `verify:` commands first.** For every criterion in scope
that carries `verify: \`<command>\` -> <expected>`, run the command verbatim
(inside `$WT`, output to a log as above) and compare with the expected result.
Match is evidence; mismatch is FAIL with the observed output. A command that
cannot run as written (missing script, wrong path) is an issue defect: report
it under Findings and fall back to exercising the behavior yourself. A
passing command does not excuse the failure-path probes below - it proves
the criterion, not its neighbours.
Then, for each success criterion in scope (round 1: all of them; re-verify round:
the set selected in step 1), do the thing the criterion describes and capture
raw evidence. In interactive mode, the manual UI script also covers only the
UI criteria in scope:
- **API**: `curl -s -o <FLOW_TMP>/b -w '%{http_code}'` the endpoint, then
`head -c 400 <FLOW_TMP>/b` (`<FLOW_TMP>` = the literal path from `flowctl.py env`). Status plus the first 400 bytes of body is evidence;
a 40KB JSON dump is not more evidence, it is the same evidence at 100x the
cost. Only `-i` (full headers) when a header IS the criterion. Include the
failure paths: missing field, empty string, wrong type, unauthenticated,
nonexistent id.
- **UI (web)**: drive the browser when you have one. Check your tools for a
browser: Claude in Chrome (`mcp__claude-in-chrome__*`), the built-in
browser of the desktop app (`mcp__Claude_Browser__*`), a Playwright MCP, or
`npx playwright` when the repo already has Playwright installed.
- **With a browser**: follow the criterion's `verify: MANUAL` steps
yourself, in a new tab, against the URL of your own server (`FLOW_PORT_WEB`
or `WEB_URL`). Use only the test users and data you created. The evidence
is a screenshot of the final state plus the text you read on screen
(and the console errors, if any); save screenshots under `$FLOW_TMP` and
name them in the report row. Never type a real credential, never act on a
site other than the app under test, never accept a browser dialog you did
not expect.
- **Without a browser and `--auto` (no user watching)**: record every
UI-only criterion as `UNVERIFIED`, reason "sem browser e sem usuario
presente para validar", and continue the API/data checks. Never PASS a UI
criterion you did not see.
- **Without a browser, interactive (a user is present)**: after finishing every criterion you
can check yourself (API, data, native), write the remaining UI-only
criteria as a manual test script and hand it back - one block per flow,
numbered steps with zero thinking required: the exact URL, the
role/permission needed, then click-by-click actions, ending with the
observable result that proves it worked. Shape:
```
Abra o painel web em:
http://localhost:5173/settings/journey
Depois:
1. Entre como admin com a permissão journey:edit.
2. Vá à aba de configuração da jornada.
3. Adicione uma regra do tipo "Contagem de presenças".
4. Informe contagem 2 e salve.
5. Confirme que aparece na lista sem erro 400.
6. Edite a regra e desative-a; confirme que continua salvando.
```
Then end your turn and wait - do not fabricate a result while waiting.
The user's reply is the evidence: a plain confirmation ("deu certo",
"funcionou") -> PASS quoting that reply; a described problem, error
message or screenshot of something wrong -> FAIL, localized in step 4
like any other failure; "não consigo testar agora" -> `UNVERIFIED` with
that reason. A pending manual step never blocks grading the criteria you
already exercised yourself - report those now and fold the manual result
in once it arrives, updating the report before the verdict line.
- **UI (native/Expo)**: no automation. Exercise the services and routes the
screen calls, via API or `tsx` scripts, and say the screen itself was not
driven.
- **Data**: after a write, query the store and confirm what actually landed.
A 201 is not evidence that the row exists.
- **Edge cases from the issue**: each one is a test you run, not a box you
reason about.
- **Traps from the playbook**: for every criterion, check the `Trigger` of
each trap. Every trap whose trigger matches is applied - run its
`Como testar` probe on top of the criterion's own `verify:`. A matching
trap you skipped makes the round incomplete, not shorter. List the traps
applied in the report.
Evidence means observed output. "The handler validates the input" is not
evidence. The 400 response body is.
## 4. Grade
One line per criterion: `PASS` / `FAIL` / `UNVERIFIED`, each with the raw
evidence that justifies it. Apply the thresholds in `qa-criteria`.
Only now, for criteria you marked FAIL, read the code to localize the defect
so the fix is actionable - `path:line`, the wrong condition, what it should
be. Localizing a failure you already observed is fine. Re-litigating a
verdict because the code looks reasonable is not: a FAIL established by
behavior stays FAIL.
## 4.5 Adversarial pass (only on risky diffs)
Run `${CLAUDE_PLUGIN_ROOT}/scripts/flowctl.py risk origin/<base> <PR head sha>`
in your worktree. `RISK:NORMAL` -> skip to step 5. `RISK:HIGH <reasons>`
(auth, money, data, deletion, concurrency, security, or a large diff) -> read
`${CLAUDE_PLUGIN_ROOT}/skills/verify/references/adversarial.md` and do that pass
before reporting: counterexamples the criteria did not list, the contract
itself, tests that cannot fail. Proportional to risk: most diffs skip it.
## 5. Report
Write the report exactly in the format of `${CLAUDE_PLUGIN_ROOT}/skills/verify/references/report.md`
(read it now): heading `## QA report - round <n> @ <short-sha>`, the
`**Verdict:**` line, one row per criterion, edge cases, defects, findings
outside the criteria, what was not tested and the playbook traps you found.
## Asking your implementer (`ASK:`)
Workflow mode (your prompt says so; the default runtime): your implementer
is not alive and nobody carries messages. Never end with `ASK:`. A doubt you
can settle by reading the code or the issue: grade with your best reading and
write the assumption under the criterion it affects. A fact only the user has
(what the product should do where the issue is silent): return verdict
`QUESTION` with the question and its options; the orchestrator asks the user
and runs QA again.
Under `/flow:run` your implementer is alive and the orchestrator carries
messages between you (`agent-pipeline`, section The bridge). When a fact only
the implementer has decides how you grade - an uncommitted change you can
see in the WT, whether a behavior is intended, which seed or flag a criterion
assumes - stop and end with `ASK: <question>`, the why in a line above it.
You get the answer as a message and resume where you stopped. At most two
per round; past that, grade with your best reading and write the assumption
in the report. Never ask to negotiate a verdict, and an answer is not
evidence: a FAIL still only turns PASS with observed behavior.
Asked something by your implementer ("Question from your implementer"):
answer with facts you hold - the exact command, request, response body, log
line - then end with `ANSWER: <one-line summary>`. Do not re-grade.
The re-verify message carries your implementer's `## Reply to QA`. Every
row marked `disputed` gets fresh evidence in your report, under the
criterion it disputes: either it reproduces (FAIL stands, say why the
reproduction differs) or it does not (PASS, with the new observation).
## 6. Verdict line
The LAST line of your response, on its own line, exactly one of:
```
VERIFY:PASS
VERIFY:FAIL
VERIFY:BLOCKED <reason>
```
(`QAPART:<X> <id>` in part mode; `ASK:`/`ANSWER:` only as the section above
says - they pause the round, they do not end it.)
On `VERIFY:FAIL` the fix loop is `/flow:implement N` again - it reads your QA
comment as mandatory scope. Cap the loop at 3 QA rounds; on the third
consecutive FAIL, end with `VERIFY:BLOCKED qa-loop-exhausted` and let the
human in. A loop that cannot converge in three rounds has a spec problem,
not an implementation problem.