Skip to content

feat: plugin ships commands + skill only, not hooks#122

Merged
ikeikeikeike merged 1 commit into
mainfrom
feat/plugin-commands-skills-only
Jul 16, 2026
Merged

feat: plugin ships commands + skill only, not hooks#122
ikeikeikeike merged 1 commit into
mainfrom
feat/plugin-commands-skills-only

Conversation

@ikeikeikeike

Copy link
Copy Markdown
Member

A Claude Code plugin installs at user scope by default, so bundling the observe/inject hook dispatcher (hooks/hooks.json) made it fire in every repo — double-recording and injecting an unwanted instinct block in any repo already running its own learning loop. Commands and the using-bough skill are inert until invoked, so they are safe user-scoped; hooks are not.

Drop hooks/hooks.json and its drift test from the plugin. Observation stays wired by the CLI, scoped to the project the operator chooses:

bough hook install --scope project|user

Also removes the now-obsolete "plugin double-fires / run bough hook uninstall" heads-up from bough doctor (the plugin no longer carries hooks, so the note was misleading).

verify result
isolated claude plugin install bough@bough Skills (12) + Hooks (0) (was 8); ~/.claude untouched
go build / golangci-lint ./internal/hooks/ OK / 0 issues
unit suite (internal/ cmd/ pkg/) 21 ok / 0 FAIL
claude plugin validate passes (version-omitted warning only)

Test TestDoctorRender_PluginDoubleWireNoteTestDoctorRender_NoPluginDoubleWireNote (regression guard: the obsolete note must not come back). Docs (README, docs/PLUGIN_CLAUDE_CODE.md, using-bough SKILL) updated to the "install the plugin anywhere / observe only where you bough hook install" model.

A Claude Code plugin installs at user scope by default, so bundling the
observe/inject hook dispatcher (hooks/hooks.json) made it fire in every repo —
double-recording and injecting an unwanted instinct block in any repo already
running its own learning loop. Commands and the using-bough skill are inert
until invoked, so they are safe user-scoped; hooks are not.

Drop hooks/hooks.json and its drift test (internal/hooks/plugin_sync_test.go)
from the plugin. Observation stays wired by the CLI, scoped to the project the
operator chooses: `bough hook install --scope project|user`. Remove the now-
obsolete "plugin double-fires / run bough hook uninstall" heads-up from
`bough doctor` (the plugin no longer carries hooks, so the note was misleading).

Verified: isolated `claude plugin install bough@bough` now reports Skills (12) +
Hooks (0); full unit suite green.

Docs (README, docs/PLUGIN_CLAUDE_CODE.md, using-bough SKILL) updated to the
"install the plugin anywhere / observe only where you `bough hook install`"
model.
@ikeikeikeike
ikeikeikeike force-pushed the feat/plugin-commands-skills-only branch from 9c70c73 to 82fbdd4 Compare July 16, 2026 17:52
@ikeikeikeike
ikeikeikeike merged commit f8418e8 into main Jul 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant