Files
second-brain/.githooks/pre-commit
kiskaadee e5600c05ad feat(auto-push): add local git hooks for pre-commit validation and
autopush

- Add pre-commit hook to enforce structural validation before commit
- Add post-commit hook for resilient Gitea auto-push and offline
  tolerance
- Add scripts/install-hooks.sh to configure core.hooksPath
2026-09-09 17:15:45 -05:00

16 lines
417 B
Bash
Executable File

#!/usr/bin/env bash
set -u
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT"
echo "🔍 [pre-commit] Validating Brain structure..."
if python3 scripts/validate-brain.py; then
echo "✅ [pre-commit] Brain structure valid."
else
echo "❌ [pre-commit] Brain validation failed. Commit aborted."
echo "💡 [pre-commit] Fix structural issues or move uncurated drafts into inbox/."
exit 1
fi