#!/bin/bash
# PhaseOps post-checkout hook — seam for adapter-defined branch-switch behavior.
#
# By default this hook is a no-op. Adapters can layer their own behavior in via
# an overlay hook (e.g. `adapters/<id>/hooks/post-checkout`) wired by
# `phaseops init`. Examples of useful overlays:
#   - re-resolve symlinks the adapter manages on branch switch
#   - re-sync IDE context files (.cursor, .claude, .codex) for the new branch
#
# This script never blocks the checkout; every code path exits 0.

# Optional adapter hook (when present) runs as a fire-and-forget background.
if [ -f ".phaseops/hooks/post-checkout-local" ]; then
  bash ".phaseops/hooks/post-checkout-local" "$@" >/dev/null 2>&1 &
fi

exit 0
