feat(init): add Kiro agent support#2692
Open
chenhaitao888 wants to merge 1 commit into
Open
Conversation
Add `rtk init --agent kiro`, installing token-savings guidance to `.kiro/steering/rtk-rules.md` (project-scoped). Kiro (AWS AI IDE) reads `.kiro/steering/` as steering files. Mirrors the existing rules-file integrations (Antigravity, Kilo Code): idempotent install, dry-run support, and a project-scoped guard that rejects `-g`. Includes unit tests and docs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
rtk init --agent kiro, a new rules-file integration for Kiro (AWS's agentic AI IDE).Kiro reads
.kiro/steering/*.mdas steering files (project context). This installs token-savings guidance to.kiro/steering/rtk-rules.md, telling Kiro to preferrtk <cmd>over raw commands — the same prompt-level approach already used for Antigravity and Kilo Code.Changes
src/main.rs— addAgentTarget::Kiroand route--agent kiro(project-scoped, rejects-g)src/hooks/init.rs—run_kiro_modewrites/updates.kiro/steering/rtk-rules.md; idempotent and dry-run aware; 2 unit testshooks/kiro/rules.md— the embedded steering file (mirrorshooks/antigravity/rules.md)hooks/kiro/README.md— per-agent hook READMEREADME.md— Kiro added to the supported-agents table, install section, and quick-startIntegration tier
Rules file (prompt-level) — identical mechanism to Antigravity / Kilo Code / Cline / Windsurf. No programmatic hook, since Kiro does not yet expose a tool-interception API.
Test plan
cargo fmt --all— cleancargo clippy --all-targets— 0 warningscargo test --all— all pass, includingtest_kiro_mode_creates_rules_fileandtest_kiro_mode_is_idempotentcargo install --path ., then verified end-to-end:rtk init --agent kirocreates.kiro/steering/rtk-rules.md--dry-runwrites nothingrtk init -g --agent kiroerrors (project-scoped), exit 1kirolisted inrtk init --help