|
| 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 version arguments: |
| 15 | + |
| 16 | +- `--appkit <version>` or first positional arg → AppKit version (e.g. `0.28.0`) |
| 17 | +- `--skills <version>` or second positional arg → 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 as arguments, skip to Step 2. |
| 27 | + |
| 28 | +Otherwise, fetch the latest tags 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: |
| 51 | + |
| 52 | +```bash |
| 53 | +gh api repos/databricks/appkit/git/ref/tags/v{appkit_version} --jq '.ref' 2>&1 |
| 54 | +gh api repos/databricks/databricks-agent-skills/git/ref/tags/v{skills_version} --jq '.ref' 2>&1 |
| 55 | +``` |
| 56 | + |
| 57 | +If either tag doesn't exist, report the error and stop. |
| 58 | + |
| 59 | +### Step 3: Read current manifest |
| 60 | + |
| 61 | +Read `internal/build/cli-compat.json`. Note the current versions and the list of versioned entries. |
| 62 | + |
| 63 | +### Step 4: Update the manifest |
| 64 | + |
| 65 | +Update **all entries** (both `next` and all versioned CLI entries) to the new appkit and skills versions. This is the "no template changes" scenario — a simple search & replace. |
| 66 | + |
| 67 | +Write the updated `internal/build/cli-compat.json`. |
| 68 | + |
| 69 | +### Step 5: Validate |
| 70 | + |
| 71 | +Run the Go tests to ensure the manifest is well-formed: |
| 72 | + |
| 73 | +```bash |
| 74 | +go test ./libs/depversions/... -run TestEmbeddedManifest -v |
| 75 | +``` |
| 76 | + |
| 77 | +If validation fails, show the errors and fix them before proceeding. |
| 78 | + |
| 79 | +### Step 6: Create branch, commit, and PR |
| 80 | + |
| 81 | +```bash |
| 82 | +# Create a new branch from the current branch (or main) |
| 83 | +git checkout -b bump-cli-compat-appkit-{appkit_version}-skills-{skills_version} |
| 84 | + |
| 85 | +# Stage and commit |
| 86 | +git add internal/build/cli-compat.json |
| 87 | +git commit -s -m "chore: bump cli-compat to appkit {appkit_version}, skills {skills_version}" |
| 88 | + |
| 89 | +# Push and create PR |
| 90 | +git push -u origin HEAD |
| 91 | +gh pr create \ |
| 92 | + --title "chore: bump cli-compat to appkit {appkit_version}, skills {skills_version}" \ |
| 93 | + --body "$(cat <<'EOF' |
| 94 | +## Summary |
| 95 | +Bump `cli-compat.json` to use: |
| 96 | +- AppKit `{appkit_version}` |
| 97 | +- Agent Skills `{skills_version}` |
| 98 | +
|
| 99 | +## Checklist |
| 100 | +- [ ] Evals passed with no regressions |
| 101 | +- [ ] `go test ./libs/depversions/... -run TestEmbeddedManifest` passes |
| 102 | +EOF |
| 103 | +)" |
| 104 | +``` |
| 105 | + |
| 106 | +Show the PR URL to the user when done. |
| 107 | + |
| 108 | +## Examples |
| 109 | + |
| 110 | +### Example: With explicit versions |
| 111 | +``` |
| 112 | +/bump-cli-compat 0.28.0 0.1.6 |
| 113 | +``` |
| 114 | +Validates tags exist, updates manifest, creates PR. |
| 115 | + |
| 116 | +### Example: Auto-detect latest |
| 117 | +``` |
| 118 | +/bump-cli-compat |
| 119 | +``` |
| 120 | +Fetches latest tags, asks for eval confirmation, then updates and creates PR. |
| 121 | + |
| 122 | +### Example: With flags |
| 123 | +``` |
| 124 | +/bump-cli-compat --appkit 0.28.0 --skills 0.1.6 |
| 125 | +``` |
| 126 | +Same as positional args. |
0 commit comments