Skip to content

Conversation

@wenxiaoyu
Copy link
Contributor

@wenxiaoyu wenxiaoyu commented Feb 2, 2026

  • Add Kiro IDE to AI_TOOLS registry with skillsDir '.kiro'
  • Create kiro adapter generating .kiro/steering/opsx-*.md files
  • Use 'inclusion: always' frontmatter for Kiro steering files
  • Register kiro in CommandAdapterRegistry
  • Add legacy cleanup path pattern for Kiro
  • Add unit tests for kiro adapter
  • Update docs/supported-tools.md with Kiro configuration

Generated with Kiro IDE using Claude Opus 4.5

Summary by CodeRabbit

  • New Features

    • Kiro IDE added as a selectable tool in the platform.
  • Documentation

    • Tool directory and tooling docs updated to list Kiro IDE and usage notes.
  • Behavior

    • Platform recognizes and manages Kiro steering/command files and includes Kiro in adapter registry.
  • Tests

    • New tests added to cover Kiro IDE adapter and related workflows.

- Add Kiro IDE to AI_TOOLS registry with skillsDir '.kiro'
- Create kiro adapter generating .kiro/steering/opsx-*.md files
- Use 'inclusion: always' frontmatter for Kiro steering files
- Register kiro in CommandAdapterRegistry
- Add legacy cleanup path pattern for Kiro
- Add unit tests for kiro adapter
- Update docs/supported-tools.md with Kiro configuration

Generated with Kiro IDE using Claude Opus 4.5
@wenxiaoyu wenxiaoyu requested a review from TabishB as a code owner February 2, 2026 07:04
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

Adds Kiro IDE support: new kiroAdapter for command-generation producing .kiro/steering/opsx-<id>.md files, registers the adapter in the registry, adds Kiro to AI_TOOLS and legacy cleanup patterns, updates docs, and adds unit tests for the adapter.

Changes

Cohort / File(s) Summary
Adapter implementation
src/core/command-generation/adapters/kiro.ts, src/core/command-generation/adapters/index.ts
New kiroAdapter export implementing ToolCommandAdapter; produces file paths under .kiro/steering/ and formats command files with YAML frontmatter and body.
Registry & config
src/core/command-generation/registry.ts, src/core/config.ts, src/core/legacy-cleanup.ts
Registers kiroAdapter in the CommandAdapterRegistry, adds Kiro to AI_TOOLS (value: 'kiro', skillsDir: '.kiro'), and adds legacy pattern for .kiro/steering/openspec-*.md.
Docs & specs
docs/supported-tools.md, openspec/changes/add-kiro-support/...
Documents Kiro IDE in supported tools and adds OpenSpec proposal/spec files describing Kiro integration, templates, and steering file expectations.
Tests
test/core/command-generation/adapters.test.ts
Adds tests for kiroAdapter (toolId, file path generation, frontmatter formatting) and includes it in adapter aggregation tests.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI
  participant Registry as CommandAdapterRegistry
  participant Adapter as kiroAdapter
  participant FS as Filesystem

  CLI->>Registry: request adapter for tool "kiro"
  Registry->>Adapter: select kiroAdapter
  CLI->>Adapter: provide CommandContent (id, name, body, description)
  Adapter->>Adapter: formatFile() -> markdown with YAML frontmatter
  Adapter->>FS: write `.kiro/steering/opsx-<id>.md`
  FS-->>CLI: file created
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • TabishB
  • Israel-Laguan

Poem

🐰 I hopped into .kiro's glade,
opsx files in neat parade,
frontmatter bright, markers in sight,
adapters whisper through the night,
a little hop — new tooling takes flight ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(init): add Kiro IDE support' directly and clearly describes the main change—adding Kiro IDE as a supported tool to the initialization workflow.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

@greptile-apps
Copy link

greptile-apps bot commented Feb 2, 2026

Greptile Overview

Greptile Summary

Added Kiro IDE support to OpenSpec following the established adapter pattern.

Key Changes:

  • Created kiro adapter with .kiro/steering/opsx-*.md file structure and inclusion: always frontmatter
  • Registered Kiro in AI_TOOLS config and CommandAdapterRegistry
  • Added legacy cleanup pattern for migration support
  • Comprehensive test coverage added
  • Documentation updated with Kiro configuration

