"Just tell the AI to write it" has become standard practice for engineers. But data shows that 45% of AI-generated code contains security vulnerabilities. The problem isn't that AI writes badly — it's that humans are skipping the structure. Without planning and verification, AI coding is like driving without a license: very fast, direction unknown. The Plan→Execute→Verify loop is the key to making AI-assisted coding genuinely reliable.
The Temptation and the Trap
"Vibe Coding" is having a moment. The idea: throw a natural language requirement at AI, let it fully auto-generate code, and your only job is to check whether it runs.
Sounds like a dream. In practice, it's a nightmare.
Research shows that roughly half of code produced through pure Vibe Coding contains security vulnerabilities. Not because AI writes poorly — but because AI performs worst on large, vague tasks. Throw it "write me a user login system" and AI will cheerfully generate reams of code — possibly missing password hashing, skipping input validation, and ignoring SQL injection protection entirely.
Where AI excels: narrow-scope, clearly defined tasks with explicit acceptance criteria.
The Three-Step Loop: Plan → Execute → Verify
The solution isn't abandoning AI — it's using it correctly. The core is a simple three-step cycle:
Plan: Before AI touches anything, define what this step does, what it doesn't do, and what "done" looks like. Not a 100-page spec — just 30 seconds of clarity about scope.
For example: "Add rate limiting to the /api/login endpoint. Maximum 10 requests per IP per minute. Return 429 on breach." That's good scope definition. Compare it to "handle login security" — it's a hundred times clearer.
Execute: Let AI generate code within that explicit scope. The tighter the scope, the lower the error rate.
Verify: Check AI's output. Run tests, read diffs, give specific feedback. "This middleware doesn't handle Redis connection failure fallback" is ten thousand times more useful than "seems off."
Then loop back to Plan for the next step. Each cycle might take only a few minutes, but the compounding quality difference is substantial.
Real-World Case: SEO Summaries for 300 Articles
An engineer shared their experience using AI to add SEO summaries to 300 blog articles. The entire process illustrated this methodology:
Define success criteria first: Before AI wrote a word, tests were written — acceptance criteria for summary length, format, and keyword density. AI doesn't know what "good" means. Tests do.
Divide and conquer: Rather than throwing all 300 articles at AI at once, they split into 8 batches, each handled by an independent sub-agent. This avoided context window overload degrading quality.
Self-contained instructions: Each sub-agent received everything it needed — no "refer back to earlier in the conversation." Outcome-oriented, not micromanaged on process.
Final result: 2 minutes of instructions triggered 45 minutes of AI work, with all output passing automated tests. Human leverage ratio: 1:22.
Why Precise Feedback Is Everything
The most commonly neglected part of the loop is the feedback that follows Verify.
Vague feedback — "this isn't quite right," "try again" — sends AI into random-guess mode. Precise feedback — "line 23's try-catch block is missing TimeoutError handling; please add a 3-second retry logic" — guides AI directly toward the correct fix.
One sentence captures it: Precise feedback closes the loop. Vague feedback creates a new one.
This Isn't Just for Engineers
Plan→Execute→Verify applies to every AI collaboration scenario.
Having AI write a report? Plan the outline and each section's key point (Plan), have AI draft section by section (Execute), review each section before moving forward (Verify).
Having AI analyze data? Define the exact questions to answer (Plan), let AI run the analysis (Execute), sanity-check the numbers (Verify).
The core insight is singular: AI's speed is a gift. Speed without structure is a curse. Add the three-step loop, and speed becomes quality.
It's not about writing the perfect prompt — it's about building a rhythm of small, verified steps. That's the real skill of working with AI.
References
- Pachaar, A. (2026). How to Vibe Code: A Developer's Playbook. Blog.
- @akshay_pachaar (2026). Thread on Plan→Execute→Verify loop.
- grapeot (2026). Key Decisions for Deploying AI in Practice. yage.ai.
Found this useful?
Follow for new AI × biomedical research notes:
Or buy me a coffee to keep new content coming.
☕ Buy Me a Coffee