Skip to content

Add Kiro CLI render adapter for steering, skills, MCP, and custom agents #91

Description

@kelos-bot

🤖 Kelos Strategist Agent @gjkim42

Area: Integration Opportunities

Summary

Add an opt-in kiro render adapter for Kiro CLI, the successor/update path for Amazon Q Developer CLI. Kiro is a strong Kanon target because its configuration is file-backed, has both global and project scopes, and maps directly to settings Kanon already models:

  • instructions.files -> Kiro steering / AGENTS.md-compatible context
  • skills -> Kiro Agent Skills folders
  • mcp.servers -> Kiro settings/mcp.json
  • compatible hooks -> Kiro custom-agent hooks
  • future permission/model/resource settings -> Kiro custom-agent fields once the shared Kanon schema exists

This should be a render-first adapter named kiro. Keep it opt-in so existing kanon.yaml files do not suddenly start writing a third agent's files.

Why this is strategically valuable

Kiro is not just another editor adapter. It covers a terminal agent with project and user scopes, custom agents, MCP, skills, steering, hooks, and headless automation. It also matters for the Amazon Q installed base: AWS docs now say the Q CLI has become the Kiro CLI, and Kiro docs describe it as the next update of Q CLI while preserving Q workflows and configuration.

That gives Kanon a migration and growth story:

  1. Teams already using Amazon Q/Q CLI can centralize the settings they are moving into Kiro.
  2. Teams standardizing on Kiro CLI get the same shared Kanon repo that already feeds Codex and Claude.
  3. Kiro's global/project split matches Kanon's existing user vs --project rendering model.
  4. Kiro's file-backed MCP and skills surfaces mean Kanon can add value without automating a UI or depending on extension storage paths.

Evidence from the current codebase

Kanon has the adapter shape but no Kiro target today:

  • Config currently contains instructions, skills, mcp, hooks, and metadata; there is no Kiro-specific config or agent list (internal/core/types.go).
  • The only agent constants are codex, claude, and all (internal/core/types.go).
  • adaptersFor dispatches only Codex and Claude (internal/core/render.go).
  • validateTargets and the CLI --agent guard only accept Codex/Claude/all (internal/core/config.go, internal/cli/root.go).
  • renderSkills already copies complete SKILL.md directories into an adapter-provided target root, which is exactly what a Kiro skill renderer needs (internal/core/render.go).
  • Co-owned merge strategies exist for Codex TOML and Claude JSON only; Kiro mcp.json will need a JSON map merge that updates Kanon-owned mcpServers while preserving manually configured servers (internal/core/merge.go).
  • Current import supports Codex and Claude destinations only (internal/core/codex.go, internal/core/claude.go). Kiro import can wait until render behavior settles.

External signal

Official docs make the Kiro target concrete:

Existing issue overlap check

I reviewed open generated-by-kelos issues and searched all issues for Kiro, Amazon Q, q developer, q cli, .amazonq, .kiro, project rules, custom agents, and mcp.json. I did not find an existing Kiro/Amazon Q render-target issue.

This is distinct from:

Proposed target and mapping

Use kiro as the canonical target:

targets: [kiro]

Recommended MVP mapping:

Kanon source Kiro user destination Kiro project destination Notes
instructions.files ~/.kiro/steering/kanon.md .kiro/steering/kanon.md or root AGENTS.md Prefer .kiro/steering/kanon.md initially to avoid duplicate-path collisions with Codex AGENTS.md.
skills[] ~/.kiro/skills/<name>/... .kiro/skills/<name>/... Reuse renderSkills, but add Kiro-specific frontmatter validation for description and name format.
mcp.servers ~/.kiro/settings/mcp.json .kiro/settings/mcp.json Merge only Kanon-owned mcpServers entries and preserve unmanaged Kiro settings/servers.
compatible hooks[] ~/.kiro/agents/kanon.json .kiro/agents/kanon.json Render only when hooks are configured for kiro; users select the kanon custom agent.

Example source:

version: 1

instructions:
  files:
    - instructions/shared.md
    - instructions/aws-platform.md

