Verification-First Development

Decide how you will check the result before the AI builds, using sample data, clear success conditions, and a short test or checklist.

Content date: October 15, 2026.

Plain English

Verification-first means deciding how you will check the result before anything gets built. A good success condition describes behavior, like "a customer can't open another customer's invoice," not an implementation detail, like "add this function." Proof can be an automated test, a written manual check, a log entry, or a screenshot, depending on the change.

Use this when

Do this before you fix a bug or add behavior that customers, staff, or other software rely on.

If you are just starting

Write one example as "given this starting point, when this happens, then this should result." Reproduce the current problem first, so you know the check can fail. Use a small test or a clear manual checklist. After the change, repeat it and try one nearby feature. For a tiny, easy-to-undo change, a three-line checklist beats a big test suite.

When your project grows

Cover the places where trust matters: logins, permissions, payments, failures, and connections to other services. Keep different proof apart: small tests, tests of pieces working together, checks in a real browser, and checks on the live site. Record which version and environment each result came from. A passing test that uses fake services doesn't show that a real password, webhook, or email provider works.

Worked example

A tutoring site lets families download progress reports. Success means: the parent who owns the report can download it; a different parent gets "access denied"; a visitor who isn't logged in gets "access denied." A test that only checks the Download button exists proves none of that. Three requests to the download address, one per person, prove all three.

Practice

Turn a vague request into evidence

  1. Pick a small bug or feature in a practice project and write three things you could observe, such as "a blank name shows an error message."
  2. Reproduce the starting behavior and write down what you did and saw, with the date and project version.
  3. Ask the AI to make the change with your three observations in front of it.
  4. Repeat each observation, then try one nearby feature you didn't change.
  5. Make a table with a row per observation and the result: pass, fail, or not tested.

Deliverable: Your three observations and the results table, with the version, the date, and a note on anything untested.

Common mistakes to watch for

  • A test copies the code's logic, so it passes even when the behavior is wrong.
  • An unrelated test suite going green is offered as proof a bug is fixed.
  • You check only the case that works, never a wrong password or someone else's record.
  • A screenshot looks right, so you assume the server also blocks people who shouldn't see the page.

Prompting

A weak prompt

Build the feature first, then add a test that passes.

A better prompt

Before changing code, write the success conditions as things I can observe, and reproduce the reported problem. Include a failure case, such as a wrong password or another user's record. Make the change, repeat the checks, and tell me what the results prove and what they don't. Use made-up sample data and say which services were faked. Don't claim the live system works based on a local stand-in.

Without it, "done" means whatever the agent happened to build, and customers find the bugs first.

Check before you move on

  • You wrote what success looks like before the change.
  • You reproduced the bug before fixing it.
  • Your checks include a success case and a denied or error case.
  • Sample data is made up and kept apart from live services.
  • Each result notes the version and environment it ran in.
  • Anything you didn't test is written down.

You are done when

  • Every success condition has an observed result or a note saying it is untested.
  • Someone else can repeat your most important check from your notes.

Questions to think about

A screenshot shows the right customer's data. Does that prove another customer can't see it?

No. Hiding something on screen isn't blocking it on the server. Test with a second customer's login or record and confirm the server refuses.

Your email test passes, but it used a stand-in for the email service. What don't you know yet?

Whether the real account, sender address, and provider settings work, or whether the message arrives. A stand-in only shows your own code ran.

An agent reports "I added a test" as proof of success. Why isn't that enough?

That reports activity, not an outcome. You need to see what the test checks and what it printed when it ran.

Official references