はじめに
kiro公式ドキュメントをブラウザの自動翻訳させると異常に分かりにくいので、AIで翻訳しました。
目次
- Steering
- What is steering?
- Key benefits(主なメリット(得られる効果))
- Project steering files(プロジェクト Steering ファイル)
- Creating custom steering files(カスタム Steering ファイルの作成)
- Steering with custom agents(カスタムエージェントでの Steering の利用)
- AGENTS.md(AGENTS.md ファイルによる指示の提供)
- Inclusion modes(Inclusion modes(インクルージョン・モード/読み込みモード))
- File references(ファイル参照機能)
- Steering during a session(セッション中のリアルタイムな指示(Steering))
- Teaching through code reviews(コードレビューを通じた AI への教え込み)
- Best practices(ベストプラクティス(効果的な運用ルール))
- Common steering file strategies(一般的な Steering ファイルの活用パターン)
- Related documentation(関連ドキュメント)
- ポイント解説
Steering(ステアリング)
What is steering?
Steering gives Kiro persistent knowledge about your project through markdown files.
Steering(スティアリング)は、Markdown ファイルを介して Kiro にプロジェクトに関する永続的な知識・文脈を提供します。
Instead of explaining your conventions in every chat, steering files ensure Kiro consistently follows your established patterns, libraries, and standards.
チャットのたびに開発ルール(コーディング規約)を毎回説明し直す必要がなくなり、Steering ファイルを設置しておくことで、Kiro が確立されたデザインパターン、使用ライブラリ、標準規約を一貫して遵守するようになります。
機能・環境別対応表(Capability Table)
| 機能(Capability) | IDE | CLI | Web | Mobile |
|---|---|---|---|---|
Workspace steering (.kiro/steering/)ワークスペース固有の Steering(プロジェクト配下) |
✓ | ✓ | ✓ | ✓ |
Global steering (~/.kiro/steering/)グローバル単位の Steering(ユーザーホームディレクトリ配下) |
✓ | ✓ | — | — |
|
Cloud steering managed in Web settings Web設定で管理するクラウド版 Steering |
— | — | ✓ | — |
|
Generate foundation files via UI UI(画面操作)経由での基礎ファイルの自動生成 |
✓ | — | — | — |
|
Inclusion modes (always, fileMatch, manual) 読み込みモードの指定(常時・ファイル一致・手動) |
✓ | ✓ | ✓ | ✓ |
AGENTS.md supportAGENTS.md のサポート |
✓ | ✓ | ✓ | ✓ |
注釈・補足説明
On Web, "Global steering" refers to your local ~/.kiro/steering/ directory, which the cloud sandbox cannot read.
Web(クラウド)版において、「Global steering」はローカル環境の
~/.kiro/steering/ディレクトリを指しますが、クラウド上のサンドボックス環境からはこのローカルディレクトリを直接読み込むことができません。
To reuse personal steering across cloud sessions, upload it through Configuration Sync; the cloud copy then applies to every cloud session.
クラウドのセッション間で個人の Steering 設定を再利用したい場合は、「Configuration Sync(設定同期)」機能を使ってアップロードしてください。アップロードされたクラウド側のコピーが、すべてのクラウドセッションに適用されるようになります。
ポイント解説
-
Workspace vs Global Steering:
-
Workspace (
.kiro/steering/): そのリポジトリ限定の技術スタックやディレクトリ構成ルール。 -
Global (
~/.kiro/steering/): 自分のローカル環境全体で共通化したい個人の好み(「変数命名は基本〜風にする」など)。 -
Inclusion modes (読み込みモード):
-
always: 常にチャットコンテキストに読み込む。 -
fileMatch: 特定の拡張子やファイル(例:*.tsx)を開いている時・編集する時だけ自動で参照させる。 -
manual: 必要に応じて#メカニズムなどで手動指定して読み込ませる。 -
AGENTS.md: 汎用的な AI エージェント向け指示ファイル(リポジトリルートに置かれる標準的な説明書形式)の読み込みに対応していることを意味します。
Key benefits(主なメリット(得られる効果))
Consistent Code Generation - Every component, API endpoint, or test follows your team's established patterns and conventions.
一貫性のあるコード生成 — すべてのコンポーネント、APIエンドポイント、あるいはテストコードが、チームで定義されたパターンや規約に正確に従って生成されます。
Reduced Repetition - No need to explain project standards in each conversation. Kiro remembers your preferences.
説明の手間の削減 — チャットでの対話のたびにプロジェクトの標準ルールを説明し直す必要がなくなります。Kiroがチームの好みや標準設定を記憶・維持します。
Team Alignment - All developers work with the same standards, whether they're new to the project or seasoned contributors.
チーム全体の足並みの揃え(標準化) — 新しく参画したメンバーか経験豊富な開発者かを問わず、すべての開発者がまったく同じ標準ルールに沿って作業を進められます。
Scalable Project Knowledge - Documentation that grows with your codebase, capturing decisions and patterns as your project evolves.
拡張可能なプロジェクト知見の蓄積 — プロジェクトの成長・進化に合わせて設計上の決定事項や実装パターンを随時記録・蓄積し、コードベースとともに成長していく生きたドキュメントとして機能します。
Steering file scope(Steeringファイルの適用範囲(スコープ))
Steering files can be created with a workspace scope or a global scope.
Steeringファイルは、「ワークスペーススコープ(プロジェクト単位)」または「グローバルスコープ(端末全体)」のいずれかの適用範囲で作成できます。
Workspace steering(ワークスペース Steering(プロジェクト固有設定))
Workspace steering files reside in your project root folder under .kiro/steering/, and apply only to that specific workspace.
ワークスペース Steering ファイルは、プロジェクトルート直下の
.kiro/steering/ディレクトリ内に配置され、その特定のワークスペース(プロジェクト)にのみ適用されます。
Workspace steering files can be used to inform Kiro of patterns, libraries, and standards that apply to an individual workspace.
個別のワークスペースに適用される特定の設計パターン、使用ライブラリ、各種標準規約などを Kiro に教え込むために使用されます。
Global steering(グローバル Steering(共通設定))
Global steering files reside in your home directory under ~/.kiro/steering/, and apply to all workspaces.
グローバル Steering ファイルは、ユーザーのホームディレクトリ配下にある
~/.kiro/steering/に配置され、すべてのワークスペース(開くすべてのプロジェクト)に適用されます。
Global steering files can be used to inform Kiro of conventions that apply to all your workspaces.
手元のすべてのワークスペースで共通して適用したい個人的な開発ルールや全社的な共通規約を Kiro に指示するために使用されます。
In case of conflicting instructions between global and workspace steering, Kiro will prioritize the workspace steering instructions.
グローバル Steering とワークスペース Steering の間で指示内容が競合(バッティング)した場合、Kiro はワークスペース Steering の指示を優先します。
This allows you to specify global directives that generally apply to all your workspaces, while preserving the ability to override those directives for specific workspaces.
これにより、原則としてすべてのプロジェクトに適用する共通指示を定義しつつ、特定のプロジェクトでのみ例外的にその設定を上書き(オーバーライド)する、といった柔軟な運用が可能になります。
Team steering(チーム Steering(組織・チーム単位の共通管理))
The global steering feature can be used to define centralized steering files that apply to entire teams.
グローバル Steering 機能は、チーム全体に一括適用される中央集権的な Steering ファイルの定義・配信手段としても利用できます。
Team steering files can be pushed to user's PCs via MDM solutions or Group Policies, or downloaded by users to their PCs from a central repository, and placed into the ~/.kiro/steering folder.
チーム用の Steering ファイルは、MDM(モバイルデバイス管理)ツールやグループポリシー(Intuneなど)を介して各開発者の端末(PC)に自動配布するか、あるいは中央のリポジトリから開発者自身がダウンロードして
~/.kiro/steeringフォルダ内に配置することで運用できます。
ポイント解説
-
Workspace vs Global の優先度ルール:
グローバル設定(個人/全社共通)よりもプロジェクト直下のワークスペース設定(.kiro/steering/)が常に優先(オーバーライド)されます。そのため、全社標準を設定しつつ、特定プロジェクトの例外的な旧ライブラリ使用なども安全に許容できます。 -
MDM / Group Policies による統一管理:
企業エンタープライズでの導入時に、全社の開発規約を~/.kiro/steering/に自動配信・同期しておくことで、新メンバーが入社・PCセットアップした初日から会社のコーディング規約に沿った AI 補助を受けられる運用パターンです。
Project steering files(プロジェクト Steering ファイル)
Kiro provides project steering files to establish core project context:
Kiro は、プロジェクトの核心となる前提情報(コンテキスト)を定義・共有するために、あらかじめ用意された「プロジェクト Steering ファイル」を提供します。
Product Overview (product.md) - Defines your product's purpose, target users, key features, and business objectives. This helps Kiro understand the "why" behind technical decisions and suggest solutions aligned with your product goals.
プロダクト概要 (
product.md) — プロダクトの目的、ターゲットユーザー、主要機能、およびビジネス上の目標を定義します。これにより Kiro は技術的判断のバックボーン(「なぜそれを作るのか」という理由)を理解し、プロダクトの目標に合致した最適なソリューションを提案できるようになります。
Technology Stack (tech.md) - Documents your chosen frameworks, libraries, development tools, and technical constraints. When Kiro suggests implementations, it will prefer your established stack over alternatives.
技術スタック (
tech.md) — 採用されているフレームワーク、ライブラリ、開発ツール、および技術的制約をドキュメント化します。Kiro が実装方針を提案する際、他の代替案よりもプロジェクトで既に採用されている技術スタックを優先して使用するようになります。
Project Structure (structure.md) - Outlines file organization, naming conventions, import patterns, and architectural decisions. This helps generated code fit your existing codebase.
プロジェクト構造 (
structure.md) — ファイルのフォルダ構成、命名規約、インポート(import)の記述ルール、およびアーキテクチャ上の決定事項の概要を定義します。これにより、生成されたコードが既存のコードベースと自然に馴染む(整合性が保たれる)ようになります。
These foundation files are included in every interaction by default, forming the baseline of Kiro's project understanding.
これらの基盤(ファウンデーション)ファイルはデフォルトで毎回の対話に自動的に読み込まれ、Kiro がプロジェクトを理解するための基本ベースラインとなります。
IDEでのプロジェクト Steering ファイル生成手順
**To generate project steering files in the IDE:**
> IDE上でプロジェクト Steering ファイルを自動生成する手順:
**1. Navigate to the Steering section in the Kiro panel**
> 1. Kiro パネル内にある「Steering」セクションに移動します。
**2. Click the Generate Steering Docs button, or click the + button and select the Foundation steering files option**
> 2. 「Generate Steering Docs(Steeringドキュメントの生成)」ボタンをクリックするか、または「+」ボタンをクリックして「Foundation steering files」オプションを選択します。
**3. Kiro will create three project steering files in .kiro/steering/**
> 3. Kiro が `.kiro/steering/` ディレクトリ配下に、上記の 3 つのプロジェクト Steering ファイルを自動作成します。
Creating custom steering files(カスタム Steering ファイルの作成)
Extend Kiro's understanding with specialized guidance tailored to your project's unique needs.
プロジェクト固有の特別なニーズに合わせた指示を追加することで、Kiro の理解力をさらに強化・拡張できます。
**1. Navigate to the Steering section in the Kiro panel**
> 1. Kiro パネル内の「Steering」セクションに移動します。
**2. Click the + button**
> 2. 「+」ボタンをクリックします。
**3. Select the scope of the steering file: workspace or global**
> 3. Steering ファイルの適用スコープを選択します(`workspace` または `global`)。
**4. Choose a descriptive filename (e.g., api-standards.md)**
> 4. 内容が分かりやすいファイル名を指定します(例: `api-standards.md` など)。
**5. Write your guidance using standard markdown syntax**
> 5. 標準的な Markdown 構文を使ってガイドラインや指示を記述します。
**6. Use natural language to describe your requirements**
> 6. 要求事項や規約は普段の自然言語を使って記述します。
Once created, steering files become immediately available across all Kiro interactions.
作成された Steering ファイルは、その後のすべての Kiro との対話において即座に利用可能となります。
Steering with custom agents(カスタムエージェントでの Steering の利用)
When using custom agents, steering files are not automatically included. You must explicitly add them to the agent's resources configuration to load steering context.
カスタムエージェント(独自の指示セットを持つサブエージェント)を使用する場合、Steering ファイルは自動的には読み込まれません。Steering の前提文脈を適用するには、エージェント設定の
resources項目へ明示的に追加する必要があります。
To include all steering files in a custom agent, add the following to your agent configuration:
カスタムエージェント設定にすべての Steering ファイルを含めるには、エージェントの設定ファイルへ以下のように記述します:
{
"resources": ["file://.kiro/steering/**/*.md"]
}
This glob pattern ensures all markdown files in your steering directory are loaded when using the agent. See the custom agents documentation for a complete configuration example.
この Glob パターン(
**/*.md)を指定することで、そのエージェントの呼び出し時に Steering ディレクトリ内のすべての Markdown ファイルが確実にロードされるようになります。設定の全体例については「カスタムエージェントドキュメント」を参照してください。
AGENTS.md(AGENTS.md ファイルによる指示の提供)
Kiro supports providing steering directives via the AGENTS.md standard. AGENTS.md files are in markdown format, similar to Kiro steering files; however, AGENTS.md files do not support inclusion modes and are always included.
Kiro は
AGENTS.mdという標準規格を介した Steering 指示の設定にも対応しています。AGENTS.mdファイルは Kiro 独自の Steering ファイルと同様に Markdown 形式で記述されますが、後述の Inclusion modes(読み込み切り替えモード)には対応しておらず、常に一律で読み込まれる点が異なります。
You can add AGENTS.md files to the global steering file location (~/.kiro/steering/), or to the root folder of your workspace, and they will get picked up by Kiro automatically.
グローバル Steering ディレクトリ(
~/.kiro/steering/)またはワークスペースのルートフォルダにAGENTS.mdを配置するだけで、Kiro が自動的にその内容を認識・取得します。
AGENTS.md files are also discovered in subdirectories throughout your workspace. This lets you place an AGENTS.md next to the code it describes — for example, one in services/api/ and another in packages/ui/ — and each is loaded as steering context alongside your other steering files.
AGENTS.mdファイルは、ワークスペース配下のサブディレクトリ内からも自動検出されます。これにより、説明対象となるコードのすぐ隣(例えばservices/api/に1つ、packages/ui/に別の1つを配置するなど)にピンポイントで置き、他の Steering ファイルと並行してそれぞれの文脈として読み込ませることができます。
ポイント解説
-
3つの基本ファイル (
product.md/tech.md/structure.md): これらはすべてのコンテキストの「土台」となるため、Kiro に自動生成させるか手動で記述して配下に置くのが推奨パターンです。 -
サブディレクトリ内の
AGENTS.md自動読み込み: モノリポ構成やマイクロサービス構成などで、特定ディレクトリ(packages/ui/やservices/api/)に閉じた専用ローカルルールがある場合、そこにAGENTS.mdを置くだけで対象箇所のコーディング時だけ適切なコンテキストが適用されるため非常に強力です。
Inclusion modes(Inclusion modes(インクルージョン・モード/読み込みモード))
Inclusion modes(読み込みモード)の概要と設定方法
Steering files can be configured to load at different times based on your needs. This flexibility helps optimize performance and ensures relevant context is available when needed.
Steering ファイルは、開発者のニーズに応じて異なるタイミングで読み込まれるように設定できます。この柔軟性により、コンテキスト(トークン量)を最適化し、必要なときにのみ関連する前提知識をAIに提供できます。
Configure inclusion modes by adding front matter to the top of your steering files. The front matter uses YAML syntax and must be placed at the very beginning of the file, enclosed by triple dashes (---).
読み込みモードを設定するには、Steering ファイルの先頭に「Front Matter(フロントマター)」を追加します。Front Matter は YAML 構文を使用し、ファイルの最上部に3つのハイフン(
---)で囲んで配置する必要があります。
Info
The inclusion configuration must be the first content in the file - no blank lines or content before it.
読み込み(Inclusion)の設定は、ファイル内の先頭のコンテンツでなければなりません。その前には空行やその他の記述を一切挟まないでください。
Always included (デフォルト:常に読み込む)
---
inclusion: always
---
These files are loaded into every Kiro interaction automatically. Use this mode for core standards that should influence all code generation and suggestions. Examples include your technology stack, coding conventions, and fundamental architectural principles.
これらのファイルは、Kiro とのすべての対話に自動的に読み込まれます。すべてのコード生成や提案に影響を与えるべき「コア標準ルール」にこのモードを使用します。例として、技術スタック、コーディング規約、基本的なアーキテクチャ原則などが挙げられます。
Best for: Workspace-wide standards, technology preferences, security policies, and coding conventions that apply universally.
最適な用途: ワークスペース全体の標準ルール、採用する技術の選定理由、セキュリティポリシー、普遍的に適用されるコーディング規約など。
Conditional inclusion (条件付き読み込み:fileMatch)
---
inclusion: fileMatch
fileMatchPattern: "components/**/*.tsx"
---
Files are automatically included only when working with files that match the specified pattern. This keeps context relevant and reduces noise by loading specialized guidance only when needed.
指定されたパターンに一致するファイルを扱っている(開いている/編集している)場合のみ、自動的に読み込まれます。必要なときにだけ専門的な指示をロードすることで、コンテキストの関連性を高く保ち、ノイズ(不必要な情報)を減らします。
You can also specify multiple patterns using an array:
以下のように配列形式(
[...])を使って、複数のパターンを指定することも可能です:
---
inclusion: fileMatch
fileMatchPattern: ["**/*.ts", "**/*.tsx", "**/tsconfig.*.json"]
---
Common patterns:
よく使われる設定パターンの例:
-
*.tsx— React コンポーネントおよび JSX ファイル -
app/api/**/*— API ルーティングおよびバックエンド処理ロジック -
**/*.test.*— テストファイルおよびテスト用ユーティリティ -
src/components/**/*— コンポーネント固有のガイドライン -
*.md— ドキュメントファイル -
["**/*.ts", "**/*.tsx"]— すべての TypeScript ファイル -
["*.js", "*.jsx", "*.ts", "*.tsx"]— すべての JavaScript / TypeScript ファイル
Best for: Domain-specific standards like component patterns, API design rules, testing approaches, or deployment procedures that only apply to certain file types.
最適な用途: 特定のファイル形式やディレクトリにしか適用されないコンポーネント設計パターン、API設計ルール、テストアプローチ、デプロイ手順などのドメイン固有標準。
Manual inclusion (手動読み込み)
---
inclusion: manual
---
Files are available on-demand by referencing them with #steering-file-name in your chat messages. This gives you precise control over when specialized context is needed without cluttering every interaction.
チャットメッセージ内で
#steering-file-nameのように参照することで、必要なオンデマンドのタイミングでのみ呼び出せます。毎回の対話(プロンプト)を圧迫することなく、専門的なコンテキストが必要な瞬間を正確にコントロールできます。
Usage: Type #troubleshooting-guide or #performance-optimization in chat to include that steering file for the current conversation. Manual steering files also appear as slash commands - type / in chat to see and select them.
使い方: チャット欄で
#troubleshooting-guideや#performance-optimizationと入力すると、その会話セッションに該当の Steering ファイルが読み込まれます。手動読み込みのファイルはスラッシュコマンドとしても表示されるため、チャット欄で/と入力して一覧から選択・参照することもできます。
Best for: Specialized workflows, troubleshooting guides, migration procedures, or context-heavy documentation that's only needed occasionally.
最適な用途: 特定の特殊ワークフロー、トラブルシューティングガイド、ライブラリ移行手順、たまにしか必要としない情報量の多い各種ドキュメントなど。
Auto inclusion (自動判定読み込み)
---
inclusion: auto
name: api-design
description: REST API design patterns and conventions. Use when creating or modifying API endpoints.
---
Files are automatically included when your request matches the description. This works similarly to skills - Kiro uses the description to decide when the steering file is relevant.
ユーザーのプロンプト(リクエスト内容)が
descriptionの説明に合致した際、自動的に読み込まれます。これはエージェントの Skill(スキル)の仕組みと非常によく似ており、Kiro が説明文を元に「その Steering ファイルが今必要かどうか」を判断します。
| フィールド | 必須 | 説明 |
|---|---|---|
| name | はい | Steering ファイルの識別子。画面表示やパターンマッチングに使用されます。 |
| description | はい | このファイルをいつ読み込むべきかという条件。Kiro はユーザーのリクエストとこの文章を照合します。 |
Auto-inclusion steering files also appear as slash commands in chat. Type / followed by the steering file name to explicitly include it, in addition to the automatic activation based on description matching.
自動判定(Auto-inclusion)に設定された Steering ファイルも、チャット欄でスラッシュコマンドとして利用できます。
descriptionによる自動読み込みに加え、チャット欄で/の後にファイル名を入力して明示的に読み込ませることも可能です。
Best for: Context-heavy guidance that should only load when relevant - like specialized domain knowledge, complex workflows, or detailed reference material that would overwhelm always-on steering.
最適な用途: 関連する話題が出たときのみ読み込ませたい情報量の多いガイドライン(専門的なドメイン知識、複雑なワークフロー、常に読み込ませるとトークンを圧迫しすぎる詳細なリファレンス資料など)。
Info(CLI環境での注意点)
On Kiro CLI, inclusion modes are not currently supported. All steering files in the .kiro/steering/ directory are loaded automatically.
注意点: 現在の Kiro CLI(コマンドライン版)では、Inclusion modes(読み込み切り替えモード)はサポートされていません。CLI 環境では
.kiro/steering/ディレクトリ内にあるすべての Steering ファイルが常に自動的に一律ロードされます。
ポイント解説
-
トークン消費の最適化(Context Window の節約):
すべての指示をinclusion: alwaysにしてしまうと、AIに渡す前提情報が膨らみ、応答速度の低下やトークン数の上限圧迫に繋がります。 - 基本ルール →
always - Reactなどの画面開発ルール →
fileMatch(*.tsx) - たまにやるDBマイグレーションやリファクタリング手順 →
manualやauto
というように切り替えるのが Kiro のベストプラクティスです。
File references(ファイル参照機能)
Link to live workspace files to keep steering current:
ワークスペース内の実際の(生の)ファイルへリンクを貼ることで、Steering の記述を常に最新の状態に保つことができます:
#[[file:<相対ファイルパス>]]
Examples:(記述例:)
- API 仕様書:
#[[file:api/openapi.yaml]] - コンポーネントの設計パターン:
#[[file:components/ui/button.tsx]] - 設定ファイルのテンプレート:
#[[file:.env.example]]
Steering during a session(セッション中のリアルタイムな指示(Steering))
In addition to persistent steering files, you can steer Kiro in real time during any session by providing direction in the chat:
永続的な Steering ファイルに加えて、チャット上で指示を与えることで、任意のセッション中にリアルタイムで Kiro の挙動を調整・誘導できます:
- 「リポジトリ内の既存のエラーハンドリング・パターンに従ってください」
- 「
UserServiceクラスと同じアプローチを踏襲してください」 - 「単体テストだけでなく、必ず結合テスト(インテグレーションテスト)も追加してください」
Info(補足)
On Kiro Web, you can steer autonomous-mode tasks the same way — direction you give during the task acts as steering for it.
Kiro Web 版では、自律モード(Autonomous-mode)で実行中のタスクに対しても同じ方法で指示を与えることができます。タスク実行中に与えた指示は、そのままそのタスクの調整指示(Steering)として機能します。
Teaching through code reviews(コードレビューを通じた AI への教え込み)
On Kiro Web, you can steer the agent by leaving feedback on pull requests. When you comment on a PR with guidance like "always use our standard error handling" or "follow our naming conventions," the agent learns and applies those patterns to future work across all your repositories.
Kiro Web 版では、プルリクエスト(PR)上にフィードバック(コメント)を残すことでエージェントを教育・指示することができます。「常に標準のエラーハンドリングを使用すること」や「命名規約に従うこと」といったアドバイスを PR コメントに残すと、エージェントはそれを学習し、今後のすべてのリポジトリでの作業にそのパターンを適用するようになります。
Only your feedback (the user who created the task) influences the agent's learnings. Other reviewers' comments don't affect what the agent learns.
なお、エージェントの学習に影響を与えるのは、タスクを作成したユーザー自身のフィードバックのみです。その他のレビューアーによるコメントは、エージェントの学習内容には影響しません。
Best practices(ベストプラクティス(効果的な運用ルール))
Keep Files Focused - One domain per file - API design, testing, or deployment procedures.
ファイルを単一目的に保つ — API 設計、テスト手法、デプロイ手順など、ファイルごとに 1 つのドメイン(テーマ)に絞って記述します。
Use Clear Names:(分かりやすいファイル名を使用する:)
-
api-rest-conventions.md— REST API の標準規約 -
testing-unit-patterns.md— 単体テストのアプローチ -
components-form-validation.md— フォームコンポーネントの仕様標準
Include Context - Explain why decisions were made, not just what the standards are.
背景・文脈を含める — 単にルール(標準)が何であるかだけでなく、「なぜその技術的決断に至ったのか(理由)」まで記述します。
Provide Examples - Use code snippets and before/after comparisons to demonstrate standards.
具体例を提供する — コードスニペットや ビフォー/アフターの比較画像・コードを用いて、標準ルールを明確に示します。
Security First - Never include API keys, passwords, or sensitive data. Steering files are part of your codebase.
セキュリティを最優先する — API キー、パスワード、機密データを決して含めないでください。Steering ファイルもソースコードの一部(リポジトリ管理対象)です。
Maintain Regularly:(定期的にメンテナンスを行う)
- スプリントの計画時やアーキテクチャの変更時に見直しを行う
- ディレクトリ構造を変更した後はファイル参照(
#[[file:...]])をテスト確認する - Steering ファイルの変更もソースコードの変更と同等に扱い、コードレビュー(PR)を必須とする
Common steering file strategies(一般的な Steering ファイルの活用パターン)
API Standards (api-standards.md) - Define REST conventions, error response formats, authentication flows, and versioning strategies. Include endpoint naming patterns, HTTP status code usage, and request/response examples.
API 標準 (
api-standards.md) — REST 規約、エラーレスポンスの形式、認証フロー、バージョニング戦略を定義します。エンドポイントの命名パターン、HTTP ステータスコードの使い分け、リクエスト/レスポンスの具体例を含めます。
Testing Approach (testing-standards.md) - Establish unit test patterns, integration test strategies, mocking approaches, and coverage expectations. Document preferred testing libraries, assertion styles, and test file organization.
テスト方針 (
testing-standards.md) — 単体テストのパターン、結合テストの戦略、モック(Mock)の作成手法、カバレッジの目標値を定義します。推奨するテストライブラリ、アサーションのスタイル、テストファイルの配置ルールを記述します。
Code Style (code-conventions.md) - Specify naming patterns, file organization, import ordering, and architectural decisions. Include examples of preferred code structures, component patterns, and anti-patterns to avoid.
コードスタイル (
code-conventions.md) — 命名規約、ファイル構成、インポートの順序(importの並び順)、アーキテクチャ上の決定事項を指定します。推奨するコード構造、コンポーネントパターン、および避けるべきアンチパターンの例を記述します。
Security Guidelines (security-policies.md) - Document authentication requirements, data validation rules, input sanitization standards, and vulnerability prevention measures. Include secure coding practices specific to your application.
セキュリティガイドライン (
security-policies.md) — 認証要件、データバリデーションルール、入力値のサニタイズ標準、脆弱性対策をドキュメント化します。アプリケーション固有のセキュアコーディング手法を含めます。
Deployment Process (deployment-workflow.md) - Outline build procedures, environment configurations, deployment steps, and rollback strategies. Include CI/CD pipeline details and environment-specific requirements.
デプロイプロセス (
deployment-workflow.md) — ビルド手順、環境ごとの設定(env等)、デプロイ手順、切り戻し(ロールバック)戦略の概要を記述します。CI/CD パイプラインの詳細や環境固有の要件を含めます。
Related documentation(関連ドキュメント)
- Skills(スキル) — 専門的なワークフローのための、オンデマンドで読み込めるモジュール型指示パッケージ
- Hooks(フック) — イベント(ファイルの保存や変更など)に基づいてエージェントのアクションを自動実行する仕組み
- Custom Agents(カスタムエージェント) — 独自の Steering 指示を組み込んだ専用エージェントの構築
ポイント解説
-
#[[file:...]]による動的参照: 規約ドキュメントに直接コードルールを長々と書き書く代わりに、プロジェクト内の「理想的なコード例(button.tsxなど)」へリンクを貼っておくことで、ソースコードが修正されても常に最新の実装がお手本として評価されます。 - PR レビューによるエージェントの学習: Kiro Web では、PR 上で人間が「この書き方はうちの命名規約と違うよ」とコメントするだけで、その修正指示をエージェントが永続的に自動学習します(タスク作成者個人のフィードバックのみ学習対象となる安全性も考慮されています)。