Commit 940350d
committed
feat(rules): add 5 anti-foot-shoot block rules (Tier 1)
Adds a new rule family - Anti foot-shoot (Tier 1) - covering the high-cost
mistakes the team has already paid for. Each rule maps 1:1 to a feedback
memory whose intent is "never do this", and ships a bypass marker for
the rare cases where the action is intentional.
The 5 new rules:
| Rule | Action | Tool | Memory |
|---|---|---|---|
| block-playwright-headless | block | Bash | feedback_no_headless.md |
| block-git-force-push-no-lease | block | Bash | feedback_resolve_merge_conflicts.md |
| block-git-rebase-skip | block | Bash | feedback_resolve_merge_conflicts.md |
| block-standup-not-in-escritorio | block | Edit/Write/MultiEdit | feedback_standup_desktop.md |
| block-goodnight-not-in-escritorio | block | Edit/Write/MultiEdit | feedback_goodnight_desktop.md |
Coverage notes:
- block-playwright-headless: matches `playwright test` (npx, pnpm, yarn,
bare) and requires --headed / --ui / --debug on the same line.
- block-git-force-push-no-lease: positive match on `-f` or `--force` plus
defense-in-depth negative match on `--force-with-lease` for
pathological orderings like `git push -f --force-with-lease`.
- block-git-rebase-skip: matches `git rebase --skip` exactly; --continue
and --abort are unaffected.
- block-{standup,goodnight}-not-in-escritorio: pattern + not_pattern on
the same file_path field. Both `~/Escritorio` (Spanish locale) and
`~/Desktop` (English / aliasing) are accepted.
Tests: 99 -> 128 passing (+29 new). Each rule covers positive matches,
negative matches, and bypass behavior.
Version bump: 1.8.0 -> 1.9.0 in package.json, plugin.json, and
marketplace.json (top-level + nested plugin entry).1 parent 1886a3b commit 940350d
9 files changed
Lines changed: 829 additions & 4 deletions
File tree
- .claude-plugin
- hooks/rules
- openspec/changes/2026-05-hooks-tier-1-foot-shoot-prevention
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
164 | 179 | | |
165 | 180 | | |
166 | 181 | | |
| |||
0 commit comments