#!/usr/bin/env bash
set -euo pipefail

if ! command -v uv >/dev/null 2>&1; then
  echo "pre-commit blocked: uv is required to run docstring coverage checks." >&2
  exit 1
fi

echo "Running docstring coverage gates (overall >=80%, core modules ==100%)..."
uv run interrogate . \
  --quiet \
  --fail-under=80 \
  --exclude tests \
  --exclude scripts \
  --exclude dist \
  --exclude tmp \
  --exclude agvv/__init__.py \
  --exclude agvv/cli.py \
  --exclude agvv/orchestration/__init__.py \
  --exclude agvv/runtime/__init__.py \
  --exclude agvv/shared/__init__.py
uv run interrogate agvv/runtime agvv/orchestration agvv/shared \
  --quiet \
  --fail-under=100 \
  --exclude agvv/orchestration/__init__.py \
  --exclude agvv/runtime/__init__.py \
  --exclude agvv/shared/__init__.py
