Guide November 11, 2026 · 6 min read

Fix It With AI, Part 2: Understand Before You Fix

Asking your AI builder to fix a problem straight away can break something else. Get it to explain first: the prompt, the warning signs and a checklist.

Part 2 of 5 · Fix It With AI

In Part 1, I said you can fix what you built with AI, using AI. This part is about the step most of us skip, and it's the one that decides whether a fix helps or hurts.

It's this: before your AI changes anything, make it explain the problem to you.

The fix that would have broken something else

A scan of one of my apps flagged a problem: a function on the server that anyone could trigger without signing in. It sent an email to everyone on the mailing list.

The obvious fix was one line: make it require a sign-in. My AI builder could have done that in seconds.

Instead, the prompt I used said: review and advise, don't change anything yet, and it asked one more question: how is this function meant to be started?

That question found the trap. The monthly newsletter was sent by a scheduled job, and that job called the function without signing in. It only worked because of the gap. If we had closed the gap straight away, the newsletter would have quietly stopped. No error, no warning. I'd have found out weeks later, when nobody had received anything.

The real fix had two parts: lock the door, and give the scheduled job its own key.

The same prompt asked the AI to check the whole app for the same kind of gap. It found four more. One flagged problem became five fixed ones.

Here's the honest part. The hard part of that fix wasn't writing the code. It was knowing what the code was connected to.

Why AI jumps straight to fixing

AI builders are made to be helpful, and "helpful" usually means doing something. Ask about a problem and you'll often get a change, not an explanation.

They also work with what's in front of them. The AI sees the function it was asked about. It doesn't automatically go looking for the scheduled job in another file that depends on the bug staying exactly as it is.

Even the companies building these tools say to slow down. Anthropic's own advice for its coding assistant is to have the AI ask you questions and write down a plan before it builds, and it lists "Claude built something different from what you had in mind" among the common ways a session goes wrong. (Anthropic, Claude Code best practices)

So if your AI builder rushed into a fix, it wasn't being careless. That's simply its default. Your job is to change the order: understand first, then fix.

The "explain first" prompt

Copy this into your AI builder, and put the problem where it says so:

Don't change anything yet. I want to understand this problem first:

[paste the problem here]

In plain English, please tell me:
1. What exactly is the problem, and where is it?
2. Who could misuse it, and what could they do?
3. How is this part of the app meant to be used or started?
   Is anything (a schedule, another page, another service, a mobile app that's already released) relying on it working the way it does now?
4. What else depends on this code?
5. What could the fix break?
6. How will we check that everything still works afterwards?

Also check the whole app for the same kind of problem, and list every place you find it.

Question 3 is the one that saved my newsletter. Never skip it.

The mobile app in that list is there for a reason, too. Many app-store apps simply load your website inside them. Lock something down on the website, and the app that's already on people's phones changes the same moment. I recently had a fix to file downloads that, done the obvious way, would have stopped files opening inside a released phone app. The explain-first answer caught it before anything changed.

Plan the change before any code moves

For a small fix, the answer to that prompt may be all you need. For anything bigger, like a change that touches several files or splits a large file into smaller ones, take one more step: agree on a plan before anything is changed.

Ask the AI to write down:

Then read it and push back where something doesn't make sense. Go back and forth until the plan matches what you actually want. It costs a few messages, and it's far cheaper than undoing a change you didn't understand.

One question deserves special attention in any plan: which part of the app is in charge of each piece of information? Think of a setting like a size limit, a user's role, or the current mode. If two parts of the app each keep their own copy, a change in one won't reach the other. That's how you end up with "I changed it, but one page still shows the old value." A good plan gives every piece of information one home, and every other part reads it from there.

Only when the plan is clear, tell the AI to turn it into steps and make the changes.

How to read the answer

Good signs:

Warning signs:

If you see warning signs, ask again, more specifically: "Which files call this function? List them." A vague answer usually means the AI hasn't looked yet.

Before you say "go ahead"

If you can tick all of them, let it make the change.

How Verilay helps

Every fix in a Verilay report comes as two prompts, in this order:

The "what relies on it?" question is there because of the newsletter story above.

Next in the series

Part 3: one fix at a time, with an undo point. Even with a good plan, changing five things at once makes it hard to tell which one broke something. In two weeks: how to make one change, check it, and keep a way back.

If you've had a fix go wrong, or a "fix" that broke something you didn't expect, tell me: [email protected].

← Previous part
You built it with AI. You can fix it with AI too.
Next part →
One fix at a time, with an undo point
Coming 25 Nov
The monthly Verilay newsletter

One short email a month: what’s new at Verilay, one thing to check in your AI-built app (with a ready-to-paste prompt), and the AI security news worth knowing. No spam, and you can unsubscribe from any issue.

Verilay is free at verilay.dev — no account needed.
Paste in a GitHub link, a ZIP from Lovable or Replit, or your live app’s address, and it will tell you in plain English what your app is made of and what’s worth worrying about. The code is public at github.com/ekbm/verilay.