The Blueprint · 30 min mission

Kiro Guide: Spec-Governed Agentic Engineering

Go zero-to-hero on Kiro across IDE, CLI, cloud sessions, Web, Mobile, and Crew — with version-gated syntax for specs, steering, hooks, permissions, agents, and MCP.

kirospecssteeringhooksmcpworkflowFact-checked 2026-06-18
On this page

Kiro is an agentic development family from AWS. It spans a VS Code-style IDE, a terminal CLI (kiro-cli), a browser Web agent, Mobile preview, and Crew for persistent unattended agents. Those surfaces share an agent foundation, but they are not feature-identical: local custom agents and hooks, remote sandboxes, mobile delegation, and always-on Crew automation have different boundaries. What makes Kiro distinctive from "chat that writes code" is the workflow it pushes you toward: instead of prompting your way to a diff, you turn an idea into a committed, reviewable spec — requirements.md, design.md, tasks.md checked into your repo — and only then write code against it.

The 15-year-old version: normal AI chat is asking a clever helper to start typing from a one-line description. Kiro first makes the helper write the plan, the checklist, and the acceptance tests, gets you to approve them, and then builds — ticking off the checklist while you watch the diff.

The senior version: two interaction axes matter most in the IDE. The first is Vibe vs Spec — a vibe session is conversational and good for exploration and small fixes; a spec session is the structured requirements → design → tasks loop with tracked execution. The second is Autopilot vs Supervised — autopilot acts end-to-end, supervised yields after each edit for hunk-level review. The docs state that supervised mode is a code-review convenience, not a security boundary.

Reach for Kiro's spec workflow when a change has several requirements, crosses files, needs review, or has real drift risk. Stay in vibe chat — or another editor agent — when the task is tiny, exploratory, or better handled by an inline edit than by a durable artifact you then have to maintain.

How a senior reads Kiro: four control planes

For an experienced engineer the question isn't "can it write code" but "can it preserve my intent while it changes a real repo?" That reframes Kiro as four control planes you operate at once:

Intent — specs, bugfix specs, Quick Plan, requirements analysis, #spec. This is where scope, acceptance criteria, and traceability live.

Context — steering, AGENTS.md, skills, powers, open files, and retrieved docs. Drift starts here, when stale context outranks the real architecture.

Automation — hooks, CLI agents, Web autonomous mode, subagents, and the GitHub/GitLab issue→PR flow. This is what can run without you watching.

Trust — MCP provenance, sandbox policy, internet access, secrets, repo permissions, and review gates. Treat the blast radius as part of the design: write down the threat model before you grant a tool, not after.

The rest of this guide is built from that frame, with the real on-disk syntax for each plane and an interactive tool to apply it. Where Kiro's own docs only document part of a format, this guide says so rather than dressing a guess up as fact.

Control planeKiro mechanismsThe question you must answer
IntentFeature specs, bugfix specs, Quick Plan, requirements analysis, #specCan every task and diff line trace back to approved intent?
ContextSteering, AGENTS.md, skills, powers, retrieved docsWhich context is authoritative, stale, duplicated, or too broad?
AutomationHooks, CLI agents, Web autonomous mode, subagentsWhat can run without a human watching — and what must pause?
TrustMCP, sandbox, internet access, secrets, repo permissionsWhat is the blast radius if the agent follows bad context or a hostile tool?
The four control planes and the question each one answers.

The spec loop, end to end

A spec session front-loads the thinking that ordinary chat hides. You supply intent and judgment; Kiro produces artifacts and runs tasks; the final check is never "it finished" — it's whether the files, tests, and diff still match the spec you approved. The loop has explicit gates, and the gates are the point.

idea → requirements → design → tasks → implementation → review

  1. Idea

    State the outcome, the user, the risk, the files in scope, and the definition of done.

  2. Requirements

    Kiro drafts numbered user stories with EARS acceptance criteria. Run requirements analysis to catch ambiguity while it is still cheap.

  3. Design

    Kiro proposes architecture, data models, and a testing strategy. Constrain it to existing modules before approving.

  4. Tasks

    Kiro breaks the design into a checklist where each leaf task back-references the requirement it satisfies (_Requirements: 1.2_).

  5. Implementation

    "Run all Tasks" executes in dependency waves — independent tasks run concurrently. Watch the diff; stop drift early.

  6. Review

    Compare the diff to the spec, run the real test suite, then sync the spec so the artifacts do not rot.

Spec lifecycle playground

Spec lifecycle playground

You are the reviewer — your gate decisions decide the drift

Walk one feature through Kiro's spec loop. Every choice you make at a gate propagates: skip requirements analysis and the ambiguities resurface as rework at implementation; flip on Quick Plan and you lose the gates entirely. Watch spec health react.

Ambiguities → code

2

Traceability

72%

Drift risk

High

Step 1 of 5 · requirements.md

Requirements

### Requirement 1: Password reset

**User Story:** As a returning user, I want to reset my
password by email, so that I can recover a locked account.

#### Acceptance Criteria
1. WHEN a user requests a reset THE SYSTEM SHALL email a
   single-use token valid for a limited time.
