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
-
Create the folder
.kiro/steering/in the root of your project. -
Create
product.mdand 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. -
Create
tech.mdand list the languages, frameworks, and versions you actually use, plus any rule about adding dependencies. -
Create
structure.mdand describe the folder layout and where new code goes. -
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. -
Choose the inclusion mode for each extra file.
inclusion: alwaysis the default.inclusion: manualloads only when you type#steering-file-namein chat.inclusion: autoneeds aname:and adescription:, and matches against what you ask for. -
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.
fileMatchPatternnever matches. The glob is relative to the workspace root, so writesrc/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.
Related
- Steering explains the concept and every inclusion mode.
- Use AGENTS.md as steering covers the portable alternative.
- Beginner Tutorial walks through your first steering file inside a full project.
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.
Related chapters
- ConceptsSteeringSteering files give Kiro permanent project knowledge. Where they live, the four inclusion modes, how scopes merge, and how AGENTS.md fits in.
- RecipesUse AGENTS.md as SteeringKiro reads AGENTS.md files as steering from anywhere in your workspace tree. How they load, what they cannot do, and when to prefer .kiro/steering/.
- Hands-onBeginner TutorialInstall Kiro, have your first agent conversation, and build a tiny real project with a spec, step by step. No experience assumed.
- RecipesKeep Secrets Out With .kiroignoreWrite a .kiroignore file so Kiro's agent never reads .env, keys, or customer data, and know which surfaces honour it today.