Repository navigation
Description
Context
The hook-enablement convention (docs/contracts/hook-enablement/README.md, added by the pull request that refs this issue) requires every hook a plugin ships to have its own <name>_enabled on/off setting, at the user layer (userConfig) and the repository layer (docs/conventions/<plugin>.yaml), read by the hook's own script. Claude Code has no per-hook off switch, so without the setting an operator who wants one hook off must disable the whole plugin or every hook.
Of the 31 plugins under plugins/ that ship hooks/hooks.json, these 11 declare no *_enabled option in .claude-plugin/plugin.json:
- animation
- context-budget
- discovery
- display-redaction
- explainer-video
- multi-agent
- playwright
- plugin-profiles
- speech
- themes
- toolchain
Count from a script over plugins/*/hooks/hooks.json and each plugin's userConfig keys, run on main at 3b46e0b (2026-11-24).
Proposed work
For each plugin listed, one change per plugin:
- Add one boolean
<name>_enableduserConfigoption per hook it ships, with the default the convention's "The per-hook setting" section describes and the title textplugin-option-namingsets. - Make each hook's script resolve the plugin default, the user layer and the repository layer before doing any work, in the convention's precedence, and exit quietly when the result is off.
- Document the key in the plugin's config reference and repository-layer schema.
Acceptance criteria
Precedence follows the owner decision of 2026-11-24 recorded in ADR 0131: the user's explicit value wins for that user, and the repository value is the default for everyone who has not set their own.
- Each of the 11 plugins declares a
<name>_enabledoption for every hook in itshooks/hooks.json. - With the option set to
falseat the user layer, each hook does nothing, whateverdocs/conventions/<plugin>.yamlsays; with the user layer unset andfalseindocs/conventions/<plugin>.yaml, it does nothing; with the user layer unset andtruethere, it runs. - A test per hook covers those three cases.
- Rerunning the count script lists no plugin.
References
- Convention:
docs/contracts/hook-enablement/README.md - Decision:
docs/adr/0131-give-every-hook-its-own-on-off-setting-at-the-user-and-repository-layers.md - Hooks page, "Disable or remove hooks": https://code.claude.com/docs/en/hooks#disable-or-remove-hooks
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 24, 2026
Size: Large
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Blast radius: hook scripts, plugin.json userConfig and config docs across about 31 plugins, plus one shared helper and a count-script check; read by every operator who runs those plugins.
Reversible: yes; each per-plugin change is a separate revert.
Claims checked:
docs/contracts/hook-enablement/README.md: held, file present.docs/adr/0131-give-every-hook-its-own-on-off-setting-at-the-user-and-repository-layers.md.--run-if-unset-or-true BASH_FORMAT_ENABLED: held,plugins/bash-format/hooks/hooks.json:13.Open questions: none
Decision recorded by the owner, and it settles every open question:
#18921 (comment)
Per that decision, this issue is the tracking parent. The shared helper and the per-plugin children are filed as separate issues, and this one holds no acceptance criteria of its own.
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 24, 2026
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).kyle-sexton commentedon Nov 24, 2026
Scope addition found while writing the contract in #18924: the 20 hook plugins that already have an
*_enabledsetting read only the user layer, and some exit early on it, so they do not yet follow the contract's rule that the hook resolves every layer before deciding.Examples:
plugins/bash-format/hooks/hooks.jsonlaunches through--run-if-unset-or-true BASH_FORMAT_ENABLED.plugins/session-flow/hooks/observer-arm.sh:33exits on the environment value alone.The retrofit therefore covers two groups: the 11 plugins listed above (no setting at all), and the 20 plugins whose existing setting must also read the repository layer.
melodic-automation-lanes commentedon Nov 24, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Each of the 11 plugins gets a per-hook
<name>_enabledoption, resolved in the hook script across plugin default, user layer and repository layer, documented and tested, once the convention is merged.Dependencies
Open questions
RECOMMENDED: Hold this issue until the convention pull request merges, then re-run refinement. Basis: docs/contracts/ has no hook-enablement directory (Glob found none)
RECOMMENDED: Yes, split into 11 per-plugin issues, each with its own task list of criteria, and keep this one as the tracking parent. Basis: judgment
RECOMMENDED: Reuse the existing shared hook helper or config-cascade resolution if one exists, and state it in the convention; otherwise add one shared helper first. Basis: docs/contracts/config-cascade/README.md
RECOMMENDED: Commit the count script as a check, for example a test that compares plugins/*/hooks/hooks.json hooks with plugin.json userConfig keys, and make it the acceptance check. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 25, 2026
Decision recorded. Split this work into one issue per plugin, with this issue as the tracking parent. Build one shared layer-resolution helper first, and commit the count script as the acceptance check.
Owner, in session 2026-11-25 ~8:21 AM EST, verbatim: "/session-flow:go-with-recommendations", accepting "(A) split into one issue per plugin under #18921 as tracking parent; one shared layer-resolution helper built first; the count script committed as the acceptance check".
What this settles from the refinement:
docs/contracts/hook-enablement/README.mdis onmain, so the work no longer waits on it.This issue tracks the children and holds no acceptance criteria of its own.