Commit 9006521
Promote aitools skills-management commands to top-level (#4917)
## Summary
Promotes the **aitools skills-management surface** out of
`experimental/` so the stable half lives at `databricks aitools …` and
slots in next to the other top-level command groups. The matching
**interface changes** (`--scope` enum, `--project`/`--global`
deprecation, `--agents` auto-detect doc) live in a stacked follow-up:
**#5234**.
This is mostly a move, but it is not move-only — see [Non-move
changes](#non-move-changes) below.
- Source files for `install`, `update`, `uninstall`, `list`, `version`
(and the agents/installer libs they depend on) physically move from
`experimental/aitools/` to `cmd/aitools/` + `libs/aitools/`, matching
the existing `cmd/apps/` + `libs/apps/` layout. OWNERS, Taskfile, and
the pr-checklist skill are updated to match.
- The top-level command is registered at `databricks aitools …`.
- **Keeps the `tools` subtree under `experimental/aitools/`** — `query`,
`discover-schema`, `get-default-warehouse`, `statement …` — because
`tools.go` still says "There are no stability guarantees for these
tools".
- The old paths under `databricks experimental aitools
install/update/uninstall/list/version` and `databricks experimental
aitools skills install/list` keep working as **deprecated
backward-compat aliases** that print a notice pointing at the new path
(via cobra's `Deprecated` field).
The aitools skills-management surface is feature-complete after the 5-PR
series (#4810–#4814) that added state tracking, lifecycle commands, and
project scope support. The `tools` subtree is functionally useful but
its shape is still in flux, so promoting only the stable half.
## Non-move changes
In addition to the file moves, this PR:
- Removes the redundant `aitools/README.md` (apps/pipelines don't carry
one); the same info lives in the command's Long description.
- Rewrites the Long description on the new top-level `databricks
aitools` command.
- Adds a deprecation notice to every legacy alias under `databricks
experimental aitools` (Lennart's review ask — they used to forward
silently).
- Refactors how the legacy `experimental aitools skills install [name]`
wrapper is wired: the wrapper now lives in
`cmd/aitools/legacy_skills.go` alongside the install code it wraps, and
the previously-exported test-injection vars (`InstallSkillsForAgentsFn`,
`ListSkillsFn`, `PromptAgentSelection`) are back to unexported. The two
now-empty experimental files (`experimental/aitools/cmd/skills.go` and
`skills_test.go`) are deleted.
## What's not in this PR
These are deliberately separated and reviewed independently:
- **#5234** — `--scope=project|global|both` flag, deprecation of
`--project`/`--global` via `cobra.Deprecated`, `--agents` auto-detect
help text.
- **#5233** (draft) — `--output json` on `databricks aitools list`.
## Command shape after this PR
```
# Stable, top-level
databricks aitools install # use --skills <name>[,<name>...] for specific skills
databricks aitools update
databricks aitools uninstall
databricks aitools list
databricks aitools version
# Backward-compat aliases (print deprecation notice; point at the new paths)
databricks experimental aitools install/update/uninstall/list/version
databricks experimental aitools skills {list,install}
# Experimental, unchanged path
databricks experimental aitools tools query
databricks experimental aitools tools discover-schema
databricks experimental aitools tools get-default-warehouse
databricks experimental aitools tools statement {submit,get,status,cancel}
```
## Test plan
- [x] `databricks aitools --help` shows
install/update/uninstall/list/version (no `tools`)
- [x] `databricks --help` lists `aitools` in the output
- [x] `databricks experimental aitools install` prints a deprecation
notice and still forwards
- [x] `databricks experimental aitools tools query …` runs as before
- [x] `databricks experimental aitools tools --help` lists
query/discover-schema/get-default-warehouse/statement
- [x] Existing aitools tests pass; the legacy-wrapper tests moved with
the wrapper to `cmd/aitools/legacy_skills_test.go`
This pull request was AI-assisted by Isaac.
---------
Co-authored-by: simon <simon.faltum@databricks.com>
Co-authored-by: simon <4305831+simonfaltum@users.noreply.github.com>1 parent 26a1cdf commit 9006521
39 files changed
Lines changed: 373 additions & 296 deletions
File tree
- .agent/skills/pr-checklist
- .github
- acceptance/help
- cmd
- aitools
- apps
- experimental/aitools
- cmd
- libs/aitools
- agents
- installer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
612 | | - | |
| 612 | + | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
614 | 616 | | |
615 | 617 | | |
616 | 618 | | |
| |||
619 | 621 | | |
620 | 622 | | |
621 | 623 | | |
622 | | - | |
| 624 | + | |
623 | 625 | | |
624 | 626 | | |
625 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
File renamed without changes.
File renamed without changes.
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
16 | 54 | | |
17 | 55 | | |
18 | 56 | | |
| |||
27 | 65 | | |
28 | 66 | | |
29 | 67 | | |
| 68 | + | |
| 69 | + | |
30 | 70 | | |
31 | 71 | | |
32 | 72 | | |
| |||
0 commit comments