Development
Spec-Driven Development
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet.
Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet.
Write a structured specification before writing any code. Code without a spec is guessing.
SPECIFY ──→ PLAN ──→ TASKS ──→ IMPLEMENT
│ │ │ │
▼ ▼ ▼ ▼
Human Human Human Human
reviews reviews reviews reviews
Start with a high-level vision. Ask clarifying questions until requirements are concrete.
Surface assumptions immediately:
ASSUMPTIONS I'M MAKING:
1. This is a web application (not native mobile)
2. Authentication uses session-based cookies (not JWT)
3. The database is PostgreSQL (based on existing Prisma schema)
4. We're targeting modern browsers only (no IE11)
→ Correct me now or I'll proceed with these.
Spec template:
# Spec: [Project/Feature Name]
## Objective
[What we're building and why. User stories or acceptance criteria.]
## Tech Stack
[Framework, language, key dependencies with versions]
## Commands
[Build, test, lint, dev — full commands]
## Project Structure
[Directory layout with descriptions]
## Code Style
[Example snippet + key conventions]
## Testing Strategy
[Framework, test locations, coverage requirements]
## Boundaries
- Always: [...]
- Ask first: [...]
- Never: [...]
## Success Criteria
[Specific, testable conditions]
## Open Questions
[Anything unresolved that needs human input]
With the validated spec, generate a technical implementation plan:
Break the plan into discrete, implementable tasks:
- [ ] Task: [Description]
- Acceptance: [What must be true when done]
- Verify: [How to confirm — test command, build, manual check]
- Files: [Which files will be touched]
Execute tasks one at a time following incremental implementation and test-driven development.
The spec is a living document:
Before proceeding to implementation: