|
| 1 | +--- |
| 2 | +name: bump-cli-compat |
| 3 | +description: "Bump cli-compat.json with new AppKit and Agent Skills versions, then create a PR. Use when the user says 'bump cli-compat', 'update cli-compat', 'bump compatibility manifest', 'new appkit release cli-compat', or wants to update the CLI compatibility manifest after an AppKit or Agent Skills release." |
| 4 | +user-invocable: true |
| 5 | +allowed-tools: Read, Edit, Write, Bash, Glob, Grep, AskUserQuestion |
| 6 | +--- |
| 7 | + |
| 8 | +# Bump CLI Compatibility Manifest |
| 9 | + |
| 10 | +Updates `internal/build/cli-compat.json` with new AppKit and Agent Skills versions, validates the result, and creates a PR. |
| 11 | + |
| 12 | +## Arguments |
| 13 | + |
| 14 | +Parse the user's input for optional named flags: |
| 15 | + |
| 16 | +- `--appkit <version>` → AppKit version (e.g. `0.28.0`) |
| 17 | +- `--skills <version>` → Agent Skills version (e.g. `0.1.6`) |
| 18 | +- No args → auto-detect latest versions from GitHub tags |
| 19 | + |
| 20 | +Versions should be provided **without** the `v` prefix (e.g. `0.28.0`, not `v0.28.0`). If provided with the prefix, strip it. |
| 21 | + |
| 22 | +## Workflow |
| 23 | + |
| 24 | +### Step 1: Resolve versions |
| 25 | + |
| 26 | +If both `--appkit` and `--skills` versions were provided, skip to Step 2. |
| 27 | + |
| 28 | +For any missing version, fetch the latest tag from GitHub: |
| 29 | + |
| 30 | +```bash |
| 31 | +# Latest appkit version (strip leading 'v') |
| 32 | +gh api repos/databricks/appkit/tags --jq '.[0].name' | sed 's/^v//' |
| 33 | + |
| 34 | +# Latest skills version (strip leading 'v') |
| 35 | +gh api repos/databricks/databricks-agent-skills/tags --jq '.[0].name' | sed 's/^v//' |
| 36 | +``` |
| 37 | + |
| 38 | +Show the resolved versions to the user and ask: |
| 39 | + |
| 40 | +> The latest versions are: |
| 41 | +> - AppKit: `{appkit_version}` |
| 42 | +> - Agent Skills: `{skills_version}` |
| 43 | +> |
| 44 | +> Have these versions been evaluated (evals passed with no regressions)? |
| 45 | +
|
| 46 | +**Do NOT proceed until the user confirms.** If the user says no or wants different versions, ask them to provide the correct versions. |
| 47 | + |
| 48 | +### Step 2: Validate tags exist |
| 49 | + |
| 50 | +Verify that the corresponding Git tags exist on GitHub. For AppKit, also validate the `template-v` tag (used by `apps init`): |
| 51 | + |
| 52 | +```bash |
| 53 | +# AppKit release tag |
| 54 | +gh api repos/databricks/appkit/git/ref/tags/v{appkit_version} --jq '.ref' |
| 55 | + |
| 56 | +# AppKit template tag (used by apps init) |
| 57 | +gh api repos/databricks/appkit/git/ref/tags/template-v{appkit_version} --jq '.ref' |
| 58 | + |
| 59 | +# Agent Skills tag |
| 60 | +gh api repos/databricks/databricks-agent-skills/git/ref/tags/v{skills_version} --jq '.ref' |
| 61 | +``` |
| 62 | + |
| 63 | +If any tag doesn't exist, report the error and stop. |
| 64 | + |
| 65 | +### Step 3: Read current manifest |
| 66 | + |
| 67 | +Read `internal/build/cli-compat.json`. Note the current versions and the list of versioned entries. |
| 68 | + |
| 69 | +### Step 4: Determine update type |
| 70 | + |
| 71 | +Ask the user: |
| 72 | + |
| 73 | +> Do any of these apply? |
| 74 | +> - **AppKit**: The new templates require new CLI logic in `apps init` (e.g. new flags, prompts, or template handling that older CLIs don't have) |
| 75 | +> - **Skills**: The new skills version uses CLI commands that older CLIs don't support |
| 76 | +> |
| 77 | +> If **neither** applies, this is a non-breaking bump (default). |
| 78 | +
|
| 79 | +- **No breaking changes** (default): proceed to Step 4a. |
| 80 | +- **Breaking changes**: proceed to Step 4b. |
| 81 | + |
| 82 | +### Step 4a: No breaking changes (update in-place) |
| 83 | + |
| 84 | +Update the **highest versioned entry** to the new appkit and skills versions. Do NOT add new versioned keys. The manifest is range-based: updating the highest entry automatically covers all CLI versions in that range. |
| 85 | + |
| 86 | +Write the updated `internal/build/cli-compat.json`. |
| 87 | + |
| 88 | +### Step 4b: Breaking changes (add new entry) |
| 89 | + |
| 90 | +Ask the user for the **minimum CLI version** that supports the new features. |
| 91 | + |
| 92 | +Add a new entry keyed to that CLI version with the new appkit and skills versions. Keep older entries unchanged so older CLI binaries stay compatible. |
| 93 | + |
| 94 | +Write the updated `internal/build/cli-compat.json`. |
| 95 | + |
| 96 | +### Step 5: Validate |
| 97 | + |
| 98 | +Run the Go tests to ensure the manifest is well-formed: |
| 99 | + |
| 100 | +```bash |
| 101 | +go test ./libs/clicompat/... -run TestEmbeddedManifest -v |
| 102 | +``` |
| 103 | + |
| 104 | +If validation fails, show the errors and fix them before proceeding. |
| 105 | + |
| 106 | +### Step 6: Create branch, commit, and PR |
| 107 | + |
| 108 | +```bash |
| 109 | +# Create a new branch from the current branch (or main) |
| 110 | +git checkout -b bump-cli-compat-appkit-{appkit_version}-skills-{skills_version} |
| 111 | + |
| 112 | +# Stage and commit |
| 113 | +git add internal/build/cli-compat.json |
| 114 | +git commit -s -m "Bump cli-compat to appkit {appkit_version}, skills {skills_version}" |
| 115 | + |
| 116 | +# Push and create PR |
| 117 | +git push -u origin HEAD |
| 118 | +gh pr create \ |
| 119 | + --title "Bump cli-compat to appkit {appkit_version}, skills {skills_version}" \ |
| 120 | + --body "$(cat <<'EOF' |
| 121 | +## Summary |
| 122 | +Bump `cli-compat.json` to use: |
| 123 | +- AppKit `{appkit_version}` |
| 124 | +- Agent Skills `{skills_version}` |
| 125 | +
|
| 126 | +## Checklist |
| 127 | +- [ ] Evals passed with no regressions |
| 128 | +- [ ] `go test ./libs/clicompat/... -run TestEmbeddedManifest` passes |
| 129 | +EOF |
| 130 | +)" |
| 131 | +``` |
| 132 | + |
| 133 | +Show the PR URL to the user when done. |
| 134 | + |
| 135 | +## Examples |
| 136 | + |
| 137 | +### Example: With explicit versions |
| 138 | +``` |
| 139 | +/bump-cli-compat --appkit 0.28.0 --skills 0.1.6 |
| 140 | +``` |
| 141 | +Validates tags exist (including `template-v0.28.0`), updates manifest, creates PR. |
| 142 | + |
| 143 | +### Example: Auto-detect latest |
| 144 | +``` |
| 145 | +/bump-cli-compat |
| 146 | +``` |
| 147 | +Fetches latest tags, asks for eval confirmation, then updates and creates PR. |
| 148 | + |
| 149 | +### Example: Only bump AppKit |
| 150 | +``` |
| 151 | +/bump-cli-compat --appkit 0.28.0 |
| 152 | +``` |
| 153 | +Auto-detects latest skills version, asks for confirmation, then updates both. |
0 commit comments