What is Spec-Driven Development?
Duration: 5 min
Spec-Driven Development (SDD) is Kiro's approach to building software with AI. Instead of jumping straight into code, you first write a specification — a structured document that captures what you want to build, how it should work, and what tasks are needed to get there.
Why specs matter with AI agents
When you ask an AI to 'build a user auth system', it makes dozens of assumptions: Which framework? JWT or sessions? What error handling? Without a spec, you get code that works for the AI's assumptions, not yours. Specs give the agent the context it needs to make the right decisions.
💡 Tip: A good spec doesn't need to be long. Even a one-page requirements doc dramatically reduces back-and-forth and rework.
The three spec documents
Kiro's spec workflow produces three files inside a .kiro/specs/
- requirements.md — What the feature must do (user stories, acceptance criteria)
- design.md — How it will be built (architecture, data models, API contracts)
- tasks.md — Ordered implementation checklist derived from the design
.kiro/
└── specs/
└── user-auth/
├── requirements.md
├── design.md
└── tasks.mdVibe coding vs spec-driven development
Vibe coding means prompting an AI and iterating until something works. It's fast for throwaway scripts but breaks down on anything with multiple components, edge cases, or future maintainers. Spec-driven development trades a small upfront investment in writing for dramatically better output quality and a codebase you can actually understand later.
❓ What is the main advantage of writing a spec before asking Kiro to generate code?