Agents that prove they're done.
A curated directory of rules, skills and hooks that make AI coding agents verify their own work and return evidence: test counts, red-to-green runs, screenshots, logs, CI artifacts. Every entry is adapted to the harness and the model, or marked untested.
Directory (34 entries)
Verification Before Completion (superpowers)
Iron law: no completion claim without fresh verification evidence. Identify the command that proves the claim, run it in full, read the output and exit code, then state the claim with the evidence.
tests run countlogsblocks: claims done without running checksblocks: stale run before last editTest-Driven Development (superpowers)
Write the failing test first, watch it fail for the right reason, then make it pass. The red run is part of the proof.
red-to-greenblocks: test never failedblocks: tests written after the fact to match codeSystematic Debugging (superpowers)
Root cause before fixes: reproduce, gather evidence, form one hypothesis, test it, then fix and confirm.
logsred-to-greenblocks: symptom patch without root causewebapp-testing (Anthropic skills)
Playwright toolkit to drive a local web app, capture browser screenshots and read browser console logs to verify frontend behavior.
screenshotlogsblocks: UI change never looked atGoal to Proof
Closure contract: proof must be as broad as the claim. Climb from focused check to the real boundary (render, device, remote) and report which layer was verified and what remains unverified.
tests run countscreenshotlogsblocks: partial artifact claimed as doneblocks: unobserved external actionStop hook test gate
A Stop hook runs your test command. Exit 2 (or decision: block with a reason) prevents the agent from ending its turn, so it keeps working until the check passes.
tests run countlogsblocks: agent stops before checks passCursor stop hook follow-up loop
When the agent loop ends, a stop hook can re-run checks and return followup_message to submit another turn automatically. loop_limit caps iterations (default 5).
tests run countlogsblocks: agent stops before checks passCapture test output with afterShellExecution
afterShellExecution receives the full command and terminal output. Append test runs to an evidence log the reviewer reads instead of the agent's summary.
logstests run countblocks: narrated results that never ranFail-closed gates (failClosed)
Hooks fail open by default. Set failClosed: true so a crashing or timed-out verification hook blocks instead of silently passing.
logsblocks: verification hook silently failing openBlock when a hook fails (onFailure)
Set onFailure: "block" on a command or HTTP hook so a missing script, crash or timeout blocks the action instead of letting it through.
logsblocks: verification hook silently failing openGrok Build PreToolUse commit gate
PreToolUse is the only blocking event in Grok Build: exit 0 allows, exit 2 denies. Match the shell tool on git commit and deny unless a fresh passing test artifact exists.
tests run countCI artifactblocks: done claim lands in repo without passing testsShow evidence, don't assert success
Best-practice rule: have the agent show the test output, the command it ran and what it returned, or a screenshot, instead of saying it works.
logsscreenshottests run countblocks: claims done without running checksAdversarial review subagent
Before counting work as done, a subagent in a fresh context reviews only the diff against the plan and reports gaps. Tell it to flag only correctness gaps.
logsblocks: agent grading its own homework/goal condition with separate evaluator
Set the check as a /goal condition: a separate evaluator re-checks it after every turn and the agent keeps working until the goal resolves.
tests run countblocks: agent stops before checks passAGENTS.md working agreement: run tests after edits
Example from OpenAI's guide: 'Always run npm test after modifying JavaScript files.' Advisory only, so pair it with a gate.
tests run countblocks: edits shipped without a test runbug-fix-verifier.mdc (Appsmith)
Real production Cursor rule: write a failing test that demonstrates the bug before fixing, fix the root cause, confirm all existing tests still pass.
red-to-greentests run countblocks: symptom patch without root causeblocks: test never failedproduction-readiness (cursor.directory)
Readiness audit where each check is PASS / GAP / N/A / UNKNOWN and PASS needs proof: a file path, config, CI run, dashboard or doc link. Never PASS from a README claim.
CI artifactlogsblocks: PASS from a README claimPlaywright MCP screenshot and console proof
MCP server exposing browser_take_screenshot, browser_console_messages and browser_network_requests so the agent can attach visual and log evidence of a UI change.
screenshotlogsblocks: UI change never looked atFail if zero tests collected
A suite that collects zero tests exits 0. Parse the runner's own count, fail if collected == 0 or the count dropped, and require one artifact you can open.
tests run countCI artifactblocks: zero tests ran, exit 0Fresh verdict bound to the diff (pre-commit)
Stamp the test verdict with a timestamp and the staged-diff hash; a git pre-commit hook rejects a 'done' commit unless a fresh passing verdict with a matching test count exists and frozen test files are untouched.
tests run countCI artifactblocks: stale run before last editblocks: agent edits tests to passCreate a verification skill (pstack)
Generates a project-local .cursor/skills/verify-<app> skill that launches the real app, drives it like a user, and captures evidence (screenshots, terminal transcripts, response bodies, logs, exit codes), then proves the generated skill before handing it over.
screenshotlogsblocks: UI change never looked atblocks: test-only endpoint used as proofMaintain a verification skill (pstack)
Periodic pass: one read-only source reader per feature plus a mandatory live session driving every feature; ships at most one PR of proven corrections and reports clean / changed / blocked honestly.
screenshotlogsblocks: stale verification docsProve It Works (pstack)
Before declaring done, verify the real artifact (run the feature, read the actual value, inspect the diff), not a proxy, self-report or 'it compiles'. Prefer a rerunnable script whose output is kept as an artifact.
logsCI artifactblocks: claims done without running checksblocks: proxy check instead of the real thingBlast radius (pstack)
Find what a change breaks beyond the diff, then prove the one fact its safety depends on by running real code. Uses an explicit 5-level evidence ladder from 'you said so' to 'reproduced in the running app'.
logstests run countblocks: unproven safety claim in reviewCorrect (pstack)
Turns repeated agent mistakes into checks (architecture, types, a lint naming the fix, a test) and proves each check fails on a real past mistake.
red-to-greenblocks: same agent mistake repeatedBenchmark checklist (pstack)
Vets a performance measurement (limiter, tuning, errors, repeatability, relevance, and whether the work actually happened) before reporting a speedup or regression.
logsblocks: unexplained benchmark numberExplain the Number (pstack)
Before trusting a measured number, name what limits it and rule out errors, skipped or cached work and noise with evidence; keep run count, spread and limiter next to the number.
logsblocks: unexplained benchmark numberShow me your work (pstack)
Decision trail for long or unattended runs: a TSV log, one row per decision (what, why, evidence, result), committed when a reviewer needs it.
logsblocks: unreviewable unattended runTDD (pstack)
Failing test first for bugs with a cheap local test target; skipped when the test path is unclear or expensive.
red-to-greenblocks: test never failedSequence Verifiable Units (pstack)
Break multi-step work into units that each end in a checked state; stack commits so the failing test comes first and the fix on top, making the sequence prove itself.
red-to-greenCI artifactblocks: big-bang change with no intermediate checksInterrogate (pstack)
Multi-model adversarial review: one read-only reviewer per configured model (default Claude + Grok) and a synthesized verdict; findings raised by several models rank higher. Does not auto-apply.
logsblocks: agent grading its own homeworkFigure it out (pstack)
Designs a playbook for big work: definition of done as a falsifiable predicate, verification harness and baseline built before the work, hypothesis loop checked on the real artifact, decision log.
logstests run countblocks: claims done without running checksblocks: agent games the gateBuild the Lever (pstack)
Build the codemod/script/check that does or proves the work, so a reviewer can rerun it instead of trusting a hand-done change.
logsCI artifactblocks: unrepeatable hand-done changeTest Behavior, Not Implementation (pstack)
Judge each test by two imagined edits: break the behavior (the test must fail) and change internals (it must pass). Tests that fail the first prove nothing.
red-to-greenblocks: test that can't failProof of the week
One verification pattern every week, adapted per harness and model. No spam.