Prompting and Debugging Slides
Grades 6–12 · 60 Minutes
01 / 15
Prompting & Debugging
“The computer can’t read your mind, only your rules.”
Big Idea: Apps follow rules, not intentions. When you leave out a rule, the computer guesses—and it usually guesses wrong.
Spot Missing Rules Name the Bug Type Write Precise Prompts
Step 1 · Play & Observe 02 / 15
Test a Classmate’s App
Move to a classmate’s device and play their app once. Leave two sticky notes:
Green Sticky
Wall of Wins
Write one specific thing that worked well in the app.
Yellow Sticky
Wall of Improvements
Write one thing that didn’t work or could be better.
Post your sticky notes on the two walls when you finish playing.
Step 1 · Good Test Notes 03 / 15
Describe What Happened, Not How You Felt
Ask yourself: “What exactly did I see?”
Too Vague
“It was bad.”
“It was fun.”
Useful Observation
“The score disappeared after level 2.”
You just collected test results. Now we figure out why. That’s debugging.
Step 2 · The Core Idea 04 / 15
Apps Follow Rules,
Not Intentions
Most bugs are missing or unclear instructions—not broken code.
Every bug is a gap between what you meant and what you said.
If you don’t write the rule, the AI fills in the blank with a guess.
Step 2 · Why Precision Matters 05 / 15
Which Is Easier to Get Right?
Prompt A · Vague
“Write a good essay.”
What does “good” mean? How long? What structure? You have to guess.
Prompt B · Precise
“Write a 5-paragraph essay with a thesis, three pieces of evidence, and a conclusion.”
Clear rules leave no room for guessing.
The AI is in the exact same spot when you prompt it to build an app.
Step 2 · The Method 06 / 15
1947 · Harvard Mark II Computer
Grace Hopper & the First “Bug”
When the computer stopped working, Grace Hopper’s team didn’t guess. They opened the machine, checked each part, and found a moth stuck in a relay.
01
Look Closely
02
Compare
03
Test Guesses
04
Fix the Cause
The point isn’t the moth—it’s the method.
Step 3 · Bug Classification 07 / 15
The Four Bug Types
1. Bad Specs
You described the vibe, not the rules. (“Make it fun.”)
2. Missing Edge Cases
You only wrote what happens when things go right.
3. Unclear Roles
You didn’t say who does what: the player, the app, or the AI.
4. Assumed Context
You had a picture in your head that the AI didn’t have.
Next: Let’s match real tester feedback to these four bug types.
Step 3 · Practice 08 / 15
Prompt Under Test: “Make a fun catching game.”
“It’s boring—just one slow ball drops at a time.”
→ Bad Specs
“I missed 5 times and the game never ended.”
→ Missing Edge Cases
“I didn’t know if I should use arrow keys or click.”
→ Unclear Roles
“It gave me a bucket, but I pictured a space net.”
→ Assumed Context
Now label the real stickies on the Wall of Improvements with a bug type.
Step 4 · The Routine 09 / 15
Four Steps to Debug Any Prompt
01
Describe
What actually happened?
02
Compare
What did you want instead?
03
Assume
What did the AI guess?
04
Refine
Write the exact missing rule.
Let’s walk through an example together before you debug your own app.
Step 4 · Worked Example 10 / 15
Model It: Quiz App Bug
1. Describe
“After I answered, I could go back and change my answers.”
2. Compare
“I wanted my answers locked after I submit.”
3. Assume
“The AI thought I wanted flexibility. I never told it otherwise.”
4. Refine
“Once a user submits an answer, they cannot go back and change it. The Next button appears only after they submit.”
Notice how Step 4 states the exact rule and when the button appears.
Step 4 · Pro Tip 11 / 15
Precise Prompts Cost Less
“It’s broken, fix it” forces the AI to search your whole app and burns more credits.
1
Name the exact page or part.
2
Say what should happen instead.
3
Add a guardrail: “Don’t change the score display.”
Step 4 · Independent Practice 12 / 15
Debug Your Own App
Using a yellow sticky about your app, write all four steps (Describe, Compare, Assume, Refine), then build your refined prompt:
Prompt Frame
“On [page or part], [what happens now]. It should [what you want instead]. Don’t change [the part that already works].”
No yellow sticky? Pick one thing you wish your app did differently.
Step 4 · Partner Check 13 / 15
Test Your Prompt on a Human First
1. Read & Ask
Partner reads your prompt and asks one question: “What happens when...?”
2. Patch & Test
If your partner is confused, the AI will be too. Add the missing rule, send in imagi, and test.
3. Switch Roles
Trade roles and test your partner’s refined prompt the same way.
Remember: if it breaks something else, add a stronger guardrail.
Step 5 · Share Out 14 / 15
Debugging Spotlight
2–3 volunteers share with the class:
01
The Bug
What was happening in your app?
02
The Bug Type
Which of the 4 bug types caused it?
03
Before & After
Your original prompt vs. your refined prompt.
Listen for how each guardrail protected the rest of the app.
Step 5 · Exit Ticket 15 / 15
Before You Leave
What improvement will you make next time?
Which part of the app controls that behavior?
What should happen after the change?
Apps follow rules, not intentions—write the rule!
Prompting and Debugging Teacher Guide
Teacher Guide · Grades 6–12 · 60 Minutes
Prompting & Debugging
Slides 1–15
Big Idea: Apps follow rules, not intentions. If you don’t write the rule, the computer guesses—and it usually guesses wrong. Students learn to spot missing rules, name the bug type, and rewrite vague prompts as precise instructions.
Before Class (Prep)
- Ensure students can open an existing app in imagi (the Build Your First Game app works well). Pair any student without an app with a classmate who has one.
- Have green and yellow sticky notes ready. Set up two board columns: Wall of Wins and Wall of Improvements.
Step 1: Play, Observe, Diagnose
10 min · Slides 1–3
- Open with: “The computer can’t read your mind, only your rules.”
- Students move to a classmate’s device, play their app once, and write two stickies: Green (one thing that worked) and Yellow (one thing that didn’t work or could be better).
- Rule: Notes must describe what happened, not judge it. Redirect vague notes by asking: “What exactly did you see?” (Good: “The score disappeared after level 2.” Too vague: “It was bad.”)
- Post stickies on the two walls. Say: “You just collected test results. Now we figure out why. That’s debugging.”
Step 2: Apps Follow Rules, Not Intentions
8 min · Slides 4–6
- Share the core idea: most bugs are missing or unclear instructions, not broken code. Every bug is a gap between what you meant and what you said.
- Ask which is easier to get right: “Write a good essay” vs. “Write a 5-paragraph essay with a thesis, three pieces of evidence, and a conclusion.” The AI is in the same spot.
- Grace Hopper (1947, Harvard Mark II): Her team didn’t guess—they opened the machine, checked each part, and found a moth in a relay. Emphasize the method: look closely, compare, test guesses, fix the real cause.
Prompting & Debugging · Teacher Guide Page 2
Step 3: The Four Bug Types
10 min · Slides 7–8
Introduce the four bug types on Slide 7, then practice on Slide 8 (“Make a fun catching game”) using the one-line fixes below. Afterward, label the real stickies on the Wall of Improvements and debrief: “Every bug came from the same place: the gap between what we meant and what we said.”
1. Bad Specs (vibe, not rules) Fix: Increase ball speed every 10 points and add power-ups.
2. Missing Edge Cases Fix: End the game after 3 misses and show a Game Over screen.
3. Unclear Roles Fix: Move the catcher left/right with arrow keys or finger drag.
4. Assumed Context Fix: Draw the catcher as a glowing neon space net on a starfield.
Step 4: Debug Your Own App
22 min · Slides 9–13
- Introduce the Routine (Slide 9): Describe → Compare → Assume → Refine.
- Model It (Slide 10 · 5 min): Walk through the quiz app bug:
- Describe: “After I answered, I could go back and change my answers.”
- Compare: “I wanted my answers locked after I submit.”
- Assume: “The AI thought I wanted flexibility. I never told it otherwise.”
- Refine: “Once a user submits an answer, they cannot go back and change it. The Next button appears only after they submit.”
- Precise Prompts Cost Less (Slide 11 · 2 min): Vague prompts like “It’s broken, fix it” force the AI to search the whole app and burn more credits. Name the exact page/part, say what should happen, and add a guardrail (“Don’t change the score display.”).
- Students Try It (Slide 12 · 10 min): Using a yellow sticky about their own app, students write all 4 steps and a refined prompt with one guardrail: On [page or part], [what happens now]. It should [what you want instead]. Don’t change [the part that already works].
- Partner Check (Slide 13 · 5 min): Partner reads the prompt and asks: “What happens when...?” If the partner is confused, the AI will be too. Add the missing rule, send in imagi, test, and switch roles.
Prompting & Debugging · Teacher Guide Page 3
Step 5: Share & Exit Ticket
10 min · Slides 14–15
Share Out (Slide 14)
Invite 2–3 volunteers to share the bug they fixed, its bug type, and their before-and-after prompt.
Exit Ticket (Slide 15)
- What improvement will you make next time?
- Which part of the app controls that behavior?
- What should happen after the change?
Troubleshooting During Work Time
“The app didn’t change.” The prompt was too vague. Have the student name the exact page or part.
“It broke something that was working.” Add a stronger guardrail: “Keep everything else the same. Only change [specific part].”
“I don’t have a yellow sticky.” Have the student pick one thing they wish their own app did differently.