2. THE SYSTEM SHALL handle token reuse appropriately.   ⚠ vague
3. THE SYSTEM SHALL respond quickly.                    ⚠ vague

Your call at the requirements gate

Be the reviewer. Make a call at each gate and watch the consequences propagate — skip requirements analysis and the ambiguity resurfaces as rework; turn on Quick Plan and you lose the gates entirely.

Knowledge check

A teammate wants to use Quick Plan for a risky, multi-team feature and approve the generated tasks immediately. What is the right move?

Specs deep dive

Specs live under .kiro/specs/, one feature-named directory per spec, committed to the repo alongside the code. A feature spec holds three files; a bugfix spec swaps requirements.md for bugfix.md and keeps the other two. Spec files use no YAML front-matter — front-matter is a steering and hooks thing.

When you create a spec, Kiro asks Feature or Bug. For a feature you pick Requirements-First (requirements → design → tasks) or Design-First (design → requirements → tasks); you cannot switch later. Quick Plan produces all three in one pass with no gates.

.kiro/specs/ — one directory per feature, committed to the repo
text
.kiro/specs/
├── password-reset/
│   ├── requirements.md   # user stories + EARS acceptance criteria
│   ├── design.md         # architecture, data models, testing strategy
│   └── tasks.md          # checklist; each task back-refs a requirement
├── product-catalog/
│   └── …
└── name-apostrophe-fix/
    ├── bugfix.md          # current / expected / unchanged behavior
    ├── design.md
    └── tasks.md

Acceptance criteria are EARS

The reason Kiro specs work is that acceptance criteria are written so a machine can verify them. Kiro's docs document one EARS form — the event-driven form:

text
WHEN <trigger> THE SYSTEM SHALL <observable response>

Bugfix specs add two more: WHEN <condition> THEN the system SHALL <correct behavior> and … SHALL CONTINUE TO <existing behavior>. The wider EARS standard has more patterns — and they are worth knowing — but note clearly: the patterns below are the EARS standard, not all documented by Kiro. Kiro reliably emits the event form; you can write the others by hand.

PatternSkeletonUse it for
Event-driven *(Kiro-documented)*WHEN <trigger> THE SYSTEM SHALL <response>A response to a discrete event or request.
Unwanted behaviorIF <condition> THEN THE SYSTEM SHALL <response>Error handling, abuse, and edge cases.
State-drivenWHILE <state> THE SYSTEM SHALL <response>Behavior that holds during a mode or state.
Optional featureWHERE <feature> THE SYSTEM SHALL <response>Behavior that only applies when a feature is present.
UbiquitousTHE SYSTEM SHALL <response>An always-true invariant with no precondition.
EARS patterns. The event form is what Kiro documents and generates; the rest are the EARS standard you can author yourself.
requirements.md — the shape Kiro generates (verbatim pattern from kirodotdev/Kiro)
markdown
# Requirements Document
 
## Introduction
 
An automated password-reset flow for returning users, scoped to the auth service.
 
## Requirements
 
### Requirement 1: Password reset
 
**User Story:** As a returning user, I want to reset my password by email,
so that I can recover a locked account.
 
#### Acceptance Criteria
 
1. WHEN a user requests a reset THE SYSTEM SHALL email a single-use token
   that expires after 30 minutes
2. IF a token is reused THEN THE SYSTEM SHALL reject the second attempt and
   show "link expired"
3. WHEN three resets are requested within an hour THE SYSTEM SHALL rate-limit
   further requests for that account
design.md — the sections Kiro produces
markdown
# Design Document
 
## Overview
Reset flow built on the existing AuthService + MailQueue (no new top-level service).
 
## Architecture
- Add a PasswordResetToken store; everything else reuses current modules.
 
## Components and Interfaces
- POST /auth/reset/request → AuthService.issueResetToken()
- POST /auth/reset/confirm → AuthService.consumeResetToken()
 
## Data Models
- PasswordResetToken { hash, userId, expiresAt, usedAt }
 
## Error Handling
- Reused token → 410; expired → 410; over rate limit → 429.
 
## Testing Strategy
- One test per acceptance criterion; negative cases for reuse and expiry.
tasks.md — a checklist where every task traces to a requirement
markdown
# Implementation Plan: Password reset
 
- [x] 1. Add PasswordResetToken model and migration
    - _Requirements: 1.1_
 
- [ ] 2. Issue + email a single-use token
  - [ ] 2.1 Generate, hash, and store the token with a 30-minute expiry
    - _Requirements: 1.1_
  - [ ]* 2.2 Unit-test token generation and expiry
    - _Requirements: 1.1_
 
- [ ] 3. Reject reused or expired tokens
    - _Requirements: 1.2_
 
- [ ]* 4. Rate-limit reset requests per account
    - _Requirements: 1.3_

Read the format like a senior reviewer: - [ ] / - [x] track completion, decimal numbering nests sub-tasks, - [ ]* marks an optional test task, and the trailing _Requirements: 1.2_ is your traceability matrix in plain text — every leaf task names the acceptance criterion it satisfies. If a task has no requirement reference, it is scope you never approved.

