Files
beads/cmd/bd/hooks_test.go
Steve Yegge 3050fd2ef8 feat(hooks): implement thin shim pattern (GH#615)
Replace full shell script hooks with thin shims that delegate to
'bd hooks run <hook-name>'. This eliminates hook version drift -
upgrading bd automatically updates hook behavior.

Changes:
- Add 'bd hooks run' subcommand with hook logic in Go
- Convert templates to minimal shims (~17 lines each)
- Shims use '# bd-shim v1' marker (format version, not bd version)
- Update version checking to recognize shim format
- Shims are never marked as "outdated"

Benefits:
- No more manual 'bd hooks install --force' after upgrades
- Hook logic always matches installed bd version
- Follows pattern used by husky, pre-commit, lefthook

Migration: Run 'bd hooks install --force' one final time.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 02:38:56 -08:00

9.0 KiB