Lesson 5.2 · 3:54
Expected vs observed
Goal: Describe a bug so clearly that anyone, including your agent, can see it happen too.
Try it
- Download the bug version of the practice app from the link below this lesson. Put it in a new folder, for example
ai-native/practice-bug. Don't overwrite your working copy. - Open it in OpenCode, make a save point, then ask OpenCode to start it (
node serve.mjs) like last lesson. - In the browser, submit "Repair the light". Check that it appears in the list.
- Refresh the page.
- Watch what happens. Do it once more to be sure.
- Create a file called
BUG-REPORT.mdin the folder (ask OpenCode to make it, or use a text editor) and fill in:
Expected:
Observed:
Steps to reproduce:
1.
2.
3.
Do not ask the agent to fix anything yet. Today you only describe.
You're done when a classmate could follow your three steps and see the same thing, without asking you a single question.
(Hint: Observed should be something like "the request disappears after refresh." Not "the database is broken." You don't know that yet!)
Recap
- A bug is a gap between expected and observed.
- A good report has three parts: expected, observed, steps to reproduce.
- Observed means only what you saw. Save guesses for next lesson.
Next lesson (5.3): you hand this report to the agent and ask why before anyone fixes anything.