Bugfix specs force you to separate three things before touching code — the current behavior that is wrong, the expected behavior that is right, and the unchanged behavior that must not regress. The bugfix design adds a root-cause section and "properties to test for," and the tasks phase generates property-based tests that prove the bug existed, the fix works, and nothing regressed.

bugfix.md — three behaviors, stated before the fix
markdown
# Bugfix Analysis
 
## Current Behavior (Defect)
WHEN a name contains an apostrophe THEN the system returns a 500 error
 
## Expected Behavior (Correct)
WHEN a name contains an apostrophe THEN the system SHALL persist the name and
return 200
 
## Unchanged Behavior (Regression Prevention)
WHEN an email or password is validated THEN the system SHALL CONTINUE TO apply
the existing validation rules

Two more spec tools matter. Requirements analysis runs after requirements and before design (via the chat option or the Continue dropdown) and flags logical inconsistencies, ambiguities like "large files" or "fast response times," conflicting constraints, unstated assumptions, and missing edge cases; resolving its questions updates requirements.md. And #spec pulls a whole spec into chat — #spec:password-reset implement task 2.1, or #spec:password-reset does my implementation meet the acceptance criteria for task 3?.

The expert moves the docs imply but won't do for you: keep the spec committed so the diff and intent travel together, and run a drift detector after implementation — ask Kiro to list any file or behavior that changed outside the approved spec. A beautiful spec is a liability the moment the PR diverges from it and nobody updates it.

Good spec vs weak spec

Weak spec

Broad outcome, no named actor, criteria like "handle errors appropriately," no non-goals, no test plan. Kiro has to invent intent — and it will optimize for the wrong behavior.

Good spec

Named user, concrete triggers, EARS criteria you could write a test against, explicit non-goals, and tasks that each back-reference a requirement. Every diff line traces home.

Spec risk analyzer + EARS editor

Spec risk analyzer + EARS editor

Build acceptance criteria the right way, get a paste-ready spec pack

The hard part of a Kiro spec is writing acceptance criteria a machine can verify. Compose each one from an EARS pattern below — the editor flags vague wording — and the requirements/design/tasks files regenerate with real requirement → task traceability.

Spec type

Risk

Acceptance criteria (EARS)

all testable
1.1

WHEN a user requests a reset THE SYSTEM SHALL email a single-use token that expires after 30 minutes

Testable.

1.2

IF a token is reused THEN THE SYSTEM SHALL reject the request and show "link expired"

Testable.

.kiro/specs/password-reset/requirements.md

# Requirements Document ## Introduction Password reset for returning user. I can recover a locked account ## Requirements ### Requirement 1: Password reset **User Story:** As a returning user, I want reset my password by email, so that I can recover a locked account. #### Acceptance Criteria 1. WHEN a user requests a reset THE SYSTEM SHALL email a single-use token that expires after 30 minutes2. IF a token is reused THEN THE SYSTEM SHALL reject the request and show "link expired"
Traceability matrix + drift detector
  • Every task ends with _Requirements: N.M_ — copy it and you have a real traceability matrix.
  • Run the drift detector after coding: ask Kiro to list any file changed outside this spec.
  • Before "Run all Tasks", use requirements analysis to catch ambiguity while it is cheap.
  • Keep the spec committed in .kiro/specs/ so the diff and intent travel together.
Compose acceptance criteria from EARS patterns with live vagueness checks, then generate a paste-ready requirements / design / tasks pack with real requirement → task traceability.

Knowledge check

Kiro generated a tasks.md where two tasks have no `_Requirements:` line. What does that tell you?

Steering: durable project memory

Steering is markdown that Kiro keeps in mind across sessions. Workspace steering lives in .kiro/steering/ and overrides global steering in ~/.kiro/steering/. The three foundation files — product.md, tech.md, structure.md — are generated by the Generate Steering Docs button and load on every interaction. Custom files should be scoped, so they only load when relevant.

.kiro/steering/ — foundation files plus scoped custom files
text
.kiro/steering/
├── product.md      # purpose, users, goals          (always loaded)
├── tech.md         # stack, constraints, commands    (always loaded)
├── structure.md    # layout, naming, architecture    (always loaded)
├── api-design.md   # inclusion: auto   (loads when the topic is relevant)
└── frontend.md     # inclusion: fileMatch  (loads for matching files only)

A custom file controls when it loads through front-matter at the very top of the file. There are four inclusion modes, and using the right one is how you stop always-on context from swallowing every prompt.

Custom steering front-matter — the four inclusion modes
markdown
--- always (default): loaded into every interaction ---
---
inclusion: always
---
 
--- fileMatch: only when an edited file matches the glob ---
---
inclusion: fileMatch
fileMatchPattern: "components/**/*.tsx"
---
 
--- manual: only when you type #file-name in chat ---
---
inclusion: manual
---
 
--- auto: loaded when the description is semantically relevant ---
---
inclusion: auto
name: api-design
description: REST API patterns. Use when creating or modifying API endpoints.
---

Note the exact keys: fileMatchPattern (not fileMatch) only applies to fileMatch mode and takes a quoted glob or an array of globs; name + description only apply to auto mode. Inside any steering file you can embed a live project file with #[[file:<path>]] — for example #[[file:api/openapi.yaml]] — so the agent reads the real contract instead of a stale paraphrase.

