007 · Verification · Live, in daily use

QA Loop With An Adversary

Before my AI says done, a second agent tries to break it.

The problem

The QA loop is a verification habit built into my Claude Code setup. Any build that will be seen or used, such as a UI change, a render, a PDF, a reply or a delivery, goes through it before it can be called done.

How it works

A model that built something is a poor judge of whether it works, and "looks good" is not evidence. That is why the loop has fixed stages. First a spec that states what done means. Then the build. Then evidence gathered per claim: a screenshot, a test run, a file read back. Then an adversary agent, with fresh context, reads the spec and the evidence and tries to break it.

Anything it finds gets fixed and the loop repeats, with a cap of three rounds so it cannot spin forever. Progress shows live in a side panel. A hook flags work that needs the loop, so skipping it is a visible choice, not an accident.

  • Spec first, then build, then evidence
  • An adversary agent tries to break it
  • Fix and repeat, three rounds maximum

Outcome

Most of my deliverables pass through it now. The builder and the breaker never share context, and that separation is the whole design.

Stack

  • claude-code
  • ai-agents
  • evals
  • hooks

Code

github.com/HenryLop/qa-loop

Transcript

Before my AI says done, a second agent tries to break it. The loop starts with a spec, then the build, then evidence for every claim. An adversary agent reads the spec and the evidence and looks for the hole. Whatever it finds gets fixed, and the loop runs again, three rounds at most. A hook reminds the session to run it before any UI, render or delivery is called finished.

How this was made

Voiceover is text-to-speech (Microsoft Edge neural voice). Background art is AI-generated (Gemini). Titles and captions are set in code, not generated. The build itself was made with Claude Code.

← I Replaced The Windows TaskbarThe Dominio Router →