# Scripts Repo-level helper scripts. ## Claude Project Knowledge sync Keeps the Crewli dev-docs in Claude Project Knowledge aligned with the repo. ### One-time setup ```bash bash scripts/install-claude-sync-hooks.sh ``` This points git at `.githooks/` and marks the hooks executable. ### Manual trigger ```bash npm run sync:docs # regenerate .claude-sync/ npm run sync:check # verify .claude-sync/ matches dev-docs ``` The underlying script also supports `list` and `help`: ```bash bash scripts/sync-claude-docs.sh list bash scripts/sync-claude-docs.sh help ``` ### Automatic - `post-commit`: syncs automatically when any file in `.claude-sync.conf` is committed - `pre-push`: warns if `.claude-sync/` is stale before pushing (non-blocking) ### After sync Upload everything in `.claude-sync/` (including `SYNC_MANIFEST.md`) to the Crewli Claude Project Knowledge, replacing existing versions. The manifest is what Claude Chat uses for drift detection against the current HEAD. ## Lefthook + Git-LFS pre-push smoke test ```bash bash scripts/test-lefthook-pre-push.sh ``` Builds a disposable sandbox, mirrors the repo's `lefthook.yml` + `.githooks/`, and runs a push to verify (a) push completes, (b) exactly one internal LFS invocation, (c) zero manual `git lfs pre-push` commands, (d) LFS upload happens. Run this after touching `lefthook.yml` or the LFS configuration. Background and what each failure mode signals: `dev-docs/ADR-LEFTHOOK-LFS-INTEGRATION.md`.