#!/usr/bin/env bash # SessionStart hook: surface PROGRESS.md and PLAN.md so any agent can pick up work. set -e ctx="" for f in PROGRESS.md PLAN.md; do if [ -f "$f" ]; then ctx="${ctx} === $f === $(head -80 "$f")" else ctx="${ctx} === $f === (missing — run /handoff to bootstrap)" fi done # Emit JSON so Claude Code adds it as additionalContext. jq -n --arg c "$ctx" '{ hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: $c } }'