#!/usr/bin/env bash
# agent-claude - launch Claude Code from the repo's committed config only.
#   user + local settings files, CLAUDE.local.md and user-level instructions are not read (--setting-sources project);
#   MCP servers come only from the committed .mcp.json (--strict-mcp-config);
#   auto memory is off so per-machine "learned" notes don't steer reviews.
set -euo pipefail
top=$(git rev-parse --show-toplevel)
python3 "$top/agent/agentfp.py" "$top" --check "$top/agent/fleet-baseline.json" >&2 || {
  echo "agent-claude: refusing to start on a drifted machine (see above)" >&2; exit 3; }
export CLAUDE_CODE_DISABLE_AUTO_MEMORY=1
exec claude --setting-sources project --strict-mcp-config --mcp-config "$top/.mcp.json" "$@"
