All guides

Set Up Project Steering Files in Kiro

Generate foundation steering files in a workspace, add one file-matched custom rule, then check that it applies and how to withdraw it.

AINavWritten / Updated Sources checked
On this page

At a glance

Steering uses Markdown files so that Kiro keeps your project conventions across chats and you do not repeat them each time. This guide generates the foundation files in the IDE, adds a rule for a fictional front-end project that loads only when working on tsx files, and explains how to check and disable it.

Workflow

  1. Layer 1: Files in the right place

    Workspace steering lives in .kiro/steering/ at the project root and applies only to that workspace. Global files live in ~/.kiro/steering/, and workspace wins when they conflict.

  2. Layer 2: Loading matches intent

    Check the front matter: always loads every time, fileMatch loads by file pattern, manual is called with # plus the file name, and auto matches on the description.

  3. Layer 3: Focused and safe content

    Each file covers one domain, explains why and gives examples, and holds no API keys or passwords, because steering files are part of your codebase.

Each stage cites official sources.

Before you start

  • Kiro is installed and signed in, with a practice workspace open (installation and login were not verified here).
  • Three to five project conventions that contain no secrets or personal data, such as component naming, test location and libraries used.

1. Generate the foundation files

In the Kiro panel open the Steering section and click Generate Steering Docs, or click + and choose Foundation steering files. Kiro creates product.md, tech.md and structure.md under .kiro/steering/.

2. Read and correct each foundation file

Open all three and check that the product purpose, technology stack and folder structure match the project. They are included in every interaction by default, so mistakes keep influencing results. Edit anything that is wrong.

3. Create a custom steering file

In the Steering section click +, choose workspace scope, pick a descriptive name such as components-form-validation.md, and write the rules in natural language.

4. Set file-match loading

At the very top of the file, with no blank line before it, add front matter: --- inclusion: fileMatch fileMatchPattern: "components/**/*.tsx" --- Then write the body, for example 'form validation messages go below the input, and say why', optionally with a short code snippet.

5. Verify in chat

Check the front matter and components/**/*.tsx pattern directly. Use separate conversations, each addressing only its intended target files, to compare a matching-component edit with a nonmatching-file task. Treat behavior as a diagnostic observation, not proof of inclusion or a guarantee that nonmatching files are unaffected by earlier context. You can provide additional direction in chat during a session; this guide does not prescribe an exclusive lifetime for every instruction.

6. Disable or narrow when needed

If the rule disturbs unrelated work, change inclusion to manual. You can then include it on demand by typing #components-form-validation in chat, or by selecting it from the slash-command list after typing /. You can also delete the file. Test again after any change.

Original example

Fictional project: a practice repository with a few tsx components. After generating the foundation files, edit tech.md to name the framework actually used. Add components-form-validation.md with fileMatch front matter for components/**/*.tsx and three body lines: validation messages sit below the input; error text is at most one sentence; each form component gets a test file. Then ask Kiro to create a contact form component under components and check the message position and test file; use a separate conversation addressing only a non-component file for diagnostic comparison, alongside direct front-matter and pattern checks; output alone does not prove the rule was absent. All of this is illustrative.

Completion checks

  • product.md, tech.md and structure.md exist under .kiro/steering/ and match the real project.
  • The custom file begins with front matter, with no blank line or content before it.
  • Check the front matter and components/**/*.tsx pattern directly. Use separate conversations, each addressing only its intended target files, to compare a matching-component edit with a nonmatching-file task. Treat behavior as a diagnostic observation, not proof of inclusion or a guarantee that nonmatching files are unaffected by earlier context. You can provide additional direction in chat during a session; this guide does not prescribe an exclusive lifetime for every instruction.
  • No steering file contains keys, passwords or personal information.

Limits

  • Custom agents do not load steering automatically; add it to the agent's resources setting, for example file://.kiro/steering/**/*.md.
  • CLI V3 supports all four inclusion modes. CLI V1/V2 have partial support; fileMatch and manual files are excluded from automatic loading. This guide uses the IDE.
  • AGENTS.md is always loaded and has no inclusion-mode setting; team distribution and cloud sync are not covered.

Verification scope

This guide is based on reading the official documentation. Login, installation, product API execution, file upload and generated output were not tested, and the example content is original and illustrative.

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. Kiro · Official sources
    View details