#!/usr/bin/env bash # Warn (non-blocking) if .claude-sync/ is stale relative to current source files. REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)" if [ -z "${REPO_ROOT}" ]; then exit 0 fi cd "${REPO_ROOT}" SYNC_SCRIPT="scripts/sync-claude-docs.sh" if [ ! -f "${SYNC_SCRIPT}" ]; then exit 0 fi set +e bash "${SYNC_SCRIPT}" check >/dev/null 2>&1 rc=$? set -e if [ "${rc}" -ne 0 ]; then { printf '%s\n' "⚠️ .claude-sync/ is stale relative to current dev-docs." printf '%s\n' " Fix: bash scripts/sync-claude-docs.sh sync" printf '%s\n' " (push is NOT blocked)" } >&2 fi exit 0