Skip to content

Commit 41a047e

Browse files
committed
Refactor skill distribution; remove bumpy ai command
Move the canonical add-change agent skill to the repo root (skills/) as a single source of truth, synced into the package on build/prepack (gitignored copy) so it ships version-pinned in the npm tarball and via the Claude Code plugin. Mirrors dmno-dev/varlock#808. Remove the bumpy ai command: its file-copying targets (opencode/cursor/codex) forked the skill into tool-specific dirs that drifted from canonical and were silently broken in the published package, while the claude target just wrapped claude plugin install. Skill is now installed via the plugin or referenced directly from node_modules.
1 parent 5041dac commit 41a047e

9 files changed

Lines changed: 47 additions & 183 deletions

File tree

.bumpy/skill-distribution.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@varlock/bumpy': patch
3+
---
4+
5+
Streamline agent skill distribution and remove the `bumpy ai` command.
6+
7+
The canonical `add-change` skill now lives at the repo root (`skills/`) as a single source of truth and is synced into the package on `build`/`prepack` (gitignored copy), so it ships version-pinned in the npm tarball and via the Claude Code plugin (`claude plugin install @varlock/bumpy`).
8+
9+
The `bumpy ai setup` command has been removed. Its file-copying targets (`opencode`, `cursor`, `codex`) duplicated the skill into tool-specific directories that drifted from the canonical copy — and had silently been broken in the published package — while the `claude` target was a thin wrapper around `claude plugin install`. Install the skill via the Claude Code plugin, or reference the bundled `SKILL.md` directly from `node_modules/@varlock/bumpy/skills/add-change/SKILL.md`.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,16 @@ bumpy publish # pack and publish, create git tags, push tags, and create GitHu
102102

103103
## AI Integration
104104

105-
Bumpy ships with an AI skill that teaches LLMs how to create bump files.
105+
Bumpy ships with an [agent skill](https://github.com/dmno-dev/bumpy/blob/main/skills/add-change/SKILL.md) that teaches LLMs how to create bump files.
106+
107+
For Claude Code, install it as a plugin:
106108

107109
```bash
108-
bumpy ai setup --target claude # installs Claude Code plugin
109-
bumpy ai setup --target opencode # creates OpenCode command file
110-
bumpy ai setup --target cursor # creates Cursor rule file
111-
bumpy ai setup --target codex # creates Codex instruction file
110+
claude plugin install @varlock/bumpy
112111
```
113112

113+
The skill is also bundled in the published npm package, so once bumpy is installed it lives at `node_modules/@varlock/bumpy/skills/add-change/SKILL.md` — version-pinned to your installed bumpy. Agents and tools that support the [SKILL.md](https://github.com/dmno-dev/bumpy/blob/main/skills/add-change/SKILL.md) format can reference it directly.
114+
114115
The skill teaches the AI to examine git changes, identify affected packages, choose bump levels, and create bump files with `bumpy add`. It also instructs the AI to keep existing bump files up to date as work continues on a branch - updating packages, bump levels, and summaries to reflect the final state of changes.
115116

116117
## Documentation

docs/cli.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -263,20 +263,3 @@ Interactive guide to set up `BUMPY_GH_TOKEN` for CI. Walks through creating a fi
263263
```bash
264264
bumpy ci setup
265265
```
266-
267-
## `bumpy ai setup`
268-
269-
Install an AI skill for creating bump files in supported coding tools.
270-
271-
```bash
272-
bumpy ai setup --target claude
273-
bumpy ai setup --target opencode
274-
bumpy ai setup --target cursor
275-
bumpy ai setup --target codex
276-
```
277-
278-
| Flag | Description |
279-
| ----------------- | ------------------------------------------ |
280-
| `--target <tool>` | `claude`, `opencode`, `cursor`, or `codex` |
281-
282-
For Claude Code, this runs `claude plugin install @varlock/bumpy` under the hood. For other targets, it copies a command/rule file into your project.

packages/bumpy/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist
2+
skills

packages/bumpy/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
}
3737
},
3838
"scripts": {
39-
"build": "tsdown",
40-
"prepack": "cp ../../README.md .",
39+
"build": "bun run scripts/sync-skill.ts && tsdown",
40+
"prepack": "bun run scripts/sync-skill.ts && cp ../../README.md .",
41+
"sync-skill": "bun run scripts/sync-skill.ts",
4142
"check": "bun run tsc --noEmit",
4243
"test": "bun test"
4344
},
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copies the canonical agent skill from the repo root (`skills/`) into this
3+
* package so it ships inside the published npm tarball. The skill then travels
4+
* with the installed bumpy version, letting agents discover version-pinned
5+
* guidance straight from `node_modules` (no separate install / registry).
6+
*
7+
* The canonical copy lives at the repo root so a single source of truth feeds
8+
* both the npm bundle and any future discovery endpoints. This package copy is
9+
* a generated artifact (gitignored) and is regenerated on every `build` /
10+
* `prepack` / publish. It is also what the Claude Code plugin manifest
11+
* (`.claude-plugin/plugin.json`) ships to agents.
12+
*/
13+
import { existsSync, rmSync, cpSync } from 'node:fs';
14+
import { resolve } from 'node:path';
15+
16+
const PKG_DIR = resolve(import.meta.dir, '..');
17+
const SRC = resolve(PKG_DIR, '../../skills');
18+
const DEST = resolve(PKG_DIR, 'skills');
19+
20+
if (!existsSync(SRC)) {
21+
throw new Error(`[sync-skill] canonical skills dir not found at ${SRC}`);
22+
}
23+
24+
rmSync(DEST, { recursive: true, force: true });
25+
cpSync(SRC, DEST, { recursive: true });
26+
27+
console.log(`[sync-skill] copied ${SRC} -> ${DEST}`);

packages/bumpy/src/cli.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,6 @@ async function main() {
162162
break;
163163
}
164164

165-
case 'ai': {
166-
const rootDir = await findRoot();
167-
const subcommand = args[1];
168-
const aiFlags = parseFlags(args.slice(2));
169-
170-
if (subcommand === 'setup') {
171-
const { aiSetupCommand } = await import('./commands/ai.ts');
172-
await aiSetupCommand(rootDir, {
173-
target: aiFlags.target as string | undefined,
174-
});
175-
} else {
176-
log.error(`Unknown ai subcommand: ${subcommand}. Use "ai setup".`);
177-
process.exit(1);
178-
}
179-
break;
180-
}
181-
182165
case '--version':
183166
case '-v':
184167
console.log(`bumpy ${__BUMPY_VERSION__}`);
@@ -228,7 +211,6 @@ function printHelp() {
228211
ci plan Report what ci release would do (JSON + GitHub Actions outputs)
229212
ci release Release — create version PR or auto-publish
230213
ci setup Set up a token for triggering CI on version PRs
231-
ai setup Install AI skill for creating bump files
232214
233215
Add options:
234216
--packages <list> Package bumps (e.g., "pkg-a:minor,pkg-b:patch")
@@ -271,9 +253,6 @@ function printHelp() {
271253
--tag <tag> npm dist-tag for auto-publish
272254
--branch <name> Branch name for version PR (default: bumpy/version-packages)
273255
274-
AI setup options:
275-
--target <tool> Target AI tool: claude, opencode, cursor, codex
276-
277256
${colorize('https://bumpy.varlock.dev', 'dim')}
278257
`);
279258
}

packages/bumpy/src/commands/ai.ts

Lines changed: 0 additions & 138 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)