#!/usr/bin/env bash # Install the G.U.I.D.E. git hooks (SPEC.md §4). Idempotent — run anytime. set -euo pipefail ROOT="$(git rev-parse --show-toplevel)" SRC="$ROOT/scripts/hooks/pre-commit" DST="$ROOT/.git/hooks/pre-commit" if [ ! -f "$SRC" ]; then echo "❌ $SRC not found." >&2 exit 1 fi cp "$SRC" "$DST" chmod +x "$DST" echo "✅ Installed pre-commit hook → $DST" echo " It runs tests/test_sanity.py and blocks commits if they fail."