#!/usr/bin/env bash # .agent/validate.sh — validation gate for the phased-execution pipeline. # # A phase is only moved to .agent/phases/complete/ if this script exits 0. # Adapt the checks below to this project's real test suite, linter, and # coverage floor, then commit the result. set -uo pipefail rc=0 if [[ -f pyproject.toml || -f pytest.ini || -f setup.py ]]; then python3 -m pytest -q || rc=1 if command -v ruff >/dev/null 2>&1; then ruff check . || rc=1 fi fi if [[ -f package.json ]]; then npm test --silent || rc=1 fi if [[ $rc -ne 0 ]]; then echo "validation FAILED (see output above)" fi exit "$rc"