#!/usr/bin/env bash set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" required=( "VERSION" "docs/10_ARCHITECTURE_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_CN.md" "docs/11_USER_REQUIREMENTS_V1R1C0_CN.md" "docs/12_INTERFACE_API_SPEC_V1R1C0_CN.md" "docs/CODEX_FULL_EXECUTION_PROMPT_V1R1C0.md" "active-runtime/app/aios_gitops_model_api.py" "active-runtime/app/aios_chatgpt_actions_api.py" "docs/gitops/openapi-chatgpt-actions.yaml" "migrations/004_gitops_custom_llm_runtime.sql" "scripts/install_v1r1c0_gitops_model_overlay.sh" "config/model_registry.yaml" "config/runtime_selector.yaml" ) for f in "${required[@]}"; do test -f "$ROOT/$f" || { echo "MISSING $f"; exit 1; }; done grep -Eq "^V1R1C[0-9]+$" "$ROOT/VERSION" python3 -m py_compile \ "$ROOT/active-runtime/app/aios_gitops_model_api.py" \ "$ROOT/active-runtime/app/aios_chatgpt_actions_api.py" \ "$ROOT/adapters/openclaw/openclaw_gitops_commands.py" \ "$ROOT/adapters/hermes/hermes_gitops_nl_router.py" grep -q "/api/branch" "$ROOT/docs/gitops/openapi-chatgpt-actions.yaml" echo "PACKAGE_CONTRACT_OK $(cat "$ROOT/VERSION")"