Skip to content

feat(tool-profile): add Kiro as a supported tool profile - #51

Open
BartoszPawlowicz01 wants to merge 1 commit into
przeprogramowani:masterfrom
BartoszPawlowicz01:feat/kiro-tool-support
Open

BartoszPawlowicz01 wants to merge 1 commit into
przeprogramowani:masterfrom
BartoszPawlowicz01:feat/kiro-tool-support

Conversation

@BartoszPawlowicz01

Copy link
Copy Markdown

Summary

Adds kiro as the eighth supported tool profile.

  • Profile registration. PROFILES.kiro writes artifacts under .kiro/ (skills/, prompts/, config-templates/) and uses the root AGENTS.md for course rules, which Kiro loads as steering context. Content is requested in the generic variant via the existing contentToolId escape hatch, because the delivery API exposes no kiro transform yet — the same pattern devin-desktop → windsurf already uses.
  • Auto-detection. Kiro is reported from .kiro/.10x-cli-manifest.json, .kiro/steering/, .kiro/specs/, .kiro/hooks/, .kiro/settings/ or a bare .kiro/ directory. Every branch is strong: the directory name is Kiro-specific with no plausible false positive, so a Kiro workspace never loses the AGENTS.md confidence tie to codex and PROFILE_ORDER needs no reshuffle. The sub-marker branches exist only to keep the hint line precise.
  • Surface and docs. --tool help text for get and sync, the README tool lists and directory table, and the platform-support reference.

The profile enters purely as configuration data. No changes to writer.ts, managed-rules.ts, tool-prompt.ts, doctor.ts, helpers.ts or bench-kit.ts — everything that iterates PROFILES picks Kiro up without an edit.

Notable design points

AGENTS.md co-ownership is documented precisely, not optimistically. planManagedRules() admits a second owner of a shared sentinel block only when its upstreamHash matches. Since each co-owner requests a different content transform (codex → codex, devin-desktop → windsurf, kiro/generic → generic), kiro shares the file conflict-free with generic only. Installing it next to Codex CLI or Devin Desktop leaves the first owner's block untouched and reports conflict_skipped / incompatible_shared_owner for rules while every other artifact installs normally. This is pre-existing fail-closed behaviour that the codex + generic pair already had; this PR states the limit in the reference doc instead of implying the combination is seamless.

.kiro/prompts/ and .kiro/config-templates/ are inert on delivery. The CLI manages them for path uniformity across writer, manifest, removal and tool-switch, but Kiro does not read them automatically. Called out in the reference doc. A follow-up could remap configPath to a location Kiro consumes, which carries its own migration question for already-written files.

skills/10x-cli-guide/SKILL.md is deliberately unchanged. helpers install is create-only and exits 1 on a byte difference, so editing the bundled guide's Profiles table would force a helper_conflict on every existing install for a documentation-only gain. --tool kiro stays discoverable through --help, the README and the reference doc.

Testing

  • tests/tool-profile.test.ts — path generation plus the first contentToolId assertion in the suite (previously uncovered).
  • tests/tool-detect.test.ts — the full marker cascade, confidence for each branch, and both ranking outcomes including the AGENTS.md tie.
  • tests/writer-profiles.test.ts — real applyBundle against a tmpdir: on-disk layout, sentinel injection into AGENTS.md, and manifest.tool === "kiro" (freshness keys on toolId, not contentToolId).
  • tests/tool-switch.test.ts — shared-AGENTS.md migration and cleanup, plus a divergent-content case asserting that kiro fails closed with incompatible_shared_owner rather than clobbering a codex-owned block.
  • tests/helpers/helper-install-contract.ts — parameterised over claude-code and kiro; the added files.length > 0 assertion closes a vacuous files.every(...) that passed on an empty set.

Local run on this branch: tsc --noEmit clean, lint 0 errors (5 pre-existing warnings in untouched code), validate:cli-skills OK, bun test 863 pass / 4 fail. All four failures reproduce on unmodified origin/master in an equivalent environment (bun writes cache into the substituted HOME; the publication-identity test depends on npm/git), so they are environmental rather than regressions.

Migration

None. No alias, no legacy layout, no manifest version bump; kiro is purely additive and existing projects are untouched.

One deferred consequence worth a note in a future changelog: if the delivery API later ships a kiro transform, deleting the contentToolId line is the whole change, but existing installs will then see a one-time content update on their next get/sync, because the bytes change while representation.tool does not.

