Skip to content
Learn Kiro.

Recipes · Chapter 31 of 63

Create Your First Steering File

Create product.md, tech.md, and structure.md in .kiro/steering/, set inclusion modes in front matter, and check that the agent obeys them.

Beginner friendly 2 min read last reviewed 2026-09-04

◎ Learning objective

Write the three foundational steering files for a project and control when each extra file loads.

A steering file is a Markdown file that gives Kiro permanent knowledge about your project. Put three of them in .kiro/steering/ and the agent stops guessing your stack, your folder layout, and your house rules in every new chat.

When to use this

Use this on any project you will work on more than once. If you have explained the same convention to the agent twice, it belongs in steering. Do this before you write hooks or custom agents, because those build on the same knowledge.

Steps

  1. Create the folder .kiro/steering/ in the root of your project.

  2. Create product.md and describe what the project is and who it is for. Keep it to one screen.

    .kiro/steering/product.md

    # Product
    
    Internal warehouse inventory service. Tracks stock levels and
    reservations. Correctness beats speed: a wrong count costs money.
  3. Create tech.md and list the languages, frameworks, and versions you actually use, plus any rule about adding dependencies.

  4. Create structure.md and describe the folder layout and where new code goes.

  5. Add a fourth file only when a rule applies to part of the tree. Put the front matter at the very top, before any heading.

    .kiro/steering/api-conventions.md

    ---
    inclusion: fileMatch
    fileMatchPattern: "src/api/**"
    ---
    
    # API conventions
    
    Routers stay thin. Business logic lives in src/services/.
    Every endpoint returns a typed error body, never a bare string.
  6. Choose the inclusion mode for each extra file. inclusion: always is the default. inclusion: manual loads only when you type #steering-file-name in chat. inclusion: auto needs a name: and a description:, and matches against what you ask for.

  7. Commit .kiro/steering/ so the whole team shares it. Put personal preferences in ~/.kiro/steering/ instead, where they apply to every project you open.

Check it worked

Start a new chat session and ask for a small change that touches one of your rules. Ask for a new endpoint and see whether the agent puts the logic in src/services/. A second check: ask the agent which steering files are loaded. The CLI configuration panel (v2.21.0) also lists steering alongside agents, MCP servers, Powers, skills, and hooks.

Common problems

  • The file is ignored. The YAML front matter must be the first content in the file. A blank line or a heading above it breaks the parse.
  • fileMatchPattern never matches. The glob is relative to the workspace root, so write src/api/**, not /src/api/** or ./src/api/**.
  • Rules conflict. Steering merges across the global and workspace scopes, and the workspace file wins. If a personal rule keeps overriding a team rule, move it out of ~/.kiro/steering/.
  • The file is huge. One domain per file. A single 900-line steering file costs context on every turn and gets ignored in practice.
  • Secrets leak in. Never put tokens, keys, or customer data in steering. Steering is loaded into the model’s context on every turn.

Frequently asked questions

Where do Kiro steering files live?

Project steering files live in .kiro/steering/ inside the repository. Personal steering files live in ~/.kiro/steering/ and apply to every project. Steering merges across the two scopes, and the workspace copy wins when the same rule conflicts.

Do I have to name the files product.md, tech.md, and structure.md?

No, but those three are the foundational files Kiro's documentation describes, and they are included by default. Any other Markdown file in the folder works too, and you control when it loads with the inclusion front matter.

How do I load a steering file only for some files?

Put inclusion: fileMatch and fileMatchPattern in the YAML front matter at the very top of the file. fileMatchPattern takes a glob string or an array of globs, for example components/**/*.tsx.

☰ Chapter summary

  • Steering files are Markdown notes in .kiro/steering/ that the agent reads before it answers.
  • product.md, tech.md, and structure.md are the foundational files and load by default.
  • YAML front matter must be the first content in the file; inclusion: always is the default.
  • inclusion: fileMatch plus fileMatchPattern loads a file only for matching paths.
  • Global files live in ~/.kiro/steering/; the workspace copy wins when the two conflict.

All chapter summaries are collected on the revision page.

Was this chapter helpful?