share .pql/hooks/ across clones

The pql plan auto-export (pre-commit) and auto-import (post-merge)
hooks were previously gitignored as part of `.pql/*`. Allowing the
hooks directory to be committed means a fresh clone gets the
planning-state sync without needing to run `pql init` first — pql
plan snapshots stay current on push and absorb changes on pull
the same way for every contributor.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 17:18:24 +02:00
co-authored by Claude
parent 6601056972
commit 4242cdc490
4 changed files with 289 additions and 194 deletions
+3
View File
@@ -98,3 +98,6 @@ legacy/**/.coverage.*
# frame0-wireframe local ID ↔ Frame0 ID mapping; per-machine state.
*.idmap.json
.pql/*
!.pql/pql-plan.json
!.pql/hooks/
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# --- pql plan import ---
# Auto-installed by pql init. Imports planning state when the
# snapshot file changes on pull/merge. Safe no-op if pql is absent.
if command -v pql >/dev/null 2>&1; then
changed=$(git diff-tree -r --name-only ORIG_HEAD HEAD -- .pql/pql-plan.json 2>/dev/null)
if [ -n "$changed" ]; then
pql plan import 2>/dev/null
fi
fi
# --- end pql ---
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# --- pql plan export ---
# Auto-installed by pql init. Exports planning state so it's
# committed alongside code changes. Safe no-op if pql is absent.
if command -v pql >/dev/null 2>&1; then
pql plan export 2>/dev/null
if ! git diff --quiet -- .pql/pql-plan.json 2>/dev/null; then
git add .pql/pql-plan.json
fi
fi
# --- end pql ---
+264 -194
View File
File diff suppressed because it is too large Load Diff