Objective
Your mission
Use three prompts — explain, why, and what-could-go-wrong — to understand and audit AI-generated code. Output: ai_explanation_audit.md.
You need: Any AI-built project with a code view and chat.
Time: 20 minutes.
Step 1: learn the 3 review prompts (3 min)
Prompt 1 — "Explain this code"
"Explain what the code in [file/section/function name] does, step by step, in plain English."
Prompt 2 — "Why did you do it this way?"
"Why did you use localStorage instead of a database?" / "Why did you use POST instead of GET?"
Prompt 3 — "What could go wrong?"
"What are the top 3 things that could go wrong with this code? What edge cases haven't been handled? What security issues might exist?"
Why the AI doesn't volunteer issues
AI coding tools are optimized to produce working code, not to surface every potential issue. When you ask it to build a form, it builds a form. It doesn't say 'by the way, your API key is exposed' unless you ask. The 'what could go wrong?' prompt is you asking it to switch from builder mode to reviewer mode. The same AI that wrote the code is surprisingly good at finding its own flaws when you ask it to look for them.
Step 2: find a section you don't understand (2 min)
Open a project you've built with AI. Find a section of code you don't fully understand — a function, a block of logic, anything that isn't immediately clear.
Step 3: ask "explain this code" (5 min)
Paste the section into the AI chat and ask:
"Explain what this section does, step by step, in plain English."
Write in your file:
## Code Section
[paste the code you didn't understand]
## Explain Prompt
["Explain what this section does, step by step, in plain English."]
## AI's Explanation
[summarize the AI's response]
Step 4: ask "why did you do it this way?" (5 min)
Follow up with a why question about a specific choice in that section.
Write in your file:
## Why Prompt
[Your "why" question]
## AI's Reasoning
[summarize the AI's response]
## My Assessment
Is the reasoning sound? [yes/no — and why]
Step 5: ask "what could go wrong?" (5 min)
Ask the AI to review its own code for issues.
Write in your file:
## What Could Go Wrong Prompt
["What are the top 3 things that could go wrong with this code? What edge cases haven't been handled?"]
## AI's Response
[summarize the issues the AI surfaced]
## My Assessment
Which issues are real? [list]
Which would I have caught myself? [list]
Which did I fix? [list what you asked the AI to fix]
The AI built your form and said nothing about risks. Which prompt switches it from builder to reviewer?
AI tools optimise for working code and rarely volunteer problems. Asking what could go wrong, which edge cases and security issues exist, gets it to audit its own output.