> ## Documentation Index
> Fetch the complete documentation index at: https://kiro.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Learn by playing

> Learn Kiro AI Engineering by completing sample tasks in a video game

In this guide, you will learn how to use Kiro by completing tasks
in the [codebase](https://github.com/kirodotdev/spirit-of-kiro) for a sample video game called Spirit of Kiro.

95% of the code for Spirit of Kiro has been written by prompting Kiro.
You are going to be using Kiro to fix bugs and add features to the game to
complete it.

![A cartoon ghost stands in front of a large industrial lever labeled "PULL"
and a workbench with tools. The ghost is next to a glowing card and a prompt
showing the "E" key.](https://kiro.dev/images/video-game-guide/intro.png)

Spirit of Kiro is an infinite crafting game in which you can:

1. Discover unique, randomly generated objects
2. Utilize these items on each other via simulated interactions like "cut",
   "paint", "glue", "enchant". Item's combine, break apart, and change in
   response to these interactions.
3. Sell your resulting creations to an AI appraiser.

Every object in the game is generated by AI. Interactions between objects
are also simulated by AI. This gives Spirit of Kiro infinite replayability
and potential.

In the following diagram you can see how the game's core crafting mechanic works. The
player has discovered two items: a spoon, and a glass jar of vegetables. The player
can use the spoon to extract a sample of the vegetables. 

![A crafting workbench interface from a game, showing a grid of unique items
and pop-up descriptions for items like a botanical extraction spoon, and jar of vegetables,
Purple arrows connect the workbench to detailed item info
panels, with the text 'Discover Unique Items' and 'Add items to workbench',
and "Freeform crafting outcomes" above.](https://kiro.dev/images/video-game-guide/crafting.png)

While the game’s core loop is complete, the game is not quite done yet. There is an
[extensive roadmap for the game](https://github.com/kirodotdev/spirit-of-kiro/blob/main/docs/ROADMAP.md),
full of additional ideas to build, and there a few bugs that have been left in the
game on purpose so you can try out solving them using Kiro.

In this guide you will learn to use Kiro by completing a series of tasks
on a `challenge` branch of the open source code for this game. Ready to get started?
Let's go!

  
### Setup

First, we ensure that you have an AWS account. We setup a Cognito user
    pool for authentication, build and launch the game stack using a
    Docker Compose file, then bootstrap DynamoDB tables. Then we verify
    that the game runs on your local machine:
    * [Setup dev environment and launch the game](https://kiro.dev/docs/guides/learn-by-playing/00-setup.md)

  
### Task: Improve game homepage

We setup steering files to help Kiro understand the project.
    With a full understanding of the project, we put Kiro to
    work improving the home landing page for the game.
    * [Steering Kiro, and improving the game homepage](https://kiro.dev/docs/guides/learn-by-playing/01-improve-the-homepage.md)

  
### Bug Fix: Physics Glitch

When we tab out of game, the physics goes haywire when tabbing
    back in. Can Kiro fix it?
    * [Investigating and fixing a subtle bug with physics](https://kiro.dev/docs/guides/learn-by-playing/02-physics-bug.md)

  
### Bug Fix: Interactions Oversight

The original pass at game interactions was "vibe coded".
    But it looks like AI missed something. Can Kiro correct its own mistake?
    * [Fixing a complex issue across multiple files](https://kiro.dev/docs/guides/learn-by-playing/03-interactions-bug.md)

  
### Refactor: DRY up code with Kiro

It's not just vibe coding, we do vibe refactoring here as well.
    * [Vibe refactoring is 50% of vibe coding](https://kiro.dev/docs/guides/learn-by-playing/04-dry-code-refactor.md)

  
### New Feature: Implementing something complex

The game is currently missing email verification and password reset.
    We implement this relatively complex new feature across client and server.
    * [Using specifications for complex work](https://kiro.dev/docs/guides/learn-by-playing/05-using-specs-for-complex-work.md)

  
### Automation: Managing assets with agent hooks

We identify some boilerplate asset management work that that is error prone.
    Fortunately Kiro agent hooks can help us automate this.
    * [Managing assets with agent hooks](https://kiro.dev/docs/guides/learn-by-playing/06-managing-assets-with-agent-hooks.md)

  
### Extending Kiro with MCP

Not only can you make this game your own, you can also make Kiro your own,
    by extending its context and behaviors with Model Context Protocol (MCP).
    * [Extending Kiro with MCP](https://kiro.dev/docs/guides/learn-by-playing/07-extending-kiro-with-mcp.md)

  
### Conclusion

Wrap up your learning journey and explore next steps.
    * [Conclusion](https://kiro.dev/docs/guides/learn-by-playing/99-conclusion.md)
