Skip to content

Add Kiro to databricks aitools install - #6436

Closed
antonyprasad-db wants to merge 3 commits into
databricks:mainfrom
antonyprasad-db:antonyprasad-db/aitools-add-kiro
Closed

antonyprasad-db wants to merge 3 commits into
databricks:mainfrom
antonyprasad-db:antonyprasad-db/aitools-add-kiro

Conversation

@antonyprasad-db

@antonyprasad-db antonyprasad-db commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Kiro to the agent registry so databricks aitools install treats it like any other skills-only agent. Follows the same shape as Goose (#6214), Gemini CLI (#6204) and Pi (#6199).

Why

Kiro reads agent skills from ~/.kiro/skills (user-level) and <workspace>/.kiro/skills (workspace-level), each skill a directory containing SKILL.md — exactly the layout this repo already emits. Today Kiro users have to fall back to databricks aitools install --path ~/.kiro/skills, which works but records no state, so aitools update and aitools uninstall never see those skills and aitools list reports every one of them as not installed.

Verification

Tested on macOS with Kiro 1.0.182.

Kiro's loader (NodeProgressiveContextSource) rejects a skill when frontmatter is missing, when name or description is empty, when name is outside 1–64 characters, when description exceeds 1024, or when name does not equal the directory name. Everything this repo emits satisfies that.

With 29 stable skills installed into ~/.kiro/skills, Kiro accepted all 29. The only rejections in that directory were two deliberately malformed probe skills added to confirm the loader was really scanning, plus two unrelated pre-existing skills whose frontmatter name disagrees with their directory:

skill.frontmatter.missing   zz-probe-no-frontmatter      (deliberate probe)
skill.fields.missing        zz-probe-no-description      (deliberate probe)
skill.name.mismatch         analyze-mlflow-trace         (pre-existing, unrelated)
skill.name.mismatch         analyze-mlflow-chat-session  (pre-existing, unrelated)

Worth knowing for anyone testing this: Kiro resolves skills lazily when a chat session starts, not when the IDE launches. Installing and then looking at an already-open Kiro shows nothing until a new session begins.

Notes on the registry entry

  • SkillsSubdir is left empty because Kiro's directory is literally skills, so the default applies.
  • SupportsProjectScope: true — Kiro's own picker text documents both scopes.
  • Binary: "kiro" is set, but Kiro is IDE-first so the binary is frequently absent from PATH. Detection then falls back to ConfigDir and reports files-only, which is the correct state for a skills-only agent (Plugin nil).

Telemetry

Also adds AitoolsAgentTypeKiro and the matching agentType case, so Kiro installs are not logged as TYPE_UNSPECIFIED and TestAgentTypeCoversRegistry stays green.

The Universe half is already merged, so nothing is owed on the proto side. That guard's failure message notes the enum lives in enum.proto (Universe) as well as aitools_install.go (CLI). KIRO = 10 was added to AitoolsAgentType.Type and merged to master on 2026-09-01 (universe 2524420), with Protobuf-Linter-Pr and OpenAPICompatibility-Pr both green — the latter being the machine check that the additive enum value is backward compatible. The two changes are order-independent: the enum addition is additive, and the CLI only emits "KIRO" once this PR merges. So this is the complete change and needs a review rather than any follow-up work.

Tests

go test ./cmd/aitools/... ./libs/aitools/... ./libs/telemetry/...

ok  github.com/databricks/cli/cmd/aitools              2.027s
ok  github.com/databricks/cli/libs/aitools/agents
ok  github.com/databricks/cli/libs/aitools/installer
ok  github.com/databricks/cli/libs/telemetry           4.959s
ok  github.com/databricks/cli/libs/telemetry/protos    0.826s

Test coverage added alongside the existing Goose cases: registry paths and project detection in libs/aitools/agents/registry_test.go, the skills-only assertion in agents_test.go, the project-scope declaration in libs/aitools/installer/installer_test.go, the agent-choices assertion in cmd/aitools/install_test.go, and the project-scope update path in cmd/aitools/update_test.go — which needed a .kiro project skills dir in the fixture alongside the existing .pi, .gemini and .goose ones.

libs/aitools/agents/detect_test.go is deliberately not extended: Goose and Gemini CLI have custom config-dir resolution to cover there (XDG_CONFIG_HOME, GOOSE_PATH_ROOT), while Kiro uses a plain ~/.kiro with no env override and registry_test.go already pins both of its paths.

Changelog

.nextchanges/cli/aitools-kiro.md, matching the fragment the Goose and Gemini CLI PRs each shipped.

This pull request and its description were written by Isaac.

@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/cmd/aitools/ - needs approval

Files: cmd/aitools/telemetry.go
Suggested: @lennartkats-db
Also eligible: @simonfaltum, @parthban-db, @fjakobs, @Shridhad, @atilafassina, @keugenek, @igrekun, @pkosiec, @MarioCadenas, @pffigueiredo, @ditadi, @calvarjorge, @renaudhartert-db, @hectorcast-db, @tanmay-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/aitools/ - needs approval

4 files changed
Suggested: @lennartkats-db
Also eligible: @simonfaltum, @parthban-db, @fjakobs, @Shridhad, @atilafassina, @keugenek, @igrekun, @pkosiec, @MarioCadenas, @pffigueiredo, @ditadi, @calvarjorge, @renaudhartert-db, @hectorcast-db, @tanmay-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/telemetry/ - needs approval

Files: libs/telemetry/protos/aitools_install.go
Suggested: @simonfaltum
Also eligible: @parthban-db, @renaudhartert-db, @hectorcast-db, @tanmay-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

@antonyprasad-db

Copy link
Copy Markdown
Contributor Author

Update on the one maintainer TODO in the description — the enum.proto side is now handled.

I've submitted that change internally: KIRO = 10 appended to AitoolsAgentType.Type after GOOSE = 9. It's in review with the log-schema owners. That path needs UI Platform review plus a Trust and Safety approver, which is why it's a separate change rather than something a maintainer here has to shepherd.

Two things I confirmed while doing it:

  • AitoolsAgentType is referenced in exactly two places internally — the enum and the agents field declaration. There's no mapping table, allow-list, or consumer switch that also needs the new value, so that one-line addition is the whole server-side change.
  • It's additive at the next free number, so the two PRs can land in either order. The CLI only emits "KIRO" once this one merges, and the enum value is harmless before that.

No changes to this PR as a result — just closing the loop so the proto side isn't left as an open question.

@antonyprasad-db

antonyprasad-db commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing the loop on my previous comment: the enum.proto change is merged, not just submitted.

KIRO = 10 is on AitoolsAgentType.Type in master as of 2026-09-01. Protobuf-Linter-Pr and OpenAPICompatibility-Pr both passed, the latter being the machine confirmation that the additive enum value is backward compatible rather than just my assertion.

So both halves are done and this PR is the complete change. I've updated the description, which still carried the original "a maintainer will need to do" caveat and read as though something was outstanding.

Two things I can't do from outside the org, in case either is what's holding this up:

Happy to rebase or split this if either would help.

@antonyprasad-db

Copy link
Copy Markdown
Contributor Author

@lennartkats-db — the approval bot flagged you as the reviewer for cmd/aitools/ on this one, so tagging you directly; I only have pull access here and can't request a review myself.

This is ready. The single maintainer TODO in the description — the enum.proto telemetry value — is now merged internally, so the CLI side is no longer knowingly incomplete. One commit, checks green, and it follows the same shape as the Goose (#6214), Gemini (#6204) and Pi (#6199) additions.

Happy to rebase or split it if that makes review easier.

Kiro reads agent skills from ~/.kiro/skills (user-level) and
<workspace>/.kiro/skills (workspace-level), each skill a directory holding a
SKILL.md. Its loader requires frontmatter name and description, rejects a name
longer than 64 characters or a description longer than 1024, and requires the
name to match its directory. That is already what this repo emits, so Kiro
needs only a registry entry.

Verified on macOS with Kiro 1.0.182: all 29 stable skills written to
~/.kiro/skills are accepted by Kiro's loader. The only rejections in that
directory were two deliberately malformed probes and two unrelated
pre-existing skills whose frontmatter name does not match their directory.

Kiro is IDE-first, so the `kiro` binary is frequently absent from PATH.
Detection then falls back to ConfigDir and reports files-only, which is the
correct state for a skills-only agent (Plugin nil).

Also adds the telemetry enum and agentType case so Kiro installs are not
logged as TYPE_UNSPECIFIED, keeping TestAgentTypeCoversRegistry green. Note
the matching AitoolsAgentType value is still needed in enum.proto on the
Universe side; only the CLI half is in this change.

Follows the same shape as Goose (databricks#6214), Gemini CLI (databricks#6204) and Pi (databricks#6199).
@antonyprasad-db

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. It was 317 commits behind, applied cleanly, same +22/-2 across the same six files, and the aitools and telemetry test packages pass locally on the new head fb30ee6. Also worth recording that this is now complete by the invariant the repo itself encodes, not only by precedent: TestAgentTypeCoversRegistry requires three legs for any registry agent, an agentType case, an AitoolsAgentType value in aitools_install.go, and the matching value in enum.proto on the Universe side. This PR carries the first two, and the third merged to master on 1 Sep. Since #6482, agentType() also backs agentResultsField, so Kiro picks up the agent level error telemetry with no extra change. The integration tests will need an authorized user to trigger them for this new SHA.

The Goose (databricks#6214) and Gemini CLI (databricks#6204) precedents each ship a
.nextchanges fragment plus a Kiro-equivalent assertion in
cmd/aitools/install_test.go and cmd/aitools/update_test.go. This branch
was missing all three.

The update test also needed its fixture extended, not just an assertion:
it creates .pi, .gemini and .goose project skill dirs, so
DetectProjectInstalled correctly reported no Kiro until .kiro was created
alongside them. The production path was never at fault.

libs/aitools/agents/detect_test.go is deliberately left alone. Goose and
Gemini CLI have custom config-dir resolution worth covering there
(XDG_CONFIG_HOME, GOOSE_PATH_ROOT); Kiro uses a plain ~/.kiro with no env
override, and registry_test.go already pins both its global and project
skills paths.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6436
  • Commit SHA: df8fb9f7494ab325b1075a00c27318be4d63111e

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: df8fb9f

Run: 36888741869

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 15 5:37
✅​ aws windows 278 13 5:06
✅​ azure linux 275 15 6:11
✅​ azure windows 277 13 4:44
✅​ gcp linux 276 15 5:35
✅​ gcp windows 278 13 3:15
Top 6 slowest tests (at least 2 minutes):
duration env testname
5:04 aws windows TestAccept
4:14 aws linux TestAccept
3:52 azure linux TestAccept
3:50 gcp linux TestAccept
3:13 gcp windows TestAccept
3:10 azure windows TestAccept

rugpanov added a commit that referenced this pull request Oct 2, 2026
The nextchanges validator requires the fragment's trailing PR link to
reference the PR that ships it. This branch supersedes the fork PR #6436.

Co-authored-by: Isaac <no-reply@databricks.com>
@antonyprasad-db

Copy link
Copy Markdown
Contributor Author

Superseded by #6908, which was recreated as a branch in this repository so the JFrog/OIDC-gated CI jobs (task test, task test-exp-aitools, validate-generated) could actually run — fork PRs can't obtain the OIDC token. #6908 merged in c232883b with the original commits and authorship preserved, and ships in CLI v1.20.0. Closing this one.

philip pushed a commit to philip/databricks-cli that referenced this pull request Oct 2, 2026
> Recreated from databricks#6436 as a branch in `databricks/cli` (not a fork) so
the JFrog/OIDC-gated CI jobs (`task test`, `task test-exp-aitools`,
`validate-generated`) actually run — fork PRs can't obtain the OIDC
token. Original author's commits are preserved. Supersedes databricks#6436.

## Summary

Adds Kiro to the agent registry so `databricks aitools install` treats
it like any other skills-only agent. Follows the same shape as Goose
(databricks#6214), Gemini CLI (databricks#6204) and Pi (databricks#6199).

## Why

Kiro reads agent skills from `~/.kiro/skills` (user-level) and
`<workspace>/.kiro/skills` (workspace-level), each skill a directory
containing `SKILL.md` — exactly the layout this repo already emits.
Today Kiro users have to fall back to `databricks aitools install --path
~/.kiro/skills`, which works but records no state, so `aitools update`
and `aitools uninstall` never see those skills and `aitools list`
reports every one of them as `not installed`.

## Verification

Tested on macOS with Kiro 1.0.182.

Kiro's loader (`NodeProgressiveContextSource`) rejects a skill when
frontmatter is missing, when `name` or `description` is empty, when
`name` is outside 1–64 characters, when `description` exceeds 1024, or
when `name` does not equal the directory name. Everything this repo
emits satisfies that.

With 29 stable skills installed into `~/.kiro/skills`, Kiro accepted all
29. The only rejections in that directory were two deliberately
malformed probe skills added to confirm the loader was really scanning,
plus two unrelated pre-existing skills whose frontmatter `name`
disagrees with their directory:

```
skill.frontmatter.missing   zz-probe-no-frontmatter      (deliberate probe)
skill.fields.missing        zz-probe-no-description      (deliberate probe)
skill.name.mismatch         analyze-mlflow-trace         (pre-existing, unrelated)
skill.name.mismatch         analyze-mlflow-chat-session  (pre-existing, unrelated)
```

Worth knowing for anyone testing this: Kiro resolves skills lazily when
a **chat session starts**, not when the IDE launches. Installing and
then looking at an already-open Kiro shows nothing until a new session
begins.

## Notes on the registry entry

- `SkillsSubdir` is left empty because Kiro's directory is literally
`skills`, so the default applies.
- `SupportsProjectScope: true` — Kiro's own picker text documents both
scopes.
- `Binary: "kiro"` is set, but Kiro is IDE-first so the binary is
frequently absent from `PATH`. Detection then falls back to `ConfigDir`
and reports files-only, which is the correct state for a skills-only
agent (`Plugin nil`).

## Telemetry

Also adds `AitoolsAgentTypeKiro` and the matching `agentType` case, so
Kiro installs are not logged as `TYPE_UNSPECIFIED` and
`TestAgentTypeCoversRegistry` stays green.

**The Universe half is already merged, so nothing is owed on the proto
side.** That guard's failure message notes the enum lives in
`enum.proto` (Universe) as well as `aitools_install.go` (CLI). `KIRO =
10` was added to `AitoolsAgentType.Type` and merged to master on
2026-09-01 (universe 2524420), with `Protobuf-Linter-Pr` and
`OpenAPICompatibility-Pr` both green — the latter being the machine
check that the additive enum value is backward compatible. The two
changes are order-independent: the enum addition is additive, and the
CLI only emits `"KIRO"` once this PR merges. So this is the complete
change and needs a review rather than any follow-up work.

## Tests

```
go test ./cmd/aitools/... ./libs/aitools/... ./libs/telemetry/...

ok  github.com/databricks/cli/cmd/aitools              4.159s
ok  github.com/databricks/cli/libs/aitools/agents      1.529s
ok  github.com/databricks/cli/libs/aitools/installer   2.648s
ok  github.com/databricks/cli/libs/telemetry           6.616s
ok  github.com/databricks/cli/libs/telemetry/protos    2.023s
```

Test coverage added alongside the existing Goose cases: registry paths
and project detection in `libs/aitools/agents/registry_test.go`, the
skills-only assertion in `agents_test.go`, the project-scope declaration
in `libs/aitools/installer/installer_test.go`, the agent-choices
assertion in `cmd/aitools/install_test.go`, and the project-scope update
path in `cmd/aitools/update_test.go` — which needed a `.kiro` project
skills dir in the fixture alongside the existing `.pi`, `.gemini` and
`.goose` ones.

`libs/aitools/agents/detect_test.go` is deliberately not extended: Goose
and Gemini CLI have custom config-dir resolution to cover there
(`XDG_CONFIG_HOME`, `GOOSE_PATH_ROOT`), while Kiro uses a plain
`~/.kiro` with no env override and `registry_test.go` already pins both
of its paths.

## Changelog

`.nextchanges/cli/aitools-kiro.md`, matching the fragment the Goose and
Gemini CLI PRs each shipped.

Co-authored-by: Antony Prasad Thevaraj
<280810845+antonyprasad-db@users.noreply.github.com>

This pull request and its description were written by Isaac.

---------

Co-authored-by: Antony Prasad Thevaraj <280810845+antonyprasad-db@users.noreply.github.com>
Co-authored-by: Isaac <no-reply@databricks.com>
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.

3 participants