Getting Started with Spec-driven Development Using Kiro

Published: (December 13, 2025 at 01:33 PM EST)
2 min read
Source: Dev.to

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!

  1. Create a project folder
    Create a folder in your local file system named Kiro_Voting_API.

  2. Open the folder in Kiro
    Launch Kiro, select File → Open Folder, and open the folder you just created.

    Launch Kiro, select File and open the folder

  3. Start a spec‑driven session
    Select Spec from the options.

    Select Spec from the options

  4. 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
  5. Generate the requirements document
    Kiro creates a document containing requirements, user stories, and acceptance criteria.

    Kiro creates a requirements document

  6. 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
  7. Move to the design phase
    Click Move to design phase once the requirements look good.

    If the requirements look good move to design phase

  8. 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).

    View the design document

  9. 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.

    Implementation plan ready

  10. Open the task list
    Open tasks.md (via Task list at the top or from the folder view).

    Open tasks.md to view the implementation plan

  11. Start implementing
    Click Start task on the first task. Kiro will set up the environment, install dependencies (after you review requirements.txt), and begin testing.

    Kiro can help you implement the feature you just designed

    Kiro asks permission before installing dependencies

  12. 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.

    Running tests at each stage to ensure everything is working

  13. Optional – You can skip steps such as adding extensive error handling or response formatting during the initial implementation and add them later as needed.

Back to Blog

Related posts

Read more »