Steering Documents
Relevant source files
The following files were used as context for generating this wiki page:Steering Documents are contextual guidelines that influence how AI assistants, specifically Kiro, approach development tasks. They contain project-specific standards, conventions, and best practices that are injected into the AI's system context to provide more relevant and consistent assistance. These documents are stored in the .kiro/steering/ directory of a project.
The primary purpose of the steering system is to formalize the design and implementation process, allowing for incremental development of complex features with greater control and feedback. This is part of a broader Spec-Driven Development methodology that includes Requirements, Design, and Task phases.
Sources: skills/create-steering-documents/SKILL.md:19-22, commands/create-steering-documents-standalone.md:175-178, kiro-web-app/src/pages/SystemDocs.tsx:28-36
How Steering Documents Work
Steering documents are integrated into the AI's context based on a defined inclusion mechanism specified in each document's front-matter. The content of all applicable documents is combined and injected into the AI's system context before it processes a user's request.
Sources: commands/create-steering-documents-standalone.md:188-192
Inclusion Mechanisms
There are three ways a steering document can be included in an interaction:
| Inclusion Type | Description |
|---|---|
always | Default behavior. Documents without front-matter or with inclusion: always are included in every interaction. |
fileMatch | Documents with inclusion: fileMatch and a fileMatchPattern are included only when files matching the pattern are part of the context. |
manual | Documents with inclusion: manual are only included when explicitly referenced by the user (e.g., using #steering-name). |
Sources: skills/create-steering-documents/SKILL.md:24-29, commands/create-steering-documents-standalone.md:180-186
The following diagram illustrates the logic for including a steering document in the AI's context.
This diagram shows the decision flow for including a steering document based on its front-matter configuration.
Sources: skills/create-steering-documents/SKILL.md:24-29, 218-222, commands/create-steering-documents-standalone.md:180-186
Creating Steering Documents
A command, Create steering documents for [project description], is used to automatically generate a set of steering documents tailored to a project's needs.
Sources: commands/create-steering-documents.md:5-7
Creation Process
The creation process involves analyzing the project description to determine the required documents, customizing templates, and outputting the final files.
- Project Analysis: The system first analyzes the project requirements to determine which steering documents are needed based on the project type (e.g., Frontend, Backend, Full-Stack).
- Document Creation: Core and conditional documents are created using predefined templates.
- Content Customization: The content is adapted based on specific languages, frameworks, project scale, and domain.
- Output: The generated markdown files are placed in the
.kiro/steering/directory.
The diagram below outlines the automated creation workflow.
This flowchart illustrates the process of generating steering documents from a user command.
Sources: commands/create-steering-documents.md:13-46, skills/create-steering-documents/SKILL.md:32-61
Output Structure
The generated documents are organized within the .kiro/steering/ directory.
This diagram shows the typical file structure for steering documents.
Sources: skills/create-steering-documents/SKILL.md:211-217, commands/create-steering-documents-standalone.md:225-232
Core Document Types
The system generates a set of core and conditional documents based on the project analysis.
| Document Name | Inclusion Logic | Purpose |
|---|---|---|
project-standards.md | always | Defines project-wide standards for code quality, testing, documentation, security, and performance. |
git-workflow.md | always | Outlines the branching strategy, commit message format, and code review process. |
frontend-standards.md | fileMatch | Specifies standards for frontend development, including component architecture, state management, and styling. Triggered by files like *.tsx, *.jsx, etc. |
api-design.md | manual or fileMatch | Provides guidelines for RESTful API design, request/response formats, and authentication. Can be triggered by files like *api* or *controller*. |
development-environment.md | fileMatch | Details the setup for the local development environment, including tooling and environment variables. Triggered by files like package.json, Dockerfile, etc. |
Sources: skills/create-steering-documents/SKILL.md:34-52, 64-199, commands/create-steering-documents.md:52-106
Front-matter Configuration
The inclusion behavior is controlled by YAML front-matter at the top of each markdown file.
---
inclusion: always|fileMatch|manual
fileMatchPattern: 'glob-pattern' # for fileMatch only
---
Example of front-matter configuration.
inclusion: Determines how the document is included (always,fileMatch, ormanual).fileMatchPattern: A glob pattern used to match against file names in the current context wheninclusionisfileMatch.
Sources: skills/create-steering-documents/SKILL.md:218-222, commands/create-steering-documents-standalone.md:234-238
File Reference Integration
Steering documents can include content from other project files using the #[[file:path/to/file]] syntax. This is useful for referencing OpenAPI specifications, database schemas, or configuration files directly within the guidelines.
Sources: skills/create-steering-documents/SKILL.md:202-207, commands/create-steering-documents-standalone.md:158-163
Web Application Interface
The Kiro Web App provides a user interface to view the generated project steering documents. The SteeringDocs.tsx page component renders a navigation sidebar and a content area to display the different documents.
The component uses a React useState hook to manage which document is currently active and renders the content from a steeringDocs array. Each document's content is displayed within a <pre> tag, preserving its markdown formatting.
Sources: kiro-web-app/src/pages/SteeringDocs.tsx:1-118
Summary
Steering Documents are a powerful feature within the Kiro ecosystem for guiding AI-assisted development. By defining project-specific standards and conventions, they ensure that the AI's contributions are consistent, high-quality, and aligned with the project's architecture. The automated creation process and flexible inclusion mechanisms make them a practical tool for managing development at scale, bridging the gap between high-level design and day-to-day implementation.
Sources: skills/create-steering-documents/SKILL.md:19-22, spec-process-guide/process/design-phase.md:1-10