๐Ÿ›Ÿ When something breaks

It will happen, and it is fixable

Use the same calm method every time, whatever tool you use: six steps, three prompts, and the point where you should stop prompting.

  1. 1

    Reproduce it

    Write down the exact steps, what you expected and what happened. If you cannot make it happen again, you cannot confirm a fix.

  2. 2

    Read the real error

    Open your browser's developer console and network tab, and check your host's logs. The error message is usually more useful than the symptom.

  3. 3

    Find the change that caused it

    Ask "what changed since it last worked?" Compare commits, or use git bisect to find the exact commit.

  4. 4

    Roll back if you are stuck

    Restoring the last working version is a valid fix while you investigate. Use your host's rollback (for example Vercel instant rollback) or git revert.

  5. 5

    Give the AI the right context

    Paste the exact error, the steps to reproduce and the relevant file. Ask it to explain the cause before it changes anything.

  6. 6

    Stop the loop

    If three attempts have not fixed it, stop prompting. Each new attempt can add more changes on top of the problem. Roll back, then try a fresh conversation with a clear summary.

Flowchart: something broke, reproduce it, read the real error, find the change, give the AI context. If fixed within three tries, commit the fix. If not, roll back, start a fresh chat with a clear summary, and reproduce again.Flowchart: something broke, reproduce it, read the real error, find the change, give the AI context. If fixed within three tries, commit the fix. If not, roll back, start a fresh chat with a clear summary, and reproduce again.
If three attempts don't fix it, roll back and start over with a clear summary.

Copy-paste prompts

Ask the AI the right way

Explain the error first

Here is an error from my app: [paste error]. Steps to reproduce: [steps].
Before changing any code, explain what is causing this and which files are involved.

Find the change that broke it

This worked at commit [hash or description] and broke after [change].
Compare the two and tell me which change caused the problem. Do not edit anything yet.

Fix only this one thing

Fix only this issue. Do not change unrelated files, rename things or add new packages.
After the fix, list every file you changed and why.

Common breakages before launch

Watch out

Missing access rules are the most common serious problem in AI-built apps. In 2025, researchers found 170 apps built with one popular builder that exposed user data this way (CVE-2025-48757). Turning on Row Level Security without writing policies blocks everything, so test with two real accounts.

Watch out

Login that works in preview but loops or fails on your real domain usually means the domain is missing from your auth provider's allowed redirect URLs. See Supabase redirect URLs.

Watch out

If payments succeed in Stripe but your app never updates, the webhook is usually pointing at the wrong URL, using a test-mode secret in live mode, or failing signature checks. Test locally with the Stripe CLI.