|
1 | 1 | ## Context |
2 | 2 |
|
3 | | -The `cli/` directory contains a React + Ink terminal UI (`plugin-kit`) for interactive plugin installation. It was the only way to install plugins before Claude Code added native `--plugin-dir` and marketplace support. The CLI is now unused but still referenced in workspaces, CI, README, and project docs. |
4 | | - |
5 | | -The `cli/scripts/validate-plugin.ts` script is independently useful — it validates `plugin.json` manifests in CI — and must be preserved. |
| 3 | +The `cli/` directory has been removed (phase 1 complete). However, the CI `check` job now fails because `bun run --filter '*' build` finds no matching workspaces. More broadly, the entire Node.js/Bun toolchain is dead weight — no plugins use node/bun, and the validate script checks for `plugin.json` at the plugin root which no longer exists. Plugins now store metadata at `.claude-plugin/plugin.json`. |
6 | 4 |
|
7 | 5 | ## Goals / Non-Goals |
8 | 6 |
|
9 | 7 | **Goals:** |
10 | 8 |
|
11 | | -- Remove all CLI installer code and its dependencies |
12 | | -- Preserve the plugin validation script for CI use |
13 | | -- Clean up all references to the CLI across project files |
| 9 | +- Fix the CI build failure |
| 10 | +- Remove all Node.js/Bun toolchain files (`package.json`, `bun.lock`, `lefthook.yml`, `node_modules/`) |
| 11 | +- Replace the TypeScript validation script with a shell script that validates `.claude-plugin/plugin.json` |
| 12 | +- Update documentation to reflect the current plugin structure |
14 | 13 |
|
15 | 14 | **Non-Goals:** |
16 | 15 |
|
17 | 16 | - Changing any plugin structure or marketplace behavior |
18 | | -- Modifying the validation logic itself |
19 | | -- Removing CLI-related dependencies from root `package.json` (only workspace removal) |
| 17 | +- Adding new CI checks beyond plugin validation |
20 | 18 |
|
21 | 19 | ## Decisions |
22 | 20 |
|
23 | | -### Inline the Zod schema into validate-plugin.ts |
| 21 | +### Replace validate-plugin.ts with shell script |
| 22 | + |
| 23 | +The TypeScript validation script requires Bun and Zod. Since we're removing the entire Node.js toolchain, rewrite it as `scripts/validate-plugin.sh` using `jq` (pre-installed on Ubuntu CI runners). The new script validates `.claude-plugin/plugin.json` instead of root `plugin.json`. |
| 24 | + |
| 25 | +**Alternative**: Keep Bun just for the validate script. Rejected because maintaining an entire runtime for one small script is excessive. |
24 | 26 |
|
25 | | -The validate script imports `PluginManifestSchema` from `cli/src/types/plugin.ts`. Rather than keeping a separate types file, inline the schema directly into `scripts/validate-plugin.ts`. The schema is small (~15 lines) and the validate script is its only remaining consumer. |
| 27 | +### Remove the check CI job entirely |
26 | 28 |
|
27 | | -**Alternative**: Create `scripts/types/plugin.ts` as a separate file. Rejected because it adds unnecessary file structure for a single small schema. |
| 29 | +The `check` job ran `build`, `typecheck`, and `test` — all delegating to workspaces via `--filter '*'`. No workspaces exist anymore. Remove the job entirely rather than trying to make it work. |
28 | 30 |
|
29 | | -### Delete cli/ entirely before relocating |
| 31 | +### Remove lefthook pre-commit hooks |
30 | 32 |
|
31 | | -Delete the entire `cli/` directory first, then create the new `scripts/validate-plugin.ts` with inlined schema. This is cleaner than a partial move. |
| 33 | +The lefthook hooks only trigger on `plugins/*/scripts/**/*.{ts,js}` files which no longer exist. Remove `lefthook.yml` entirely. |
32 | 34 |
|
33 | 35 | ## Risks / Trade-offs |
34 | 36 |
|
35 | | -- [Removing install method] → Users who relied on `plugin-kit` CLI lose that path. Mitigated by `--plugin-dir` and marketplace being strictly better alternatives. |
36 | | -- [CI breakage during transition] → If CI runs between deleting `cli/` and updating the workflow path. Mitigated by making all changes in a single commit. |
| 37 | +- [No pre-commit hooks] → Losing lint/format checks on commit. Acceptable because no JS/TS plugin code exists to lint. |
| 38 | +- [jq dependency in CI] → `jq` is pre-installed on GitHub Actions ubuntu runners, so no additional setup needed. |
0 commit comments