Skip to content

Commit f68182d

Browse files
committed
feat: add Kiro CLI support
Add Kiro (AWS AI IDE) as a supported tool with command adapter that writes to .kiro/prompts/ with YAML frontmatter. - Add Kiro to AI_TOOLS registry in config.ts - Create kiro.ts adapter (GitHub Copilot pattern) - Register adapter in index.ts and registry.ts - Add legacy cleanup path for migration - Update supported-tools.md documentation
1 parent c574e79 commit f68182d

6 files changed

Lines changed: 37 additions & 1 deletion

File tree

docs/supported-tools.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For each tool you select, OpenSpec installs:
2929
| GitHub Copilot | `.github/skills/` | `.github/prompts/`\*\* |
3030
| iFlow | `.iflow/skills/` | `.iflow/commands/` |
3131
| Kilo Code | `.kilocode/skills/` | `.kilocode/workflows/` |
32+
| Kiro | `.kiro/skills/` | `.kiro/prompts/` |
3233
| OpenCode | `.opencode/skills/` | `.opencode/command/` |
3334
| Qoder | `.qoder/skills/` | `.qoder/commands/opsx/` |
3435
| Qwen Code | `.qwen/skills/` | `.qwen/commands/` |
@@ -55,7 +56,7 @@ openspec init --tools all
5556
openspec init --tools none
5657
```
5758

58-
**Available tool IDs:** `amazon-q`, `antigravity`, `auggie`, `claude`, `cline`, `codebuddy`, `codex`, `continue`, `costrict`, `crush`, `cursor`, `factory`, `gemini`, `github-copilot`, `iflow`, `kilocode`, `opencode`, `qoder`, `qwen`, `roocode`, `trae`, `windsurf`
59+
**Available tool IDs:** `amazon-q`, `antigravity`, `auggie`, `claude`, `cline`, `codebuddy`, `codex`, `continue`, `costrict`, `crush`, `cursor`, `factory`, `gemini`, `github-copilot`, `iflow`, `kiro`, `kilocode`, `opencode`, `qoder`, `qwen`, `roocode`, `trae`, `windsurf`
5960

6061
## What Gets Installed
6162

src/core/command-generation/adapters/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export { geminiAdapter } from './gemini.js';
2020
export { githubCopilotAdapter } from './github-copilot.js';
2121
export { iflowAdapter } from './iflow.js';
2222
export { kilocodeAdapter } from './kilocode.js';
23+
export { kiroAdapter } from './kiro.js';
2324
export { opencodeAdapter } from './opencode.js';
2425
export { qoderAdapter } from './qoder.js';
2526
export { qwenAdapter } from './qwen.js';
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Kiro Command Adapter
3+
*
4+
* Formats commands for Kiro following its .prompt.md specification.
5+
*/
6+
7+
import path from 'path';
8+
import type { CommandContent, ToolCommandAdapter } from '../types.js';
9+
10+
/**
11+
* Kiro adapter for command generation.
12+
* File path: .kiro/prompts/opsx-<id>.prompt.md
13+
* Frontmatter: description
14+
*/
15+
export const kiroAdapter: ToolCommandAdapter = {
16+
toolId: 'kiro',
17+
18+
getFilePath(commandId: string): string {
19+
return path.join('.kiro', 'prompts', `opsx-${commandId}.prompt.md`);
20+
},
21+
22+
formatFile(content: CommandContent): string {
23+
return `---
24+
description: ${content.description}
25+
---
26+
27+
${content.body}
28+
`;
29+
},
30+
};

src/core/command-generation/registry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { geminiAdapter } from './adapters/gemini.js';
2222
import { githubCopilotAdapter } from './adapters/github-copilot.js';
2323
import { iflowAdapter } from './adapters/iflow.js';
2424
import { kilocodeAdapter } from './adapters/kilocode.js';
25+
import { kiroAdapter } from './adapters/kiro.js';
2526
import { opencodeAdapter } from './adapters/opencode.js';
2627
import { qoderAdapter } from './adapters/qoder.js';
2728
import { qwenAdapter } from './adapters/qwen.js';
@@ -52,6 +53,7 @@ export class CommandAdapterRegistry {
5253
CommandAdapterRegistry.register(githubCopilotAdapter);
5354
CommandAdapterRegistry.register(iflowAdapter);
5455
CommandAdapterRegistry.register(kilocodeAdapter);
56+
CommandAdapterRegistry.register(kiroAdapter);
5557
CommandAdapterRegistry.register(opencodeAdapter);
5658
CommandAdapterRegistry.register(qoderAdapter);
5759
CommandAdapterRegistry.register(qwenAdapter);

src/core/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const AI_TOOLS: AIToolOption[] = [
3434
{ name: 'GitHub Copilot', value: 'github-copilot', available: true, successLabel: 'GitHub Copilot', skillsDir: '.github' },
3535
{ name: 'iFlow', value: 'iflow', available: true, successLabel: 'iFlow', skillsDir: '.iflow' },
3636
{ name: 'Kilo Code', value: 'kilocode', available: true, successLabel: 'Kilo Code', skillsDir: '.kilocode' },
37+
{ name: 'Kiro', value: 'kiro', available: true, successLabel: 'Kiro', skillsDir: '.kiro' },
3738
{ name: 'OpenCode', value: 'opencode', available: true, successLabel: 'OpenCode', skillsDir: '.opencode' },
3839
{ name: 'Qoder', value: 'qoder', available: true, successLabel: 'Qoder', skillsDir: '.qoder' },
3940
{ name: 'Qwen Code', value: 'qwen', available: true, successLabel: 'Qwen Code', skillsDir: '.qwen' },

src/core/legacy-cleanup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const LEGACY_SLASH_COMMAND_PATHS: Record<string, LegacySlashCommandPatter
4242
'cursor': { type: 'files', pattern: '.cursor/commands/openspec-*.md' },
4343
'windsurf': { type: 'files', pattern: '.windsurf/workflows/openspec-*.md' },
4444
'kilocode': { type: 'files', pattern: '.kilocode/workflows/openspec-*.md' },
45+
'kiro': { type: 'files', pattern: '.kiro/prompts/openspec-*.prompt.md' },
4546
'github-copilot': { type: 'files', pattern: '.github/prompts/openspec-*.prompt.md' },
4647
'amazon-q': { type: 'files', pattern: '.amazonq/prompts/openspec-*.md' },
4748
'cline': { type: 'files', pattern: '.clinerules/workflows/openspec-*.md' },

0 commit comments

Comments
 (0)