Kiro also reads the cross-tool AGENTS.md standard. It discovers these files throughout the workspace, so place a root file beside repository-wide policy and nested files beside the code they describe — for example, services/api/AGENTS.md and packages/ui/AGENTS.md. They load as steering context and do not use steering inclusion modes. Keep each file portable and scoped; use Kiro steering when you need fileMatch, auto, manual, or live file references. The failure mode here isn't missing context — it's conflicting context, where global steering, workspace steering, and nearby AGENTS.md files overlap. A serious team needs a steering-conflict policy: workspace beats global, the closest guidance owns its code boundary, every custom file has an owner, and stale files get deleted during architecture review.

Steering generator + context-budget advisor

Steering generator + context-budget advisor

Durable project memory without drowning every prompt in context

Foundation files (product/tech/structure) load on every interaction. Scoped custom files should not. Pick an inclusion mode and the front-matter regenerates with the exact keys Kiro expects — plus a read on how much always-on context you are carrying.

Custom file

inclusion mode

Always-on files

3

Context budget

Healthy

.kiro/steering/frontend-standards.md

---inclusion: fileMatchfileMatchPattern: "components/**/*.tsx"--- # frontend-standards Use semantic HTML, label every control, and keep client islands deterministic. # Embed a live file for the agent to follow:#[[file:.eslintrc.json]]
Steering conflict review
  • Workspace steering (.kiro/steering/) overrides global (~/.kiro/steering/) — keep machine-wide defaults thin.
  • Kiro discovers AGENTS.md throughout the workspace. Put portable guidance beside the code it governs; use steering for Kiro inclusion modes.
  • Good: this scoped file only loads when it is relevant, not on every prompt.
  • Never put secrets, tokens, or credentials in steering — it is context, not a vault.
Generate foundation and custom steering with the exact inclusion front-matter Kiro expects — and a live read on how much always-on context you are carrying into every prompt.
LayerUse it forAvoid
Global steering (~/.kiro/steering/)Personal defaults across all your repos.Repo-specific architecture (workspace overrides it anyway).
Workspace steering (.kiro/steering/)This repo: product, stack, structure, testing.One feature's scope — that is a spec.
Custom scoped file (fileMatch / auto)Frontend, API, security, or docs rules that load on demand.One giant always-on standards file.
Root or nested AGENTS.mdPortable, cross-agent guidance scoped beside the code it describes.Kiro steering inclusion fields (AGENTS.md does not use them).
Where each layer belongs — and what not to put in it.

Knowledge check

You keep pasting the same component conventions into every frontend task. Where should they live?

Hooks: event-triggered automation

