Vibe Coding
AI-Driven Development (AIDD)
From Chaos to Structure
Building production-ready software with AI agents
The Origin of "Vibe Coding"
There's a new kind of coding I call "vibe coding", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists.
Andrej Karpathy, February 2025
The Promise
AI handles implementation while you focus on what to build, not how
The Reality
Without structure, AI-generated code leads to chaos, bugs, and technical debt
The Solution
AIDD: A structured methodology for AI-driven development
The Problem: Unstructured AI Coding
8x
more code duplication as AI adoption increased
GitClear analysis, 211M lines (2020-2024)
+9%
higher bug rates with AI adoption
Google DORA Report 2024
Root cause: AI without methodology produces code that works in isolation but fails at scale.
AIDD: AI-Driven Development Framework
Structure that makes AI coding production-ready
1 Specification-Driven
Clear requirements guide AI generation before implementation begins
2 Test-Driven (TDD)
Write tests first, then implement. Each requirement validated individually
3 Automated Review
Best practices enforced automatically. No duplicate code, no coupled modules
4 Production-Ready
Generated code must be secure, maintainable, and scalable from day one
The AIDD Workflow
Discovery & Planning
- Discover - Map personas, goals, user flows
- Plan - Break into tasks with acceptance criteria
- Review - Eliminate duplication, check vision
Execution & Validation
- Execute - TDD: test first, then implement
- Commit - All tests pass before push
- Test - Human + automated validation
Deep dive: Session 2 covers each phase in detail with prompts and examples.
User Story Mapping
Jeff Patton's method for visualizing user journeys
User Story Map: A visual tool organizing user stories along two axes—horizontal (workflow sequence) and vertical (priority/detail level).
The Three Levels
Activities (Backbone)
High-level goals: "Deposit check", "View balance"
Steps (Ribs)
Subtasks: Enter details → Sign → Submit
Details
Granular interactions prioritized vertically
Why Map Stories?
- Steps become epics in backlog
- Details become user stories
- MVP slicing by priority lines
- Reveals gaps and risks early
Prompt: "Map the user story for [feature]: activities, steps, and details with acceptance criteria."
The Vision Document
Your project's single source of truth
Project Overview
What we're building and why it matters to users
Target Audience
Who uses this and what they need
Primary Goals
Must-achieve objectives (scope IN)
Non-Goals
Explicit boundaries (scope OUT)
Why it matters: AI consults this before every task, preventing drift and maintaining consistency across your entire codebase.
From Assistants to Agents
AIDD leverages agentic capabilities
AI Assistants (2023)
- Respond to single prompts
- Limited context window
- No tool access
- Human orchestrates every step
AI Agents (2026)
- Autonomous multi-step execution
- Full codebase awareness
- File, terminal, API access
- Plan → Execute → Verify loops
AIDD insight: Agents need guardrails. The vision document and TDD provide those guardrails.
Practical AIDD Example
Task: Add user authentication to a Python Flask app
1. Discover
Map user journeys: login, register, password reset, session management
2. Plan
Create tasks: User Registration, Login/Logout, Password Reset, Sessions
3. Review
Check for duplicate auth logic, ensure single source of truth
4. Execute
Implement with TDD - write test first, then minimal code to pass
5. Test
Create human test script + automated Playwright tests
Risk-Based AI Usage
Low Risk
Lean on AI fully:
- Boilerplate & scaffolding
- Test generation
- Documentation
- Prototypes
Medium Risk
AI + Human Review:
- Business logic
- API integrations
- Data transformations
- Standard features
High Risk
Enhanced Scrutiny:
- Security/auth code
- Financial calculations
- Core algorithms
- Compliance code
Common Pitfalls & AIDD Solutions
No Specification
Problem: "Just build me a login page"
Solution: Always discover & map requirements first
Skipping Tests
Problem: Code works today, breaks tomorrow
Solution: TDD - write test first, then implement
Code Duplication
Problem: AI generates similar code in multiple places
Solution: Review phase catches and eliminates duplicates
Context Drift
Problem: AI forgets project constraints mid-task
Solution: Vision document consulted before every action
The Future of AI-Driven Development
Smarter Agents
Full codebase understanding, multi-repo awareness, production deployment
Natural Specs
Describe features in plain language, get production-ready implementations
Continuous AIDD
AI monitors production, suggests improvements, auto-fixes issues
The developers who thrive will be those who can effectively direct AI agents, not those who memorize syntax.
Industry Best Practices
Principles from Addy Osmani, Softr, and the AI coding community
1. Plan Before Coding
Create a spec.md with requirements and architecture before prompting. "Waterfall in 15 minutes."
2. Small Iterative Chunks
One function at a time. Test after each step. Avoid monolithic requests.
3. Extensive Context
Load AI with all relevant info: codebase, docs, constraints. Never partial information.
4. Human in the Loop
Review line-by-line. Treat AI code "as if from a junior developer." Never blindly trust.
Golden rule: Never commit code you can't explain. You remain the senior engineer.
Key Takeaways
1
Vibe Coding needs structure. AIDD provides the methodology to make AI coding production-ready.
2
Vision document first. Give AI agents a north star to prevent drift and maintain consistency.
3
TDD is non-negotiable. Tests validate requirements and catch regressions automatically.
4
Workflow matters. Discover → Plan → Review → Execute → Commit → Test
Sources & Further Reading
Methodologies
- AIDD Framework - Parallel Drive
github.com/paralleldrive/aidd
- User Story Mapping - Jeff Patton
jpattonassociates.com/story-mapping
- Vibe Coding - Andrej Karpathy
Collins Dictionary Word of 2025
Best Practices
- AI Coding Workflow - Addy Osmani
addyosmani.com/blog/ai-coding-workflow
- 8 Vibe Coding Practices - Softr
softr.io/blog/vibe-coding-best-practices
- TDD with AI - NN/g, Qodo
nngroup.com, qodo.ai
Research: GitClear (code duplication study), Google DORA (AI impact on stability)
Questions?
Let's discuss AI-Driven Development
Next: Session 2 - The AIDD Framework Deep Dive