feat: drop the kettle plugin; the binary writes its own skills

The plugin and the binary shipped on two release cadences and nothing on an
operator's machine ever checked that the one they installed described the other.
The generated flag block existed precisely so a renamed flag could not ship with
documentation recommending the old one — and then shipped one version behind the
registry it came from, which is the same bug one hop downstream.

So the prose moved into the binary. `internal/scaffold` embeds every document;
`kettle init` and `kettle gen scaffold` write them into a project's own
`.claude/`. The two cannot disagree because there is one artefact.

The namespace survived the move. A project's skills are flat, so the prefix is
spelled into the directory name (`kettle-issue`); a project's *commands* take
their namespace from a subdirectory, so `commands/kettle/init.md` is still
`/kettle:init`. Four of the six command files are thin pointers at a skill, and
that is what kept ~1,600 lines of `/kettle:…` cross-references true without a
rewrite. `init` and `auth` lost `disable-model-invocation: true` — being a
command is that property — and `auth` now restricts `allowed-tools` so a model
cannot reach `kettle auth add` at all.

`gen scaffold` writes files whole rather than splicing a region. The old
refusal protected somebody's hand-written prose around the block; that prose is
embedded now, so there is none to protect, and preserving local edits would
freeze a project's documentation at whatever version first initialized it.
`--check` warns before an upgrade discards one.

The plugin's `agents-sync.sh` — 141 lines of Python behind a filename that said
`.sh` — became `internal/mirror` and `kettle mirror`. Same seven branches, same
refusal to merge two real files that differ, now with a table test per branch
and a check that a repair converges in one pass. `--hook` is the PreToolUse
form and exits 0 on every path including a panic. It is opt-in per project,
which is strictly narrower than the plugin hook that was on for everybody who
installed it.

`kettle init --interactive` walks a person through the login, the token (read
with the echo off, so it lands in no history and no file), the repository, the
`.claude/` tree and the mirror hook. It refuses a stdin that is not a terminal
and names the flags instead: every question it asks has one, and it performs
nothing itself, so an interactive run and a flag run are one code path.

Two rules that used to be prose are now the binary's: init refuses a linked
worktree and names the main checkout, and writing into an existing
`.claude/settings.json` is refused with the snippet printed rather than
reformatting a file the operator commits.

The scaffold version stamp went to its own `.kettle/scaffold.yaml` rather than
into `config.yaml`, because unknown keys there are a hard error and that file
may be committed and read by whatever build each machine has.

golang.org/x/term becomes a direct dependency; it was already in the tree
indirectly, so no module was added.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
naudachu
2026-08-12 16:17:24 +05:00
parent f18a633185
commit 8b1b11001a
445 changed files with 231172 additions and 1339 deletions
+15 -11
View File
@@ -15,17 +15,19 @@
SHELL := /bin/sh
# Sequential on purpose: `check` builds the binary and then asks it whether the
# plugin's documentation still matches, and -j would let the second start first.
# documents embedded in it still match its own command registry, and -j would
# let the second start first.
.NOTPARALLEL:
MODULE := git.noodles.cam/claude-skills/marketplace/cli
SKILLS := ../plugins/kettle/skills
ASSETS := internal/scaffold/assets
DIST := dist
BIN := $(DIST)/kettle
REMOTE ?= origin
# Where `make install` puts the binary. The plugin's skills expect `kettle` on
# PATH and say so when it is not; override for a Go-style layout:
# Where `make install` puts the binary. Everything kettle writes into a project
# expects `kettle` on PATH and says so when it is not; override for a Go-style
# layout:
# make install BINDIR=$(go env GOPATH)/bin
BINDIR ?= $(HOME)/.local/bin
@@ -99,13 +101,15 @@ build:
@go build -trimpath -ldflags '$(LDFLAGS)' -o $(BIN) ./cmd/kettle
@echo 'build $(BIN) — $(VERSION)'
# The documentation invariant: everything the plugin's SKILL.md files say about
# a kettle command is generated from the registry the binary is built from, and
# this exits 1 the moment the two disagree. Run `kettle gen skills --out …`
# without --check to fix it.
# The documentation invariant, and it is circular on purpose. The documents an
# operator gets are embedded in the binary, and the flag tables inside them are
# rendered from the registry that same binary is built from — so the embedded
# copy has to already hold what the current registry would produce. This exits 1
# the moment it does not; `$(BIN) gen scaffold --out $(ASSETS)` fixes it, and
# then the binary has to be rebuilt to pick the new bytes up.
gen-check: build
@echo 'docs gen skills --check'
@$(BIN) gen skills --out $(SKILLS) --check
@echo 'docs gen scaffold --check'
@$(BIN) gen scaffold --out $(ASSETS) --check
# ---------------------------------------------------------------------------
# building for other people
@@ -117,7 +121,7 @@ install:
@echo 'installed $(BINDIR)/kettle — $(VERSION)'
@case ":$$PATH:" in \
*":$(BINDIR):"*) ;; \
*) echo "note: $(BINDIR) is not on your PATH, so the plugin's skills will not find it" ;; \
*) echo "note: $(BINDIR) is not on your PATH, so nothing kettle writes will find it" ;; \
esac
# CGO_ENABLED=0 because these binaries are downloaded by people whose machines