Hooks run an agent prompt or a shell command when something happens. IDE 1.0 and CLI 3.0 share the same standalone, versioned format: .kiro/hooks/*.json with a top-level { "version": "v1", "hooks": [...] }. Each hook uses a PascalCase trigger such as PostFileSave, an optional regex matcher, and an action whose type is command or agent.

The shared triggers cover session start, prompt submit, stop, pre/post tool use, post-file create/save/delete, and IDE pre/post spec-task execution. Kiro's older generic hook material still mentions Manual, but the dedicated current trigger reference says legacy Manual has no v1 equivalent and new Manual-trigger hooks cannot be created; use a steering slash command for manual invocation. A command receives event context as JSON on STDIN; exit 0 adds stdout to context. Any non-zero result returns stderr to the agent and blocks PreToolUse or UserPromptSubmit. An agent action injects its prompt into the conversation. Hook files are discovered when a session starts, so begin a new session after adding or changing one.

.kiro/hooks/lint-on-save.json — IDE 1.0 / CLI 3.0 v1 schema
json
{
  "version": "v1",
  "hooks": [
    {
      "name": "Lint on save",
      "description": "Lint TypeScript files after they are saved.",
      "trigger": "PostFileSave",
      "matcher": "\\.(ts|tsx)$",
      "action": { "type": "command", "command": "npx eslint --fix" },
      "timeout": 60,
      "enabled": true
    }
  ]
}

Legacy CLI 2.x migration note — do not use this shape in CLI 3.0. CLI 2.x embedded a camelCase hooks object inside an agent config. Its preToolUse command blocked only on exit code 2; other non-zero exits warned but let the tool run. Migrate these entries to standalone .kiro/hooks/*.json, map event names to PascalCase (for example, fileEdited → PostFileSave), and retest blocking because the v1 command action treats any non-zero exit as a block for PreToolUse and UserPromptSubmit. CLI 3.0 is still early access within CLI 2.19, so version-check before distributing a shared config.

Legacy CLI 2.x only — embedded agent hooks shown for migration
json
{
  "hooks": {
    "agentSpawn":       [ { "command": "git status" } ],
    "userPromptSubmit": [ { "command": "ls -la" } ],
    "preToolUse":  [
      { "matcher": "execute_bash",
        "command": "scripts/guard.sh"  } ],
    "postToolUse": [
      { "matcher": "fs_write",
        "command": "cargo fmt --all"   } ]
  }
}

Hook builder (current + migration)

Version-gated hook builder with a noise budget

One current v1 schema — one explicitly legacy migration view

IDE 1.0 and CLI 3.0 share standalone .kiro/hooks/*.json files with PascalCase triggers. CLI 2.x embedded camelCase hooks are legacy. Generate the current file by default; open the legacy view only to migrate an existing profile.

Format

trigger (PascalCase)

action.type

.kiro/hooks/source-audit-on-save.json

{  "version": "v1",  "hooks": [    {      "name": "source-audit-on-save",      "description": "Generated session hook.",      "trigger": "PostFileSave",      "matcher": "\\.(ts|tsx)$",      "action": {        "type": "agent",        "prompt": "A guide file was saved. Flag any factual claim with no source URL and any placeholder text. Suggest edits; do not auto-apply."      },      "enabled": true    }  ]}

Blocking behavior

Current v1 agent action: the prompt is injected into the conversation; it is not a deterministic policy check.

Hook noise budget
  • A hook that fires on every save and returns generic advice gets ignored. Scope it with a narrow matcher and keep output actionable.
  • Current v1 matchers are regex patterns; validate them against matching and non-matching paths or tool names.
  • Current hooks activate when a session starts. Begin a new session after creating or changing the file.
  • The dedicated trigger reference says legacy Manual has no v1 equivalent. Use a steering slash command for manually invoked automation.
  • CLI 3.0 is early access within CLI 2.19; confirm the active engine before distributing the generated config.
  • Test it: trigger a matching case, a non-matching case, and one known-bad case before sharing it with a team.
Generate the shared .kiro/hooks/*.json v1 file for IDE 1.0 / CLI 3.0, or inspect the explicitly labeled embedded format only while migrating CLI 2.x.

Knowledge check

A teammate puts a camelCase `preToolUse` object inside an agent profile for CLI 3.0. What should you do?

MCP, skills, powers — and which one to reach for

These mechanisms solve different problems, and the classic mistake is using the most powerful one for everything. MCP connects Kiro to external tools and data. Skills package a reusable procedure as portable instructions. Powers bundle tools and guidance so they install and load together. (Steering and hooks, covered above, round out the set.)

MCP config lives in .kiro/settings/mcp.json (workspace) and ~/.kiro/settings/mcp.json (user); both merge, workspace wins. The transport is implicit — command means a local stdio server, url means a remote one. There is no type or transport key, and no top-level timeout.

.kiro/settings/mcp.json — local and remote servers (real schema)
json
{
  "mcpServers": {
    "web-search": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-bravesearch"],
      "env": { "BRAVE_API_KEY": "${BRAVE_API_KEY}" },
      "disabled": false,
      "autoApprove": []
    },
    "github": {
      "url": "https://api.github.com/mcp",
      "oauth": { "clientId": "your-app-client-id" },
      "oauthScopes": ["repo", "user"],
      "disabledTools": ["delete_repo"]
    }
  }
}

MCP is the sharpest edge in the whole tool: an MCP server is third-party code that can read secrets, run commands outside the sandbox, and exfiltrate data. Kiro only expands env vars you've explicitly allowed and warns on the rest, but the governing rule is yours to enforce — apply least privilege, autoApprove only narrow, read-only, trusted tools, and chmod 600 your mcp.json so secrets don't leak. Name the mcp risk before you connect, not after.

Skills are an open-standard procedure package: .kiro/skills/<name>/SKILL.md plus optional scripts/, references/, and assets/. The SKILL.md front-matter needs name (matching the folder) and description (which decides when it activates, by progressive disclosure).

Powers now prefer the Agent Plugins 1.0 format. A Power has a required plugin.json manifest and may add skills/, mcp.json, and dev.kiro/ extensions. The manifest declares activation keywords; Kiro loads relevant tools and skills on demand. Older power-<name>/POWER.md packages remain supported as a legacy format, but do not use them as the template for new Powers. The reason Powers exist is context economy — raw MCP loads every tool definition up front, while a Power activates the integration only when its keywords match.

plugin.json — current Agent Plugins 1.0 manifest for a Power
json
{
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
  "name": "supabase",
  "version": "1.0.0",
  "description": "Build applications with Supabase database, auth, and storage",
  "author": { "name": "Supabase" },
  "keywords": ["database", "postgres", "auth", "storage", "supabase"]
}
MechanismReach for it whenLives in
SpecA scoped change needs requirements, design, tasks, and review..kiro/specs/<feature>/
SteeringKiro needs durable project or team context..kiro/steering/*.md
SkillA reusable procedure should be discoverable and portable..kiro/skills/<name>/SKILL.md
PowerTools + guidance should install and load together on demand.Agent Plugin 1.0: plugin.json + optional skills/, mcp.json, dev.kiro/
MCPThe agent needs a live external tool or data source..kiro/settings/mcp.json
HookAn event should trigger a prompt or command.IDE 1.0 / CLI 3.0: .kiro/hooks/*.json v1
The decision boundaries between mechanisms.

Mechanism selector

Mechanism selector

Pick the smallest Kiro mechanism that does the job

The classic mistake is reaching for MCP or a Power when steering or a skill would do. Answer what the work actually needs and get the minimal mechanism, the file it lives in, and what not to use.

Use

Steering

It is a durable project or team standard the agent should keep in mind.

.kiro/steering/*.md (inclusion: always | fileMatch | manual | auto)

What not to use
  • Do not put one-off feature scope here — that belongs in a spec.
Safety
  • Use fileMatch for domain rules so always-on context stays small.

MCP risk rule

Whenever the answer touches MCP or a Power, name the blast radius first: what data the server can read, what it can write, and the rollback path. Grant least privilege, deny unrelated tools, and never auto-approve write tools.

Answer what the work actually needs and get the minimal mechanism, the exact file it lives in, what not to use, and the safety note that goes with it.

Knowledge check

You want Kiro to call an internal issue-tracker API and follow a team runbook whenever it does. Which mechanism fits best?

IDE, CLI, Web, Mobile, Crew, and subagents

Kiro's surfaces share concepts, not a guarantee of feature identity. Pick the surface by execution boundary, continuity, and review model.

Kiro CLI (kiro-cli chat) is the terminal surface: headless review, custom agents, and scriptable validation. Use --no-interactive for one-shot runs on the stable CLI 2.x engine. CLI 3.0's new TUI and shared agent harness are early access within 2.19, so check the active engine before copying a command or config.

In IDE 1.0 / CLI 3.0, custom agents can be JSON or Markdown frontmatter under .kiro/agents/ (or ~/.kiro/agents/). Tool tags such as read, write, shell, and subagent select capabilities; permissions.rules constrain what those tools may do with allow, ask, or deny. This replaces CLI 2.x toolsSettings restrictions. Run /upgrade-agent to back up a legacy profile and migrate compatible rules, then review any regex-to-glob conversion manually.

Stable CLI 2.x — headless review and a named agent
bash
# Review a diff with read-only tools; findings only, no edits.
git diff | kiro-cli chat --no-interactive --trust-tools=read,grep \
  "Review these changes for bugs, missing tests, and security risk."
 
# Run a named custom agent on a one-shot task.
kiro-cli chat --no-interactive --agent reviewer "Audit src/auth for unsafe input handling"
.kiro/agents/reviewer.json — IDE 1.0 / CLI 3.0 least-privilege profile
json
{
  "name": "reviewer",
  "description": "Read-only repo reviewer",
  "tools": ["read", "shell"],
  "allowedTools": ["read"],
  "permissions": {
    "rules": [
      { "capability": "shell", "match": ["git status", "git diff*"], "effect": "allow" },
      { "capability": "fs_write", "effect": "deny" }
    ]
  },
  "resources": [
    "file://README.md",
    "file://.kiro/steering/**/*.md"
  ],
  "prompt": "You are a senior reviewer. Report findings first; do not edit."
}

