name: INV-AG3 Agent Tool Grants # Hard gate for INV-AG3 (docs/spec/X4-agents.md §2א): a subagent's `tools:` # frontmatter is a CLOSED allow-list, so any MCP tool an agent is TOLD to run — # by the backend delegation in web/, or by its own instructions — must appear # there. Built after analyze_protocol shipped without a grant (2026-06-30) and # the analyst was handed an issue instructing it to run a tool it could not # call (CMP-229, 2026-08-04). Pure-stdlib check (no venv) — fast, runs on every # PR and on push to main. on: pull_request: branches: [main] push: branches: [main] jobs: agent-tool-grants: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: INV-AG3 — agent tool-grant guard run: python3 scripts/agent_tool_grants_guard.py