destructive-ops-blocker-false-positive-on-backup-suffixes
Regex pattern \b(rm|mv)\s+.*MEMORY\.md\b incorrectly blocks rm MEMORY.md.bak.123 because . is a non-word character and the word boundary matches mid-filename. It also matches rm inside quoted strings like echo "rm MEMORY.md". Fix: use CMD_START anchor (?:^|[;&|\(]\s*)to require command position, and NOT_BACKUP anchor(?![.\w])` to prevent matching filename prefixes.
Related
- brainstorming-hardgate-blocks-stop-hook-creating-loop
- docker
- spec-reviewer-blocks-on-os-system-in-test-code
- brainstorm-stop-hook-deadlock-on-blocked-user-input
- brainstorm-hard-gate-blocks-stop-hook-until-writing-plans-in
- destructive-hook-regex-word-boundary-backup-false-positive
- destructive-hook-regex-matches-rm-inside-echo-strings
- hook-regex-false-positives-require-cmd-start-not-backup-anch
- hook-regex-cmd-start-not-backup-anchors-required
- hook-regex-word-boundary-false-positives-on-backups
- hook-regex-false-positives-cmd-start-not-backup-anchors
- session-close-phase-1-6-disposition-is-not-resolution