Kiro Web is a different trust boundary from the local IDE — it clones your repo into a sandbox and opens PRs. It is preview-only and limited to certain accounts and regions. It runs in two modes: collaborative (the default — it iterates with you and opens a branch/PR on request) and autonomous mode (it owns the outcome through a Clarification → Planning → Execution → Completion arc, and even picks the model). From a GitHub issue you trigger it with the kiro label or a /kiro comment; GitLab uses a personal access token and opens an MR. On the PR you steer it with /kiro all (address every comment) or /kiro fix (one thread).

Because Web executes remotely, its sandbox controls are the security surface. Internet access has three tiers — connections-only (default), a built-in allowlist of common package registries, or open internet — plus a custom domain allowlist. And secrets carry the most risk: they're exposed to the sandbox as env vars, and the docs warn plainly that "the agent may exfiltrate these secrets through code changes, logs, or external requests, so only provide secrets necessary for the task and only use the agent with repositories you trust."

CLI cloud sessions run in a managed sandbox, continue after your local terminal disconnects, and can be resumed from another machine. That is continuity, not local feature parity: review the remote environment, credentials, network, and resulting branch before treating it like a local continuation.

Mobile is a preview surface for starting, monitoring, and steering work away from the desk. Crew is the persistent automation surface: unattended agents can stay running, accept schedules, and respond to webhooks. Crew therefore needs service-style ownership, scoped credentials, observability, and a disable path; it is not merely a longer chat session.

Subagents give context isolation: each runs with its own conversation context, tools, and permissions, then returns findings to the main agent. IDE and CLI can invoke custom agents from .kiro/agents/; Web and Mobile delegate only to Kiro's built-in subagents. Independent stages can run in parallel, dependent stages form a DAG, and a reviewer can send work back through a bounded review loop with max_iterations from 1 to 10. Do not rely on the old fixed four-subagent claim. Spec state and hook triggers are isolated per subagent, so pass an explicit brief and acceptance criteria instead of assuming the parent session's orchestration state transfers. Prefer one writer unless file ownership is explicit; use parallel agents for independent work and reviewers.

