aboutsummaryrefslogtreecommitdiff
path: root/.claude/settings.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-26 12:58:14 -0500
committerCraig Jennings <c@cjennings.net>2026-05-26 12:58:14 -0500
commit9bfb13aced68e9e0778f9d46b0eeb939cef05a30 (patch)
tree4309185cfc6d17b31ec9580cf07b31f216b6f5b3 /.claude/settings.json
parent7beb8d10451bd4c425bf71d22734a9cb1272f83c (diff)
downloadrulesets-9bfb13aced68e9e0778f9d46b0eeb939cef05a30.tar.gz
rulesets-9bfb13aced68e9e0778f9d46b0eeb939cef05a30.zip
feat(hooks): hard-deny the AskUserQuestion popup machine-wide
The no-popup-menus rule in interaction.md was too easy to forget, so the popup kept slipping back into choice prompts. I added a PreToolUse hook on AskUserQuestion that denies the call outright and returns the rule as the reason, which routes choices back to inline numbered lists. Since ~/.claude/settings.json symlinks to this repo's .claude/settings.json, the hook is machine-wide and version-controlled across machines. I documented it under the rule in interaction.md, including the consequence: the deny is unconditional, so the old "use the popup for this one" exception now needs the hook disabled via /hooks first.
Diffstat (limited to '.claude/settings.json')
-rw-r--r--.claude/settings.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/.claude/settings.json b/.claude/settings.json
index 0b81559..0f76d18 100644
--- a/.claude/settings.json
+++ b/.claude/settings.json
@@ -8,6 +8,17 @@
"defaultMode": "bypassPermissions"
},
"hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "AskUserQuestion",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Popup choice menus are disabled per interaction.md (No Popup Menus for Choices) — present options inline in chat as a numbered list and ask the user to reply with a number.\"}}'"
+ }
+ ]
+ }
+ ],
"PreCompact": [
{
"hooks": [