#!/usr/bin/env bash
# Gate hook — runs on Stop / SubagentStop to give fast feedback (non-blocking by default).
# Tune the commands below to this project's stack. Exit 2 would FORCE Claude to keep working
# (hard gate); the default here is informational (exit 0) so it never traps the agent — real
# gating is the reviewer agent + CI (see CONSTITUTION.md Law 11 / §9).
set -uo pipefail
cd "${CLAUDE_PROJECT_DIR:-.}" || exit 0

# --- build (rebind to your stack) ---
# dotnet build || { echo "BUILD FAILED" >&2; exit 0; }   # exit 2 to hard-block

# --- quick tests (keep fast; full suite runs in CI) ---
# dotnet test --filter "Category!=e2e" || { echo "TESTS FAILED" >&2; exit 0; }

echo "verify: configure build/test commands in .claude/hooks/verify.sh"
exit 0