SurfaceUse whenVerify
IDEYou want visible specs, local edits, hooks, MCP, and hunk-level review.Inspect artifacts, the diff, tests, permissions, and generated guidance.
CLIYou need terminal work, custom agents, or headless checks.Version-gate CLI 2.x vs 3.0 EA syntax; keep permissions narrow.
CLI cloud sessionTerminal work should continue after disconnect and resume elsewhere.Review the managed sandbox, remote credentials, network policy, branch, and CI.
Web (preview)You want issue → sandbox → PR/MR delegation.Review sandbox + internet-access policy, secrets scope, the diff, and CI.
Mobile (preview)You need to start, monitor, or steer built-in agents away from a workstation.Do not assume IDE/CLI custom agents or local hooks are available.
CrewPersistent agents must run unattended on schedules or webhooks.Define ownership, least-privilege credentials, logs, review gates, and a kill switch.
SubagentsParallel or dependent work benefits from isolated contexts and aggregation.Declare DAG dependencies and bound review loops to 1–10 iterations.
The surfaces share an agent foundation but differ in execution, continuity, and available controls.

Workspace explorer

Workspace explorer

What a real .kiro/ project actually looks like

Specs, steering, v1 hooks, MCP and skills all live under one committed .kiro/ directory. Click any file to read the current, paste-ready contents — front-matter, versioned JSON shapes and requirement back-references included.

.kiro workspace
  • .kiro/
  • specs/
  • password-reset/
  • steering/
  • hooks/
  • settings/
  • skills/

.kiro/specs/password-reset/requirements.md

# Requirements Document ## IntroductionPassword reset for returning users, scoped to the auth service. ## Requirements ### Requirement 1: Password reset**User Story:** As a returning user, I want to reset my password by email,so that I can recover a locked account. #### Acceptance Criteria1. WHEN a user requests a reset THE SYSTEM SHALL email a single-use token   that expires after 30 minutes.2. IF a token is reused THEN THE SYSTEM SHALL reject it and show "link expired".
Click through a realistic, committed .kiro/ project — specs, steering with front-matter, a v1 hook JSON file, mcp.json, and a SKILL.md — and read the real, paste-ready contents of each.

Kiro prompt generator

Kiro prompt generator

Turn a goal into a Kiro-ready request

A good first message tells Kiro which surface to use, what artifacts to produce, the trust boundary, and how to prove the result. This composes one — including the Web sandbox policy, internet-access stance, and secret handling when you pick Web.

Surface

Risk

kiro-ready-prompt.md

