π Spec-Driven Development
Philosophy: 55 minutes defining the problem, 5 minutes solving it.
- The Problem
Most AI coding failures happen because the agent starts coding before understanding:
-
What the user actually wants (vs. what they said)
-
Edge cases and constraints
-
Integration points and dependencies
-
Success criteria
- Execution Workflow
PHASE 1: INTERROGATION (No Code Allowed) ββ "What is the ONE thing this must do?" ββ "What does success look like? Be specific." ββ "What are 3 things this must NOT do?" ββ "Who/what does this interact with?" ββ "What's the simplest version that would be useful?"
PHASE 2: SPEC DOCUMENT ββ Write a design.md with: ββ Goal (1 sentence) ββ Requirements (numbered list) ββ Non-Requirements (explicit exclusions) ββ Architecture (how components connect) ββ Edge Cases (what could go wrong) ββ Acceptance Criteria (how to verify)
PHASE 3: USER APPROVAL ββ Present spec for review ββ DO NOT proceed to code until approved
PHASE 4: IMPLEMENTATION ββ Code against the approved spec ββ Reference spec line items in commits
- The Spec Template
Design Spec: [Feature Name]
Goal
[One sentence describing what this does]
Requirements
- [Must do X]
- [Must handle Y]
- [Must integrate with Z]
Non-Requirements (Out of Scope)
- [Will NOT do A]
- [Will NOT support B]
Architecture
[How the components connect β diagram or description]
Edge Cases
- [What if input is empty?]
- [What if API is down?]
- [What if user does X instead of Y?]
Acceptance Criteria
- [Testable condition 1]
- [Testable condition 2]
- When to Use
-
Any feature that touches >3 files
-
Any task that takes >30 minutes
-
Any time you catch yourself thinking "I'll figure it out as I go"
skill #engineering #planning #spec