~/VibeHandbook
$39

Chapter 12 · 10

Recap and Practice

Key takeaways

  • A bug is a gap between what you expected and what happened — give the AI both sides plus the exact steps, never just "it's broken."
  • Paste the error verbatim and the top of the stack trace; the first line pointing at your file is almost always where to start.
  • Confirm before you change: add a labeled log line to test a hypothesis, and bisect (in code or history) to halve the search space each step.
  • Fix the root cause, not the symptom — a guard or try/catch that only stops a crash usually papers over the real problem.
  • When the AI loops, reset the context to what you know for certain, ask it to explain rather than fix, and add evidence instead of guesses.

Try it

Next time something breaks, write the bug report before you ask for a fix. In a fresh chat, give the AI three things: the steps to reproduce, what you expected, and what actually happened — with the error copied verbatim and the top stack frames included. Then, instead of asking "fix it," ask for a hypothesis and a cheap way to confirm it (usually a log line). Run that check, paste the output back, and only then let the AI propose a fix. Notice how much straighter the path is than "it doesn't work, help."

I have a bug. Before suggesting any fix, give me a hypothesis and a cheap way
to confirm it (such as a log line) — don't edit code yet.

Steps to reproduce: [what you did]
Expected: [what should have happened]
Actual: [what happened]

Full error and stack trace:
[paste verbatim]

Relevant code:
[paste the function that failed, plus anything it calls]

What could be causing this, and what should I log to confirm it before we change anything?

Want it offline?

Get the PDF + EPUB + downloadable prompt library + version updates.

$ Get the PDF — $39