Task: Add password reset to the auth service Context: Next.js app, existing AuthService + mail queue, strict TypeScriptFiles / areas: lib/auth/**, app/(auth)/**, tests/auth/**Risk: high Workflow: Create a feature spec (requirements-first). Run requirements analysis before design; do not start tasks until I approve the design. Required controls:- Produce/update `.kiro/specs/<feature>/{requirements,design,tasks}.md`; every task ends with `_Requirements: N.M_`.- Check whether `.kiro/steering/` should change; use fileMatch for domain-only rules. Definition of done:- Requirements analyzed; design matches existing architecture; tasks small and traceable.- Real test/lint/build commands run, with failures shown — not just claimed.- A reviewer can trace every diff line back to approved intent. If the output is weak, reply: "Rewrite acceptance criteria as observable EARS, split broad tasks, add a verification step per task, and list anything you could not verify."
Compose a first message that tells Kiro which surface to use, what artifacts to produce, and the trust boundary — including the Web sandbox policy, internet-access stance, and secret handling.

Knowledge check

A Kiro Web task needs a repo secret and internet access to build a PR. What is the safe posture?

How Kiro compares

There's no universal winner — pick by planning model, context model, automation, repo workflow, and how much review evidence you need. Kiro's one real differentiator is the committed three-file spec (requirements/design/tasks with EARS criteria and dependency-wave execution). Most rivals center a single rules file — CLAUDE.md, AGENTS.md, .cursor/rules, GEMINI.md — plus mode toggles, without Kiro's on-disk spec triad. Claude Code is the flexible terminal/IDE harness; Codex is strong for local/cloud continuity and PR review; Cursor is the fast editor loop; Gemini CLI is scriptable terminal work; Cline and Roo Code are approval-first BYO-model editing; GitHub Copilot's agent is GitHub-native issue→PR.

Comparison matrix

Comparison matrix

Compare by workflow, not by brand

Every agent here is good at something. The honest split is the planning model and the context file: Kiro is the one that commits a three-file spec (requirements/design/tasks) to the repo; the others center a single rules file plus mode toggles.

ToolBest usePlanning modelContext / rules fileAutomationRepo workflowCaution
KiroSpec-driven work across IDE, CLI, cloud sessions, Web, Mobile and CrewSpec sessions: requirements (EARS) → design → tasks, committed.kiro/steering/*.md + root/nested AGENTS.md + custom agent resources.kiro/hooks/*.json v1, Agent Plugin Powers, subagent DAGs, Web/CrewLocal IDE/CLI; resumable CLI cloud sessions; Web sandbox PR/MRCLI 3.0 is EA in 2.19; Web/Mobile are previews; surface features differ
Claude CodeTerminal/IDE/desktop agent, same engine everywherePlan mode, /loop, subagentsCLAUDE.md (managed→user→project→local) + .claude/rulesHooks in settings.json, GH Actions/GitLab CI, Agent SDKCI PR review & issue triage; background agentsReads CLAUDE.md not AGENTS.md unless you @-import it
CodexApp/IDE/CLI/Cloud agent with PR reviewAGENTS.md-driven; cloud delegationAGENTS.md + ~/.codex/config.tomlcodex exec (headless), Cloud tasksCloud opens PRsCloud env setup matters; approval/sandbox modes need care
CursorIDE-native daily coding with rule typesPlan mode; Always/Auto-Attached/Manual rules.cursor/rules/*.mdc + AGENTS.mdBackground AgentsIn-IDE; background agentsNot a committed spec-first system by default
Gemini CLIOpen-source scriptable terminal agentInteractive; checkpointingGEMINI.md + ~/.gemini/settings.jsonHeadless JSON output; Gemini CLI GitHub ActionGitHub Action: PR review, issue triageNative PR-lifecycle evidence is thinner
Cline / Roo CodeIn-editor, approval-first, bring-your-own-modelPlan/Act (Cline); modes (Roo).clinerules / .roo/rules + AGENTS.mdMCP + auto-approve controlsIn-editorManaged repo/PR delegation is weaker
GitHub Copilot agentGitHub-native issue → draft PRAssign issue → autonomous runRepo custom instructionsEphemeral env powered by GitHub ActionsOpens a draft PR on a branchHard ~59-min session cap; poor fit outside GitHub
Compare by workflow, not brand: planning model, context/rules file, automation, repo workflow, and the honest caution for each tool.

Coding-agent decision tree

Coding-agent decision tree

Route the task before you open a tool

Kiro is the answer when a committed spec is the point. This routes that need against editor speed, terminal harnesses, GitHub-native PR work, and local BYO-model setups — with why-not-the-others.

Recommended

Kiro specs

The task has multiple requirements and needs a reviewable, committed audit trail.

Why not the others
  • Vibe chat or an editor agent moves faster but leaves no traceable spec.
Start & verify
  • Create a feature spec (requirements-first), run requirements analysis, then design.
  • Check requirements → design → tasks → diff alignment and run the real test suite.
Route a task to a Kiro surface or another agent, with why-not-the-others, how to start, and what to verify.

Troubleshooting

Weak requirements — tasks look polished but miss intent. Fix: rewrite acceptance criteria as observable EARS; run requirements analysis. Verify: every task maps back to a requirement.

Broad spec — it tries to redesign the repo. Fix: name non-goals and unchanged behavior. Verify: unrelated files stay untouched.

Over-generated tasks — a long list with no dependency order. Fix: ask for fewer, smaller tasks, each with one verification line and a requirement reference.

Design ignores the codebase — Fix: point Kiro at steering and existing modules; call out any deliberate deviation. Verify with a code-owner review.

Steering conflicts — Kiro follows an old rule. Fix: narrow global steering, update workspace steering, delete stale files. Verify with a "summarize this repo's conventions" prompt.

Noisy hooks — repeated generic advice. Fix: narrow the matcher and severity; if it still fires too often, disable it and move that workflow to a manually invoked steering slash command. Verify with matching and non-matching sample files.

MCP overload — Kiro considers irrelevant tools, or context fills before the first prompt. Fix: disable unused servers/tools, prefer Powers for on-demand loading. Verify the allowed-tool list.

Hook never fires — for IDE 1.0 / CLI 3.0, check that the file ends in .json, the top level is version: "v1" plus a hooks array, the trigger is PascalCase, the matcher is a regex, and the session started after the file was created. Embedded camelCase hooks belong to legacy CLI 2.x only.

Spec rot — the diff diverged and nobody updated the spec. Fix: run a drift detector and sync requirements/design/tasks to the accepted diff. Verify the spec matches shipped behavior.

Security and governance

Treat Kiro as a powerful actor with real reach. The minimum threat model for a serious workflow names: trusted vs untrusted inputs, writable paths, network egress, secrets, MCP servers, generated code, generated tests, CI, reviewers, and the rollback path. If you can't name the blast radius, don't run autonomous mode with broad repo or network access.

The concrete rules: never put secrets in steering, skills, powers, prompts, hooks, or example configs. Don't connect an MCP server just because it exists — apply least privilege and review provenance. Remember that supervised mode is a review convenience, not an isolation boundary. In IDE 1.0 / CLI 3.0, capability-based permissions parse compound shell commands and evaluate every segment separated by ;, &&, ||, or | independently; a rule that allows npm test * therefore does not silently approve npm test ; curl attacker.example. Keep match globs narrow and remember that deny overrides ask, which overrides allow across scopes. Use blocking PreToolUse hooks only for genuinely dangerous actions; exit code 2 is the legacy CLI 2.x special case, while the v1 command action blocks on any non-zero exit for PreToolUse and UserPromptSubmit. For Web and CLI cloud sessions, scope repo permissions, the sandbox, internet access, and secrets to the task, and keep a human in the loop on every PR/MR. Enterprise MCP governance exists (an org allowlist via an MCP registry) but the docs are explicit that it's client-side enforced and can be circumvented by a user with local admin — so it's a guardrail, not a wall.

Reach the end and this star joins your charted sky.