Files
gastown/internal/claude/config/settings-interactive.json
gastown/crew/max 77ac332a41 fix(hooks): add PreToolUse pr-workflow guard to settings templates
The gt tap guard pr-workflow command was added in 37f465bde but the
PreToolUse hooks were never added to the embedded settings templates.
This caused polecats to be created without the PR-blocking hooks,
allowing PR #833 to slip through despite the overlays having the hooks.

Adds the pr-workflow guard hooks to both settings-autonomous.json and
settings-interactive.json templates to block:
- gh pr create
- git checkout -b (feature branches)
- git switch -c (feature branches)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 20:26:43 -08:00

81 lines
1.8 KiB
JSON

{
"enabledPlugins": {
"beads@beads-marketplace": false
},
"hooks": {
"PreToolUse": [
{
"matcher": "Bash(gh pr create*)",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/.local/bin:$PATH\" && gt tap guard pr-workflow"
}
]
},
{
"matcher": "Bash(git checkout -b*)",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/.local/bin:$PATH\" && gt tap guard pr-workflow"
}
]
},
{
"matcher": "Bash(git switch -c*)",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/.local/bin:$PATH\" && gt tap guard pr-workflow"
}
]
}
],
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime && gt nudge deacon session-started"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt prime"
}
]
}
],
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt mail check --inject"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "export PATH=\"$HOME/go/bin:$HOME/bin:$PATH\" && gt costs record"
}
]
}
]
}
}