The model gives you working code and moves on. But "works when I tried it" and "works" are different claims, and the gap is where bugs live.

The verify loop is one extra step: after it answers, ask it to break its own answer. It's the cheapest bug-fix you'll ever run.

The first output usually handles the case you were thinking of. It's the cases you weren't thinking of, an empty list, a missing field, a huge number, that ship as bugs. So you don't accept the first answer; you interrogate it.

One verify question, one bug gone

Both outputs are from Claude, via Claude Code (26 Sep 2026), the second after a single follow-up. Verbatim.

You
write a function that returns the average of a list of numbers
Model
function average(nums) {
  const total = nums.reduce((a, b) => a + b, 0);
  return total / nums.length;
}

it dependsCorrect for a normal list. But average([]) divides by zero and returns NaN, which then spreads through everything downstream.

You
what inputs would break this function, and fix it
Model
function average(nums) {
  if (!Array.isArray(nums) || nums.length === 0) return 0;
  const total = nums.reduce((a, b) => a + b, 0);
  return total / nums.length;
}

betterThe model found its own edge case: an empty array (and a non-array). Same function, now safe.

What changed: You didn't need to know the bug was there. You needed to ask the model to go looking. "What would break this?" does that in one line.

The loop is three moves: generate, verify, refine. Verifying can be asking for edge cases, asking it to write a test, or just reading the code (the next lesson). The point is that the check is a separate step you always take, not a mood you're sometimes in.

Try it with the rules off. Picture shipping the first version above to a page that averages user ratings. The first product with no ratings shows “NaN stars.” One verify question, asked before you shipped, would have caught it.

Check yourself

0/3 got it

Saved on this device only. No account, no streaks.

Next in talking to it well: How to read AI code without coding.