Repository navigation
docs(contracts): require an on/off setting for every hook - #18924
Conversation
Add the hook-enablement contract: every Claude Code hook and git hook has its own <name>_enabled setting at the user and repository layers, beside plugin enable/disable and disableAllHooks. Record the decision as ADR 0131 and add the convention registry row. Refs: #18921 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vcupon7WnXmS7MsGbmijSY
A repository value can only turn a security guard on; only the user's own layer can turn it off. Owner decision in the handoff-improvements interview. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vcupon7WnXmS7MsGbmijSY
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
- Naming: keep <name>_enabled for userConfig options and convention-file keys, which always resolve to a declared default; a hook's own environment variable follows configuration-switch-naming. - Precedence: a set user value wins for that user, the repository value is the default for everyone else; declared as a config-cascade deviation. Security guards keep the policy-floor class. - Add a pointer page at docs/conventions/hook-enablement/README.md. - Reflect all three in ADR 0131. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vcupon7WnXmS7MsGbmijSY
|
claude-review reviewed Code review: PR #18924, changes since
|
|
claude-security-review reviewed Security review: PR #18924, incremental since
|
…-floor The owner's rule lets the user's own false turn a security guard off and stops only the repository from loosening it. That is the policy-floor class's repository half without its condition 2; say so in the contract, ADR 0131 and the config-cascade deviation instead of claiming the class. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Vcupon7WnXmS7MsGbmijSY
|
The pr-verify verifier failed head What it wrote (38 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
Refs: #18921
Summary
Claude Code has no per-hook off switch, so an operator who wants one hook off must disable the whole plugin or every hook. This adds the hook-enablement contract: every hook, Claude Code and git hooks alike, gets its own
<name>_enabledon/off setting at the user layer (userConfig) and the repository layer (docs/conventions/<plugin>.yaml), beside plugin enable/disable anddisableAllHooks.Owner decisions of 2026-11-24 are applied: the user's own value wins for that user and the repository value is the default for everyone else (a declared config-cascade deviation; security guards keep the policy-floor class),
<name>_enabledstays affirmative against the configuration-switch-naming standard, and the contract stays indocs/contracts/with a pointer page underdocs/conventions/.Owner decisions (2026-11-24, owner interview in the session that opened this PR), verbatim
Decision 3's parenthetical is the security-guard rule this PR states: the repository cannot turn a guard off, and the user's own
falsecan, a departure from the policy-floor class's condition 2 that the contract names. #18921's acceptance criteria were updated to this precedence.Fix
docs/contracts/hook-enablement/README.md: the three levels; the per-hook key (name, naming against configuration switch naming, default, layers, precedence, the config-cascade deviation, who reads it, security guards); how the setting reaches a Claude Code hook and a git hook; the "on/off setting" wording.docs/contracts/config-cascade/README.mdandCHANGELOG.md: the user-over-team order on per-hook keys listed under Declared deviations;contract_versionunchanged.docs/conventions/hook-enablement/README.md: pointer page in the shape ofdocs/conventions/hook-budget/README.md.docs/adr/0131-give-every-hook-its-own-on-off-setting-at-the-user-and-repository-layers.md: the decision, including precedence, naming and location, and the alternatives weighed.docs/plugin-philosophy.md: a convention registry row.Verification
scripts/check-affected.sh: 19 passed, 5 skipped.check-adr-numbers.sh --check,check-contract-clause-coverage.py,check-docs-naming.sh --check,check-line-citations.py,check-purged-em-dashes.sh,sync-config-cascade-semantics.py --check: all pass.lychee --offline --include-fragmentsover the five changed docs: 261 OK, 0 errors.plugins/*/hooks/hooks.jsonand eachuserConfigfound 31 hook plugins, 11 with no*_enabledoption.Left out: retrofitting the 11 plugins, which #18921 tracks.
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vcupon7WnXmS7MsGbmijSY