System Data Flow
Relevant source files
The following files were used as context for generating this wiki page:The Kiro system's data flow is characterized by a structured, multi-faceted approach to software development and AI collaboration, rather than a single monolithic process. The primary data flows revolve around three core concepts: the Spec-Driven Development workflow, the AI Context Augmentation via the Steering System, and the Model Context Protocol (MCP) for tool integration. These systems work in concert to transform high-level ideas into well-defined, implementable code.
This documentation outlines these distinct but interconnected data flows. The Spec-Driven workflow provides a structured path from requirements to tasks. The Steering System dynamically injects project-specific standards and guidelines into the AI's context. Finally, the MCP enables the AI to interact with external tools and services, creating a comprehensive ecosystem for development.
Spec-Driven Development Workflow
The project follows a systematic three-phase workflow for feature development: Requirements, Design, and Tasks. This ensures that features are well-planned before implementation begins. The data flows from one phase to the next, with each phase building upon the previous one.
Sources: skills/spec-driven-development/SKILL.md, spec-process-guide/methodology/overview.md
The diagram below illustrates the sequential and iterative nature of this workflow.
Sources: spec-process-guide/process/README.md
Phase 1: Requirements
The process begins by transforming a feature idea into testable requirements using the EARS (Easy Approach to Requirements Syntax) format. This phase focuses on defining user stories and acceptance criteria.
Sources: skills/requirements-engineering/SKILL.md, spec-process-guide/resources/standards.md
Phase 2: Design
Once requirements are approved, the Design phase translates them into a technical blueprint. This involves creating system architecture diagrams, defining data models, specifying component interfaces, and planning for error handling and testing.
This data flow is visualized in the standard design template.
Phase 3: Tasks
The final phase breaks the approved design into a sequence of actionable coding tasks. Each task is linked back to specific requirements to ensure traceability from the initial concept to the final implementation step.
Sources: spec-process-guide/templates/tasks-template.md, skills/spec-driven-development/SKILL.md:83-93
AI Context Augmentation (Steering System)
The Steering System is a key data flow that provides contextual guidance to the Kiro AI assistant. It works by dynamically including project-specific standards, conventions, and best practices from markdown files located in the .kiro/steering/ directory.
Sources: kiro-web-app/src/pages/SystemDocs.tsx:30-41, skills/create-steering-documents/SKILL.md:21-25
The flow involves analyzing the user's interaction and context to determine which steering documents to inject into the AI's prompt.
Inclusion Logic
The selection of steering documents is governed by front-matter defined within each file.
| Inclusion Type | Condition |
|---|---|
always | Included in every interaction (default behavior). |
fileMatch | Included when files matching the fileMatchPattern are in the context. |
manual | Included only when explicitly referenced by the user in the chat. |
Sources: skills/create-steering-documents/SKILL.md:162-166, kiro-web-app/src/pages/SystemDocs.tsx:37-40
Steering Document Structure
Steering documents are organized by project type to provide relevant guidance. For example, a frontend project would include frontend-standards.md, while a backend project would include api-design.md.
| Project Type | Core Documents |
|---|---|
| Frontend | project-standards.md, git-workflow.md, frontend-standards.md, development-environment.md |
| Backend/API | project-standards.md, git-workflow.md, api-design.md, development-environment.md |
| Library/Package | project-standards.md, git-workflow.md, documentation-standards.md |
Sources: skills/create-steering-documents/SKILL.md:29-49
Model Context Protocol (MCP)
The Model Context Protocol (MCP) is a system that allows the Kiro AI to interact with external tools. It operates via a server that the Kiro IDE connects to. The data flow involves the Kiro client making requests to the MCP server, which then executes the requested tool or command.
Sources: kiro-web-app/src/pages/SystemDocs.tsx:58-68
The sequence diagram below shows the interaction between the Kiro IDE and the MCP server.
The MCP server's behavior is configured through mcp.json files, which can specify tools to be auto-approved or disable the server entirely. The server automatically reconnects when the configuration changes.
Sources: kiro-web-app/src/pages/SystemDocs.tsx:62-68
Frontend Documentation Display
The system's own documentation, including details on capabilities, response styles, and workflow patterns, is stored as static content within the kiro-web-app and rendered through React components. This represents a simple data flow from hardcoded content in the source files to the user interface.
The SystemDocs.tsx page, for example, contains an array of documentation objects, each with a title and content. A user's selection in the UI updates the component's state to display the corresponding content.