Notes:

  • The implementation follows the same pattern as other adapters (iflow, kilocode)
  • File structure uses .kiro/steering/ for command files (per Kiro spec)
  • Uses minimal frontmatter with only inclusion: always field
  • The escapeYamlValue function is defined but not used - consider removing it

Confidence Score: 4/5

  • Safe to merge with one minor cleanup suggestion
  • Clean implementation following established patterns with comprehensive tests. Only issue is unused escapeYamlValue function which is a style concern, not a functional problem
  • src/core/command-generation/adapters/kiro.ts (minor cleanup of unused function)

Important Files Changed

Filename Overview
src/core/command-generation/adapters/kiro.ts New Kiro adapter with minimal frontmatter (inclusion: always), unused escapeYamlValue function
src/core/config.ts Added Kiro IDE to AI_TOOLS array with skillsDir .kiro
src/core/legacy-cleanup.ts Added legacy cleanup pattern for .kiro/steering/openspec-*.md files

Sequence Diagram

sequenceDiagram
    participant User
    participant CLI as OpenSpec CLI
    participant Registry as CommandAdapterRegistry
    participant KiroAdapter as kiroAdapter
    participant FS as File System

    User->>CLI: openspec init --tools kiro
    CLI->>Registry: Load adapters
    Registry->>KiroAdapter: register(kiroAdapter)
    Note over KiroAdapter: toolId: 'kiro'<br/>skillsDir: '.kiro'
    
    loop For each command (explore, new, apply, etc.)
        CLI->>KiroAdapter: getFilePath(commandId)
        KiroAdapter-->>CLI: .kiro/steering/opsx-{commandId}.md
        
        CLI->>KiroAdapter: formatFile(content)
        Note over KiroAdapter: Format with frontmatter:<br/>inclusion: always
        KiroAdapter-->>CLI: Formatted markdown with YAML
        
        CLI->>FS: Write file to .kiro/steering/
        FS-->>CLI: Success
    end
    
    CLI->>FS: Write skills to .kiro/skills/
    FS-->>CLI: Complete
    
    CLI-->>User: Kiro IDE configured
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/core/command-generation/adapters/kiro.ts`:
- Around line 13-15: The file-level comment that describes the Kiro steering
file frontmatter incorrectly lists name and description as YAML frontmatter
fields; update that comment so it only documents the supported frontmatter keys
(inclusion and fileMatchPattern) and note that name and description are emitted
into the markdown body (not the YAML frontmatter) — edit the top comment block
in src/core/command-generation/adapters/kiro.ts to remove references to
name/description from the frontmatter section and clarify that only inclusion
and fileMatchPattern belong in YAML while name/description are body content
(referencing the existing emitted keys "inclusion" and "fileMatchPattern" in the
code).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@openspec/changes/add-kiro-support/tasks.md`:
- Around line 8-9: The spec files incorrectly document a single fixed steering
file name; update cli-init/spec.md and kiro-integration/spec.md to state that
Kiro produces per-command steering files using the pattern
`.kiro/steering/opsx-<commandId>.md` to match the adapter implementation; mirror
the logic in src/core/command-generation/adapters/kiro.ts by referencing its
getFilePath() behavior and replace any occurrences of
`.kiro/steering/openspec.md` with the per-command pattern and an explanatory
note that `<commandId>` corresponds to the command's id.
🧹 Nitpick comments (2)
openspec/changes/add-kiro-support/specs/cli-init/spec.md (1)

31-49: Clarify where users can add custom content.

The file structure examples show all content wrapped within the OpenSpec managed markers (<!-- OPENSPEC:START --> / <!-- OPENSPEC:END -->). However, the update requirements in kiro-integration/spec.md (line 103) specify preserving "user content outside the markers."

Consider adding an example or note showing where users can safely add custom content that won't be overwritten during openspec update.

Also applies to: 55-73

openspec/changes/add-kiro-support/specs/kiro-integration/spec.md (1)

54-55: Consider explaining Kiro's file reference syntax.

The spec mentions using Kiro's #[[file:]] syntax but doesn't explain its purpose or behavior. For readers unfamiliar with Kiro IDE, a brief note explaining that this syntax allows Kiro to include the referenced file's content in the AI context would improve clarity.

Also applies to: 60-61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant