Getting Started with Spec-driven Development Using Kiro
Source: Dev.to
Creating a Simple Voting API
What You’ll Build
A simple REST API where users can:
- Create a poll with options
- Vote on a poll
- View poll results
Pre‑requisites
Download and install the Kiro IDE for your operating system.
Create a Project Folder and Start Developing!
-
Create a project folder
Create a folder in your local file system named Kiro_Voting_API. -
Open the folder in Kiro
Launch Kiro, select File → Open Folder, and open the folder you just created.
-
Start a spec‑driven session
Select Spec from the options.
-
Enter a natural‑language prompt
Build a simple poll and voting REST API using Python and FastAPI Requirements: - A poll has: id, question, options, votes - Options are strings - Votes are counted per option - Endpoints: - POST /polls to create a poll - GET /polls/{id} to retrieve a poll and its results - POST /polls/{id}/vote to vote for an option - Store all data in memory - Return JSON responses -
Generate the requirements document
Kiro creates a document containing requirements, user stories, and acceptance criteria.
-
Refine the requirements (optional)
Add support for displaying poll results as a percentage Poll results must be calculated as a percentage as well as displaying the raw numbers of votes -
Move to the design phase
Click Move to design phase once the requirements look good.
-
Review the generated design
Open the generated design.md file. The design includes error handling and a testing strategy (you can later reduce these if you prefer a quicker prototype).
-
Move to the implementation plan
After any final design tweaks, click Move to implementation plan. Kiro creates an implementation plan and a tasks.md file.
-
Open the task list
Open tasks.md (via Task list at the top or from the folder view).
-
Start implementing
Click Start task on the first task. Kiro will set up the environment, install dependencies (after you reviewrequirements.txt), and begin testing.

-
Follow the implementation plan
Continue through the remaining tasks. Kiro will periodically ask for permission to run tests at each stage to ensure the code works as expected.
-
Optional – You can skip steps such as adding extensive error handling or response formatting during the initial implementation and add them later as needed.