Skip to content

Commit 2994859

Browse files
aitools: parse experimental_skills manifest section
Teaches the aitools installer to parse the new manifest shape from databricks/databricks-agent-skills (paired with d-a-s #73): - Single `skills` map; each entry's `repo_dir` ("skills" or "experimental") is the source of truth for stable-vs-experimental. - `SkillMeta.IsExperimental()` derives state from `RepoDir`. - Experimental skills get a `-experimental` suffix on their install-side key in `normalizeManifest`; new `SourceName` field preserves the unsuffixed name for fetch URLs. - The existing `--experimental` flag (already wired in `cmd/skills.go`) now has skills to install; `resolveSkills` filters them otherwise. - New acceptance tests at `acceptance/experimental/aitools/skills/install*/` cover stable-only, --experimental, specific-skill, and empty-manifest cases. `DATABRICKS_SKILLS_BASE_URL` env-var lets the tests mock the manifest server. Rebased onto current main; layout drift reconciled from `experimental/aitools/lib/installer/` → `libs/aitools/installer/` and `experimental/aitools/cmd/list.go` → `cmd/aitools/list.go` (per #4917's final shape). Acceptance test golden files regenerated to capture the legacy-alias deprecation warning that #4917 added on `databricks experimental aitools install`. Co-authored-by: Isaac
1 parent 50ce8c2 commit 2994859

22 files changed

Lines changed: 601 additions & 50 deletions

File tree

Taskfile.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ tasks:
615615
- libs/aitools/**
616616
- experimental/aitools/**
617617
- acceptance/apps/**
618+
- acceptance/experimental/aitools/**
618619
- "{{.EMBED_SOURCES}}"
619620
cmds:
620621
- |
@@ -628,7 +629,7 @@ tasks:
628629
--format ${GOTESTSUM_FORMAT:-pkgname-and-test-fails} \
629630
--no-summary=skipped \
630631
--packages ./acceptance/... \
631-
-- -timeout=${LOCAL_TIMEOUT:-30m} -run "TestAccept/apps"
632+
-- -timeout=${LOCAL_TIMEOUT:-30m} -run "TestAccept/(apps|experimental/aitools)"
632633
633634
test-exp-ssh:
634635
desc: Run experimental SSH unit and acceptance tests

acceptance/experimental/aitools/skills/install-experimental-empty/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
=== --experimental against a manifest with no experimental skills logs a nudge
3+
>>> [CLI] experimental aitools install --global --experimental
4+
Command "install" is deprecated, use "databricks aitools install" instead.
5+
Installing Databricks AI skills for Claude Code...
6+
Using skills version test-ref
7+
Warn: --experimental was set but the manifest at test-ref exposes no experimental skills. Set DATABRICKS_SKILLS_REF to a release that includes them (or =main for the latest).
8+
Installed 1 skill.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mkdir -p "$HOME/.claude"
2+
3+
title "--experimental against a manifest with no experimental skills logs a nudge"
4+
trace $CLI experimental aitools install --global --experimental
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Env.DATABRICKS_SKILLS_BASE_URL = "$DATABRICKS_HOST"
2+
Env.DATABRICKS_SKILLS_REF = "test-ref"
3+
4+
Ignore = [
5+
".databricks/aitools/skills/.state.json",
6+
]
7+
8+
[EnvMatrix]
9+
DATABRICKS_BUNDLE_ENGINE = []
10+
11+
# Manifest with stable skills only — no entries with repo_dir=experimental.
12+
# Simulates a release tag that pre-dates the experimental feature.
13+
[[Server]]
14+
Pattern = "GET /test-ref/manifest.json"
15+
Response.Body = '''
16+
{
17+
"version": "2",
18+
"updated_at": "2026-01-01T00:00:00Z",
19+
"skills": {
20+
"test-stable": {"version": "1.0.0", "files": ["SKILL.md"]}
21+
}
22+
}
23+
'''
24+
25+
[[Server]]
26+
Pattern = "GET /test-ref/skills/test-stable/SKILL.md"
27+
Response.Body = '''---
28+
name: test-stable
29+
---
30+
31+
# Stable
32+
'''

acceptance/experimental/aitools/skills/install-specific/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
=== install only one specific stable skill via --skills
3+
>>> [CLI] experimental aitools install --global --skills test-stable-a
4+
Command "install" is deprecated, use "databricks aitools install" instead.
5+
Installing Databricks AI skills for Claude Code...
6+
Using skills version test-ref
7+
Installed 1 skill.
8+
9+
=== install a specific experimental skill (note the -experimental suffix)
10+
>>> [CLI] experimental aitools install --global --skills test-exp-experimental --experimental
11+
Command "install" is deprecated, use "databricks aitools install" instead.
12+
Installing Databricks AI skills for Claude Code...
13+
Using skills version test-ref
14+
Installed 1 skill.
15+
16+
=== asking for an experimental skill without --experimental flag errors out
17+
>>> [CLI] experimental aitools install --global --skills test-exp-experimental
18+
Command "install" is deprecated, use "databricks aitools install" instead.
19+
Installing Databricks AI skills for Claude Code...
20+
Using skills version test-ref
21+
Error: skill "test-exp-experimental" is experimental; use --experimental to install
22+
23+
Exit code: 1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
mkdir -p "$HOME/.claude"
2+
3+
title "install only one specific stable skill via --skills"
4+
trace $CLI experimental aitools install --global --skills test-stable-a
5+
6+
title "install a specific experimental skill (note the -experimental suffix)"
7+
trace $CLI experimental aitools install --global --skills test-exp-experimental --experimental
8+
9+
title "asking for an experimental skill without --experimental flag errors out"
10+
errcode trace $CLI experimental aitools install --global --skills test-exp-experimental
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Env.DATABRICKS_SKILLS_BASE_URL = "$DATABRICKS_HOST"
2+
Env.DATABRICKS_SKILLS_REF = "test-ref"
3+
4+
Ignore = [
5+
".databricks/aitools/skills/.state.json",
6+
]
7+
8+
[EnvMatrix]
9+
DATABRICKS_BUNDLE_ENGINE = []
10+
11+
[[Server]]
12+
Pattern = "GET /test-ref/manifest.json"
13+
Response.Body = '''
14+
{
15+
"version": "2",
16+
"updated_at": "2026-01-01T00:00:00Z",
17+
"skills": {
18+
"test-stable-a": {"version": "1.0.0", "files": ["SKILL.md"], "repo_dir": "skills"},
19+
"test-stable-b": {"version": "1.0.0", "files": ["SKILL.md"], "repo_dir": "skills"},
20+
"test-exp": {"version": "0.0.1", "files": ["SKILL.md"], "repo_dir": "experimental"}
21+
}
22+
}
23+
'''
24+
25+
[[Server]]
26+
Pattern = "GET /test-ref/skills/test-stable-a/SKILL.md"
27+
Response.Body = '''---
28+
name: test-stable-a
29+
---
30+
31+
# A
32+
'''
33+
34+
[[Server]]
35+
Pattern = "GET /test-ref/skills/test-stable-b/SKILL.md"
36+
Response.Body = '''---
37+
name: test-stable-b
38+
---
39+
40+
# B
41+
'''
42+
43+
[[Server]]
44+
Pattern = "GET /test-ref/experimental/test-exp/SKILL.md"
45+
Response.Body = '''---
46+
name: test-exp
47+
---
48+
49+
# Exp
50+
'''

acceptance/experimental/aitools/skills/install/out.test.toml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)