Register a `kiro` profile that writes artifacts under `.kiro/` (skills,
prompts, config templates) and co-owns the root `AGENTS.md` for course
rules alongside codex, devin-desktop and generic. Content is delivered in
the generic variant because the delivery API exposes no `kiro` transform
yet.

Auto-detection reports Kiro from `.kiro/.10x-cli-manifest.json`,
`.kiro/steering/`, `.kiro/specs/`, `.kiro/hooks/`, `.kiro/settings/` or a
bare `.kiro/` directory. Every branch is `strong`: the directory name is
Kiro-specific with no plausible false positive, so a Kiro workspace never
loses the `AGENTS.md` confidence tie to codex and `PROFILE_ORDER` needs no
reshuffle. The profile takes its place in the resolution order ahead of
generic.

Extend `--tool` help text for `get` and `sync`, document the new paths,
the `.kiro/config-templates/` staging caveat and the exact limits of
`AGENTS.md` co-ownership (byte-identical rules only, so `kiro` pairs with
generic but reports `incompatible_shared_owner` next to codex or
devin-desktop) in the platform support reference and README, and cover the
profile in the detection, profile, tool-switch, writer and install-contract
test suites — including the divergent-content case that must fail closed.

The bundled `skills/10x-cli-guide/SKILL.md` is deliberately left unchanged:
`helpers install` is create-only and exits 1 on a byte difference, so a
documentation-only edit there would break every existing install.
Copilot AI lite review requested due to automatic review settings September 17, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Kiro rules are targeted to the wrong steering location, and documentation corrections remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds Kiro as a supported tool profile with .kiro/ artifacts, detection, documentation, and test coverage.

Changes:

  • Registers Kiro with generic content delivery and detection markers.
  • Adds writer, migration, and helper-install tests.
  • Updates CLI help, README, platform documentation, and changelog.
  • Review findings include one critical issue regarding Kiro’s steering-file location and two documentation nits.
File summaries
File Summary
tests/writer-profiles.test.ts Tests Kiro artifact writing and manifest data.
tests/tool-switch.test.ts Tests Kiro migration and shared-rule handling.
tests/tool-profile.test.ts Tests Kiro profile configuration.
tests/tool-detect.test.ts Tests Kiro marker detection and ranking.
tests/helpers/helper-install-contract.ts Tests helper installation for Kiro.
src/lib/tool-profile.ts Registers Kiro paths and content mapping.
src/lib/tool-detect.ts Adds Kiro workspace detection.
src/commands/sync.ts Updates sync tool help.
src/commands/get.ts Updates get tool help.
README.md Documents Kiro support.
docs/reference/platform-support.md Documents Kiro layout and behavior.
CHANGELOG.md Records the new profile.
Review details

Suppressed comments (2)

README.md:41

  • This supported-tool list still omits copilot, even though the helper and the later --tool table list it as a valid profile. Since this line is being updated for Kiro, please keep the introductory list complete so users are not told that GitHub Copilot is unsupported.
`--tool claude-code`, `cursor`, `codex`, `devin-desktop`, `gemini`, `kiro`, or `generic`

docs/reference/platform-support.md:90

  • This statement incorrectly classifies .kiro/prompts/ as inert. Kiro's official prompt documentation uses .kiro/prompts/ for project prompts (for example via @prompt-name), so users would be told to move files that the CLI has already placed in a supported location. Limit the caveat to config-templates or document the actual prompt usage.
`.kiro/prompts/` and `.kiro/config-templates/` are staging locations the CLI
manages but Kiro does not read automatically — move any artifact you want Kiro
to pick up to the place Kiro expects it (`.kiro/steering/` for always-on
context, `.kiro/hooks/` for hooks).
  • Files reviewed: 12/12 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/lib/tool-profile.ts
Comment on lines +114 to +116
// Kiro loads AGENTS.md as steering context, so it co-owns the root file
// with codex, devin-desktop and generic.
rulesFile: "AGENTS.md",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Kiro AGENTS.md support — version reference

Full (nested, per-directory) support for AGENTS.md was introduced separately for each Kiro surface:

  • Kiro IDE: version 1.0.309 (Aug 13, 2026) — "Add AGENTS.md files throughout your workspace to give Kiro instructions scoped to each directory tree." (changelog
    (https://kiro.dev/changelog/ide/1-0-309/))
  • Kiro CLI: version 2.18 — "AGENTS.md files now load as steering context from anywhere in your workspace tree, not just the workspace root and ~/.kiro/steering/." (changelog
    (https://kiro.dev/changelog/cli/2-18/))

Before these releases, AGENTS.md was only picked up from the workspace root.

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.

2 participants