utils/scripts/check_agent_ready.sh
Krzysztof kuhy Rudnicki a0fb279b1b agent_ready: AgentReady v2.0 checker + repo_contract web-site gate
New agent_ready/ package (dist and live-url modes, 100% branch coverage)
checks robots, sitemap, llms.txt, ai-catalog, 404, no-JS text, markdown
mirrors and JSON-LD. repo_contract gains web-repo detection and installs the
agent-ready pre-commit hook, CI workflow and check_agent_ready.sh shim;
scripts/check_agent_ready.sh is the shared entry point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBScELfMUiieK9ManFbS3Y
2026-10-22 21:18:49 +02:00

28 lines
997 B
Bash
Executable File

#!/bin/bash
# ============================================================================
# Fail if the current repo's website fails the AgentReady checker.
#
# Reads [agent_ready] from repo-contract.toml (dist = build dir, url = live
# site, skip = not a website), runs the build, then agent_ready/check.sh.
# See repo_contract/web.py and agent_ready/README.md.
#
# This is the REAL gate. Per-repo scripts/check_agent_ready.sh files are thin
# shims that exec this one -- do not overwrite this file with a shim.
#
# Usage: scripts/check_agent_ready.sh [--repo PATH] [--strict] [--install]
# Exit: 0 pass | 1 FAIL | 2 bad config | 3 undeterminable (--strict only)
# ============================================================================
set -euo pipefail
UTILS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
readonly UTILS_ROOT
main() {
PYTHONPATH="$UTILS_ROOT${PYTHONPATH:+:$PYTHONPATH}" \
python3 "$UTILS_ROOT/repo_contract/agent_ready_gate.py" "$@"
}
main "$@"