Two Ways of Coding with AI: SDD vs Vibe Coding

Two Ways of Coding with AI: SDD vs Vibe Coding
The arrival of generative AI tools like GitHub Copilot, ChatGPT, and Claude has given rise to two distinct approaches to software development. On one side, "Vibe Coding": an intuitive and spontaneous way of coding by letting AI guide the process. On the other, Specification Driven Development (SDD): a structured approach that uses AI as a tool within a defined framework.
Let's explore these two working methods, their differences, and how they influence day-to-day development.
Vibe Coding: An Intuitive Approach
Vibe Coding represents a way of working that favors spontaneity and exploration:
How We Work in Vibe Coding
The typical process:
- We have an idea or a need
- We ask AI to generate code with general prompts
- We test what comes out
- We adjust based on what "seems to work well"
- We iterate until we get a satisfactory result
Characteristics of this approach:
- No detailed prior documentation
- Architecture emerges as development progresses
- Decisions are made at coding time
- AI generates both structure and implementation
- Validation is mainly done through manual testing
When This Approach Works
Vibe Coding can be relevant in certain contexts:
- Rapid prototyping: Testing an idea or concept quickly
- Technical exploration: Discovering new libraries or frameworks
- Throwaway scripts: Single-use or temporary code
- Learning: Exploring and experimenting with new technologies
The Limits We Encounter
Over time, this approach reveals constraints:
- Code becomes difficult to understand for others (and for yourself after a few weeks)
- Every change risks breaking unexpected things
- Adding features requires more and more time
- Bugs become difficult to trace and fix
- Moving to production often requires partial rewriting
Specification Driven Development (SDD): A Structured Approach
SDD represents a way of working that favors planning and structure:
How We Work in SDD
The typical process:
- We analyze the need and define objectives
- We design architecture and interfaces
- We write detailed specifications
- We use AI to implement according to these specifications
- We validate each step before moving to the next
Characteristics of this approach:
- Documentation created before code
- Architecture defined by human experts
- Decisions made upstream of development
- AI implements according to precise directives
- Systematic validation at multiple levels
Foundation as a Starting Point
The key difference: architecture is not generated by AI. It has already been established, reviewed, and stabilized.
A solid foundation is:
- Designed by architects and experienced developers
- Based on proven patterns
- Exhaustively documented
- Built to evolve over time
This foundation (like our Foundation CSS) serves as a common reference for the entire team and guides AI usage.
Specifications Before Implementation
Before coding, we precisely document what we want to build:
## Specification: Task Management Module
### Objective
Manage user tasks with support for categories and priorities
### Architecture
- Pattern: Repository + Service Layer
- Dependencies: Foundation CSS Data Module
- Interfaces: ITodoService, ITodoRepository
### Required Behaviors
1. Create/update/delete a task
2. Mark a task as completed
3. Filter by category and priority
4. Text search
### Constraints
- Mandatory data validation
- Limit of 1000 tasks per user
- Soft delete for history
### Acceptance Criteria
- [ ] Unit tests > 90%
- [ ] Complete integration tests
- [ ] Performance validation
- [ ] Complete API documentation
A Rigorous Validation Process
Every code goes through several verification steps:
- Architectural validation: Verification of consistency with the foundation
- Code review: Examination of quality and best practices
- Mandatory testing: Minimum coverage and integration tests
- Security review: Identification of potential vulnerabilities
- Final approval: Validation before production release
Comparing Both Approaches in Daily Work
Starting a Project
Vibe Coding:
- We start coding immediately
- Architecture emerges progressively
- Startup time: a few hours
SDD:
- We start with architecture and specifications
- Implementation follows the defined structure
- Startup time: a few days
Adding a New Feature
Vibe Coding:
- We ask AI to generate the feature
- We integrate it where it seems logical
- We test manually
- Time: 1-2 hours
SDD:
- We specify the feature and its integration
- We use AI to implement according to the spec
- We validate with automated tests
- Initial time: 3-4 hours
Fixing Bugs
Vibe Coding:
- We search through code without clear structure
- Difficult to understand the problem's origin
- Risk of creating others while fixing
- Variable time: 2-8 hours
SDD:
- Specifications help locate the problem
- Architecture facilitates understanding
- Tests prevent regressions
- More predictable time: 1-3 hours
Onboarding a New Developer
Vibe Coding:
- Must explore code to understand
- No reference documentation
- High risk of breaking things
- Productivity after: 4-6 weeks
SDD:
- Documentation and foundation serve as guide
- Clear architecture facilitates understanding
- Framework reduces possible errors
- Productivity after: 1-2 weeks
AI in Both Approaches
AI's Role in Vibe Coding
AI is the main driver of development:
- Generates architecture as we go
- Proposes technical solutions
- Creates structure and implementation
- Guides architectural decisions
- Adapts code based on feedback
AI's Role in SDD
AI is an execution tool within a defined framework:
What AI does:
- Generates boilerplate code according to templates
- Implements features according to precise specifications
- Creates comprehensive unit tests
- Generates technical documentation
- Suggests optimizations within the existing framework
What AI doesn't do:
- Design the overall architecture
- Define patterns and structures
- Make architectural decisions
- Validate security
- Approve final code
Concrete Example: A Shopping Cart System
Vibe Coding Approach
Developer → AI: "Create a shopping cart system for me"
→ AI generates a complete structure
→ We test and adjust as we go
→ We add features as needed
→ Final structure: organic and unique to this project
SDD Approach
1. Specification (team + architect):
- Architecture: Clean Architecture with Foundation CSS
- Patterns: Repository, Command/Query Separation
- Constraints: ACID, Event Sourcing for history
- Interfaces: ICartService, ICartRepository, ICartItem
2. Structured prompt to AI:
"Implement ICartRepository according to CartSpec.md:
- Interface defined in Foundation.Commerce.Abstractions
- Use CartEntity with defined validation
- Respect Foundation CSS patterns
- Add tests according to CartSpecification.md"
3. Validation:
- Architectural compliance verification
- Test validation
- Code review
- Approval for integration
Evolution Over Time
After 3 Months
Vibe Coding:
- Functional code but complex structure
- Adding features increasingly slow
- Minimal or absent documentation
- Understanding limited to original developers
SDD:
- Structured and maintainable code
- Constant velocity for new features
- Up-to-date documentation
- Any developer can contribute effectively
After 1 Year
Vibe Coding:
- Significant technical debt
- Major changes very risky
- Often needs complete refactoring
- High maintenance cost
SDD:
- Robust architecture that has proven itself
- Continuous evolution without major refactoring
- Foundation that enriches with experience
- Predictable maintenance cost
Choosing Your Approach
Vibe Coding is Suitable When:
- We're doing rapid prototyping
- The project is temporary or exploratory
- Working alone on a small project
- Experimenting with new technologies
- Code won't be maintained long-term
SDD is Suitable When:
- We're building a production system
- Multiple developers work together
- The project must evolve long-term
- Maintainability is important
- Quality and reliability are critical
Principles of Modern SDD
Architecture First
Structure is defined before implementation, by experienced humans who understand technical and business challenges.
Clear Specifications
Each element is precisely documented before being implemented, creating a common reference for the team and AI.
AI as Accelerator
AI is used in a targeted way to increase productivity, respecting the established architectural framework.
Systematic Validation
Each element goes through human review before integration, ensuring quality and consistency.
Non-Negotiable Quality
Testing, security, and maintainability are integrated from the start, not added afterwards.
Conclusion: Two Different Philosophies
Vibe Coding and SDD represent two distinct philosophies of AI-assisted development:
Vibe Coding: Rapid Exploration
- Favors initial speed
- Suited to exploratory contexts
- AI guides development
- Ideal for short-term
SDD: Sustainable Construction
- Favors long-term solidity
- Suited to production systems
- AI accelerates execution
- Ideal for medium/long-term
The choice between these approaches depends on context, objectives, and the project's expected lifespan. Understanding the differences allows for conscious selection of the most appropriate approach for each situation.
An Unavoidable Reality: AI is an inevitable change for our profession. Vibe Coding fully accepts and embraces it without reservation, while SDD acknowledges this transformation while channeling it within a structured framework. Both approaches welcome AI, but only one ensures the long-term sustainability and quality of the systems we build.
To learn more about the SDD approach, consult our Foundation CSS that structure interactions with AI.
AI is the future of development, but only if we maintain a solid human architecture as a foundation.