Deep Dive into AI-Driven Development
Lecture 2
Mastering the six-phase workflow for production-ready AI coding
2026 WayUp
The gap between AI capability and code quality
Discover + Plan + Review
Goal: Define exactly what to build
Execute with TDD
Goal: Build with tests first
Commit + Test
Goal: Verify it works
Every AIDD project starts with vision.md
What we're building and why it matters
Who uses this and their needs
Must-achieve objectives
Explicit scope boundaries
Languages, frameworks, services
Key choices with reasoning
Performance, security, compliance
How we measure achievement
Define distinct user types and their characteristics
Visual representation of user activities
What happens when things go wrong?
Explicitly define what we won't build
Epic: User Registration
Story: As a visitor, I want to create an account so I can access the app
Criteria: [ ] Email validated [ ] Password hashed [ ] Confirmation sent [ ] Error handling
Dependencies: Database schema, Email service | Size: M
RED: Write failing test → GREEN: Write minimal code to pass → REFACTOR: Clean up while keeping green
Think-Aloud Protocol:
E2E Test Scripts:
Continuous refinement, not one-time execution
Issues found? Go back to Discover for new requirements or Execute for fixes
New requirements? Update vision.md, then restart from Discover
Create new epic, Review for impact, Execute with TDD fix
Review existing code, Execute improvements (tests stay green)
| Phase | Best Tools | Why |
|---|---|---|
| Discover | Claude, ChatGPT | Strong reasoning for requirements analysis |
| Plan | Claude, Cursor | Task decomposition, codebase awareness |
| Review | Claude Code, Amazon Q | Code analysis, security scanning |
| Execute | Claude Code, Cursor | Multi-file edits, TDD support |
| Commit | GitHub Copilot | Commit message generation |
| Test | Claude Code, Playwright | Test script generation |
"Just build it" leads to rework. Always map requirements first.
AI loses context. Vision.md is the source of truth.
Writing tests after code defeats TDD's purpose.
Duplicate code and coupling go unnoticed.
AI can't catch UX issues. Users must validate.
Hard to review, hard to revert. Small commits win.
Create vision.md before writing any code. Update it when requirements change.
Complete one epic fully before starting the next. Avoid context switching.
Write the failing test, show it to AI, then implement. Never batch.
AI makes mistakes. Review phase catches them before they become tech debt.
The goal isn't to write code faster. It's to write better code, faster.
6
Phases: Discover, Plan, Review, Execute, Commit, Test
1
Vision document as the single source of truth
TDD
Test-Driven Development at the core of Execute
Deep Dive into AIDD Framework
Next: Effective Prompt Engineering
2026 WayUp - way-up.io