Skip to main content
Cory Diggs AI Builder

How I verify AI-generated code before I ship it

AI can write code fast. That doesn't make it ready.

When I built LottoMuse — a live web app on ASP.NET Core / .NET, hosted on Azure — with AI as my main coding partner, I learned this early: the model will hand you code that looks right, compiles, and still breaks something real. So I don't ship on looks. I ship after verification gates.

Gate 1: Does it do only what I asked?

The first check is scope. Did the change touch only the files and behaviour in the task? AI tools love to "helpfully" refactor nearby code. In a production app, unrelated changes are where regressions hide. If the diff is bigger than the task, I cut it back.

Gate 2: Does it build and pass the smallest relevant tests?

Not the whole suite for every tweak — the smallest tests that actually cover the change, plus a clean build. If those fail, nothing else matters yet.

Gate 3: Does it work end-to-end, for real?

For user-facing work, I test on the real app, with real providers, the way a user would hit it — not just a mocked test host. That's how I caught problems that unit tests missed completely: flows that silently rerouted, and stories that looked fine until a real generation ran.

Gate 4: What happens when it fails?

AI-generated code tends to handle the happy path. I check the failure path on purpose: bad input, a provider timing out, an empty result. A feature that only works when everything goes right isn't finished.

The point

Verification isn't distrust of AI. It's how you get the speed of AI and software you can stand behind. That workflow — plan, generate, verify, ship — is the core of Real Software With AI, using LottoMuse as the worked case study from start to finish.

If you want the short version first, the free guide is "Ship Something This Weekend" — at https://www.realsoftwarewithai.com/. The full e-book is $4.99, and the Complete Bundle with the Multi-Agent Kit for VS Code is $29.99, both one-time.

Portrait of Cory Diggs

Hey, I'm Cory Diggs

I'm Cory Diggs — founder of LottoMuse and creator of Real Software With AI. I build real web apps with AI, and I write here about planning, coding, verifying, and shipping them.

JOIN MY MAILING LIST

Practical notes on building, verifying, and shipping a real web app with AI.

Newsletter

Subscribe now to get daily updates.

Created with © systeme.io