skills:
  - name: pr-review
    targets: [kiro, claude, codex]
  - name: cdk-deploy
    targets: [kiro]

mcp:
  servers:
    aws-docs:
      command: uvx
      args: [awslabs.aws-documentation-mcp-server@latest]
      env:
        FASTMCP_LOG_LEVEL: ERROR
      targets: [kiro]

    github:
      type: http
      url: https://api.githubcopilot.com/mcp/
      targets: [kiro, claude]

hooks:
  - name: audit-bash
    targets: [kiro]
    event: preToolUse
    matcher: execute_bash
    type: command
    command: hooks/audit-bash.sh

Expected project render tree:

.kiro/steering/kanon.md
.kiro/settings/mcp.json
.kiro/skills/pr-review/SKILL.md
.kiro/skills/cdk-deploy/SKILL.md
.kiro/agents/kanon.json        # only if hooks/custom-agent resources are needed

Rendered Kiro MCP shape:

{
  "mcpServers": {
    "aws-docs": {
      "command": "uvx",
      "args": ["awslabs.aws-documentation-mcp-server@latest"],
      "env": {
        "FASTMCP_LOG_LEVEL": "ERROR"
      },
      "disabled": false
    },
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp"
    }
  }
}

Rendered kanon custom agent shape when hooks are present:

{
  "name": "kanon",
  "description": "Kanon-managed agent context and hooks",
  "prompt": "file://../steering/kanon.md",
  "includeMcpJson": true,
  "resources": [
    "file://../steering/**/*.md",
    "skill://../skills/*/SKILL.md"
  ],
  "hooks": {
    "preToolUse": [
      {
        "matcher": "execute_bash",
        "command": "hooks/audit-bash.sh"
      }
    ]
  }
}

Guardrails

Suggested MVP scope

  1. Add AgentKiro and target validation for kiro, gated by adapter opt-in/default behavior.
  2. Implement kiroAdapter.Render for steering, skills, and settings/mcp.json.
  3. Add FileMergeKiroMCP for co-owned JSON mcpServers preservation.
  4. Add Kiro-specific skill frontmatter validation for Kiro-targeted skills.
  5. Add custom-agent kanon.json rendering only for supported Kiro hooks, or defer hooks to a second PR if the custom-agent surface needs more design.
  6. Add tests for user/project paths, MCP merge preservation, unsupported MCP fields, skill validation, hook event mapping, target filtering, and explicit --agent kiro behavior.
  7. Run make verify.

Use cases unlocked

  • Amazon Q to Kiro migration: teams can keep one Kanon source while developers transition from Q CLI to Kiro CLI.
  • AWS-heavy platform teams: shared steering, AWS documentation MCP, CDK deployment skills, and safe Kiro hooks can be rolled out across laptops and project repos.
  • Terminal-agent standardization: Kiro CLI users get the same managed instructions, skills, MCP servers, and hooks as Codex/Claude users.
  • Project-scoped team context: repositories can carry .kiro/ steering, skills, and MCP config generated from the same Kanon source used for AGENTS.md and CLAUDE.md.
  • Headless automation: Kiro CLI's automation story can consume a deterministic Kanon-rendered project/user config before non-interactive agent runs.

Backward compatibility

  • Existing kanon.yaml files are unchanged.
  • Kiro is opt-in and should not affect current Codex/Claude output.
  • Existing Codex/Claude render and import behavior remains unchanged.
  • Existing Kiro settings/mcp.json files keep unmanaged server entries.
  • Import support is deferred, so existing Kiro files are not normalized in the first increment.

Non-goals

  • Do not implement Amazon Q legacy .amazonq rendering in this issue unless Kiro compatibility testing proves it is still necessary.
  • Do not manage Kiro model/provider defaults in v1; keep that with the shared model-defaults work.
  • Do not manage Kiro knowledge bases, prompts, code-intelligence settings, or session settings in v1.
  • Do not build a full neutral custom-agent schema here; render only the parts needed by current Kanon primitives.
  • Do not add import parity in the first pass.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions