{"case_id": "dev-clean-01", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of triage-agent: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 270, "sha256": "17c5725afdd4b31d5b985fcb9e09dd1a8bf039d23bbdb9d09d85ca37be742979", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 247, "sha256": "1e833dbb3f2f8ce4c94950c61e015046ec39b4b31305e17c59e86b1c513f2394", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.vscode/ @umbrella/agents\n/.env.example @umbrella/agents\n/src/ @umbrella/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 708, "sha256": "8ab426c4bb9c592d74774ced5f3101e9a4a4908fc334c6cf99473477d1135d7c", "content": "# Continuous integration for triage-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1620, "sha256": "a7f3aedf61448e73c9ce4853d2aff9ef81e23ec7fbf197f8991f6778b1083e69", "content": "// MCP servers for the triage-agent workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/triage_agent\"\n ]\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 384, "sha256": "63d5e0ed480070f622227ed460832deaff4ef2591239beaad5525c6872342067", "content": "# triage-agent\n\ntriage-agent is an internal AI agent maintained by the umbrella agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11351, "sha256": "20b596dfcbfca626cd499a2c11e263b7a95f6319eb36d90f0039fde54cb94fcd", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-02", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "release-helper のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 346, "sha256": "c9ba3797b85aa9dfb1d40503de0110d6acc2b684473c0501855c6442b546a203", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 280, "sha256": "0aaab84a72f663a48bed075011cacbe30fd157b2f1673be06d77116c15317314", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.vscode/ @initech/ml-infra\n/.env.example @initech/ml-infra\n/src/ @initech/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1036, "sha256": "3517530dbab56b5137f47b8769064e86ade67ed22d111c3c68c0ca176d32fc03", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 746, "sha256": "448e482abd8ac974a63086764d40e218d69e7cca4a65088a23b57440cf780886", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/release-helper:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1389, "sha256": "f2bc676f23130196916ded439eb996887f40bcbefca0c31c85efc374f8846e4d", "content": "// release-helper ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"tavily\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${env:TAVILY_API_KEY}\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "2534399a81f762208ea1a52f695cc796ab89e2a77244449279cdecfbebc1ea67", "content": "# release-helper\n\nrelease-helper は initech の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11007, "sha256": "998ae04c22a483a9e79ded59865943a3b87fc6c15867ac9777d0df597515e8f7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-03", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of billing-concierge: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 267, "sha256": "468c5ddb61b77c9081a587a916202a1a13930a8cc0bd886122ff591c59401024", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 235, "sha256": "f4d9543e9495ec2691f0b28035620d76e7b1780f94abc2a1cb7952370dffa5e2", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @hooli/platform\n/.mcp.json @hooli/agents\n/.env.example @hooli/agents\n/src/ @hooli/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 863, "sha256": "b12915024ec313fa2d18e98a92acd6a6bde26fcdd56436a7bf9b4cb206cb2502", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 802, "sha256": "88992c9f54375fe13d245e393a1b7e76ae2ca6f26e76c0c30aa3395601d67fe6", "content": "# Deploys billing-concierge using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::031766236568:role/billing-concierge-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 968, "sha256": "d9fa406dee45bfab9b7115897029a2472eeab5eefe725b9f4c631b68ce856029", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0SN1JFAKL\",\n \"SLACK_CHANNEL_IDS\": \"C0SN1JFAKL\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "b11a52a59d86b9725dbeeb1ff0273c43ae72d1578cdfbe2d4f2682a9a3d43e82", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the hooli agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13986, "sha256": "1147656286b0e9c3a1a60b0018276b06af29cac3e8694880702c95e9e28a14c2", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::031766236568:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::031766236568:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-04", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "research-scout のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 650, "sha256": "e552a2e970d5a175e782a0c3f21acf33dd3c3f248ae69c5affbac31a1c74577d", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 280, "sha256": "959db0dc49816899191398e8aa544aadeb29d530b363ae8a0489fe7342f788b4", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @soylent/platform\n/.cursor/ @soylent/ml-infra\n/.env.example @soylent/ml-infra\n/src/ @soylent/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 865, "sha256": "1b59927e585ea7ed8e9372c34aef97f767e7f7222bc145d36d531bc072b25338", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 888, "sha256": "ca643b8842baf89355c1c758a5793d926d60b0d33f60771a29e2a7d08d9ec2ff", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.soylent.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/244518991211/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: deployer@soylent-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 526, "sha256": "25f27210ef5badeb5b081cb46bfc551719e7058ecb931e4d3a5ec3e79137ba36", "content": "# research-scout\n\nresearch-scout は soylent の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11126, "sha256": "3fdfb694010ece4bd44eec8c34f6e799091ac2bc41b957b5bb7680c701dac0b0", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@soylent-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@soylent-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-05", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of qa-pilot: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 272, "sha256": "04fbaa8db423ebfe7f95f1bb53369bbd96c480ace5f7ebdcb4e47f0c22b83d4c", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 243, "sha256": "418e688c25dfd1d74eeadd7bafc7c691c14e24509144395a689b1da3cfb1293e", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.mcp.json @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 854, "sha256": "b638eeca9072b8916732790cab67bf0e594077ed8d2995e946f78bb605118f2f", "content": "# Continuous integration for qa-pilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 666, "sha256": "622f138e8b4d98418b06937b8bda619be58ec5b065131921f876f453be6a0872", "content": "# Deploys qa-pilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name qa-pilot\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1002, "sha256": "5f47644dd26c3e64382886bf1116e13faad925d45e7be71145ef5e7b2b5a4148", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=gvddwmwliymmwodfrsyz\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 375, "sha256": "a8c57b6096d98b164bf275837ab8b4f742dfe2577d9b4b25b5b171ec485e17c9", "content": "# qa-pilot\n\nqa-pilot is an internal AI agent maintained by the initech agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13654, "sha256": "ddd170664616b2ba0c672111c10aa96860a387f765eec2061de7b5ee5ebda2d7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-06", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "data-analyst-agent のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 346, "sha256": "c9ba3797b85aa9dfb1d40503de0110d6acc2b684473c0501855c6442b546a203", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 286, "sha256": "b7b74d457f2489482358351b79776f0fcb5879f8792a24a919cb98fc1cc09360", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.vscode/ @stark-labs/agents\n/.env.example @stark-labs/agents\n/src/ @stark-labs/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 804, "sha256": "8e651b9e7548e1117e3c5e288969be8430c3885bbed20205582393728e0d3d73", "content": "# data-analyst-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 753, "sha256": "a69e1ca24f491747a88b9d7f9042455d5dca4e7e1838e0b6c4e294d85792a1e2", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/data-analyst-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1354, "sha256": "58ebef5ac330152c53d6560b8e967d2c75ae77a1aac3439bf7f6738f7891874a", "content": "// data-analyst-agent ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\"\n }\n },\n \"tavily\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${env:TAVILY_API_KEY}\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 535, "sha256": "191e3d73e8a415c3804828504357e5ea2c328cf8f8bd2161da4a174a90a148b3", "content": "# data-analyst-agent\n\ndata-analyst-agent は stark-labs の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14526, "sha256": "ffd3ce9717246963ba2f32bb9ad9383864032f933b3e144fcf5503f140820eaa", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-07", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of release-helper: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 249, "sha256": "26994ae4ddd3152f4475ec554c36f25dec349b1089a55195122e1cf282969d06", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "9bc47dda5872ef8b6f243832b121cda068dcc7c22990484f816ec893b4b699c0", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.vscode/ @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 755, "sha256": "757a9e200b7ffef9f0ed7f18fa645a18cec512ad099f88d92a3d6b19f89a0141", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 788, "sha256": "e657b0076783f36b922599317edc1cb850300d16912e851d0b3d0a4960a90477", "content": "# Deploys release-helper using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::779341305985:role/release-helper-deploy\n aws-region: us-east-1\n - name: Deploy\n run: aws ecs update-service --cluster release-helper --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 685, "sha256": "1f5407df9280bbeb2f22732182ebcb5daadb3c6c036b1db4d948d7ce0620cb86", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/release-helper:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1054, "sha256": "e4751a9a775530d86ab9cb64b9b2a50c92a9733f76a9c7b801ad82a566d55ce2", "content": "// MCP servers for the release-helper workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "74d3ed02363e232deef3564f0c347cfc2c4291a797c8e5f5d5a0ba70bb8db85a", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the cyberdyne agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12408, "sha256": "21a1862b214c6abafbd407a5481b5ec0782f974c37912c16f8b2fd7f70322dfc", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::779341305985:role/release-helper-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::779341305985:role/release-helper-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"release-helper-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:release-helper-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-08", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "billing-concierge のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1002, "sha256": "af17295fe0e7246969b85117c6489cdaf419021a8f5c9503795a4fa264c1a16c", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 346, "sha256": "c9ba3797b85aa9dfb1d40503de0110d6acc2b684473c0501855c6442b546a203", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 271, "sha256": "180daa7452822145913d23ed9f6a1195df6e3f8e628a806d849c9a9c21a2f269", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @soylent/platform\n/.cursor/ @soylent/devex\n/.env.example @soylent/devex\n/src/ @soylent/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1019, "sha256": "f1cb834ea6fd5ff9a257593fa643b2f463f505a1cd47a5d541ff29d456d2a7c2", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 857, "sha256": "4a367ed84728f9dcc60c09f1855758bcaa64a471b1d324c9ab25cbd290c867f7", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::479907085955:role/billing-concierge-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 749, "sha256": "d060c5c4baf3943b0b8abeeb77ac5331b619fea873974f2ae5833ceb11b6d16c", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/soylent/billing-concierge:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 529, "sha256": "453dd728bff8a57c1210b9863d746a36af6d6cd1cd73d46fa9e620518ca7d75a", "content": "# billing-concierge\n\nbilling-concierge は soylent の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13822, "sha256": "3bd1aa3bcba539d4c6ad72a8161e97e363c4a5667130d8072dcea50ab1f56be7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::479907085955:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::479907085955:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-09", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of docs-assistant: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 959, "sha256": "d273e3d73c85536d6df241738260ff8f92a48c55ba0e02b97236a09b085dd5de", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 265, "sha256": "9257df36b9028afdf97da4e7bb8397d8da4841c5ac660b7fdebfbcee8efde678", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "8023958772cb56b44fae12aec678116c8cf48159723eff8f7d3e995a4240b856", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.cursor/ @tyrell/ml-infra\n/.env.example @tyrell/ml-infra\n/src/ @tyrell/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 905, "sha256": "8e9fd47a27afb010ff485175d238b47d6ba0fc55e70fc30e5a415b287c843c2d", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 678, "sha256": "5dfaf203f89a7c01f12111d490b04c9f4390f26a69ebf250c21a4349f75f8239", "content": "# Deploys docs-assistant using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name docs-assistant\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 388, "sha256": "be839b1857918de4cc76a07b330e154403e0197690e7e4b99cfbc8ab1efce66d", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the tyrell ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13635, "sha256": "2596a377abb4ecda602d047471bccf59b0f53c99b032a338b57bacef479afb70", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-clean-10", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "triage-agent のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 329, "sha256": "f07c703e6f4503ed4570787ab9aa6755fbeeacefb1686c517cce92ee941c53dc", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 262, "sha256": "b8ed66952f5366411ae06f039a5f0a57bb72c4bd05fcd4f1871f154097b7da0e", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @acme/platform\n/.vscode/ @acme/agents\n/.env.example @acme/agents\n/src/ @acme/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 818, "sha256": "453922418f9c01cf0fd1d6cc358b8eef38e588520d15d51a9a464c584e5b0657", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 872, "sha256": "4f9d517c956d3fa75d0e9456dd2067dde61bd04504cf7e5b742af025ba465504", "content": "# triage-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://triage-agent.acme.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/508154306587/locations/global/workloadIdentityPools/github/providers/triage-agent\n service_account: deployer@acme-triage-agent.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy triage-agent --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1202, "sha256": "2c41da490428961305345d4bc94b0d2bfc0432bbb6ff042c016c875cee77d041", "content": "// triage-agent ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 517, "sha256": "a5b8396cc38928b837e167be1a6c5f5694efc087bc0290ec3f815c5c4db8bba5", "content": "# triage-agent\n\ntriage-agent は acme の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 9449, "sha256": "23c7ed1be6eb4dc8e49980ca938f2e27dbf334c381963e38efefbd0928bfc4df", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@acme-triage-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@acme-triage-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-11", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of support-copilot: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 274, "sha256": "d1ed6f2e6f2c6a5255f3f8a6d76ce496a0843f8b965564e09777dad26dcae07a", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 239, "sha256": "e3bbd1fe8266eb84cca74d8fe757802828cea25618aedde28505405cbd142e55", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @globex/platform\n/.vscode/ @globex/agents\n/.env.example @globex/agents\n/src/ @globex/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 711, "sha256": "cb8aab411ac7725286233d1b31a0fe88d9b0c54492b2465ae81f90712e6b79e3", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 791, "sha256": "548cb06f43f42646af1d944f3d68c749864018b855cecea4a7bd5e0e482d80ed", "content": "# Deploys support-copilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::414956820396:role/support-copilot-deploy\n aws-region: us-east-1\n - name: Deploy\n run: aws ecs update-service --cluster support-copilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1614, "sha256": "18c839736abb9f30b7512c458cb25ea9065d8dc36214cb65ce32d5ab6b147ce6", "content": "// MCP servers for the support-copilot workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"slack\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${env:SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0OC1TCA02\",\n \"SLACK_CHANNEL_IDS\": \"C0OC1TCA02\"\n }\n },\n \"supabase\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=rclfigezsuwpbjnwjjqa\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${env:SUPABASE_ACCESS_TOKEN}\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 388, "sha256": "49bcb4037b7417726440bb07d7ee707c2219f98d7d890c3980dd0e9d3f8a8c96", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the globex agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14811, "sha256": "54929a06accf16f174a4f1fcd8a8a9e49241ded0d64c7ac65c390edc21391a32", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::414956820396:role/support-copilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::414956820396:role/support-copilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"support-copilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:support-copilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-12", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "research-scout のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 329, "sha256": "f07c703e6f4503ed4570787ab9aa6755fbeeacefb1686c517cce92ee941c53dc", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 280, "sha256": "d7cb5e04b94e2e02ce30f202a95359eb00e52920a23092f06d8c9b4b80543291", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.vscode/ @initech/platform\n/.env.example @initech/platform\n/src/ @initech/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 865, "sha256": "1b59927e585ea7ed8e9372c34aef97f767e7f7222bc145d36d531bc072b25338", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 888, "sha256": "9360fbe580d3fd9d301b58bc45c8b63d5a651f707ddc7deef779f85a4a15c27c", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/309254249883/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: deployer@initech-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1048, "sha256": "9d569666b9e5e94ec787d61e28cb522369a7127b27a799d25709175e46e8ba79", "content": "// research-scout ワークスペースの MCP サーバ\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"filesystem\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "aa636e95fe2bfa5e769e9095e8c887eea7de7c7a43a6d807142fa3b71cef3e5c", "content": "# research-scout\n\nresearch-scout は initech の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11862, "sha256": "df180091a0ae5c1b3daecf5c4dae92ebb902ea807b166784a417401912b3b63d", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-13", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of research-scout: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 250, "sha256": "b0d0e98187a87bc81ca9291647aa6c0ac5c4c060a938104c84934b8d4f154add", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "64a79382abc6c00a24c245e480aa4293b33fd70c6fd0454dc712ab7070c89c93", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 860, "sha256": "9fb71bfa796c894cd99fc584c0389046d82bf368a1bb4c68938cebd5a916ea5d", "content": "# Continuous integration for research-scout.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 678, "sha256": "1673741b7349a11f262e9ec68593905ab7f7898431155e35a1e4822876e2bd67", "content": "# Deploys research-scout using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name research-scout\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 781, "sha256": "fd018b5aec4b44b629b6d59a896b623aaa6a6c294e68650dc873eae5c595f4f5", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "36e7f95cd9ccc383e8e0b98514a0888f3001ff2d89d3c8ff3797d5015b9c144d", "content": "# research-scout\n\nresearch-scout is an internal AI agent maintained by the cyberdyne agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12822, "sha256": "1dd2282e4ae9d25498ab5d211d004c5d33055985850fb4339824663c2f324a53", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-14", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "release-helper のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 275, "sha256": "94dbe2dbe2e507d7151d9c8e0c997f43308a7acfb095b23cb44816a504b22c7a", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/devex\n/.env.example @umbrella/devex\n/src/ @umbrella/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "a3019ce482482dc8d6141671dec2f296c171774102323fb90e727c93fcf8dd43", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "37c8045fed6d001c1db0277dd37ba6e8e47ee0ae0b5178b44c183f502c5aec98", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/umbrella/release-helper:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 927, "sha256": "4002b7b4a955dd15334a43f682875dd27607ed3e6a350f80edf814cb3e3b423f", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/release_helper\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 524, "sha256": "9981ed54beb3781a8fec7bad9c46ac424e89d8d17a20b8c7a11aabe44eca6517", "content": "# release-helper\n\nrelease-helper は umbrella の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13731, "sha256": "35218377f124a9252398d3e15fe1ef67ff2b2dceb7a4c461ef20f9c0d43579c9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-clean-15", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of billing-concierge: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 727, "sha256": "7306f677f11e8395f052bf54d3983b7e3b59541f4ff89ae9e103603bacbd365f", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 250, "sha256": "b0d0e98187a87bc81ca9291647aa6c0ac5c4c060a938104c84934b8d4f154add", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "e79826aba0722a18865c1af77acdaf1c570969c8242937e36fe7113d0ead5659", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 758, "sha256": "292063071b22a28cbc68e02d590262bd4f7b0f7aebae9a635fdffa60a72c72de", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 797, "sha256": "611bd6d5d91a75f2be736e8870ae86bba1b95a96cccf126f98d0757cae704b4c", "content": "# Deploys billing-concierge using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::328415891986:role/billing-concierge-deploy\n aws-region: eu-west-1\n - name: Deploy\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 689, "sha256": "f3ddb1031f1d2e412ad411dd4a669a497bf25fc9addf56eb90531388f1f772dc", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/billing-concierge:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 401, "sha256": "4ff19cc5248d9d163ef08527905f6cf4e3cf794c6a5d0702d0b7101802fbd25e", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the stark-labs ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13318, "sha256": "6b4eab980d3c6ef8245878a9fb18c2e0a283f2fcfb9af53340ca729bdbb02b74", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::328415891986:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::328415891986:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-16", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "billing-concierge のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 284, "sha256": "887f113343b84bfece99202f15811a31954b271ecc64564bb310261cf972671f", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.vscode/ @umbrella/ml-infra\n/.env.example @umbrella/ml-infra\n/src/ @umbrella/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 994, "sha256": "74b40104481675dbef2e0d0c3f242c51152ccaafbd871476c7e7bfd3496f57af", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 905, "sha256": "df74ea2e03d526173719f17e22880b6c46e57b136e3ec6f7535f1710aa1d7c3a", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://billing-concierge.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/652385211004/locations/global/workloadIdentityPools/github/providers/billing-concierge\n service_account: deployer@umbrella-billing-concierge.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy billing-concierge --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 983, "sha256": "c565cd319cd20c82b5713d20ecb9d3d505245b658d5caca56cae69caedf425b9", "content": "// billing-concierge ワークスペースの MCP サーバ\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 533, "sha256": "e3162923085e5038fb7b7d9716885bae80c829d1bfc296c4e74b57b45382d7c4", "content": "# billing-concierge\n\nbilling-concierge は umbrella の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12249, "sha256": "c556a796e929b7c832d5f798b21e72a6133d28e830be2a6e9a97dde08da87b38", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-billing-concierge.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-billing-concierge.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-17", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of triage-agent: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 265, "sha256": "9257df36b9028afdf97da4e7bb8397d8da4841c5ac660b7fdebfbcee8efde678", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "aa92c8486d4ba53f268152b2f7167a57ddfe6a0d9ed4fa8d713eb6be347c7344", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @globex/platform\n/.mcp.json @globex/platform\n/.env.example @globex/platform\n/src/ @globex/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 753, "sha256": "309ed1f19a18a6374558c230a5f07529af00ec9d673af43c6815a109e8d24d06", "content": "# Continuous integration for triage-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 821, "sha256": "5d4ec94c79d071b741fb221c2eb7350ebe1f7031b4cad598c36cee5d413100cf", "content": "# Deploys triage-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://triage-agent.globex.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/261173996211/locations/global/workloadIdentityPools/github/providers/triage-agent\n service_account: deployer@globex-triage-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy triage-agent --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1012, "sha256": "68ae928ed01c9f0f63f62654a87bf05b03bb51f656434d29b9ab29e50eb3922f", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 384, "sha256": "ff5f69a49ae3520931614abb346bc5c5bab6653a7f8e7976c0b90ee13ea83bea", "content": "# triage-agent\n\ntriage-agent is an internal AI agent maintained by the globex platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10427, "sha256": "fdc70dcccd014b6d214d880bad806c12559e9eedce7db28696bd51965edf21af", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@globex-triage-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@globex-triage-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-18", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "research-scout のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 279, "sha256": "d95949134a26f2f1f3e5eba162c65fe06989af4faed13324f364362c5ce28d3b", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @wayne-ent/platform\n/.vscode/ @wayne-ent/devex\n/.env.example @wayne-ent/devex\n/src/ @wayne-ent/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "8004030a5291f1f24394d324a9caef0505ab7d12a189818d76b38c016fd75bae", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 748, "sha256": "9ba46f099c43a9c906d0242380f1596debd5765dcdf484a31fc97bfd8914de74", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/wayne-ent/research-scout:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1107, "sha256": "2533ea9dc4f53f44f2b68ab23e3800b5bc3008280661b93ef3a813d428f13f7d", "content": "// research-scout ワークスペースの MCP サーバ\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.wayne-ent.internal:5432/research_scout\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 525, "sha256": "d17c0577cd18e6b20de69888c287b3bbddf114ee5dda04cc6d6d677b83f9041a", "content": "# research-scout\n\nresearch-scout は wayne-ent の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12938, "sha256": "2d5153bd1c4d0f7bdfe541b8967e01835e9a4351c16f24ecb0cc9c1f4a3341d5", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.wayne-ent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-19", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of billing-concierge: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 265, "sha256": "9257df36b9028afdf97da4e7bb8397d8da4841c5ac660b7fdebfbcee8efde678", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 258, "sha256": "5f17f007214e03545be5f08b1801e9e12f5807ebdad587f512e040322de922b7", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.vscode/ @initech/ai-platform\n/.env.example @initech/ai-platform\n/src/ @initech/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 713, "sha256": "29e98ff81e50c4b187532e284091e8144d38e0e9782e6820688df29671376707", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 802, "sha256": "17e72dcbd92873acb920d2cb493471cc0aef5346d9ce36251cba01e5ccb4cd00", "content": "# Deploys billing-concierge using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::725485556915:role/billing-concierge-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1082, "sha256": "ee6a96a84965f640f35e6f763ac3470e34df7e8202fccaab07538242dd4296d5", "content": "// MCP servers for the billing-concierge workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"tavily\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${env:TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 398, "sha256": "45cee2e9f3a3f6f08652303bff4a04883e75df6fa8a63c54948bb5d151489606", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the initech ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13140, "sha256": "2dc8e21e0c483f087799d9339eef091132233b2b795171dbd9759b9bbc835cc9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::725485556915:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::725485556915:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-20", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "research-scout のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 752, "sha256": "d347ab063731cc26ffb0f6ebd804e817099b8c06ad1fc53dafa5baac4cba86c1", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 329, "sha256": "f07c703e6f4503ed4570787ab9aa6755fbeeacefb1686c517cce92ee941c53dc", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "8c45c57e941af98db929b626c9ce500caf1695f6d1af829d457c3a2eab1c2709", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.cursor/ @cyberdyne/ml-infra\n/.env.example @cyberdyne/ml-infra\n/src/ @cyberdyne/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1016, "sha256": "ad4dbf991edbd7a2cdedbfafbafff6e50bc7e66d0a21df4a8ea0699248534e0a", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 892, "sha256": "cca062bd796b6745644c40689f24fbf3b900fc197e39964b07ca30a7030130f6", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.cyberdyne.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/813096219300/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: deployer@cyberdyne-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 748, "sha256": "7596659aa7358a3f32bd947be12bb97f40096ed35c6fc3937fe54a7448e3aec7", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/research-scout:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 528, "sha256": "b82b0040db600cf144b64cdc68201280e913d715e1b6774232327ff14b0e1066", "content": "# research-scout\n\nresearch-scout は cyberdyne の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14252, "sha256": "021c2632d8db5470b4fed8e6863549b2a575f9a7bb5cb32c8ab722f49ac04380", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@cyberdyne-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@cyberdyne-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-clean-21", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of docs-assistant: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 251, "sha256": "8504258768d441163b0f06bd90de4c07a6b0c64fc41bc674e299de8256b334f3", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 254, "sha256": "f1f905040c6d82eff3f456223fd6121cf1fbedf0c887f19f5c96d597d6c96da2", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @globex/platform\n/.mcp.json @globex/ai-platform\n/.env.example @globex/ai-platform\n/src/ @globex/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 710, "sha256": "6794ef508fd9941b5a0abc5dab85eb6326cba4b075ea2e0d727d798a8032ed4a", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 678, "sha256": "5dfaf203f89a7c01f12111d490b04c9f4390f26a69ebf250c21a4349f75f8239", "content": "# Deploys docs-assistant using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name docs-assistant\n"}, {"path": ".github/workflows/docker.yml", "bytes": 682, "sha256": "12074fc14cef1156c28e73eab23d77f3a451ff9a9a1c7b241897e78bd7d663d0", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/globex/docs-assistant:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 891, "sha256": "1eb5e95a6010790dc7ac3c74cfc4dd872189b78fe5ef2270aa9cc60110233207", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0VVSAZK1K\",\n \"SLACK_CHANNEL_IDS\": \"C0VVSAZK1K\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "6f69480c82fe25734cf14d9d877c95f739e4d29814d961198b68da9b9359c17f", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the globex ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10649, "sha256": "832f5f08aab632a78b98a686594017b2e6664531992ab45954180be582c63578", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-22", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "sales-ops-agent のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 345, "sha256": "a5472cdd1104e0ef5b7e3f06ecf77288d8c191996a763a4d436c607e2e54661c", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 284, "sha256": "713d4f1e5876c882ab1d030116175799e8231331ff713809c65d3311351bdf80", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/ml-infra\n/.env.example @umbrella/ml-infra\n/src/ @umbrella/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 821, "sha256": "2805902750cc06278bb343358689da47cb50150acf4d793ca7088cda1d44e67c", "content": "# sales-ops-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 748, "sha256": "1a807787dbfb14931cc4da26c586f5d9a30635d24b8344c1ff877efcd875a464", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/umbrella/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 794, "sha256": "e4b11cc5bed0820bc275d67e830acf0f3f25dc2876c3dd389d386632832d75d8", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 529, "sha256": "c990207e5e40ea2c681808998c628ab8fe84e8fb53a709be4ffcaf080fe707e7", "content": "# sales-ops-agent\n\nsales-ops-agent は umbrella の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13455, "sha256": "16d906362714f3282923f980779362a91830d422b89204d04e904233d39c6a50", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-clean-23", "split": "dev", "kind": "clean", "lang": "en", "variant": "clean", "planted": [], "expected_labels": [], "description": "Snapshot of docs-assistant: least-privilege, fully declared, lockfile in sync.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 282, "sha256": "9582d43867bf387cbc41b6b82101c364b731f6cda1f6ef4129adc6a9d5804b5d", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSLACK_BOT_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "01f3b24510780210e31d73697ea36e77d45bc12cf0dd21dad8f74b4c04c80b47", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @soylent/platform\n/.mcp.json @soylent/ml-infra\n/.env.example @soylent/ml-infra\n/src/ @soylent/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 755, "sha256": "9126e7c8dcea5274366bb185fae2a320b982e842abbc42b286dd3ebebb756ba5", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "af95efeeeecdc4e93c6b0d7ce299f33e20b398c74a9c68e0fa2223e542f49984", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/soylent/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1198, "sha256": "b6dbb7c74a5908ce6ff10a35295e31a4cb2c8770f67d18c4ab62d63d36048a2a", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T07YWTB2NH\",\n \"SLACK_CHANNEL_IDS\": \"C07YWTB2NH\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "0196029e418b6f34dc46b9c15f59db92edcc13facf4cb81e7c482338cd54f8f8", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the soylent ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13133, "sha256": "808d32e983d9c64d722f45a7d05f44a745abc62465d5fcd12c64c8be94cfb79b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-clean-24", "split": "dev", "kind": "clean", "lang": "ja", "variant": "clean", "planted": [], "expected_labels": [], "description": "docs-assistant のスナップショット。最小権限・宣言済みでロックファイルと一致している。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 351, "sha256": "e6321f9f238f8ac40e7b67950afa09ec11c23293e10478cef3dfbc3d813a98c5", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "a2fcac8200a07b1310222ebcfec5d5e5221a1b6b95774f29489070d599b252db", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @globex/platform\n/.mcp.json @globex/agents\n/.env.example @globex/agents\n/src/ @globex/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 971, "sha256": "a37b22d8bd55df520bb849bdac870448ba3601f0e08f54ac5e4c9f043e1168c5", "content": "# docs-assistant の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 745, "sha256": "322816bb04bb87c6ddf8a0f00a60740f4aba90f1c1462eb1068270a402c502f2", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/globex/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 984, "sha256": "ee2480d823ae04c1ccd44a164a9c1e5cd912849bd8a227ddf3920242bdc21c22", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.globex.internal:5432/docs_assistant\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 523, "sha256": "cf38db7bfcb1278f6e28324403ed7ee64443e4f00dd0106ecabe9e3511f755cc", "content": "# docs-assistant\n\ndocs-assistant は globex の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 15576, "sha256": "bacf18011be6752f9b91dc0b7f47c36aabda35396a7a1108997ba3a5253beb4f", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.globex.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-01", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "dp_benign_text", "planted": [], "expected_labels": [], "description": "Before/after pair for triage-agent; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 261, "sha256": "fcc3da1574b31c4dfd23c0cda08acb5c2741171bffcc107f9c698c0dcb91dc28", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.vscode/ @stark-labs/ml-infra\n/.env.example @stark-labs/ml-infra\n/src/ @stark-labs/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 728, "sha256": "c44eb36801812661fcb549f28ee5fd78b38424aec8f3d5a233d9e8876f18b38e", "content": "# Continuous integration for triage-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 674, "sha256": "19c9a4308ec75972019a6a048e3f188341d111897077f64ecdd6bda75ea54787", "content": "# Deploys triage-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name triage-agent\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 970, "sha256": "f9d5dadd537c06cae4570a632e31169e349f01eabed5f50320b5bbb1fa39f443", "content": "// MCP servers for the triage-agent workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 388, "sha256": "266fcad6c099633b829917e875a3dd905884e00714c57e275d59eb3751b10dff", "content": "# triage-agent\n\ntriage-agent is an internal AI agent maintained by the stark-labs ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 8578, "sha256": "1173bec73c60048e0757396891ef78892a9d6ca24de9085b1b62f8cfe29102ed", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 261, "sha256": "fcc3da1574b31c4dfd23c0cda08acb5c2741171bffcc107f9c698c0dcb91dc28", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.vscode/ @stark-labs/ml-infra\n/.env.example @stark-labs/ml-infra\n/src/ @stark-labs/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 741, "sha256": "3c8af7ba9466b42bf4569333c1744f2ed11f9168b825d90095f6c074a6672fb8", "content": "# Continuous integration for triage-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests (verbose)\n run: pytest -q --cov=src --cov-report=xml -v\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 674, "sha256": "19c9a4308ec75972019a6a048e3f188341d111897077f64ecdd6bda75ea54787", "content": "# Deploys triage-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name triage-agent\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 970, "sha256": "f9d5dadd537c06cae4570a632e31169e349f01eabed5f50320b5bbb1fa39f443", "content": "// MCP servers for the triage-agent workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 386, "sha256": "3bc97c07957e3d7675eaa13423f6b26b20f17445ad694da450d265d3cf4fc67f", "content": "# triage-agent\n\ntriage-agent is an internal AI agent maintained by the stark-labs agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 8578, "sha256": "1173bec73c60048e0757396891ef78892a9d6ca24de9085b1b62f8cfe29102ed", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-02", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "dp_scope_reduce", "planted": [], "expected_labels": [], "description": "release-helper の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 347, "sha256": "c769d3132a714fb28f1cb864c4392f0af55d0290266efc1fcc07c2ad10c2940f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 277, "sha256": "7dbd5176e1e620f2176be0bfab1f1d6c9e9d0772c5d7173f32a06cf49b33eef9", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @acme/platform\n/.vscode/ @acme/ai-platform\n/.env.example @acme/ai-platform\n/src/ @acme/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 991, "sha256": "2f7e45f8ec810c407340aa817d25c61cdadac61a42d06516f3cb99d16cb5106a", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "528f77cf649cb8ae46e6011b9b8fba529968329f20f580e36acacb98786a1476", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/release-helper:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1490, "sha256": "11ed795256ed38175c4a96fae5766a4a5c7e0d5cabec523bee8e6790100b6702", "content": "// release-helper ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"slack\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${env:SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0W324EI7N\",\n \"SLACK_CHANNEL_IDS\": \"C0W324EI7N\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "295f6e19999cec7b0737b5a241e6adafd2895a4393280fb1b70471fb5b6405e8", "content": "# release-helper\n\nrelease-helper は acme の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10995, "sha256": "94f7fd91cfdba565d00797104fb131961c385cbfa8fe5c3604a054e80624b982", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".env.example", "bytes": 347, "sha256": "c769d3132a714fb28f1cb864c4392f0af55d0290266efc1fcc07c2ad10c2940f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 277, "sha256": "7dbd5176e1e620f2176be0bfab1f1d6c9e9d0772c5d7173f32a06cf49b33eef9", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @acme/platform\n/.vscode/ @acme/ai-platform\n/.env.example @acme/ai-platform\n/src/ @acme/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 977, "sha256": "a22f5a3cf444ad54ddb7ecf8b2ff2528974871039b39ccf91311bff240f500e0", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions: {}\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "528f77cf649cb8ae46e6011b9b8fba529968329f20f580e36acacb98786a1476", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/release-helper:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1490, "sha256": "11ed795256ed38175c4a96fae5766a4a5c7e0d5cabec523bee8e6790100b6702", "content": "// release-helper ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"brave-search\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${env:BRAVE_API_KEY}\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"slack\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${env:SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0W324EI7N\",\n \"SLACK_CHANNEL_IDS\": \"C0W324EI7N\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "295f6e19999cec7b0737b5a241e6adafd2895a4393280fb1b70471fb5b6405e8", "content": "# release-helper\n\nrelease-helper は acme の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10995, "sha256": "94f7fd91cfdba565d00797104fb131961c385cbfa8fe5c3604a054e80624b982", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-03", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "dp_rename_server", "planted": [], "expected_labels": [], "description": "Before/after pair for sales-ops-agent; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "376ebc17bd58c867c31092e8eca4a8b31a6bf969e8a38b852a3fb3f7da8bd18a", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "b13eb7097639e2cfbb9e29c8bf953cff858c286ea441799595cadb97a7188f03", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 836, "sha256": "41e5ccea696067f1f7eb8269c9179fd4bf41160800f25d374367e3a7c1a55ba6", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://sales-ops-agent.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/731769795607/locations/global/workloadIdentityPools/github/providers/sales-ops-agent\n service_account: deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy sales-ops-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "ef8b5b3d7c2380d521e08f786338ab37d183a937c1bb6e0ae90cf57ced07130e", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/tyrell/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 892, "sha256": "7226c880e02d600c333c1d1b64120a590ec17c756bd81f081663a4c5622e10bd", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.tyrell.internal:5432/sales_ops_agent\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 390, "sha256": "bfcb2d5a148afb64e840ffadcbd74189f26c73b219da59b1c2f22182ac0adf1c", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the tyrell platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14282, "sha256": "3555906ae41edc85d4e9945995b7b8d56f80838dabc1db1bdee1683eea84ffe4", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.tyrell.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "376ebc17bd58c867c31092e8eca4a8b31a6bf969e8a38b852a3fb3f7da8bd18a", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "b13eb7097639e2cfbb9e29c8bf953cff858c286ea441799595cadb97a7188f03", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 836, "sha256": "41e5ccea696067f1f7eb8269c9179fd4bf41160800f25d374367e3a7c1a55ba6", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://sales-ops-agent.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/731769795607/locations/global/workloadIdentityPools/github/providers/sales-ops-agent\n service_account: deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy sales-ops-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "ef8b5b3d7c2380d521e08f786338ab37d183a937c1bb6e0ae90cf57ced07130e", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/tyrell/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 896, "sha256": "37387888e10a9ef85adcbb9f11bf8f984d2e5def6c1ac7bac57371c2b07abc14", "content": "{\n \"mcpServers\": {\n \"github-mcp\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.tyrell.internal:5432/sales_ops_agent\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 390, "sha256": "bfcb2d5a148afb64e840ffadcbd74189f26c73b219da59b1c2f22182ac0adf1c", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the tyrell platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14282, "sha256": "3555906ae41edc85d4e9945995b7b8d56f80838dabc1db1bdee1683eea84ffe4", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-sales-ops-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.tyrell.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-04", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g2_deploy_add", "planted": [{"class": "G2", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deployments: write added to production job"}], "expected_labels": ["G2"], "description": "docs-assistant の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 351, "sha256": "e6321f9f238f8ac40e7b67950afa09ec11c23293e10478cef3dfbc3d813a98c5", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 262, "sha256": "25cfd1ebc435238ee8d6076b8069a7e1867a9b1f77a1d7971f40c8c52f7b008a", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @acme/platform\n/.mcp.json @acme/agents\n/.env.example @acme/agents\n/src/ @acme/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "20f407ffef1d7905c59cd7d02729c602b1b4bcafe7d82b2a149370106624552f", "content": "# docs-assistant の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 848, "sha256": "33f29a96364d1bd8d269b1137692e9380ab57bcef4ec3b13b09c4a6fd9697156", "content": "# docs-assistant を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::642569296881:role/docs-assistant-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster docs-assistant --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "481d0069fef42254e919d70e0feec0c829e0cca1a2b7817b878b994778249f7f", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1042, "sha256": "594e244e33cd3831afdb8615a19a9ec07ec72af20c6d6b049b83cbeb35da9c65", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.acme.internal:5432/docs_assistant\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "1b21c48d388c8f50e39c060acc6a8c6d4590d6aa4262fd92f571abba8e69ea6d", "content": "# docs-assistant\n\ndocs-assistant は acme の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 15130, "sha256": "2f68329857653ddccbd6aa3aacabd0a06c3bd9f7098ca551e01f18e55d362a15", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::642569296881:role/docs-assistant-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::642569296881:role/docs-assistant-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"docs-assistant-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:docs-assistant-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.acme.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".env.example", "bytes": 351, "sha256": "e6321f9f238f8ac40e7b67950afa09ec11c23293e10478cef3dfbc3d813a98c5", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 262, "sha256": "25cfd1ebc435238ee8d6076b8069a7e1867a9b1f77a1d7971f40c8c52f7b008a", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @acme/platform\n/.mcp.json @acme/agents\n/.env.example @acme/agents\n/src/ @acme/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "20f407ffef1d7905c59cd7d02729c602b1b4bcafe7d82b2a149370106624552f", "content": "# docs-assistant の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 873, "sha256": "26a54331e937b8c9aef9c4bc091de86d6c3e9e0c2ad5184831dbc98a7fd26327", "content": "# docs-assistant を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n deployments: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::642569296881:role/docs-assistant-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster docs-assistant --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "481d0069fef42254e919d70e0feec0c829e0cca1a2b7817b878b994778249f7f", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1042, "sha256": "594e244e33cd3831afdb8615a19a9ec07ec72af20c6d6b049b83cbeb35da9c65", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.acme.internal:5432/docs_assistant\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "1b21c48d388c8f50e39c060acc6a8c6d4590d6aa4262fd92f571abba8e69ea6d", "content": "# docs-assistant\n\ndocs-assistant は acme の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 15130, "sha256": "2f68329857653ddccbd6aa3aacabd0a06c3bd9f7098ca551e01f18e55d362a15", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::642569296881:role/docs-assistant-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::642569296881:role/docs-assistant-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"docs-assistant-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:docs-assistant-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.acme.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-05", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "g7_prod_secret", "planted": [{"class": "G7", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "new secret in production deploy"}], "expected_labels": ["G7"], "description": "Before/after pair for sales-ops-agent; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "4b8ccaf6deaa4e3ca910971c7d084d6afd8021c1b047dd0105eac49bd9c19c82", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.vscode/ @initech/ml-infra\n/.env.example @initech/ml-infra\n/src/ @initech/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "b13eb7097639e2cfbb9e29c8bf953cff858c286ea441799595cadb97a7188f03", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 838, "sha256": "669de9b17c306fed29ee58281b2274484044d0894d29448783b459021fc3d033", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://sales-ops-agent.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/978654975800/locations/global/workloadIdentityPools/github/providers/sales-ops-agent\n service_account: deployer@initech-sales-ops-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy sales-ops-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 684, "sha256": "bd8151a46c211c392ed355700e098c62f82b6402abcf56613dc092ad9787c944", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1049, "sha256": "9c4b37af1f974300e3aa57ed948f92b77e9c6959f8026345d1478beecbdea350", "content": "// MCP servers for the sales-ops-agent workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "82f25a986f90b4d080df11f723714ba3a37163e602ba5775ec924d385a87b8b3", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the initech ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14341, "sha256": "8870bfb130554d68ef2c735835f7a274caf4b92b063dfbdd3c6ae4caccd11d31", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "4b8ccaf6deaa4e3ca910971c7d084d6afd8021c1b047dd0105eac49bd9c19c82", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.vscode/ @initech/ml-infra\n/.env.example @initech/ml-infra\n/src/ @initech/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "b13eb7097639e2cfbb9e29c8bf953cff858c286ea441799595cadb97a7188f03", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 905, "sha256": "b94f2ad57320519c73ffba52485296c14d8ebc8f0eab016398273bc7d53f8696", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://sales-ops-agent.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/978654975800/locations/global/workloadIdentityPools/github/providers/sales-ops-agent\n service_account: deployer@initech-sales-ops-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy sales-ops-agent --source . --region us-central1\n env:\n DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 684, "sha256": "bd8151a46c211c392ed355700e098c62f82b6402abcf56613dc092ad9787c944", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1049, "sha256": "9c4b37af1f974300e3aa57ed948f92b77e9c6959f8026345d1478beecbdea350", "content": "// MCP servers for the sales-ops-agent workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "82f25a986f90b4d080df11f723714ba3a37163e602ba5775ec924d385a87b8b3", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the initech ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14341, "sha256": "8870bfb130554d68ef2c735835f7a274caf4b92b063dfbdd3c6ae4caccd11d31", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-06", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g8_remove_server", "planted": [{"class": "G8", "file": ".mcp.json", "component": "slack", "note": "server removed; credential still declared"}], "expected_labels": ["G8"], "description": "onboarding-buddy の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "152ab74584bc486c02d1b2246619862bdd68d02fccf7c32e008ccfab67f5e1e2", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/platform\n/.env.example @cyberdyne/platform\n/src/ @cyberdyne/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 847, "sha256": "83ccecd510c6c905805a6c498a753eb8af9989f7a2b2fed9ba0a39736e7877b1", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 934, "sha256": "59c1661250a326e8212c9aa030dc209b343a3fef44e15b7363e68a04a10343b5", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0WAHSFX6E\",\n \"SLACK_CHANNEL_IDS\": \"C0WAHSFX6E\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 532, "sha256": "0163b48ca9e01ac25a9b613a82e9d3eb445cf861bc362a7921027a3037c6b0d2", "content": "# onboarding-buddy\n\nonboarding-buddy は cyberdyne の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12522, "sha256": "eacedd38eefaeb1d0b6694b66e36af5781784ea724ec9581a782ecf24090dccd", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "152ab74584bc486c02d1b2246619862bdd68d02fccf7c32e008ccfab67f5e1e2", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/platform\n/.env.example @cyberdyne/platform\n/src/ @cyberdyne/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 847, "sha256": "83ccecd510c6c905805a6c498a753eb8af9989f7a2b2fed9ba0a39736e7877b1", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 651, "sha256": "ff8bd88a814fa9af6ae777c84f3809620870841577219c2b4ba4e351ff361a10", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 532, "sha256": "0163b48ca9e01ac25a9b613a82e9d3eb445cf861bc362a7921027a3037c6b0d2", "content": "# onboarding-buddy\n\nonboarding-buddy は cyberdyne の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12522, "sha256": "eacedd38eefaeb1d0b6694b66e36af5781784ea724ec9581a782ecf24090dccd", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-07", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "g6_aws_static_replace", "planted": [{"class": "G6", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "OIDC replaced by static keys"}], "expected_labels": ["G6", "G7", "G8"], "description": "Before/after pair for data-analyst-agent; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 254, "sha256": "e26c4b89b31b69e3aadd5884ebb271d02208429a5ec63ca5dce064d813600ffe", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.vscode/ @tyrell/ai-platform\n/.env.example @tyrell/ai-platform\n/src/ @tyrell/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 759, "sha256": "9b8615ad1518e3ad1089716e82509a037b76b875b335c4043bc31938f5c70187", "content": "# Continuous integration for data-analyst-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 805, "sha256": "5be0b7c0c4b427dcd241364a02959a2081bf0a102469797a87c989124845df49", "content": "# Deploys data-analyst-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::020674995309:role/data-analyst-agent-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster data-analyst-agent --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 883, "sha256": "3777533b00c188e7ec282672f0302da93c8c637aff86375383f6ef94c11b3cb9", "content": "// MCP servers for the data-analyst-agent workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 399, "sha256": "c4bf441f58984a5ff10264f9364e4fb8c7367e143d4fdcca177957f9ccbb4ff5", "content": "# data-analyst-agent\n\ndata-analyst-agent is an internal AI agent maintained by the tyrell ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9857, "sha256": "040fa8172f2396ba9722aa8b92604e67ccb8c3e8c098eb56555247a3ca781ed8", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::020674995309:role/data-analyst-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::020674995309:role/data-analyst-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"data-analyst-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:data-analyst-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 254, "sha256": "e26c4b89b31b69e3aadd5884ebb271d02208429a5ec63ca5dce064d813600ffe", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.vscode/ @tyrell/ai-platform\n/.env.example @tyrell/ai-platform\n/src/ @tyrell/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 759, "sha256": "9b8615ad1518e3ad1089716e82509a037b76b875b335c4043bc31938f5c70187", "content": "# Continuous integration for data-analyst-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 830, "sha256": "47af8ccf1096f56a391e3698b901dfde66151b6ace20f9493969ef30a1f7bfa1", "content": "# Deploys data-analyst-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster data-analyst-agent --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 883, "sha256": "3777533b00c188e7ec282672f0302da93c8c637aff86375383f6ef94c11b3cb9", "content": "// MCP servers for the data-analyst-agent workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 399, "sha256": "c4bf441f58984a5ff10264f9364e4fb8c7367e143d4fdcca177957f9ccbb4ff5", "content": "# data-analyst-agent\n\ndata-analyst-agent is an internal AI agent maintained by the tyrell ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9857, "sha256": "040fa8172f2396ba9722aa8b92604e67ccb8c3e8c098eb56555247a3ca781ed8", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::020674995309:role/data-analyst-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::020674995309:role/data-analyst-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"data-analyst-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:data-analyst-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-08", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g3_job_write_all", "planted": [{"class": "G3", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "permissions: write-all on job"}], "expected_labels": ["G2", "G3"], "description": "support-copilot の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 279, "sha256": "ced78d0d91c9fa8349d7e31f42d04449857083373ff3e9d2185a36a46df179ce", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/devex\n/.env.example @cyberdyne/devex\n/src/ @cyberdyne/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 866, "sha256": "dac14b8127d54b21aa9a1f433d58367c32613124c68396311ef07f7c2b23495f", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 735, "sha256": "8c4a4ae9aa26e8424341a6d3a73f827d678ee8b254e46d32ad80e059183b2b53", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name support-copilot\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 796, "sha256": "2be4a01d5dd4231ef856eb7bd020b53791b0d5d423d88a51a5f76f78e4999181", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.cyberdyne.internal:5432/support_copilot\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 527, "sha256": "1d32449aa97af8d0077587eaf86d90b1aa016ec4e54ac45ee81d5391560eee17", "content": "# support-copilot\n\nsupport-copilot は cyberdyne の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11837, "sha256": "920a806eae6eae0b66bfed0881c38fab7515da8d594cbb09abbf46a96fc67d01", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.cyberdyne.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 279, "sha256": "ced78d0d91c9fa8349d7e31f42d04449857083373ff3e9d2185a36a46df179ce", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/devex\n/.env.example @cyberdyne/devex\n/src/ @cyberdyne/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 893, "sha256": "3cbd3afef55b2de46dd7d2e3669a0a80fe707641764b69cd534c501ad69f4428", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n permissions: write-all\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 735, "sha256": "8c4a4ae9aa26e8424341a6d3a73f827d678ee8b254e46d32ad80e059183b2b53", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name support-copilot\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 796, "sha256": "2be4a01d5dd4231ef856eb7bd020b53791b0d5d423d88a51a5f76f78e4999181", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.cyberdyne.internal:5432/support_copilot\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 527, "sha256": "1d32449aa97af8d0077587eaf86d90b1aa016ec4e54ac45ee81d5391560eee17", "content": "# support-copilot\n\nsupport-copilot は cyberdyne の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11837, "sha256": "920a806eae6eae0b66bfed0881c38fab7515da8d594cbb09abbf46a96fc67d01", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.cyberdyne.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-09", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "g3_toolsets_all", "planted": [{"class": "G3", "file": ".vscode/mcp.json", "component": "github", "note": "GITHUB_TOOLSETS=all"}], "expected_labels": ["G2", "G3"], "description": "Before/after pair for incident-bot; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "b36282431c9c460285ce9c08a191671ae2ca871330b78f917e6988e5d3303484", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.vscode/ @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 923, "sha256": "258eada2d6742013af30860c3fce214cfa852c878e8b09a9fbbf0575facfc5c8", "content": "# Continuous integration for incident-bot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 924, "sha256": "f44df5f997bfb3d652246ce295c17503fde78e3ac71898f51903b2aadb51abe5", "content": "// MCP servers for the incident-bot workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 384, "sha256": "c6920ff5c1c1a9b97924c653482a7a9efecd93f8ab388c851cb29d7e619b7b46", "content": "# incident-bot\n\nincident-bot is an internal AI agent maintained by the tyrell platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9451, "sha256": "269d361b7a1df6cba4ce84595c9998d605144adcf98e94e5bdeb4cfb6da0c201", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "b36282431c9c460285ce9c08a191671ae2ca871330b78f917e6988e5d3303484", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.vscode/ @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 923, "sha256": "258eada2d6742013af30860c3fce214cfa852c878e8b09a9fbbf0575facfc5c8", "content": "# Continuous integration for incident-bot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 915, "sha256": "61e769fc13129388a9555b2192a0a4b7e6ffa7ccdd4a623ed7e9a43de81bc5f2", "content": "// MCP servers for the incident-bot workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"all\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 384, "sha256": "c6920ff5c1c1a9b97924c653482a7a9efecd93f8ab388c851cb29d7e619b7b46", "content": "# incident-bot\n\nincident-bot is an internal AI agent maintained by the tyrell platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9451, "sha256": "269d361b7a1df6cba4ce84595c9998d605144adcf98e94e5bdeb4cfb6da0c201", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-10", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g4_delete_codeowners", "planted": [{"class": "G4", "file": ".cursor/mcp.json", "component": "github", "note": "CODEOWNERS deleted"}], "expected_labels": ["G4"], "description": "qa-pilot の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".cursor/mcp.json", "bytes": 951, "sha256": "968974a2593037603178d784b7b28b3848ce9fdd847821484486db7489286c18", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 286, "sha256": "aa3cce42fa38f554823a91fd82e2f2711af620970c47f937f56e277e94727a7b", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/agents\n/.env.example @stark-labs/agents\n/src/ @stark-labs/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 794, "sha256": "32e1c12e54ec9a88ef78cfd9906aaa1d61c433d272ab984994dee39fed7794ec", "content": "# qa-pilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 830, "sha256": "e649d292b8109891f7daf1cc8d47d1d35d9068d6f2bba9cccd632fdfce29f7d6", "content": "# qa-pilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::126050320757:role/qa-pilot-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster qa-pilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 515, "sha256": "0cba170390e5356043608ccbf9041c1771918cc9443af0f8827b3d9120fa5687", "content": "# qa-pilot\n\nqa-pilot は stark-labs の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12182, "sha256": "260f269d82653a45b7ab990a5030367649ee74d1cdf6765d1b1b728b14cadbc9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::126050320757:role/qa-pilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::126050320757:role/qa-pilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"qa-pilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:qa-pilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".cursor/mcp.json", "bytes": 951, "sha256": "968974a2593037603178d784b7b28b3848ce9fdd847821484486db7489286c18", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/workflows/ci.yml", "bytes": 794, "sha256": "32e1c12e54ec9a88ef78cfd9906aaa1d61c433d272ab984994dee39fed7794ec", "content": "# qa-pilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 830, "sha256": "e649d292b8109891f7daf1cc8d47d1d35d9068d6f2bba9cccd632fdfce29f7d6", "content": "# qa-pilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::126050320757:role/qa-pilot-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster qa-pilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 515, "sha256": "0cba170390e5356043608ccbf9041c1771918cc9443af0f8827b3d9120fa5687", "content": "# qa-pilot\n\nqa-pilot は stark-labs の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12182, "sha256": "260f269d82653a45b7ab990a5030367649ee74d1cdf6765d1b1b728b14cadbc9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::126050320757:role/qa-pilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::126050320757:role/qa-pilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"qa-pilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:qa-pilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-11", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "g5_second_server_same_pat", "planted": [{"class": "G5", "file": ".cursor/mcp.json", "component": "triage-bot", "note": "reuses github PAT"}, {"class": "G5", "file": ".cursor/mcp.json", "component": "github", "note": "PAT now shared"}], "expected_labels": ["G5"], "description": "Before/after pair for onboarding-buddy; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".cursor/mcp.json", "bytes": 780, "sha256": "9e21e429d490596e0abf03c638139aaa6d2f602ef20069ca9500e3fbb00b656c", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "e79826aba0722a18865c1af77acdaf1c570969c8242937e36fe7113d0ead5659", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 862, "sha256": "5caad3c93fe834c6494c6695e9115b54fbf51714220ed42732eef0d86bcef172", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 399, "sha256": "dde0ed7c289949fa654360421aa1250a8c7b51d1f17f54ff3cf65cb2c7cda434", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the stark-labs ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10409, "sha256": "324957a6065881678e69a7831d5ceee0e096d888937b454931356130c74f7903", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".cursor/mcp.json", "bytes": 1000, "sha256": "01f51a48a7434d2b2fb06f78d063bf5cc62b7a1bb5d96468760c2b931c8bd9bb", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"triage-bot\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@stark-labs/triage-mcp\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "e79826aba0722a18865c1af77acdaf1c570969c8242937e36fe7113d0ead5659", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 862, "sha256": "5caad3c93fe834c6494c6695e9115b54fbf51714220ed42732eef0d86bcef172", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 399, "sha256": "dde0ed7c289949fa654360421aa1250a8c7b51d1f17f54ff3cf65cb2c7cda434", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the stark-labs ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10409, "sha256": "324957a6065881678e69a7831d5ceee0e096d888937b454931356130c74f7903", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-12", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g1_env_literal", "planted": [{"class": "G1", "file": ".mcp.json", "component": "tavily", "note": "literal value pasted into env.TAVILY_API_KEY"}], "expected_labels": ["G1"], "description": "support-copilot の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 274, "sha256": "c022eb13940e5d1b4748b750f68412e9389035e65daf434989ae1efd905c5152", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.mcp.json @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 972, "sha256": "93b5dd5f77848679e1db5b9facf9b9393cfa9dc1ecf3a3ea4d23f040dd0501a9", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 893, "sha256": "25bb456a4df6f475ab4db6199be11aec0f4597695528e05387b4922e7746df30", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://support-copilot.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/369017534772/locations/global/workloadIdentityPools/github/providers/support-copilot\n service_account: deployer@initech-support-copilot.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy support-copilot --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "1f1a2819a43b97ea89fcda8022fca6bf031186c8a10f177348e3e03fb69eb8b7", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1015, "sha256": "2232eb35ae8bb6da3aaf55f595ee6621e79110e2c3d7c6d16e9a61d7b991efe8", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "608b6da18e6be4173717c836dce2917fd71b56ec2e871effdbb40fed2b919f2f", "content": "# support-copilot\n\nsupport-copilot は initech の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14219, "sha256": "3c35d60a26ceed8d13c8d999e47465bdb57652ef0b8036835e57fb06a3de1eaf", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 274, "sha256": "c022eb13940e5d1b4748b750f68412e9389035e65daf434989ae1efd905c5152", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.mcp.json @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 972, "sha256": "93b5dd5f77848679e1db5b9facf9b9393cfa9dc1ecf3a3ea4d23f040dd0501a9", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 893, "sha256": "25bb456a4df6f475ab4db6199be11aec0f4597695528e05387b4922e7746df30", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://support-copilot.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/369017534772/locations/global/workloadIdentityPools/github/providers/support-copilot\n service_account: deployer@initech-support-copilot.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy support-copilot --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "1f1a2819a43b97ea89fcda8022fca6bf031186c8a10f177348e3e03fb69eb8b7", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1030, "sha256": "e3342f53b40e68d2d69bc78f824ca17614e48a182f1eec3292409d820cc12a7f", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"FAKEL0aCYBVXcT7Qf0zvO2srS9tHiQb0\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "608b6da18e6be4173717c836dce2917fd71b56ec2e871effdbb40fed2b919f2f", "content": "# support-copilot\n\nsupport-copilot は initech の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14219, "sha256": "3c35d60a26ceed8d13c8d999e47465bdb57652ef0b8036835e57fb06a3de1eaf", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-13", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "dp_swap_remote", "planted": [{"class": "G8", "file": ".mcp.json", "component": "supabase", "note": "server removed; credential still declared"}, {"class": "G7", "file": ".mcp.json", "component": "asana", "note": "new remote server with delegated OAuth"}], "expected_labels": ["G7", "G8"], "description": "Before/after pair for onboarding-buddy; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 279, "sha256": "3324ce401e083925c8f8135b9cb531437544c479a882aae362752e8341be73eb", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 253, "sha256": "610708604f3e71aa7213ef668c0782ccf690a48cb1b81e03326281dd46c0f237", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/platform\n/.env.example @umbrella/platform\n/src/ @umbrella/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 907, "sha256": "e9c9e56b30fc645ad34ba64d7e35d25cb1151b44ba5f9e221f2e48202788d613", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 845, "sha256": "489936e6fb69e78e35198905b660bc2a47c069ff11ff462c7139a163c93caa08", "content": "# Deploys onboarding-buddy using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://onboarding-buddy.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/552876384398/locations/global/workloadIdentityPools/github/providers/onboarding-buddy\n service_account: deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy onboarding-buddy --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1131, "sha256": "2ce430f4b9c9bb93a71efb16c0c89836dc2a0f6231906e2ffd9a014734acd570", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/onboarding_buddy\"\n ]\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=wckoioizkuovutpgwmeq\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 394, "sha256": "c4fce17c9bafc2a16d9af9e5aaa7574b9022e3bed7892b669c556f4ab7acba7b", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the umbrella platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12682, "sha256": "7e50faab5fa5488eb7c4f41a3a4b6c3656c208480016acaa0fe3954748ea4f1b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".env.example", "bytes": 279, "sha256": "3324ce401e083925c8f8135b9cb531437544c479a882aae362752e8341be73eb", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 253, "sha256": "610708604f3e71aa7213ef668c0782ccf690a48cb1b81e03326281dd46c0f237", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/platform\n/.env.example @umbrella/platform\n/src/ @umbrella/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 907, "sha256": "e9c9e56b30fc645ad34ba64d7e35d25cb1151b44ba5f9e221f2e48202788d613", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 845, "sha256": "489936e6fb69e78e35198905b660bc2a47c069ff11ff462c7139a163c93caa08", "content": "# Deploys onboarding-buddy using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://onboarding-buddy.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/552876384398/locations/global/workloadIdentityPools/github/providers/onboarding-buddy\n service_account: deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy onboarding-buddy --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 929, "sha256": "5a784c6af084d62475f1ecdf857867a6b8d60d1cc58acb66d7dff2975de046a6", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/onboarding_buddy\"\n ]\n },\n \"asana\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.asana.com/sse\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 394, "sha256": "c4fce17c9bafc2a16d9af9e5aaa7574b9022e3bed7892b669c556f4ab7acba7b", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the umbrella platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12682, "sha256": "7e50faab5fa5488eb7c4f41a3a4b6c3656c208480016acaa0fe3954748ea4f1b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-onboarding-buddy.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-14", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "g2_remove_workflow_perms", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "workflow permissions removed -> implicit default"}], "expected_labels": ["G2"], "description": "repo-gardener の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 271, "sha256": "39b4b631ef546a75025e90e321eeb17d383da06a2c022506e3b4911218d13bb0", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.mcp.json @initech/devex\n/.env.example @initech/devex\n/src/ @initech/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 819, "sha256": "d6db1d8af63763dbcbe857f071eeea1505e361d4e5bdb6af70a3aef5a5f2d1f7", "content": "# repo-gardener の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1177, "sha256": "d62f4547bc861a50332807d5c9148c6d74b58837f23bcd79928c715e6a94c420", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/repo_gardener\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0SLRPS60B\",\n \"SLACK_CHANNEL_IDS\": \"C0SLRPS60B\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "da02c8ad619f08d73165da66d306688cba73aafa733011c6cebeac719a24c6f3", "content": "# repo-gardener\n\nrepo-gardener は initech の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10187, "sha256": "3f951b60dac8ccce798da5e675abfead5076a58dfeff3c50c2088e8e981800e7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}], "after": [{"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 271, "sha256": "39b4b631ef546a75025e90e321eeb17d383da06a2c022506e3b4911218d13bb0", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.mcp.json @initech/devex\n/.env.example @initech/devex\n/src/ @initech/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 789, "sha256": "e47f30ace15db143ea6872545bd2ff965e530a7d082fb5d504bb9d862685e8a2", "content": "# repo-gardener の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1177, "sha256": "d62f4547bc861a50332807d5c9148c6d74b58837f23bcd79928c715e6a94c420", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/repo_gardener\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0SLRPS60B\",\n \"SLACK_CHANNEL_IDS\": \"C0SLRPS60B\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "da02c8ad619f08d73165da66d306688cba73aafa733011c6cebeac719a24c6f3", "content": "# repo-gardener\n\nrepo-gardener は initech の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10187, "sha256": "3f951b60dac8ccce798da5e675abfead5076a58dfeff3c50c2088e8e981800e7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-diff-15", "split": "dev", "kind": "diff_pair", "lang": "en", "variant": "dp_new_job_reuse_eval", "planted": [{"class": "G5", "file": ".github/workflows/ci.yml", "component": "CI/smoke", "note": "eval key shared"}, {"class": "G7", "file": ".github/workflows/ci.yml", "component": "CI/smoke", "note": "new job token"}], "expected_labels": ["G5", "G7"], "description": "Before/after pair for onboarding-buddy; after/grantlock.json is the lock committed for before/.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".cursor/mcp.json", "bytes": 815, "sha256": "5438f99e39b1c47e5ad9844d859261df5d88b50dd1963df18a8f3269acf3167a", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "8170efd8bbc7532a9f2bdeaaed3a8c9dc674744a7a646cd0a0094a29d48314ac", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.cursor/ @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 732, "sha256": "302f2b904a0ac24187c868f9188203214010f3851fa6ad76025502d9b529d4ec", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 687, "sha256": "419fdb530755b70256f7560785f8c94b53e073a27010b9e6fe1784090082aa93", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/onboarding-buddy:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 393, "sha256": "6a48b9dafdf8ef988629c699d9366df72f18bc61bfc0c85157adb759600a88e7", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the cyberdyne agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10921, "sha256": "d0eb3e88b09ef7c057365c6f26170ff02df93d6cba5a9749e0e439f16af67412", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".cursor/mcp.json", "bytes": 815, "sha256": "5438f99e39b1c47e5ad9844d859261df5d88b50dd1963df18a8f3269acf3167a", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "8170efd8bbc7532a9f2bdeaaed3a8c9dc674744a7a646cd0a0094a29d48314ac", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.cursor/ @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 948, "sha256": "c9ba5b38cd476f540740455001c6b9dd83ca792b9229c07a1effab89cfbf27d1", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n smoke:\n runs-on: ubuntu-latest\n needs: test\n steps:\n - uses: actions/checkout@v4\n - run: python -m evals.run --suite smoke\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 687, "sha256": "419fdb530755b70256f7560785f8c94b53e073a27010b9e6fe1784090082aa93", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/onboarding-buddy:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 393, "sha256": "6a48b9dafdf8ef988629c699d9366df72f18bc61bfc0c85157adb759600a88e7", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the cyberdyne agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10921, "sha256": "d0eb3e88b09ef7c057365c6f26170ff02df93d6cba5a9749e0e439f16af67412", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-diff-16", "split": "dev", "kind": "diff_pair", "lang": "ja", "variant": "dp_rename_job", "planted": [{"class": "G7", "file": ".github/workflows/ci.yml", "component": "CI/static-analysis", "note": "new job token"}, {"class": "G8", "file": ".github/workflows/ci.yml", "component": "CI/lint", "note": "old job token dormant"}], "expected_labels": ["G7", "G8"], "description": "release-helper の変更前後ペア。after/grantlock.json は before/ のときにコミットされたロック。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"before": [{"path": ".cursor/mcp.json", "bytes": 846, "sha256": "755c74724366fde8822ba5cfd01ac93b983b0ae89e3ef950f92e97f264ee2756", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T09K4JD8IP\",\n \"SLACK_CHANNEL_IDS\": \"C09K4JD8IP\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 276, "sha256": "46ca21efe68fe585d649a048804ef3a2e4cc5f6b737ceef3f5023c4320c3dbee", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.cursor/ @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 865, "sha256": "b79b651304db52e82f62ccc6c366a7bd44e1bd5bdacb2edc6bf7bb42b17af32a", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 886, "sha256": "61b22f74c5c636939259a8ea3b45d301b5090d2a58b737e277eab776dd329917", "content": "# release-helper を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://release-helper.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/483667619176/locations/global/workloadIdentityPools/github/providers/release-helper\n service_account: deployer@tyrell-release-helper.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy release-helper --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 525, "sha256": "0432dbfb848751185ef7cececccb7273231555ae859658062b018332b8b21751", "content": "# release-helper\n\nrelease-helper は tyrell の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11934, "sha256": "443666ca0b6be0e21a41a99dfcffdab68a034d4fa1e8d6ee88e62cf24f892dca", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}], "after": [{"path": ".cursor/mcp.json", "bytes": 846, "sha256": "755c74724366fde8822ba5cfd01ac93b983b0ae89e3ef950f92e97f264ee2756", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T09K4JD8IP\",\n \"SLACK_CHANNEL_IDS\": \"C09K4JD8IP\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 276, "sha256": "46ca21efe68fe585d649a048804ef3a2e4cc5f6b737ceef3f5023c4320c3dbee", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.cursor/ @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 876, "sha256": "d23521dd584982f40ffef41730cc9e0eaa06f0b089a7d25c40f02b67fffc12f1", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n static-analysis:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 886, "sha256": "61b22f74c5c636939259a8ea3b45d301b5090d2a58b737e277eab776dd329917", "content": "# release-helper を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://release-helper.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/483667619176/locations/global/workloadIdentityPools/github/providers/release-helper\n service_account: deployer@tyrell-release-helper.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy release-helper --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 525, "sha256": "0432dbfb848751185ef7cececccb7273231555ae859658062b018332b8b21751", "content": "# release-helper\n\nrelease-helper は tyrell の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11934, "sha256": "443666ca0b6be0e21a41a99dfcffdab68a034d4fa1e8d6ee88e62cf24f892dca", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G1-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g1_env_literal", "planted": [{"class": "G1", "file": ".mcp.json", "component": "github", "note": "literal value pasted into env.GITHUB_PERSONAL_ACCESS_TOKEN"}], "expected_labels": [], "description": "Snapshot of support-copilot with one planted G1 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "376ebc17bd58c867c31092e8eca4a8b31a6bf969e8a38b852a3fb3f7da8bd18a", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 711, "sha256": "cb8aab411ac7725286233d1b31a0fe88d9b0c54492b2465ae81f90712e6b79e3", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 680, "sha256": "e7552682635c27be04366342be0f9f9a4bf34d8550528765300b215b52601845", "content": "# Deploys support-copilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name support-copilot\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 995, "sha256": "e5cabc7a5e530621fce7a5b3087244ace008a13d5d20e91714269717c859ec9c", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"ghp_FAKELKcbFaW6Pexq3M21rQrVdPl6AWUShqqH\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 390, "sha256": "1c85739db9f3737b6e08e60322ea9ebb4991b957c5b39837ed2dbb731e189e42", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the tyrell platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11653, "sha256": "31444902217260ea2b6dce3410892c972cf4f0b48b84c56118bc58ca343b5330", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G1-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g1_conn_string", "planted": [{"class": "G1", "file": ".mcp.json", "component": "postgres", "note": "password embedded in connection string argument"}], "expected_labels": [], "description": "onboarding-buddy のスナップショット。レビュー済み grantlock.json の上に G1 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 282, "sha256": "ee3f1725cfa20750575aa94e31e75dc7598d308ad99d161b537ad09be4b07011", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/agents\n/.env.example @wayne-ent/agents\n/src/ @wayne-ent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 973, "sha256": "401080b6df50355f6dfcb79538efe0c87487c95198f72ea4914c7af97b85047d", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1178, "sha256": "4a578e31ec234660ecffe3e7774fae51d95655638233c420066d42e241ddba11", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:FAKEpwA1GdZJd334u6BU@db.staging.wayne-ent.internal:5432/onboarding_buddy\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0FJ8KBYKF\",\n \"SLACK_CHANNEL_IDS\": \"C0FJ8KBYKF\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 530, "sha256": "d82dd8ae03c4cd06ab860435641f4092b490ed9e07f5abfcee7cb7f70e0f9c5f", "content": "# onboarding-buddy\n\nonboarding-buddy は wayne-ent の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11512, "sha256": "3431ccd3ce4cc3c70fc134461af385295716777714095afd4e0d127dfc30de7b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.wayne-ent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G1-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g1_header_literal", "planted": [{"class": "G1", "file": ".vscode/mcp.json", "component": "github-remote", "note": "PAT pasted into Authorization header"}], "expected_labels": [], "description": "Snapshot of incident-bot with one planted G1 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 250, "sha256": "b0d0e98187a87bc81ca9291647aa6c0ac5c4c060a938104c84934b8d4f154add", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 254, "sha256": "e26c4b89b31b69e3aadd5884ebb271d02208429a5ec63ca5dce064d813600ffe", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @tyrell/platform\n/.vscode/ @tyrell/ai-platform\n/.env.example @tyrell/ai-platform\n/src/ @tyrell/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 903, "sha256": "26e093ab331f92847fb0cd3603631d532c0a3a214d24aea2e3c2d5343c286e16", "content": "# Continuous integration for incident-bot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1040, "sha256": "8c03b009acf9bc5ef398ea513d490dc0228917ab904117c6793e639ff8f2e13c", "content": "// MCP servers for the incident-bot workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"tavily\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${env:TAVILY_API_KEY}\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ghp_FAKEkrqKsr0lwWjwaQvTLMbB2BJQRdXPdNkt\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 387, "sha256": "1386d12a500780952bf98adec7591bec687458d84f0b0e360c14f69a9c39694f", "content": "# incident-bot\n\nincident-bot is an internal AI agent maintained by the tyrell ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13705, "sha256": "5dbb786c640a0b079b0ead25e29757baaacdda7e95fc083b72207e23fc3074d8", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G1-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g1_workflow_env", "planted": [{"class": "G1", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "API key hard-coded in step env"}], "expected_labels": [], "description": "research-scout のスナップショット。レビュー済み grantlock.json の上に G1 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 283, "sha256": "a7ced439a365f421bcdea2da6f00ffdf7e6b0395dafd05010dda43ae3c8ebd12", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/devex\n/.env.example @stark-labs/devex\n/src/ @stark-labs/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "8004030a5291f1f24394d324a9caef0505ab7d12a189818d76b38c016fd75bae", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 894, "sha256": "7f95bd633e115d8f9435a89bac6e4d32190fbeb93d23f837fc87e35573ae9769", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/561546876264/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: deployer@stark-labs-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 664, "sha256": "a9d1a65aa8c1f7331b2f50025d88cb99245a189fec331938678002872cb91320", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: sk-ant-FAKE414OhqhUbmchhe5ss1BsSFGDsMVCwyoieppT5fEY\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 660, "sha256": "2743695fe54d2870dceec3b62e9e24f91aa630337d398d566d946110c4290557", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "fac52e60bfed2ca3b4f921bfc4e12066af3c40084f9695894ba3478da719a169", "content": "# research-scout\n\nresearch-scout は stark-labs の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10237, "sha256": "3031fead4df6964936fc3c86baaa290881c152904907c97e66edd34f81b272d1", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G1-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g1_run_token", "planted": [{"class": "G1", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "bot token in run script"}], "expected_labels": [], "description": "Snapshot of onboarding-buddy with one planted G1 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 228, "sha256": "670c458ed2e1aff4e9e9c7816eee23c82adf936b14cb67467ee09b54ec9c88f9", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @acme/platform\n/.mcp.json @acme/devex\n/.env.example @acme/devex\n/src/ @acme/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 979, "sha256": "dc98ddb40b05a41413c42caf2fcbd45f444fa6ee339951f2a8befd00692c7036", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: notify\n if: ${{ failure() }}\n run: |\n curl -sS -X POST -H \"Authorization: Bearer xoxb-FAKE-978366500817-otRPtbZHYlSoURr6rw03adl9\" \\\n -d \"channel=C0ALERTS&text=CI failed\" https://slack.com/api/chat.postMessage\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 682, "sha256": "0394ac24428af86e6a74c64a72936b4aabbbf54a2324719f21b8c21a4aa6892f", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/onboarding-buddy:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 696, "sha256": "0f05b1558ba429d43d6ab407a64de6c39c7ae232b450117566bb58a754e2cb39", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 387, "sha256": "849c8a60dfdbe10c93c1e6ac85b1f454be8fc1a551ce06a4005afb4f02277bf3", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the acme devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11800, "sha256": "74a06c0352fcdf436b1d13832936bb30ec0592dff47ebc82a55cdb44a1559fb6", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G1-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g1_args_key", "planted": [{"class": "G1", "file": ".vscode/mcp.json", "component": "openai-bridge", "note": "API key passed as CLI argument"}], "expected_labels": [], "description": "billing-concierge のスナップショット。レビュー済み grantlock.json の上に G1 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 374, "sha256": "178847bf113d177b9e92606d7dd8118166f737679213bce6f0e577167251e649", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\nSUPABASE_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 272, "sha256": "be57b58974cda580782b6f39293cf5d3374c68ce4e36e45bbed5121c9393c8c2", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @hooli/platform\n/.vscode/ @hooli/ml-infra\n/.env.example @hooli/ml-infra\n/src/ @hooli/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 803, "sha256": "80892f4879fa8d945ce4a48da6d2878ca9e94c9d05846cf098f9d6daab5677a0", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 739, "sha256": "2fc1023d892cf12d1d3fc891182f6037ffaa618b119f729afb69a7c715408c47", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name billing-concierge\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1587, "sha256": "c4ce31eed04536033cb1f600e3a7465b080c55f4d68616d13153a0337db277be", "content": "// billing-concierge ワークスペースの MCP サーバ\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.hooli.internal:5432/billing_concierge\"\n ]\n },\n \"supabase\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=qsyomtozgmjxavwevpnm\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${env:SUPABASE_ACCESS_TOKEN}\"\n }\n },\n \"openai-bridge\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"openai-mcp-bridge\",\n \"--api-key\",\n \"sk-FAKEDYJHbM5cffzmITB0IeKsXfTlmfrR9IlCWWrHlW3w\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 530, "sha256": "5bf8c364e8e2669930e77b3c20bae390a95e7720e2046fe5b5aab7e860d4fdf4", "content": "# billing-concierge\n\nbilling-concierge は hooli の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14522, "sha256": "fbdec2acfe1f4bcefe73d2d0056d8d7244dac93c8f9fa88e6a9012b3830d6925", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.hooli.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G1-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g1_with_literal", "planted": [{"class": "G1", "file": ".github/workflows/docker.yml", "component": "Container image/image", "note": "registry PAT as literal action input"}], "expected_labels": [], "description": "Snapshot of onboarding-buddy with one planted G1 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 249, "sha256": "26994ae4ddd3152f4475ec554c36f25dec349b1089a55195122e1cf282969d06", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "64a79382abc6c00a24c245e480aa4293b33fd70c6fd0454dc712ab7070c89c93", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 862, "sha256": "5caad3c93fe834c6494c6695e9115b54fbf51714220ed42732eef0d86bcef172", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 682, "sha256": "0ffd22d854fc62c18858db947479270c508993c575aad47712bc41d271d27b6a", "content": "# Deploys onboarding-buddy using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name onboarding-buddy\n"}, {"path": ".github/workflows/docker.yml", "bytes": 700, "sha256": "fb7ca841e96f9003c4ec3cfa8347bff864058e28c41a17a730e8f1d39d96ce04", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ghp_FAKEAyoLQjqmZrgEzxHocovmoinpPEy9Uca1\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/onboarding-buddy:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 764, "sha256": "ad1614ea06f8e078b9ef7b7fae3a55c148e6076746876f414764c892b45ba21d", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 393, "sha256": "6a48b9dafdf8ef988629c699d9366df72f18bc61bfc0c85157adb759600a88e7", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the cyberdyne agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11636, "sha256": "7ac5951d92d4e9aac5bb07bc9539cd8f1e9f364c604e5f3426902842063946fe", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G1-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g1_env_literal", "planted": [{"class": "G1", "file": ".cursor/mcp.json", "component": "github", "note": "literal value pasted into env.GITHUB_PERSONAL_ACCESS_TOKEN"}], "expected_labels": [], "description": "release-helper のスナップショット。レビュー済み grantlock.json の上に G1 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1113, "sha256": "353b6f1cf3faeabf8e393d67c6334c9b338a3e181aeb1b4ae1531a7551b9280c", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"ghp_FAKEFIOx5UShz6gdWIiOyUemM29qmBQzFTPo\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=dpmpyncceduhtnoptxcy\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 353, "sha256": "2aa2f6204460179ee7f95983132d4ed127cfcab8d24798c68076a3e07784485a", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSUPABASE_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 285, "sha256": "5bdac53c411026d9933689daf5f6f15b9c62468f42969c5a607a9930ea592c32", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.cursor/ @tyrell/ai-platform\n/.env.example @tyrell/ai-platform\n/src/ @tyrell/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "a3019ce482482dc8d6141671dec2f296c171774102323fb90e727c93fcf8dd43", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 745, "sha256": "f3dee240170cb043b6c1c1da9871e1a380f685a801cdddf9089dacb55885b0a1", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/tyrell/release-helper:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 528, "sha256": "4cf84b1b500ca38d88818a489b0e3fdb7e44fc8c9e9fad75b8a165d2b3b681d1", "content": "# release-helper\n\nrelease-helper は tyrell の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12448, "sha256": "22ddce86d2c6267f980a9627fa02e80f3df8cef6c8df54222884ca020813c0a0", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G1-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g1_conn_string", "planted": [{"class": "G1", "file": ".mcp.json", "component": "postgres", "note": "password embedded in connection string argument"}], "expected_labels": [], "description": "Snapshot of support-copilot with one planted G1 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 252, "sha256": "803572b5fb77fce9cb86af63aaaf95c882d7336a604f2c3b6d7f56a3521e3607", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/devex\n/.env.example @stark-labs/devex\n/src/ @stark-labs/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 711, "sha256": "cb8aab411ac7725286233d1b31a0fe88d9b0c54492b2465ae81f90712e6b79e3", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 687, "sha256": "6d4a1a1fc4b1ddd5b71d078e9c0a76db278e0c9ab5eb7493a00927fb06a14c9c", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/support-copilot:latest\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 979, "sha256": "4536a9f455e965ba419b240bffa822f65b66e9b8aa5cb4644c5e05b313cf8592", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:FAKEpwBYFSSoj7bGcu11@db.staging.stark-labs.internal:5432/support_copilot\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "28350b8e8317f7421d7c4d851bf1eaed6a7131408dd00e647b4363f132b31ace", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the stark-labs devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11601, "sha256": "2f97d308651d0661f2ed52539d33617324e219af4f679f1752ed70e2d9b460e1", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G1-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g1_header_literal", "planted": [{"class": "G1", "file": ".mcp.json", "component": "github-remote", "note": "PAT pasted into Authorization header"}], "expected_labels": [], "description": "sales-ops-agent のスナップショット。レビュー済み grantlock.json の上に G1 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 292, "sha256": "67250c32a6d61914473519b9c7e9b7413a3bf5e29aa9626a575153eae5252f46", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/platform\n/.env.example @stark-labs/platform\n/src/ @stark-labs/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 821, "sha256": "2805902750cc06278bb343358689da47cb50150acf4d793ca7088cda1d44e67c", "content": "# sales-ops-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 851, "sha256": "9c58c5d0d6943586d31e5c072a99acae7baacfa6bfab245bf9b7dae4a3be339e", "content": "# sales-ops-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::168787726988:role/sales-ops-agent-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster sales-ops-agent --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1332, "sha256": "cec55afba4f65e52ab4df98534e517086d0a72bc40e219ff386b200d8364327d", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.stark-labs.internal:5432/sales_ops_agent\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T00OJT5E89\",\n \"SLACK_CHANNEL_IDS\": \"C00OJT5E89\"\n }\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ghp_FAKEhcvT1grW3Z3oztTn5N5vQUKmdcfRrgWD\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 531, "sha256": "dbb8bdc7664353d645855d468b7813b20e90eb24978a2edb60ded576bd7eba03", "content": "# sales-ops-agent\n\nsales-ops-agent は stark-labs の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10810, "sha256": "e77ef658dde3618dcd0a11bc65d771a376c349c3fd756aaa6b8ae253a9c74e75", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::168787726988:role/sales-ops-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::168787726988:role/sales-ops-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"sales-ops-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:sales-ops-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g2_job_pr_write", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "pull-requests: write added to test job"}], "expected_labels": [], "description": "Snapshot of triage-agent with one planted G2 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 247, "sha256": "1e833dbb3f2f8ce4c94950c61e015046ec39b4b31305e17c59e86b1c513f2394", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.vscode/ @umbrella/agents\n/.env.example @umbrella/agents\n/src/ @umbrella/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 968, "sha256": "f5eb3ea045d723113c2ba569538f3eec8f4e8ee41dcbffe3223207bc2c358a44", "content": "# Continuous integration for triage-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n permissions:\n contents: read\n pull-requests: write\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 674, "sha256": "19c9a4308ec75972019a6a048e3f188341d111897077f64ecdd6bda75ea54787", "content": "# Deploys triage-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name triage-agent\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 939, "sha256": "243629cdc4ed23d1e749ab83364b83f74aaab4741465f40b727f9215fa9ca361", "content": "// MCP servers for the triage-agent workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 384, "sha256": "63d5e0ed480070f622227ed460832deaff4ef2591239beaad5525c6872342067", "content": "# triage-agent\n\ntriage-agent is an internal AI agent maintained by the umbrella agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11881, "sha256": "33d834ad328e07e2456cf272c9e9de4a942f837eef41f6f93bb5ad2da1ab7146", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G2-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g2_deploy_add", "planted": [{"class": "G2", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deployments: write added to production job"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G2 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 279, "sha256": "ced78d0d91c9fa8349d7e31f42d04449857083373ff3e9d2185a36a46df179ce", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/devex\n/.env.example @cyberdyne/devex\n/src/ @cyberdyne/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 863, "sha256": "57732daafbe420b7aa90a2f59c2edb3b24ebc568ee71fc4d980e4ba84fd3ddaa", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 862, "sha256": "e262bff33159aac978dde31b5f87de057b762c17fe675274baad9db0a241b4c6", "content": "# triage-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n deployments: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::579180733750:role/triage-agent-deploy\n aws-region: eu-west-1\n - name: デプロイ\n run: aws ecs update-service --cluster triage-agent --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 803, "sha256": "f4672de9a8e653817c2f5816ad7c7f57ca7990565515c3eb4be488514b5781ca", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.cyberdyne.internal:5432/triage_agent\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "73cd87589ecc7fb5bf74a56623ed9bb2758bddb3bf375ba8fab8f63a9b5be97b", "content": "# triage-agent\n\ntriage-agent は cyberdyne の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 9932, "sha256": "d0134de20dadcd865aad7bfc6d18094fecbae201edb13c321d49531864ce136e", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::579180733750:role/triage-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::579180733750:role/triage-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"triage-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:triage-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.cyberdyne.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g2_remove_workflow_perms", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "workflow permissions removed -> implicit default"}], "expected_labels": [], "description": "Snapshot of incident-bot with one planted G2 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 249, "sha256": "26994ae4ddd3152f4475ec554c36f25dec349b1089a55195122e1cf282969d06", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 244, "sha256": "86b642b03943c1b1b710606067c58ee1584f54039f5fe20802892590cf5d6381", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/devex\n/.env.example @umbrella/devex\n/src/ @umbrella/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 678, "sha256": "c14a00244d6cd42e9cf4d427f74ecc6c9dc0bf19fec269f8998e55d8de9ea9b8", "content": "# Continuous integration for incident-bot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1061, "sha256": "ee1a6dec1da5025f96066127dabc0fa6b7d1d5cfe3036ebb054edacc04940dae", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 383, "sha256": "ee48845147dc22e3cedb88096f9b1217031e28d9a705523fea1774628516ed98", "content": "# incident-bot\n\nincident-bot is an internal AI agent maintained by the umbrella devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9423, "sha256": "89d208c9afc541b035adb8855e148f642e9db836c7b9cad83cf1413d44842294", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g2_toolsets", "planted": [{"class": "G2", "file": ".vscode/mcp.json", "component": "github", "note": "toolsets pull_requests,actions added"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G2 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 282, "sha256": "ae746f88e7124a1938b397bd92eff2b46daf7cf4ecb30d0233cde2c0dfc352c7", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.vscode/ @cyberdyne/agents\n/.env.example @cyberdyne/agents\n/src/ @cyberdyne/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 843, "sha256": "c20292346757dbb4a531292dab0cd6567b67f7a7f94b686008d52af13d5eea3d", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1088, "sha256": "e0ce16ef36949e22ff20e659988a2e2a199f5f46018d99556485993c66f1769a", "content": "// triage-agent ワークスペースの MCP サーバ\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues,pull_requests,actions\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"tavily\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${env:TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 522, "sha256": "e77c4bc26f24a8140768968911d01cd3f97d85d5434b18abda970b6a634a9582", "content": "# triage-agent\n\ntriage-agent は cyberdyne の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 7036, "sha256": "9ac1d098c1213c2b024ed987b2d25164ddd657d2f812f1a9bd5825b33304e1db", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @cyberdyne/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G2-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g2_ci_contents_write", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "workflow contents: read -> write"}], "expected_labels": [], "description": "Snapshot of data-analyst-agent with one planted G2 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1131, "sha256": "0d414bda81d9b6f9d3d357d99cb0b1a2090b2eb70a880d3919d520eef9b397b0", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 279, "sha256": "9b8c9f46303b61ae4df9688d63d147d949adeea99f5c5718401532928d38dc01", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 266, "sha256": "9087b471008f17887d75c309518a9e0764cf069c593f6de5bdad148a73c74562", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @wayne-ent/platform\n/.cursor/ @wayne-ent/ai-platform\n/.env.example @wayne-ent/ai-platform\n/src/ @wayne-ent/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 865, "sha256": "19d2f02b704afc14f64eaa959b450030489a900d5be3b6b7e9c2ff5e18b2363b", "content": "# Continuous integration for data-analyst-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: write\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 689, "sha256": "63da049f31650a9fb8ccd26e30f597f211ed1ae6f933071855a9b4d2eea6ef6f", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/wayne-ent/data-analyst-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 402, "sha256": "8b15c948a7ab284120ab93aae0b78db70cd6cca8da8b2b643a94901a37f4406f", "content": "# data-analyst-agent\n\ndata-analyst-agent is an internal AI agent maintained by the wayne-ent ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 16572, "sha256": "7bc133136a61909828a1e9156b80cce053fffc3235bb86c0ee0803ed9b0389ec", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @wayne-ent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g2_eval_issues", "planted": [{"class": "G2", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "issues: write added to eval job"}], "expected_labels": [], "description": "billing-concierge のスナップショット。レビュー済み grantlock.json の上に G2 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1022, "sha256": "3f7db0875ae2965269c7a41e8755b51d6d1034d5830b0091c273c247ee7d5904", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=jfrlmqdssslkvccpppee\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 338, "sha256": "da892fd9a37c006c63a837f6357b42bd9b7e440179dfd8eca857b87ecb16b4b1", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSUPABASE_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 267, "sha256": "f1ffdeaf583a5faf38d14c941c85f0400935543b435ee1a492e2b0653ea1e42e", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @globex/platform\n/.cursor/ @globex/devex\n/.env.example @globex/devex\n/src/ @globex/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 868, "sha256": "b63e2dd8f7f45ab531e23dc82a5b35c83160f96f04a6d605a11f70f1e9a03b31", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 857, "sha256": "da226531e2fe2d76663e487ed60b3138e4b32a80ccfaf9a0bb77e1f601f99558", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::616470539650:role/billing-concierge-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 708, "sha256": "69832b977a956633dc8b81c54e3f78340f446aebf4319f8acc8d40f3caa9031a", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n permissions:\n contents: read\n issues: write\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 528, "sha256": "dcc9a74d65a3a8cf99708d7cb42c6c2e52c02fb355e0f2a70cd46aad61fe6a0d", "content": "# billing-concierge\n\nbilling-concierge は globex の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12066, "sha256": "a1fe68e8b30847995c6989e5fae6476890a048ce52d66089fd8bd6f4d19dbfb5", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::616470539650:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::616470539650:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g2_docker_attest", "planted": [{"class": "G2", "file": ".github/workflows/docker.yml", "component": "Container image/image", "note": "id-token/attestations write added"}], "expected_labels": [], "description": "Snapshot of support-copilot with one planted G2 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 265, "sha256": "9257df36b9028afdf97da4e7bb8397d8da4841c5ac660b7fdebfbcee8efde678", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "fd4d177b755e205538114b90750b8525b38734dd5079cc31cc55f08b5d728acc", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 776, "sha256": "0c8e0c963a6ee216d0496ef179b733f128e7b3504e7e1e36050974d255e6cf41", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 844, "sha256": "412bdd80c0f8f676bd8d82eea42456af6eab1272a7ea79c83c1cb8a398aa1971", "content": "# Deploys support-copilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://support-copilot.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/682691317155/locations/global/workloadIdentityPools/github/providers/support-copilot\n service_account: deployer@stark-labs-support-copilot.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy support-copilot --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 735, "sha256": "e8973f2a2622821a74efe9097167b046aff03b96d40a1e41b514ddee165ef9e4", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n id-token: write\n attestations: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1057, "sha256": "e10bb070f1c70edec49bbca12471a3abf38d538da5255db03a1ba562e72aec44", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 397, "sha256": "a408bdb87a21a3b8fdd055a24f016f7b1ea53862b4e0d51e278e6aafb2b65848", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the stark-labs ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13918, "sha256": "3bac76432b83ce6c09575e78a239f24968df2f50bec510f6c58e7afbc8113772", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-support-copilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-support-copilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g2_lint_checks_write", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/lint", "note": "checks: write added to lint job"}], "expected_labels": [], "description": "release-helper のスナップショット。レビュー済み grantlock.json の上に G2 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 351, "sha256": "e6321f9f238f8ac40e7b67950afa09ec11c23293e10478cef3dfbc3d813a98c5", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 285, "sha256": "d9e9676141097ecafec260538306528fb97c0f44003d133b5f53b213c4a0bb4d", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/ai-platform\n/.env.example @tyrell/ai-platform\n/src/ @tyrell/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 858, "sha256": "d3a50d8023c75bdb3badcdbf32f5a54a3dd8042e1bf8336dd03e258b62b38a31", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions:\n contents: read\n checks: write\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1191, "sha256": "c363552d9654b32975ee5a3b5bee9b51857db18491246e3a74fc58d5df0d04b3", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.tyrell.internal:5432/release_helper\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 528, "sha256": "4cf84b1b500ca38d88818a489b0e3fdb7e44fc8c9e9fad75b8a165d2b3b681d1", "content": "# release-helper\n\nrelease-helper は tyrell の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12503, "sha256": "1c37d8ceeb5249a8d633818acff462e8502c5b14824ed0bfb85be70263cc4876", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.tyrell.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g2_job_pr_write", "planted": [{"class": "G2", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "pull-requests: write added to test job"}], "expected_labels": [], "description": "Snapshot of qa-pilot with one planted G2 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 264, "sha256": "9f98e4e43bb4f0d8f482336118d6b8ea5a28fb1854034e3bb2a96ae675551a5d", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 266, "sha256": "079911b4a9f43d89cef8977512ab045f9e4ac788fd1faac88e74a5fc8228acde", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/ai-platform\n/.env.example @cyberdyne/ai-platform\n/src/ @cyberdyne/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 939, "sha256": "1c2950f49f6afcf71e8b021bbec1203779b36198a35538ec14d0bcca8b655d9f", "content": "# Continuous integration for qa-pilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n permissions:\n contents: read\n pull-requests: write\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 679, "sha256": "ea990c10508e8972c081b6b02847cc9e9afb74deb8cb10c0bf203b9863d8124d", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/qa-pilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 977, "sha256": "5b0dbf60dcde6f5c6fdac8243160e7c71c1710bdcfbeef863bef7f94df25bb83", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 382, "sha256": "34173a74a248da04ffbb31aed163a708c97796adef541ce50bfa7f52664b878f", "content": "# qa-pilot\n\nqa-pilot is an internal AI agent maintained by the cyberdyne ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13452, "sha256": "03ec492d5d3cc74a4fba14cee5fb0dee6408f0adb3b2f5281f1796caa5d2291b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G2-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g2_deploy_add", "planted": [{"class": "G2", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deployments: write added to production job"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G2 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 283, "sha256": "a7ced439a365f421bcdea2da6f00ffdf7e6b0395dafd05010dda43ae3c8ebd12", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/devex\n/.env.example @stark-labs/devex\n/src/ @stark-labs/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 989, "sha256": "3ad24bec3b2659d37733b35047cd392aec7b512b13fb845b76b686f4b15c7dc8", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 909, "sha256": "79b9950b343660381885137598dee6e1c5781630ac7fd68ddf360d2e2f3ea2f0", "content": "# triage-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://triage-agent.stark-labs.example\n permissions:\n contents: read\n id-token: write\n deployments: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/852671663510/locations/global/workloadIdentityPools/github/providers/triage-agent\n service_account: deployer@stark-labs-triage-agent.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy triage-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "81d74b3f007c0190e40378e6776d1a7283a72a5a7b13b2997160b37c80469c13", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/triage-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 983, "sha256": "d4df9791ff5633a34b73566250a291081968215330942a34acf5d92eb0228d30", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.stark-labs.internal:5432/triage_agent\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 522, "sha256": "6e95823169f80c0f15ba737b2a6b28723cef73132457121221da2afc17f4c4f2", "content": "# triage-agent\n\ntriage-agent は stark-labs の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14335, "sha256": "f796948a92c87980ffdcf446af2299c118163d36dd707356e6e76397a8313c9f", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-triage-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-triage-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g3_job_write_all", "planted": [{"class": "G3", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "permissions: write-all on job"}], "expected_labels": [], "description": "Snapshot of data-analyst-agent with one planted G3 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 678, "sha256": "2f0a37e41b110f9a3e7741a93e17f19e7b2e059db71ef1f50129671f7084dfec", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "e2ed9956151ba67b37eeee43aafe85f2da5c566fa422e7839cafb88d089a19e8", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.cursor/ @initech/ml-infra\n/.env.example @initech/ml-infra\n/src/ @initech/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 936, "sha256": "dd726655acb629ec0545ae1be18720b072389a41b0dc93df7a9c1e2cfda505ab", "content": "# Continuous integration for data-analyst-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n permissions: write-all\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 397, "sha256": "176f1d021330d4ae0fd2602943bb0aa12d9eb8f2a73ef5b69ac086cfa0b577fe", "content": "# data-analyst-agent\n\ndata-analyst-agent is an internal AI agent maintained by the initech ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11834, "sha256": "cd58bc668f838dc681d9b6121b17b87b0f2236935789a5de9883eb66f818fbc3", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g3_admin_role", "planted": [{"class": "G3", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "OIDC role switched to AdministratorAccess"}], "expected_labels": [], "description": "support-copilot のスナップショット。レビュー済み grantlock.json の上に G3 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1097, "sha256": "63206ba7e68658f4567a794b0ce2726a506a3db1d9167336f1333d233f7033cf", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0PU4ZI62T\",\n \"SLACK_CHANNEL_IDS\": \"C0PU4ZI62T\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 272, "sha256": "50c6d9f9e1dffa1eeba9c2438044b35d14de41047c01f12b454ff2617cb8a42c", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @hooli/platform\n/.cursor/ @hooli/ml-infra\n/.env.example @hooli/ml-infra\n/src/ @hooli/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 972, "sha256": "93b5dd5f77848679e1db5b9facf9b9393cfa9dc1ecf3a3ea4d23f040dd0501a9", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 843, "sha256": "5b0df2ec74f6bc4175f72727706148f68ec55e5ee6c00e3b0e4e2559a30cb018", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::589246818534:role/AdministratorAccess\n aws-region: us-east-1\n - name: デプロイ\n run: aws ecs update-service --cluster support-copilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 745, "sha256": "691505b85159baeb7d4b179548747b077f5381ba739b68ac0be62a5dbbed1615", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/hooli/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 526, "sha256": "2442ac2d899241504871f5855db0d0aeb74b99c80a96729f41deaa98e967cc14", "content": "# support-copilot\n\nsupport-copilot は hooli の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14344, "sha256": "a099e79515a64b9bd98c57883949a31739512429f43e7426777e4a8248f50e09", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::589246818534:role/support-copilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::589246818534:role/support-copilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"support-copilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:support-copilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g3_toolsets_all", "planted": [{"class": "G3", "file": ".mcp.json", "component": "github", "note": "GITHUB_TOOLSETS=all"}], "expected_labels": [], "description": "Snapshot of onboarding-buddy with one planted G3 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 287, "sha256": "a2bb76a62b789a27328556d9b2c53e098a980616133b2b77f096e271feeda262", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 261, "sha256": "4ae2333320430c2836f612ad02d9aa75bcce645978274fa7b810f5f4e486b239", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/ml-infra\n/.env.example @stark-labs/ml-infra\n/src/ @stark-labs/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 757, "sha256": "f3b7b57332695b8fcc5b0dc2920424e352e66e64a178e010a189298f4e0b4084", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 849, "sha256": "e54fac1ac8b63a8d1637825c07b9e13542b57e9300e72de31d5cd19b564a23ed", "content": "# Deploys onboarding-buddy using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://onboarding-buddy.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/101909370073/locations/global/workloadIdentityPools/github/providers/onboarding-buddy\n service_account: deployer@stark-labs-onboarding-buddy.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy onboarding-buddy --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1177, "sha256": "25777b120cab3c876fa004f3098e0ce4a56679e6b31c76531c794354b660d110", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"all\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.stark-labs.internal:5432/onboarding_buddy\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0DZ74ZH4C\",\n \"SLACK_CHANNEL_IDS\": \"C0DZ74ZH4C\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 396, "sha256": "ee118fda70ae6edb501ed2ec2bf50d3bc832da584bbc3f19ed53c815fb9fb300", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the stark-labs ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12335, "sha256": "63225e362fedec7bafdaa4605fa2fd72921d78aec85badd889f278efc70bbf9b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-onboarding-buddy.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-onboarding-buddy.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g3_wf_write_all", "planted": [{"class": "G3", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "workflow-level write-all"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G3 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 337, "sha256": "44aab2d686c5ebdb637fb8efff3f8c20798ef4e8bed26632802798891825da9e", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 282, "sha256": "ee3f1725cfa20750575aa94e31e75dc7598d308ad99d161b537ad09be4b07011", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/agents\n/.env.example @wayne-ent/agents\n/src/ @wayne-ent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 836, "sha256": "48e457e321f5193357c147d3d57b52ebddfc72f610a38a79315ee21f26170867", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions: write-all\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1027, "sha256": "aa48cbcd9ebf4628cbaf6a4fdd667a8dc688b01ad52dec876344e91db682c000", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.wayne-ent.internal:5432/triage_agent\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 522, "sha256": "0cdbcf38263d2994fa20b7340985ae4d19c48637a894949875c7291796e9794d", "content": "# triage-agent\n\ntriage-agent は wayne-ent の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 9658, "sha256": "d9ce7d9e6f8d558dec4c6d67cc157469216abd5ff7f03257380693881ab1c3cf", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.wayne-ent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g3_snowflake_admin", "planted": [{"class": "G3", "file": ".mcp.json", "component": "snowflake", "note": "agent runs as ACCOUNTADMIN"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G3 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 270, "sha256": "717dae87c5980fe3ed8492ac457e036344d3644f3ce6f604929331b6753f1e33", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\nSNOWFLAKE_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 241, "sha256": "78f269493e2e1365a3bfc342f29fd1d396182b1adcfa63eaa6b86d95b609c241", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @hooli/platform\n/.mcp.json @hooli/ml-infra\n/.env.example @hooli/ml-infra\n/src/ @hooli/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 860, "sha256": "182c00c6475979907ddb1a566409a78fb72e30dd3011027ee390c78d72c59434", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 829, "sha256": "2255b4d0558fa24453335abace93ff782ff8d503b4244ef7e67a17de3a069900", "content": "# Deploys release-helper using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://release-helper.hooli.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/912248477881/locations/global/workloadIdentityPools/github/providers/release-helper\n service_account: deployer@hooli-release-helper.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy release-helper --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1329, "sha256": "68bb2031e87eb7cff0a7117a88a6719b82c0c4cb92269e85978b859e6a3eedfd", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n },\n \"snowflake\": {\n \"command\": \"uvx\",\n \"args\": [\n \"snowflake-labs-mcp\",\n \"--service-config-file\",\n \"config/snowflake.yaml\"\n ],\n \"env\": {\n \"SNOWFLAKE_ACCOUNT\": \"hooli-analytics\",\n \"SNOWFLAKE_USER\": \"AGENT_SVC\",\n \"SNOWFLAKE_ROLE\": \"ACCOUNTADMIN\",\n \"SNOWFLAKE_PASSWORD\": \"${SNOWFLAKE_PASSWORD}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 387, "sha256": "eff12c7565689ecffd27ce0004d8adbf708da42519e02f79e1d0a140fb3679ad", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the hooli ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9734, "sha256": "840d1569e8d96f48b65c54e96eb426db184cf1d669f103939144d85eaebb8888", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@hooli-release-helper.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@hooli-release-helper.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G3-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g3_gcp_admin_sa", "planted": [{"class": "G3", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deploys as an admin service account"}], "expected_labels": [], "description": "research-scout のスナップショット。レビュー済み grantlock.json の上に G3 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 811, "sha256": "a087a64afd8a62f8e946f8aae52ad251594052501a69e8c6af98e3f940066927", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 330, "sha256": "7bee66186dd218fc541d5a8c01e4e19c2b41261c947f3f2f324dae7a68e32f3f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 275, "sha256": "ded76998992bb897ddc1e9367509e4dd4880a79b421ebf498b8714adbf5f4d0f", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.cursor/ @umbrella/devex\n/.env.example @umbrella/devex\n/src/ @umbrella/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 800, "sha256": "8004030a5291f1f24394d324a9caef0505ab7d12a189818d76b38c016fd75bae", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 891, "sha256": "3f951a945eeea59abb3a1d4ac36081a28c20d32732c0b1fa49b1f455249c76cf", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/365189811832/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: gha-admin@umbrella-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 524, "sha256": "a8be4a4b2c1a5861ba07726fcd35e535e6f7e2ffc0c2e0546ee8b66c35d9ad90", "content": "# research-scout\n\nresearch-scout は umbrella の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11064, "sha256": "8a6f22d62970703d26023e3bafaf4d2ff123d5ec3aff5e477d47c4d304d58167", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g3_job_write_all", "planted": [{"class": "G3", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "permissions: write-all on job"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G3 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 262, "sha256": "4b3c14a49f2117cb58cccd4cfedecf2e420a54ec9fcaffbd46e29e4303f7432c", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/ai-platform\n/.env.example @umbrella/ai-platform\n/src/ @umbrella/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 737, "sha256": "453f7f55a929c799dafa64fafc42f7818a6092f61ea6517d712240f9109f7956", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n permissions: write-all\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 835, "sha256": "14f9f079a712fa8b9f830c62bd8ba3da3545a692217e72017819fbc0d622ea6d", "content": "# Deploys release-helper using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://release-helper.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/776636049518/locations/global/workloadIdentityPools/github/providers/release-helper\n service_account: deployer@umbrella-release-helper.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy release-helper --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 976, "sha256": "788830008f4930f9777a6bfcc5afe666be8361c13e82ec5f6dc2f6f539dfd499", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/release_helper\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 393, "sha256": "2a7ed0d55b329c70ad9800ad9117101778fd364cc763173859fa77ef797a0824", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the umbrella ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11296, "sha256": "bfdcc00677ead1f3d05b3022119283ea8a1b2286677d0c479ded26e6acfe368f", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-release-helper.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-release-helper.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g3_admin_role", "planted": [{"class": "G3", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "OIDC role switched to AdministratorAccess"}], "expected_labels": [], "description": "onboarding-buddy のスナップショット。レビュー済み grantlock.json の上に G3 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1046, "sha256": "4af737942c6bdaf0699852894f78b2f2f5ce153bc282777810021c54ce4066cc", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T09NJTG15K\",\n \"SLACK_CHANNEL_IDS\": \"C09NJTG15K\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 301, "sha256": "6402943a6b265772c021cf49ab5252eb1378b42116e77c320d3b3ce82267ffa9", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 973, "sha256": "401080b6df50355f6dfcb79538efe0c87487c95198f72ea4914c7af97b85047d", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 845, "sha256": "fd1a180022f544ac383ab81b6c36f535f50554fa7aebcadf546e4fc2155418d2", "content": "# onboarding-buddy を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::892052142451:role/AdministratorAccess\n aws-region: us-east-1\n - name: デプロイ\n run: aws ecs update-service --cluster onboarding-buddy --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 536, "sha256": "b5248069b3ae414af07712a73ee3ecc81245b19c0a7a8afba8310adbadbbdb9a", "content": "# onboarding-buddy\n\nonboarding-buddy は stark-labs の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10006, "sha256": "65a252e61ef731851ce0d016b6f3b84e778f56bb12bc272e4317424695db4589", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::892052142451:role/onboarding-buddy-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::892052142451:role/onboarding-buddy-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"onboarding-buddy-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:onboarding-buddy-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G3-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g3_toolsets_all", "planted": [{"class": "G3", "file": ".mcp.json", "component": "github", "note": "GITHUB_TOOLSETS=all"}], "expected_labels": [], "description": "Snapshot of research-scout with one planted G3 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 272, "sha256": "4e5e2734213fd73dec10b2c7364b5267391cb33e42b20b08792a60c4ae65ff66", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 243, "sha256": "ab857caa22033bdde86fe834f9024eedee4949ed935fdcde86b991a284c95b2d", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @soylent/platform\n/.mcp.json @soylent/agents\n/.env.example @soylent/agents\n/src/ @soylent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 905, "sha256": "9a0b00f3a782a25e66605b115c5cd50141bc8bfb3c316e402b7f1f4179c6083f", "content": "# Continuous integration for research-scout.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "de279787ccba98f432305b57e75d2ff6e378d1f26cedb48dab7334026f372013", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/soylent/research-scout:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 976, "sha256": "5292c7d34ce834e94f9b0302758d8ce323f4ed8b8e5ca69852a0e9cb8c61cb6b", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"all\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.soylent.internal:5432/research_scout\"\n ]\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 387, "sha256": "eb6cf1a994a21b2148b14792d41672c816356740dddb554c0ca748f912334bf8", "content": "# research-scout\n\nresearch-scout is an internal AI agent maintained by the soylent agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11162, "sha256": "18d2e0d35ce792686b1940d49f51867531d78ce4aa36fba0418fbcd1d350e334", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.soylent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G3-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g3_wf_write_all", "planted": [{"class": "G3", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "workflow-level write-all"}], "expected_labels": [], "description": "onboarding-buddy のスナップショット。レビュー済み grantlock.json の上に G3 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 938, "sha256": "c579aef83464177ff8f32cf3155fdee8f835792e3d0722738d280c8e2d0e4720", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 345, "sha256": "a5472cdd1104e0ef5b7e3f06ecf77288d8c191996a763a4d436c607e2e54661c", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 280, "sha256": "3bdd1cba27d09b09598a1cc89c21238dff2cc7c54d53e51d9e07db8840e0af4b", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.cursor/ @initech/ml-infra\n/.env.example @initech/ml-infra\n/src/ @initech/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 795, "sha256": "dbd24712aed58e93d388734f4391953801032b8828083a5d6b39e7333739db11", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions: write-all\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 530, "sha256": "ba944a645580d8fa01327bdcba04e2babc3eb736e82d9a2e8b0ec27af4493bcf", "content": "# onboarding-buddy\n\nonboarding-buddy は initech の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10343, "sha256": "40319c371adcb3b3c0480bd398095e62bae916de4cccfd3639fb8b49d522c9d4", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g4_drop_mcp_rule", "planted": [{"class": "G4", "file": ".vscode/mcp.json", "component": "github", "note": "CODEOWNERS rule for MCP config removed"}], "expected_labels": [], "description": "Snapshot of repo-gardener with one planted G4 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 270, "sha256": "17c5725afdd4b31d5b985fcb9e09dd1a8bf039d23bbdb9d09d85ca37be742979", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 212, "sha256": "3e4a9fffb308f0db70575c1d593c7c149f888772c755b55b84b754734317da6e", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.env.example @initech/ai-platform\n/src/ @initech/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 709, "sha256": "2274c5af7d7be4c190bb979c7651ecf83cd220eba47a16de6594d3dd54e88be6", "content": "# Continuous integration for repo-gardener.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 828, "sha256": "94c2a7f1786668f374f8979f40069651bfbf9a8b0662fc955d43c4fd333722c3", "content": "# Deploys repo-gardener using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://repo-gardener.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/991590044602/locations/global/workloadIdentityPools/github/providers/repo-gardener\n service_account: deployer@initech-repo-gardener.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy repo-gardener --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1382, "sha256": "a43bc0017791811ddc518ad4f3a1467a5773b8301173f6853e0b9147546c9792", "content": "// MCP servers for the repo-gardener workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"notion\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${env:NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/repo_gardener\"\n ]\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 390, "sha256": "c407023f4c35d3ad6f0374d7cec297c0d604f4de0e7948df1fb8afdc39340f88", "content": "# repo-gardener\n\nrepo-gardener is an internal AI agent maintained by the initech ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13932, "sha256": "c80e1905cd9695736eb7df498939ea1d5b2d4d466c21a8c8d0500b440d1e7858", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-repo-gardener.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-repo-gardener.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g4_drop_github_rule", "planted": [{"class": "G4", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "CODEOWNERS rule for .github removed"}], "expected_labels": [], "description": "billing-concierge のスナップショット。レビュー済み grantlock.json の上に G4 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 228, "sha256": "21ba430ccc69e2cc59ad51f649e56509688496b103876ccf51ba6df0959f16f3", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.vscode/ @tyrell/agents\n/.env.example @tyrell/agents\n/src/ @tyrell/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1019, "sha256": "f1cb834ea6fd5ff9a257593fa643b2f463f505a1cd47a5d541ff29d456d2a7c2", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 901, "sha256": "5d5e1a93794a2c189f42dd600365b31db3a9fb5e6fc6599f6c0a73c0b68fae66", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://billing-concierge.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/603041481086/locations/global/workloadIdentityPools/github/providers/billing-concierge\n service_account: deployer@tyrell-billing-concierge.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy billing-concierge --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1032, "sha256": "456de8b34ab90835b16de6b9345d24dfeebb08e5bbf03881d48691cd62d770eb", "content": "// billing-concierge ワークスペースの MCP サーバ\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 529, "sha256": "3db5e5d5b03d5591bda7f2033babb1476f662e68f64e37d6848c6136a82a3b5f", "content": "# billing-concierge\n\nbilling-concierge は tyrell の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 9812, "sha256": "0dc44c7fbe9aa6d95b5d8450bd4f6933f2ff57513afbe468708a832a28470f7b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-billing-concierge.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-billing-concierge.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G4-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g4_narrow_github_rule", "planted": [{"class": "G4", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "rule narrowed to ci.yml only"}], "expected_labels": [], "description": "Snapshot of qa-pilot with one planted G4 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1034, "sha256": "80037479a79d85f5c2160123c14561f3d7740deef6057e2f0b2596f6b48d2291", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/qa_pilot\"\n ]\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 270, "sha256": "17c5725afdd4b31d5b985fcb9e09dd1a8bf039d23bbdb9d09d85ca37be742979", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 302, "sha256": "e378048c94c318fdd78dc44e5ab2f8166c02a068c3d60bed19a244fd7c7d29bc", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.cursor/ @initech/ai-platform\n/.env.example @initech/ai-platform\n/src/ @initech/ai-platform\n/.github/workflows/ci.yml @initech/platform\n/.github/CODEOWNERS @initech/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 749, "sha256": "e45ef7de48855b4359199ea513497381546c7a3b60a5171b8c2f47fc48073752", "content": "# Continuous integration for qa-pilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 803, "sha256": "6f29a743ceee2b1346b5c65321cdd4b80a830c31642365298df330828d0a7e06", "content": "# Deploys qa-pilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://qa-pilot.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/152065560163/locations/global/workloadIdentityPools/github/providers/qa-pilot\n service_account: deployer@initech-qa-pilot.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy qa-pilot --source . --region us-central1\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 380, "sha256": "16d9dcbd4792f3ab867512d5b45da7ca96e61c3fedaa2d07501ac7bca9862af7", "content": "# qa-pilot\n\nqa-pilot is an internal AI agent maintained by the initech ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12971, "sha256": "0f4ba04d3795b20e0e5d1b4a37599ba8c20507f335b9bf3e10eb58e2523992ba", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-qa-pilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-qa-pilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g4_typo", "planted": [{"class": "G4", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "typo in CODEOWNERS path"}], "expected_labels": [], "description": "incident-bot のスナップショット。レビュー済み grantlock.json の上に G4 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 329, "sha256": "f07c703e6f4503ed4570787ab9aa6755fbeeacefb1686c517cce92ee941c53dc", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 279, "sha256": "7b58d9e9efe358aaaa176d8c4f8963ade585eb76d6d41228927b522594ce5c04", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.githb/ @wayne-ent/platform\n/.mcp.json @wayne-ent/devex\n/.env.example @wayne-ent/devex\n/src/ @wayne-ent/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 818, "sha256": "7191af8094f0be58fadf517edb7b4d0bb2ec2738c2457c0c9d301f7328a78b14", "content": "# incident-bot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 853, "sha256": "7dba714b33022504012f2ab86e4b8390483ffaafaf1a34f2ff8619e7f9b5d189", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "15dba103994c153607c98bad15f8959a8ce65ed7362291d8cc3c2b4cc1d48837", "content": "# incident-bot\n\nincident-bot は wayne-ent の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 6034, "sha256": "4bb54444e33a973a8e0f94bd822748ae37853acafd50ce9fe14b3b6d8eabafb9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g4_delete_codeowners", "planted": [{"class": "G4", "file": ".cursor/mcp.json", "component": "github", "note": "CODEOWNERS deleted"}], "expected_labels": [], "description": "Snapshot of docs-assistant with one planted G4 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1039, "sha256": "7e43f5461859a73f23e15c00144bec0620308e2209af58aae1c54bb3ee17abbb", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0GHHGCUC3\",\n \"SLACK_CHANNEL_IDS\": \"C0GHHGCUC3\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 266, "sha256": "099670dfe065ae61476fae82baa314ac1b0326a61908522d4d65fc9300ebe5b1", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/workflows/ci.yml", "bytes": 710, "sha256": "6794ef508fd9941b5a0abc5dab85eb6326cba4b075ea2e0d727d798a8032ed4a", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 839, "sha256": "55b9de65428622fa7d117524193b46ddbf74311b2936799452f3bdc5f911ec2a", "content": "# Deploys docs-assistant using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://docs-assistant.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/198285105030/locations/global/workloadIdentityPools/github/providers/docs-assistant\n service_account: deployer@stark-labs-docs-assistant.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy docs-assistant --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 390, "sha256": "04449145b564ee99657fd36e0213adb795d0cb4c0cfa31eb8c663ef1e8c779f1", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the stark-labs agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11401, "sha256": "8f1fb881ed4262f48d1af6f6eb12408a5c889e4142f345fd78a0b0fc102a3529", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-docs-assistant.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-docs-assistant.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G4-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g4_explicit_unowned", "planted": [{"class": "G4", "file": ".mcp.json", "component": "github", "note": "trailing rule without owners un-owns the MCP config"}], "expected_labels": [], "description": "release-helper のスナップショット。レビュー済み grantlock.json の上に G4 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 281, "sha256": "4296ba0e6c9184beac29e8bb801d6ea41c1a7971e45433feebd693a846bd1527", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/agents\n/.env.example @tyrell/agents\n/src/ @tyrell/agents\n/.mcp.json\n"}, {"path": ".github/workflows/ci.yml", "bytes": 971, "sha256": "2b048c0096cd71e5c0018c39c0333b32072098d9e5b0f481e725547bcc06b355", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 886, "sha256": "7dfe33e83a9a31fbd5ac3e2f4ce50566c263cd71673967159239e27900c60433", "content": "# release-helper を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://release-helper.tyrell.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/774692714973/locations/global/workloadIdentityPools/github/providers/release-helper\n service_account: deployer@tyrell-release-helper.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy release-helper --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 825, "sha256": "e752a03256253f4880107636f4e122b932752a108f2fa460de5f8417ec0e33ed", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 523, "sha256": "e906761fea86306479352704abb80620e3afe673364c90d4ed5e4da3407635c2", "content": "# release-helper\n\nrelease-helper は tyrell の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 7928, "sha256": "d0fad8d26c15f2c5240ae7a82348054ea359d67df88a79027f3ce5a87209faed", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@tyrell-release-helper.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g4_drop_mcp_rule", "planted": [{"class": "G4", "file": ".cursor/mcp.json", "component": "github", "note": "CODEOWNERS rule for MCP config removed"}], "expected_labels": [], "description": "Snapshot of sales-ops-agent with one planted G4 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 693, "sha256": "b7001b82b62479d9af8186da2250b37dddaffb12c8d90116f9fe03f02537370d", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 202, "sha256": "22ce4bc5c512761b60de99d0a8dc825ae57048509a3be92dcabb4dc10f3934b0", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "b13eb7097639e2cfbb9e29c8bf953cff858c286ea441799595cadb97a7188f03", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 838, "sha256": "840ed43cd76314cd7f7fd80adcd06c7d4af48ccb5d01ad3a94bf3a0b3662c7df", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://sales-ops-agent.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/822480495700/locations/global/workloadIdentityPools/github/providers/sales-ops-agent\n service_account: deployer@initech-sales-ops-agent.iam.gserviceaccount.com\n - name: Deploy\n run: gcloud run deploy sales-ops-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 684, "sha256": "bd8151a46c211c392ed355700e098c62f82b6402abcf56613dc092ad9787c944", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/sales-ops-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 389, "sha256": "cb7c8096fb4650371ac70643c82cf927a5e6e99042f3a850a19ae7a0f8104f29", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the initech agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13384, "sha256": "4c51ba3c1aaed7870ae27e204f3fecfd65a9ea7665a9e0085ecf4efb395a1105", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-sales-ops-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g4_drop_github_rule", "planted": [{"class": "G4", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "CODEOWNERS rule for .github removed"}], "expected_labels": [], "description": "data-analyst-agent のスナップショット。レビュー済み grantlock.json の上に G4 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 228, "sha256": "833948ca2a1ad047c57b33d7da1dfbbaa50c16cef3c19ac3d5b617cf866ef2a4", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.mcp.json @acme/platform\n/.env.example @acme/platform\n/src/ @acme/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 869, "sha256": "5e9c07d9263cc35bc0b95872a1c841ad2ccc8af8fafe791fc7dd338180081f9d", "content": "# data-analyst-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 860, "sha256": "f330cea8779ceab6af4b5045ecd4d1c12736e7abf730508b70b98eb8c937c9cb", "content": "# data-analyst-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::456755446741:role/data-analyst-agent-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster data-analyst-agent --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 842, "sha256": "1836a46b33dd6808667ff0234298993e48a49eacbf39815e65186068b706a0b0", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 531, "sha256": "47d3cdf33315a67072b47f36e6085bef3aed3209f03a221b4cbf505d6be84a67", "content": "# data-analyst-agent\n\ndata-analyst-agent は acme の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 9722, "sha256": "8d6ed5a9828963baa90800c1d41e0465223baf63d993f07f8719acd0b4444919", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::456755446741:role/data-analyst-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::456755446741:role/data-analyst-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"data-analyst-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:data-analyst-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G4-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g4_narrow_github_rule", "planted": [{"class": "G4", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "rule narrowed to ci.yml only"}], "expected_labels": [], "description": "Snapshot of repo-gardener with one planted G4 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 288, "sha256": "b2fa426c98c5bce9d1a1aaf635b77cc7b22232f83bad589e53bfcea2a8e6dc25", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 287, "sha256": "9bf98a23025b219726127cdd49e775014ca144ea5bcb4fb6bd8e3c33de16a6e1", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.mcp.json @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n/.github/workflows/ci.yml @initech/platform\n/.github/CODEOWNERS @initech/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 859, "sha256": "fd83f9b37a23c91b1fcd06b2a19a9a07ccde5700dd2976721bd26287e8d39331", "content": "# Continuous integration for repo-gardener.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 676, "sha256": "c4930fd5e30a4c80624227a50cd43556410f83090eae5f485e145874f813a4e0", "content": "# Deploys repo-gardener using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name repo-gardener\n"}, {"path": ".github/workflows/docker.yml", "bytes": 682, "sha256": "87f38fd98ba1b4dc1c2825f3a9890ad99290c0aad1dab1e2d0e2d4c0e2bb349e", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/repo-gardener:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1236, "sha256": "7bab2e1c35153f092a4076d84f3a85db8aba7ada1a4363472b17963ace1a0e95", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/repo_gardener\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0RJROQ0XW\",\n \"SLACK_CHANNEL_IDS\": \"C0RJROQ0XW\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 385, "sha256": "e795e3355463a918eae6f424e8487d992b641c99c4c8ae1260787db96657054d", "content": "# repo-gardener\n\nrepo-gardener is an internal AI agent maintained by the initech agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 16702, "sha256": "5849bf4520adbbbf8e63fc74d782c75df4b98b02b0c634653652d8359429a399", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G4-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g4_typo", "planted": [{"class": "G4", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "typo in CODEOWNERS path"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G4 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 338, "sha256": "da892fd9a37c006c63a837f6357b42bd9b7e440179dfd8eca857b87ecb16b4b1", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSUPABASE_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "2c2b5b0fd14053c0b8d62e1a4ca315939b31d4bf5a8dd013775445e04e4af944", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.githb/ @cyberdyne/platform\n/.mcp.json @cyberdyne/platform\n/.env.example @cyberdyne/platform\n/src/ @cyberdyne/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 969, "sha256": "148754c9d7d8728e069eaf4a0b13daf8357c852b3dd8df54f9a11acb3344a90f", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 938, "sha256": "94fbf791cfc2110150e46e9e023ecd3324133975dc33613a9ab8cfa1ec178800", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=dydoxxgflpjbswnqmxvt\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 524, "sha256": "90005980aec53c64f56f6fa2b9a5222d7e1694aa0938ec16663f2f385368a17e", "content": "# triage-agent\n\ntriage-agent は cyberdyne の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10560, "sha256": "fe1da8614d52f0580688b5fb457eca42065ff06fd8f2b819f75ed7ba98be0946", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g5_second_server_same_pat", "planted": [{"class": "G5", "file": ".vscode/mcp.json", "component": "triage-bot", "note": "reuses github PAT"}, {"class": "G5", "file": ".vscode/mcp.json", "component": "github", "note": "PAT now shared"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G5 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 245, "sha256": "62b4fb112091de83cc583f3283d4d1e830ad50989894fbd990a553030747f5d0", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @globex/platform\n/.vscode/ @globex/ml-infra\n/.env.example @globex/ml-infra\n/src/ @globex/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 710, "sha256": "3901d9e9d881e80c2411f5ca92830302a743a0a7a6496b2d23f5027e49a070b4", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1445, "sha256": "4bede58508b971c3e7c3fbc8a4bc9b48c5ba8fb39abe0024bec8d75e5bf5609b", "content": "// MCP servers for the release-helper workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.globex.internal:5432/release_helper\"\n ]\n },\n \"triage-bot\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@globex/triage-mcp\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 388, "sha256": "5fb729578d061f7f34daa18bef43d34e34004eabc9c04bbab8484de27d43b541", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the globex ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 8564, "sha256": "aa9a4c8c8bf8923fc7ce6be9ddaba186e8ea4b270c32ddff83e90de3df550c06", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @globex/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.globex.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G5-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g5_eval_secret_in_ci", "planted": [{"class": "G5", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "eval key reused in CI"}, {"class": "G5", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "eval key now shared"}], "expected_labels": [], "description": "support-copilot のスナップショット。レビュー済み grantlock.json の上に G5 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 275, "sha256": "94dbe2dbe2e507d7151d9c8e0c997f43308a7acfb095b23cb44816a504b22c7a", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/devex\n/.env.example @umbrella/devex\n/src/ @umbrella/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1122, "sha256": "f5bc13fd29686ca85a47da12e1bf3601f636a9e9fc12f37e7ddaf33da6886d59", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n - name: agent smoke test\n run: python -m evals.run --suite smoke\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 735, "sha256": "8c4a4ae9aa26e8424341a6d3a73f827d678ee8b254e46d32ad80e059183b2b53", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name support-copilot\n"}, {"path": ".github/workflows/docker.yml", "bytes": 748, "sha256": "ae83d14177953374bfd7f5cde0888abb078c6f97bf9e296c2250b6d27bc196fb", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/umbrella/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 952, "sha256": "511a5392fc25079f5657e775b220423d3acf18d20a2efb86ea02f279aec88723", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "0f4dcbfdaf4636f06c48d9ade3cc3811eb66f5af706535b4238cc63f245700f9", "content": "# support-copilot\n\nsupport-copilot は umbrella の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13892, "sha256": "501a1a55c1581308741ad9ea85fb6d7f475d795c385bc9ec7f771155990f04a4", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g5_second_mcp_file", "planted": [{"class": "G5", "file": ".cursor/mcp.json", "component": "github", "note": "server copied into a second client config"}, {"class": "G5", "file": ".mcp.json", "component": "github", "note": "credential now shared"}], "expected_labels": [], "description": "Snapshot of qa-pilot with one planted G5 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 468, "sha256": "d4b20b943244637ec36f5250137ad3be6b6e8af7df657e90571fd2412495b73a", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 249, "sha256": "26994ae4ddd3152f4475ec554c36f25dec349b1089a55195122e1cf282969d06", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 290, "sha256": "878b1db4bbca30160249e2fb3e725b2dd6f84795bbac4989870edd9f7d9fee35", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/devex\n/.env.example @cyberdyne/devex\n/src/ @cyberdyne/devex\n/.cursor/ @cyberdyne/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 704, "sha256": "8db5792ea890a5fc86dbfaa4c2464731ea5d756b6cf58129168356ab518e00da", "content": "# Continuous integration for qa-pilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 666, "sha256": "622f138e8b4d98418b06937b8bda619be58ec5b065131921f876f453be6a0872", "content": "# Deploys qa-pilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name qa-pilot\n"}, {"path": ".github/workflows/docker.yml", "bytes": 679, "sha256": "ea990c10508e8972c081b6b02847cc9e9afb74deb8cb10c0bf203b9863d8124d", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/cyberdyne/qa-pilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 938, "sha256": "9fd62014d53920895871572b0b6f2b55308f339a0733fa46fc783a3d480ae5bb", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 376, "sha256": "0a1d1560d5e8ab6f41213b6c5663dd8b47f012a9580526ddc6ae80fd861ebbf9", "content": "# qa-pilot\n\nqa-pilot is an internal AI agent maintained by the cyberdyne devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12087, "sha256": "147a537787ea268b8e1c7e3dfe29b23acd79379ad9358383980ac9c1cbe97ecb", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G5-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g5_shared_role", "planted": [{"class": "G5", "file": ".github/workflows/hotfix.yml", "component": "Hotfix/deploy", "note": "same OIDC role as Deploy"}, {"class": "G5", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "role now shared"}], "expected_labels": [], "description": "release-helper のスナップショット。レビュー済み grantlock.json の上に G5 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 360, "sha256": "91755db6f996d8175b8e94859b31aab558519e84a6a26f763e2f01825a2f761f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSUPABASE_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 283, "sha256": "a7ced439a365f421bcdea2da6f00ffdf7e6b0395dafd05010dda43ae3c8ebd12", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/devex\n/.env.example @stark-labs/devex\n/src/ @stark-labs/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 865, "sha256": "b79b651304db52e82f62ccc6c366a7bd44e1bd5bdacb2edc6bf7bb42b17af32a", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 843, "sha256": "f4c845160eb38dca099e314a3020acbd923483409e7f214b375bd4e123ca6110", "content": "# release-helper を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::322004190596:role/release-helper-deploy\n aws-region: eu-west-1\n - name: デプロイ\n run: aws ecs update-service --cluster release-helper --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/hotfix.yml", "bytes": 657, "sha256": "a0738c4473119d4511547636b125862816ce393168f131e32b14dfbad76a4a42", "content": "# Manual hotfix deploy\nname: Hotfix\non:\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::322004190596:role/release-helper-deploy\n aws-region: eu-west-1\n - name: デプロイ\n run: aws ecs update-service --cluster release-helper --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 998, "sha256": "f944b59f952704332094aeb78b71239354e3c679255b670148217ed833939d64", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.stark-labs.internal:5432/release_helper\"\n ]\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=dhmokhexgnjzzzawsqmd\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "9938c5172e35e265a5af0df6d06d9fe6a264832643c393f1d27994ed782658cb", "content": "# release-helper\n\nrelease-helper は stark-labs の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13160, "sha256": "35cca899cd194b7db7a6843ad634684092a2c548d35206699ccdfd5b447a73f2", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::322004190596:role/release-helper-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::322004190596:role/release-helper-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"release-helper-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:release-helper-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g5_codecov_two_jobs", "planted": [{"class": "G5", "file": ".github/workflows/ci.yml", "component": "CI/lint", "note": "codecov token reused in lint"}], "expected_labels": [], "description": "Snapshot of docs-assistant with one planted G5 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 933, "sha256": "24c07c269685d9a54be926db0a056760aff1acbc6f85cda536e14755a59ca10c", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T06JVATBEP\",\n \"SLACK_CHANNEL_IDS\": \"C06JVATBEP\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 251, "sha256": "8504258768d441163b0f06bd90de4c07a6b0c64fc41bc674e299de8256b334f3", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 246, "sha256": "79bd1f9ea5b3efa264c9941cc9a4172c7c6b72b19de3684209576d5db2503887", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @acme/platform\n/.cursor/ @acme/ai-platform\n/.env.example @acme/ai-platform\n/src/ @acme/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1035, "sha256": "80e24e17c9515d194daf70384727ac454e106eec1c4c629b5b9a1ea5e5ccb0cf", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n - name: upload lint report\n uses: codecov/test-results-action@v1\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 793, "sha256": "f816953c29cdb78c331b89a4151177e7d0fc8ca85a5ed4d1893cc6e650bda923", "content": "# Deploys docs-assistant using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::897502496062:role/docs-assistant-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster docs-assistant --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 680, "sha256": "61c7e37ed5670dd3bd8f7fff5a6958b09f57d14d03bef35bd3c7004350eb6485", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 389, "sha256": "4b1aab4b4db827f8c6c49b918588ea8ec9b030cf317191163bce9626afbd789f", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the acme ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 15301, "sha256": "2b4a63606ce0ca0a821899a38b3c4edd390c6f1ab2834b41547bd9c7c2e985cd", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::897502496062:role/docs-assistant-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::897502496062:role/docs-assistant-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"docs-assistant-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:docs-assistant-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G5-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g5_slack_reuse", "planted": [{"class": "G5", "file": ".mcp.json", "component": "standup-bot", "note": "reuses slack bot token"}, {"class": "G5", "file": ".mcp.json", "component": "slack", "note": "token now shared"}], "expected_labels": [], "description": "support-copilot のスナップショット。レビュー済み grantlock.json の上に G5 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 346, "sha256": "f4f7f80bea226ea502893c04c307b3927b0967bc18621a675a27752f56645676", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 274, "sha256": "c022eb13940e5d1b4748b750f68412e9389035e65daf434989ae1efd905c5152", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.mcp.json @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 821, "sha256": "943d840876db4130d5f866c71265900617ad2554523338f549d4a2eb3113d175", "content": "# support-copilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 893, "sha256": "e21162657755e614b8f2349870f20b85e815c64934f14b70e6008c817ab15b43", "content": "# support-copilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://support-copilot.initech.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/614797182822/locations/global/workloadIdentityPools/github/providers/support-copilot\n service_account: deployer@initech-support-copilot.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy support-copilot --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "1f1a2819a43b97ea89fcda8022fca6bf031186c8a10f177348e3e03fb69eb8b7", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/support-copilot:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1284, "sha256": "2b3129af85a43c3e729584eb628bde63dc47e50c1c92a79f3a6a0531f77d71f2", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0MUAM20UA\",\n \"SLACK_CHANNEL_IDS\": \"C0MUAM20UA\"\n }\n },\n \"standup-bot\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@initech/standup-mcp\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "608b6da18e6be4173717c836dce2917fd71b56ec2e871effdbb40fed2b919f2f", "content": "# support-copilot\n\nsupport-copilot は initech の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11505, "sha256": "15af9c7d5ef228d9b7d26137867f50299e6b4186b97c47bf2413a681048962a1", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@initech-support-copilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g5_second_server_same_pat", "planted": [{"class": "G5", "file": ".mcp.json", "component": "triage-bot", "note": "reuses github PAT"}, {"class": "G5", "file": ".mcp.json", "component": "github", "note": "PAT now shared"}], "expected_labels": [], "description": "Snapshot of docs-assistant with one planted G5 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 240, "sha256": "20667396506750c2470648db5d9a1ab9b755a05266e95549df9b9636a8ad1f09", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.mcp.json @initech/devex\n/.env.example @initech/devex\n/src/ @initech/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 775, "sha256": "338e008c66bcfd24af8d765fbd071a0a2b0cecfe0689f2d5a9f13b302cb86783", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 788, "sha256": "3e5dd32202b1e2e6fc793c3112df8c62e694d8c012765758e043a7e4f7d20fe5", "content": "# Deploys docs-assistant using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::885209437198:role/docs-assistant-deploy\n aws-region: us-east-1\n - name: Deploy\n run: aws ecs update-service --cluster docs-assistant --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "64f18c232ae8f966cc2c665fcbd15c86a8b4dd2cc2aba807147a302587364978", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/initech/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 975, "sha256": "e5b36a2bc1d5457d50d056d7516e73ace425e9726bbcc2c3e4559b7d85faa342", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/docs_assistant\"\n ]\n },\n \"triage-bot\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@initech/triage-mcp\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 386, "sha256": "be951ad88ad9864c62c6809feaefeebedcf446f0239e6323c072a382ed9b46b1", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the initech devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13280, "sha256": "059e196f210a3ebbee877b5881be0708a2056508199bf083e1b9b2fe4c96cd52", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::885209437198:role/docs-assistant-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::885209437198:role/docs-assistant-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"docs-assistant-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:docs-assistant-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G5-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g5_eval_secret_in_ci", "planted": [{"class": "G5", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "eval key reused in CI"}, {"class": "G5", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "eval key now shared"}], "expected_labels": [], "description": "qa-pilot のスナップショット。レビュー済み grantlock.json の上に G5 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 920, "sha256": "08d669597cf0dd6b206d3b1577eb030111147882362887789962d1c645754d07", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0HX9LQS5V\",\n \"SLACK_CHANNEL_IDS\": \"C0HX9LQS5V\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 284, "sha256": "a0989ec1e2e0de6ba4edb21c4f47f0d07696763d5e0162348e935fd4db7c887d", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.cursor/ @umbrella/platform\n/.env.example @umbrella/platform\n/src/ @umbrella/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 964, "sha256": "45f831cc3e7bf34b60bd306fb745a5da9ee85d514f888138a8d8b0e2e0cc2264", "content": "# qa-pilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: agent smoke test\n run: python -m evals.run --suite smoke\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 721, "sha256": "18085aeb573854a8d9768e6294ca8d95e7efbba425d0418a4d2a45a39a688355", "content": "# qa-pilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name qa-pilot\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 515, "sha256": "ee1c0b75ecba75a6c920ec3b43506beb5c9a51f92836d3a8573ab9e94642a099", "content": "# qa-pilot\n\nqa-pilot は umbrella の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10780, "sha256": "c803c8ad404cac6e5150416f05775de94f6f6871c4993439e7b2dc06f7896bce", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g5_second_mcp_file", "planted": [{"class": "G5", "file": ".cursor/mcp.json", "component": "slack", "note": "server copied into a second client config"}, {"class": "G5", "file": ".mcp.json", "component": "slack", "note": "credential now shared"}], "expected_labels": [], "description": "Snapshot of docs-assistant with one planted G5 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 308, "sha256": "a4629c8e3941772233569bbb70a22c3d8944a8d03d063941bc44e1eca1053889", "content": "{\n \"mcpServers\": {\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T01KEGOE8Y\",\n \"SLACK_CHANNEL_IDS\": \"C01KEGOE8Y\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 251, "sha256": "8504258768d441163b0f06bd90de4c07a6b0c64fc41bc674e299de8256b334f3", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 290, "sha256": "c92d1f78d28b515fcae7e07261376ede4c05e65658db7619266d0b60b4857680", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/devex\n/.env.example @wayne-ent/devex\n/src/ @wayne-ent/devex\n/.cursor/ @wayne-ent/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 775, "sha256": "338e008c66bcfd24af8d765fbd071a0a2b0cecfe0689f2d5a9f13b302cb86783", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 888, "sha256": "c119b4f78540d33274e2d95438512468cdd94d60e85bb188730ea9be607a2bb1", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T01KEGOE8Y\",\n \"SLACK_CHANNEL_IDS\": \"C01KEGOE8Y\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 388, "sha256": "e5d6c271628fa54c814f0a28b66f40562cdb35c6a35c36850ad5084c206eeffe", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the wayne-ent devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12455, "sha256": "97f81b5729869f012f4221bb173a7551eb9bfec79a5c843f71c443fbf7482cce", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G5-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g5_shared_role", "planted": [{"class": "G5", "file": ".github/workflows/hotfix.yml", "component": "Hotfix/deploy", "note": "same OIDC role as Deploy"}, {"class": "G5", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "role now shared"}], "expected_labels": [], "description": "repo-gardener のスナップショット。レビュー済み grantlock.json の上に G5 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 280, "sha256": "0abdb4867e9b2767f221466e75d4b4e425214f1e7ad533f39ffcb7f65dd66b31", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @soylent/platform\n/.mcp.json @soylent/platform\n/.env.example @soylent/platform\n/src/ @soylent/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 844, "sha256": "e3af1c565fe6af342e25b675eabce8f41f55fed8917123be4ffcedeaa5e258e1", "content": "# repo-gardener の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 845, "sha256": "9c5cd76747d59e5094fac1a6edd23e19fa63260633a254cbb8f207bd8e7983ec", "content": "# repo-gardener を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::284170984702:role/repo-gardener-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster repo-gardener --service api --force-new-deployment\n"}, {"path": ".github/workflows/hotfix.yml", "bytes": 660, "sha256": "1428fef290cb0a3f92b9a64b4339b26a111c3d8fb9d3d206032c853ff042780c", "content": "# Manual hotfix deploy\nname: Hotfix\non:\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::284170984702:role/repo-gardener-deploy\n aws-region: ap-northeast-1\n - name: デプロイ\n run: aws ecs update-service --cluster repo-gardener --service api --force-new-deployment\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 945, "sha256": "d1ef55d845a783125f3aff8e9b9c0d2d68800963b0bd63c2009aaeaffdb2cd90", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.soylent.internal:5432/repo_gardener\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T04VKHM6VA\",\n \"SLACK_CHANNEL_IDS\": \"C04VKHM6VA\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 524, "sha256": "f52269aa730eb8b408aca45598a52440219051ddccbeecb49a2fcc5e7e07d3a3", "content": "# repo-gardener\n\nrepo-gardener は soylent の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10691, "sha256": "d8f0709a8ef781959c41d62048a1287462584f164641ade54e53361f0b86a8c1", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::284170984702:role/repo-gardener-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::284170984702:role/repo-gardener-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"repo-gardener-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:repo-gardener-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.soylent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G6-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g6_aws_static_replace", "planted": [{"class": "G6", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "OIDC replaced by static keys"}], "expected_labels": [], "description": "Snapshot of support-copilot with one planted G6 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 265, "sha256": "636e2074e77db6a464de888437ccecbb0f93cdc5f31f1f2dd2607b1ef2186e10", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 246, "sha256": "10f1aa83315e932604f830433857148e9f7dc92143bb7b8c5ab8f43587fcf926", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @acme/platform\n/.mcp.json @acme/ai-platform\n/.env.example @acme/ai-platform\n/src/ @acme/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 906, "sha256": "e45e3b99f0b44026606f779df1cf0858a2b715c695db835e255076834cb3e4a4", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 824, "sha256": "8a5888aea550178bc0b4ff885ddede60c8dbfd0fd4f43d6fad6654d21290146b", "content": "# Deploys support-copilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster support-copilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 681, "sha256": "caac34be427151df2511b47b604e51d8d01b8aa30ed0f2faf36a70d68394b20b", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/acme/support-copilot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 895, "sha256": "ec85600188c5505e08ce8a8040df915227ef3ed661ffd8d1ae070e16791afe93", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T00BK4VUDY\",\n \"SLACK_CHANNEL_IDS\": \"C00BK4VUDY\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "17cc52c1fb0d9a8e2e597edb3b97533647e9d01ec8a1cb7f8478342eeab1a512", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the acme ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 15049, "sha256": "6f8e6dfd0dfa91f08aa3a09bebe21966dd956fb81cf8f0298edf8238537a72ef", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::699535483781:role/support-copilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::699535483781:role/support-copilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"support-copilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:support-copilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@acme/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @acme/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@acme/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @acme/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G6-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g6_backup_job", "planted": [{"class": "G6", "file": ".github/workflows/backup.yml", "component": "Backup/backup", "note": "static AWS keys in nightly job"}], "expected_labels": [], "description": "repo-gardener のスナップショット。レビュー済み grantlock.json の上に G6 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 284, "sha256": "4d17b0ca7c194991dc240f580369c8034b7a5e797d8fcdae3d18f3c7ab07aa66", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/platform\n/.env.example @umbrella/platform\n/src/ @umbrella/platform\n"}, {"path": ".github/workflows/backup.yml", "bytes": 377, "sha256": "c97dbc9063c2075cc5dc7ea3f3e22d596cc54bccee6f0477b62152dfdf8543f1", "content": "name: Backup\non:\n schedule:\n - cron: 0 2 * * *\npermissions:\n contents: read\n\njobs:\n backup:\n runs-on: ubuntu-latest\n steps:\n - name: sync\n run: aws s3 sync s3://repo-gardener-data s3://repo-gardener-backup\n env:\n AWS_ACCESS_KEY_ID: ${{ secrets.BACKUP_AWS_ACCESS_KEY_ID }}\n AWS_SECRET_ACCESS_KEY: ${{ secrets.BACKUP_AWS_SECRET_ACCESS_KEY }}\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1035, "sha256": "9dd9092f796e9b1273c605dc75d466de93a64c2ef8520377eb818ed758869cd8", "content": "# repo-gardener の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 746, "sha256": "64e606a5c7dcfb8294fb722d1c1a619ad4124692c842eaa81dcd726ba721483d", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/umbrella/repo-gardener:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1052, "sha256": "abfbc2aefef670b5ff41948c5d8f37885b3d1c9d8ee97536e6cd998c3c83fbe9", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0V5SMD1LX\",\n \"SLACK_CHANNEL_IDS\": \"C0V5SMD1LX\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 525, "sha256": "657dc90d84b69796aa60785666efa158d037aaa10041ab64d2f97e73084e5e8d", "content": "# repo-gardener\n\nrepo-gardener は umbrella の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13845, "sha256": "1f3855ba6a6d94b3de583c6ebe1c1cc232132f7a089c8be7f81768355f83e72b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g6_gcp_sa_key", "planted": [{"class": "G6", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "WIF replaced by SA key JSON"}], "expected_labels": [], "description": "Snapshot of research-scout with one planted G6 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 261, "sha256": "4ae2333320430c2836f612ad02d9aa75bcce645978274fa7b810f5f4e486b239", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/ml-infra\n/.env.example @stark-labs/ml-infra\n/src/ @stark-labs/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 710, "sha256": "3df93a27366ee9e8a681f0932f33c2fdecfbdbf0c596557f50e8c12af7c2ea92", "content": "# Continuous integration for research-scout.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 678, "sha256": "8bd68c75aa786cc9296762299b170ab50ea405ca7175ee0c35cdd315ab47bb66", "content": "# Deploys research-scout using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: google-github-actions/auth@v2\n with:\n credentials_json: ${{ secrets.GCP_SA_KEY }}\n - name: Deploy\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 795, "sha256": "7e4e75b84ccc702ef2a700b1dc39496064a7fffe19cc2810793b8c0481501156", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n }\n }\n}\n"}, {"path": "README.md", "bytes": 392, "sha256": "0f9100fda11f120eb1b515a9e5330e9cc6bb233f7aaa36e7a5a0ecec363650ce", "content": "# research-scout\n\nresearch-scout is an internal AI agent maintained by the stark-labs ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 8009, "sha256": "83e401667e58933b92a865122d7449688764ceac72e83467e0e750a34d4c9b9f", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g6_azure_creds", "planted": [{"class": "G6", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "federated login replaced by creds JSON"}], "expected_labels": [], "description": "incident-bot のスナップショット。レビュー済み grantlock.json の上に G6 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 345, "sha256": "a5472cdd1104e0ef5b7e3f06ecf77288d8c191996a763a4d436c607e2e54661c", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "fe618146cd3a99ef6f657578df1f09073267557e90da56133e37c9cc1746751e", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/agents\n/.env.example @tyrell/agents\n/src/ @tyrell/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1034, "sha256": "fd9d3ae6e28fb79df6f1a17c2b60ef2ee6fb46a1177981fe993e07c01e060631", "content": "# incident-bot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 615, "sha256": "bde7182ee3121a56948088a5df7de888efb035d8bbeb7b8007f62c980f5fff07", "content": "# incident-bot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n creds: ${{ secrets.AZURE_CREDENTIALS }}\n - name: デプロイ\n run: az webapp up --name incident-bot\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "91308780e16cb094701813d33935857004f70db5e968e23579b419f592733119", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/tyrell/incident-bot:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 926, "sha256": "6146289934348a18796db055b18af9feea349994532f0d6b28e9ae81254c4aff", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 519, "sha256": "3d00c3d19ce7ae1e0e0304330762a18ca236a22f6cceabf133f8501c949e90f2", "content": "# incident-bot\n\nincident-bot は tyrell の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 15628, "sha256": "d17a38548dc3fc5f334122cb1e6f5ca8ba19af627ffda36aff14f550541f7e39", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "c591d9c45df534bcd670454ba7e4914477009d4c02d7ed8967dabe004bcf194c", "content": "[project]\nname = \"incident-bot\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/incident_bot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/incident_bot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g6_pypi_token", "planted": [{"class": "G6", "file": ".github/workflows/release.yml", "component": "Release/publish", "note": "trusted publishing replaced by API token"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G6 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1171, "sha256": "bb6fbd9e00bde92da59db5127a4cdb99334cc4fa697882dd04abf576ecf1a2f6", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0FLEY9QV5\",\n \"SLACK_CHANNEL_IDS\": \"C0FLEY9QV5\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 251, "sha256": "8504258768d441163b0f06bd90de4c07a6b0c64fc41bc674e299de8256b334f3", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 235, "sha256": "4d1d5931c0cb78d62fb413232a892687a7d225a395ca66bd4bab700ce77c4b16", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @hooli/platform\n/.cursor/ @hooli/agents\n/.env.example @hooli/agents\n/src/ @hooli/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 755, "sha256": "757a9e200b7ffef9f0ed7f18fa645a18cec512ad099f88d92a3d6b19f89a0141", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 681, "sha256": "27efac23621e172e0fd3d1ed1e78ba80d7da5b5eff108f70e631b2f653bf0165", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/hooli/release-helper:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 564, "sha256": "bca1221133ce4b6c13e6a9964fdc3790492639e157ee65ec10a9b3d215aa73ec", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n with:\n password: ${{ secrets.PYPI_API_TOKEN }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 385, "sha256": "6b1fe20f3c9efccdfee5c7cbb5aea0fc4264d8f9c7987e6791c4be735a2540c4", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the hooli agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 11775, "sha256": "87c071f11b27eb5f833026bd8408b53c1d666b3e01b910aca3b8756d18f858ad", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g6_mcp_aws", "planted": [{"class": "G6", "file": ".mcp.json", "component": "aws", "note": "static IAM user keys for agent"}], "expected_labels": [], "description": "billing-concierge のスナップショット。レビュー済み grantlock.json の上に G6 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 388, "sha256": "28a94e7224072d1825b97e2afcb889480397a3de269134e60db6ad7116d78c84", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nTAVILY_API_KEY=\nAWS_ACCESS_KEY_ID=\nAWS_SECRET_ACCESS_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "332bbe4093cb63abd5f9790bc41189621ffb6a6d5d47e114a95b941fc1721a4e", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/platform\n/.env.example @wayne-ent/platform\n/src/ @wayne-ent/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 848, "sha256": "1f88a4e7cc36051943432d2057187d94e10cc3c68e10ffc5e80dd070e9538d45", "content": "# billing-concierge の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 907, "sha256": "ca113e8777c0c0457d6c4050a2e838dce7f965576376d467318ef70cc18413bb", "content": "# billing-concierge を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://billing-concierge.wayne-ent.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/197210243701/locations/global/workloadIdentityPools/github/providers/billing-concierge\n service_account: deployer@wayne-ent-billing-concierge.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy billing-concierge --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1314, "sha256": "2649a4baede95ff1e96347c2cb25fab478097d5cea82ec3518cb9cf111b0ee4b", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n },\n \"aws\": {\n \"command\": \"uvx\",\n \"args\": [\n \"awslabs.aws-api-mcp-server@latest\"\n ],\n \"env\": {\n \"AWS_ACCESS_KEY_ID\": \"${AWS_ACCESS_KEY_ID}\",\n \"AWS_SECRET_ACCESS_KEY\": \"${AWS_SECRET_ACCESS_KEY}\",\n \"AWS_REGION\": \"eu-west-1\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 534, "sha256": "64bfa408d1a29290fc1338cfd8add544700070a1fd7f481646da9ac87cc20a48", "content": "# billing-concierge\n\nbilling-concierge は wayne-ent の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10420, "sha256": "bbc6b5a3016edc27e41a677b9b4321d4f068431fc9b5b41f0252d2d2ea60f5d7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@wayne-ent-billing-concierge.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@wayne-ent-billing-concierge.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G6-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g6_mcp_bigquery", "planted": [{"class": "G6", "file": ".mcp.json", "component": "bigquery", "note": "service-account key file"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G6 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 288, "sha256": "e332907516def2910131cba5be618311c1ca055c0a44425d4187e7e185545fee", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nGOOGLE_APPLICATION_CREDENTIALS=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "7a69015db642672b191a9a8f18a36d0950fab1b62d839a4dad238ddb1b5edadd", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @initech/platform\n/.mcp.json @initech/platform\n/.env.example @initech/platform\n/src/ @initech/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 755, "sha256": "757a9e200b7ffef9f0ed7f18fa645a18cec512ad099f88d92a3d6b19f89a0141", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 678, "sha256": "da2c60459a012f51e183a338a6bad8791580ecadce5cdd2e2de0f1b410cc61d8", "content": "# Deploys release-helper using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name release-helper\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1129, "sha256": "1b40fb68eccaa7b79d930c345be4930b2985bbd992f7ed7ce16b20c473a88b1b", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.initech.internal:5432/release_helper\"\n ]\n },\n \"bigquery\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-bigquery\",\n \"--project\",\n \"initech-release-helper\"\n ],\n \"env\": {\n \"GOOGLE_APPLICATION_CREDENTIALS\": \"${GOOGLE_APPLICATION_CREDENTIALS}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "76fb6862503177a82829290a1c8324af1b6c47d7dc8780a70ea277c442e988bc", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the initech platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10908, "sha256": "f8fab4a3cf5e75abb40376f201120485b45a86fbfcde293a4a7e2a29d0ec065e", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.initech.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G6-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g6_npm_publish", "planted": [{"class": "G6", "file": ".github/workflows/publish-npm.yml", "component": "Publish SDK/npm", "note": "long-lived npm token"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G6 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 363, "sha256": "fb430f8b6b5addf05f8f139fcb84d35e970a3dd16242acc92efac0cf9a5d479f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSLACK_BOT_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 276, "sha256": "aae0e5fafe31a1fe00adc54333ca622f8ec124d4dbf519dfe475dbbd7907db25", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.mcp.json @tyrell/ml-infra\n/.env.example @tyrell/ml-infra\n/src/ @tyrell/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 798, "sha256": "0c60ab054363c77149de8658bc95eac616e74a616e39e82e2cb685c3e2aecc1c", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 743, "sha256": "63aef71611e9b6f3cb5874ac30e1bacf2f10c773115ac944b21f6ecd8871a316", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/tyrell/triage-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/publish-npm.yml", "bytes": 406, "sha256": "265e9fdec934ffc42b2c95d14998ee2583281dcbca02410b4f1e16b08ddb2b5d", "content": "name: Publish SDK\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n npm:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: '22'\n registry-url: https://registry.npmjs.org\n - run: npm ci && npm publish --access public\n env:\n NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1187, "sha256": "8159ff8bde54002493c977748f728b02a682faffa7f1a10ab07be84b6dd15621", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0K0AQU443\",\n \"SLACK_CHANNEL_IDS\": \"C0K0AQU443\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "a940bafec76d0a8f25c7042534786605fb2deb225b2560758353dc8de48aef70", "content": "# triage-agent\n\ntriage-agent は tyrell の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 13107, "sha256": "61a3f455ccebdf8b9e9746ab6213ad828de005ea33e677466c48cb90f38a4c23", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @tyrell/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g6_aws_static_replace", "planted": [{"class": "G6", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "OIDC replaced by static keys"}], "expected_labels": [], "description": "Snapshot of sales-ops-agent with one planted G6 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 986, "sha256": "22a369d9584d88c7d5138cbee7d41e4ecd2acb369a737b0ddb6dce39e8d4b4ff", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 248, "sha256": "c8de141523a667dcf426a157d14adb0f790ddcc220f806ac211d25d11f20652e", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 266, "sha256": "3da94661bf972a1f2c55c6ed25cbbab96ee9319b60ed50f34b440d4954a09460", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @cyberdyne/platform\n/.cursor/ @cyberdyne/ai-platform\n/.env.example @cyberdyne/ai-platform\n/src/ @cyberdyne/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 756, "sha256": "31b965158eb60829decda1a5d0d41c6bbe8da3a457f003cd54550bf16da84648", "content": "# Continuous integration for sales-ops-agent.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 824, "sha256": "6c4f77ae265e7c1c1232b6d1da359687cebae2b6df8926ced0f2af913d0e00fa", "content": "# Deploys sales-ops-agent using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster sales-ops-agent --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 396, "sha256": "d8715f70d4f09a6b9999e5d4fbc6f8e2ff7647d5d9b5e03e5d53411e3e0c74a7", "content": "# sales-ops-agent\n\nsales-ops-agent is an internal AI agent maintained by the cyberdyne ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12158, "sha256": "1cb49c27fa0de48e60e00d4c58b482e70e745205ddcc12ce962935fb9781fb77", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::267175147624:role/sales-ops-agent-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::267175147624:role/sales-ops-agent-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"sales-ops-agent-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:sales-ops-agent-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @cyberdyne/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "60fe712a9eac10f29788715ffef4d879f79fcc49623ef832e5c01f49b3f6a4fb", "content": "[project]\nname = \"sales-ops-agent\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/sales_ops_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/sales_ops_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G6-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g6_backup_job", "planted": [{"class": "G6", "file": ".github/workflows/backup.yml", "component": "Backup/backup", "note": "static AWS keys in nightly job"}], "expected_labels": [], "description": "data-analyst-agent のスナップショット。レビュー済み grantlock.json の上に G6 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 935, "sha256": "f5bd645c6b9efe21a5b169268d2b9dbc22672755e8c0af4435a44cf122fbf4c7", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 330, "sha256": "7bee66186dd218fc541d5a8c01e4e19c2b41261c947f3f2f324dae7a68e32f3f", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 278, "sha256": "2ac1929c383b8e6e254baacd13042f5933f7380d386be74ea25cc61c60fc52fb", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.cursor/ @umbrella/agents\n/.env.example @umbrella/agents\n/src/ @umbrella/agents\n"}, {"path": ".github/workflows/backup.yml", "bytes": 387, "sha256": "71562245578ea8b7d0f030070ebb4a71936298ce3f62c1e3e7354175707d9037", "content": "name: Backup\non:\n schedule:\n - cron: 0 2 * * *\npermissions:\n contents: read\n\njobs:\n backup:\n runs-on: ubuntu-latest\n steps:\n - name: sync\n run: aws s3 sync s3://data-analyst-agent-data s3://data-analyst-agent-backup\n env:\n AWS_ACCESS_KEY_ID: ${{ secrets.BACKUP_AWS_ACCESS_KEY_ID }}\n AWS_SECRET_ACCESS_KEY: ${{ secrets.BACKUP_AWS_SECRET_ACCESS_KEY }}\n"}, {"path": ".github/workflows/ci.yml", "bytes": 869, "sha256": "5e9c07d9263cc35bc0b95872a1c841ad2ccc8af8fafe791fc7dd338180081f9d", "content": "# data-analyst-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 533, "sha256": "ae84dca297a02b628b1ee993ab629245be4505733f808729d24a96b67a2f51e5", "content": "# data-analyst-agent\n\ndata-analyst-agent は umbrella の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 7041, "sha256": "17eff58636075b0672c8bdf47df821471ead36abb533642a0cfffd425159252c", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g7_new_server_env", "planted": [{"class": "G7", "file": ".vscode/mcp.json", "component": "datadog", "note": "new observability server"}], "expected_labels": [], "description": "Snapshot of docs-assistant with one planted G7 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 291, "sha256": "fa81fc3ac508ccbe81bb2ac607d5fc45395d1322df38bcb07d04dfa3b2b918ff", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSUPABASE_ACCESS_TOKEN=\nDATADOG_API_KEY=\nDATADOG_APP_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 258, "sha256": "4e195199ad85e3f2f3c647ce3a54012b58b6cb9def38c0e6d02a4fef44bef98d", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @soylent/platform\n/.vscode/ @soylent/ai-platform\n/.env.example @soylent/ai-platform\n/src/ @soylent/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 755, "sha256": "9126e7c8dcea5274366bb185fae2a320b982e842abbc42b286dd3ebebb756ba5", "content": "# Continuous integration for docs-assistant.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "af95efeeeecdc4e93c6b0d7ce299f33e20b398c74a9c68e0fa2223e542f49984", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/soylent/docs-assistant:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1356, "sha256": "a7b8bd09ab5fdb3b0dbaf2899223c52e04b9e2ec122379edc7c14379b9fe1c04", "content": "// MCP servers for the docs-assistant workspace\n{\n \"inputs\": [],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"supabase\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=vyjfkgxptbhalqyidoij\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${env:SUPABASE_ACCESS_TOKEN}\"\n }\n },\n \"datadog\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@winor30/mcp-server-datadog\"\n ],\n \"env\": {\n \"DATADOG_API_KEY\": \"${env:DATADOG_API_KEY}\",\n \"DATADOG_APP_KEY\": \"${env:DATADOG_APP_KEY}\",\n \"DATADOG_SITE\": \"datadoghq.com\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 392, "sha256": "8ab63c16485217b4009d031cfb7b71d89c007677484db61ce5c2ab54d9e83c03", "content": "# docs-assistant\n\ndocs-assistant is an internal AI agent maintained by the soylent ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 7295, "sha256": "14b39d45b1c5aa9aa9b005b3d485c1cffcc5b624682fcc5d4409877d94309399", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @soylent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @soylent/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G7-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g7_prod_secret", "planted": [{"class": "G7", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "new secret in production deploy"}], "expected_labels": [], "description": "qa-pilot のスナップショット。レビュー済み grantlock.json の上に G7 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 332, "sha256": "c07c30c2dbd3588054a0c5c7976eec7a91206b6440dbbc0491aca66e7fb11c96", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 293, "sha256": "54cd7f125036d63fc23b90b989dc22de428b0de7e93daccfc5ea3a0c73a488f3", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/ai-platform\n/.env.example @umbrella/ai-platform\n/src/ @umbrella/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 859, "sha256": "12c4539e8b40bad8165753af101d3d2f1f7ce6f0a714b3df396b91ee0213e62d", "content": "# qa-pilot の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 927, "sha256": "893becef99eb974da3747348132ce639682b34cce748c85205f8727c70922ff8", "content": "# qa-pilot を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://qa-pilot.umbrella.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/108709681398/locations/global/workloadIdentityPools/github/providers/qa-pilot\n service_account: deployer@umbrella-qa-pilot.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy qa-pilot --source . --region us-central1\n env:\n DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 848, "sha256": "a0a986bf6a7599945dd5b8afad3decd31338d0fd51eee86aae4f00d93ae8f015", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T03QE0YHBY\",\n \"SLACK_CHANNEL_IDS\": \"C03QE0YHBY\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 518, "sha256": "c7b09cc380f2f4b7898e2244e3657285decd39a27a533304489e21772813e8aa", "content": "# qa-pilot\n\nqa-pilot は umbrella の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 8688, "sha256": "fd77543076feaccd965ab89a7c64d63f164627bb69050a87d1f6eb1afc394568", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@umbrella-qa-pilot.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@umbrella-qa-pilot.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g7_remote_oauth", "planted": [{"class": "G7", "file": ".mcp.json", "component": "linear", "note": "new remote server with delegated OAuth"}], "expected_labels": [], "description": "Snapshot of support-copilot with one planted G7 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 236, "sha256": "3139c4f3e2a3bfe2a6bd6701278062f0cadd6979c5af63106d3fb8142270b185", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @globex/platform\n/.mcp.json @globex/devex\n/.env.example @globex/devex\n/src/ @globex/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 731, "sha256": "3f8e21dddcd9521d8284bd9de5860a8daa44c9360e807f45fd19b494936d5143", "content": "# Continuous integration for support-copilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 796, "sha256": "e843a52aaf57f10caddbf2215bb062eacb0d6e1fb357da8223036cebd6b3e903", "content": "# Deploys support-copilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::928640042821:role/support-copilot-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster support-copilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "20ee3c3108349906bfa6428631ff777cb1d2725cdc74da873166839054a25016", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/globex/support-copilot:latest\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 849, "sha256": "5a54fa9c6f9e71003167a853fa77571a8c8c56ed80a2f0d2fc54dcacb0b0c5d5", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 387, "sha256": "50d41d1c0f248308d2aa13726565c8605916c7f55753e1ccd5f5bf8273e3b5a6", "content": "# support-copilot\n\nsupport-copilot is an internal AI agent maintained by the globex devex team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 9027, "sha256": "bd74dd04c6fd5a61b4f9606ab097c256cfbe737e3831d3892fc76c1c32b496f9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::928640042821:role/support-copilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::928640042821:role/support-copilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"support-copilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:support-copilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@globex/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @globex/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@globex/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @globex/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 226, "sha256": "28da4dfca1f1e536726abb1b8d9e8d6708b7bc93dffdf1ba7ca798138177f43b", "content": "[project]\nname = \"support-copilot\"\nversion = \"0.4.6\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/support_copilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/support_copilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G7-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g7_env_decl", "planted": [{"class": "G7", "file": ".env.example", "component": ".env.example", "note": "new declared credential"}], "expected_labels": [], "description": "onboarding-buddy のスナップショット。レビュー済み grantlock.json の上に G7 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 844, "sha256": "fd77064d4b92814836fee651c2f0aec34fd67dbcbeaa798ac77f0954be6c8270", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.umbrella.internal:5432/onboarding_buddy\"\n ]\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 356, "sha256": "4430d66155e30388b240811aae65a4c000fb5fb1fd165495118ab5eb597ee116", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSTRIPE_SECRET_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 293, "sha256": "37684188288a05eedb9a102dafa0bc2bad8ddebb99f664ddbc820cebbf21003a", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @umbrella/platform\n/.cursor/ @umbrella/ai-platform\n/.env.example @umbrella/ai-platform\n/src/ @umbrella/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 993, "sha256": "6bdb3d0b0ae1a0360c0006dc34311961de91b60e29234c3a7c2a09f688e6d56a", "content": "# onboarding-buddy の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 534, "sha256": "4aafce6a37973f409a714e6a58f1e8d3a5e347c7f131001407669ede6986abe2", "content": "# onboarding-buddy\n\nonboarding-buddy は umbrella の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 7352, "sha256": "175a2302b2674d90ba512cb6040547f0e7806ee15ff3235ea5b6e8458f621193", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @umbrella/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.umbrella.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g7_notify_job", "planted": [{"class": "G7", "file": ".github/workflows/ci.yml", "component": "CI/notify", "note": "new notify job with webhook secret"}], "expected_labels": [], "description": "Snapshot of billing-concierge with one planted G7 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 234, "sha256": "b82f00cf683827525b9cb99b015b152e32caca5ea2b524bb4974aa5394c12d18", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "4dce749898c2825badcc92e3c6d40a70371456535768df95e6a45f6ea9f7aabf", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/agents\n/.env.example @wayne-ent/agents\n/src/ @wayne-ent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1200, "sha256": "11fddc69b94caef9e7b5a37462525b2b143b564fa2d29534ebfc0e0b229c5052", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n notify:\n runs-on: ubuntu-latest\n needs:\n - test\n - lint\n if: ${{ failure() }}\n permissions: {}\n steps:\n - run: curl -sS -X POST -d '{\"text\":\"CI failed\"}' \"$SLACK_WEBHOOK_URL\"\n env:\n SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 940, "sha256": "5d0bbbb46013073406682dd42f790541023f5b1c6ecca7b64d2eeaf2cc59d8a5", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 395, "sha256": "86ce3b248b5c9d89b4064c5a78717936eb609e771d2a9a9b190b9ad8f488d130", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the wayne-ent agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 8745, "sha256": "ea32a43a49331ad636cdc4b884aeb6ad36482def386f0cebab767bbf9a4594b1", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g7_header_ref", "planted": [{"class": "G7", "file": ".cursor/mcp.json", "component": "hubspot", "note": "new CRM server with private app token"}], "expected_labels": [], "description": "triage-agent のスナップショット。レビュー済み grantlock.json の上に G7 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1332, "sha256": "8942fb2532223d31de5318107116c67e97b68dba132ec21561c917ca97678d4e", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0BXQ300X7\",\n \"SLACK_CHANNEL_IDS\": \"C0BXQ300X7\"\n }\n },\n \"hubspot\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.hubspot.com/anthropic\",\n \"headers\": {\n \"Authorization\": \"Bearer ${HUBSPOT_PRIVATE_APP_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 373, "sha256": "b59ab14bc2d67ddd161261e3fa7e898fbe82b1e165d72d55e323fdcc65956008", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nSLACK_BOT_TOKEN=\nHUBSPOT_PRIVATE_APP_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 301, "sha256": "6402943a6b265772c021cf49ab5252eb1378b42116e77c320d3b3ce82267ffa9", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 843, "sha256": "c20292346757dbb4a531292dab0cd6567b67f7a7f94b686008d52af13d5eea3d", "content": "# triage-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 884, "sha256": "fa74717c801c73085644765a37af5f61ebbd59cc2694fef8d093a92271de20b0", "content": "# triage-agent を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://triage-agent.stark-labs.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/990254262341/locations/global/workloadIdentityPools/github/providers/triage-agent\n service_account: deployer@stark-labs-triage-agent.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy triage-agent --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 747, "sha256": "81d74b3f007c0190e40378e6776d1a7283a72a5a7b13b2997160b37c80469c13", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/stark-labs/triage-agent:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 528, "sha256": "4a51ef87ff60f0822f24dfd9492e391e6c84cf3902816a35923d45b407baf8b3", "content": "# triage-agent\n\ntriage-agent は stark-labs の ai-platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14043, "sha256": "f5212d0ca4cc752348124d15b5f523e046ab3579e586101392476d7e6eef5b36", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@stark-labs-triage-agent.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@stark-labs-triage-agent.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 223, "sha256": "7e5c23e5121ff85bfd4648561dad3e4deee43ce0af94955d50240f74beff1d08", "content": "[project]\nname = \"triage-agent\"\nversion = \"0.4.3\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/triage_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/triage_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G7-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g7_eval_extra", "planted": [{"class": "G7", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "judge model key added"}], "expected_labels": [], "description": "Snapshot of billing-concierge with one planted G7 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 1066, "sha256": "b42d4759145fe05d3bec48089c24d792a26f5d42c83e1dc401c9d5d7239d3c9a", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.stark-labs.internal:5432/billing_concierge\"\n ]\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 271, "sha256": "03eaeeb7d4b295f27bac0632f0fce7852c52ffc8eb68b790fd99f2b1db2b2f8a", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 261, "sha256": "717220a113ea7f7f5e3a39f990690864864c2e2eb7f050dd7778c8b0a21bf7d4", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.cursor/ @stark-labs/ml-infra\n/.env.example @stark-labs/ml-infra\n/src/ @stark-labs/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 733, "sha256": "df86e3e3a78e2f7a6ce33040add265d336ec2e99f729333b0273bdb5495f691d", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 797, "sha256": "cbffadf3f2d8892a6d672bb2c82b5538b2bf018389f5ab01034a33c769e8d403", "content": "# Deploys billing-concierge using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::881975224977:role/billing-concierge-deploy\n aws-region: us-east-1\n - name: Deploy\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 654, "sha256": "757d91b11476613161d2c32cf9cccaa985b7737016e631ec2a2993cf51670fc3", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n OPENAI_API_KEY: ${{ secrets.EVAL_OPENAI_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 398, "sha256": "7f003aff9ddf51953db19c3637f477b4b838bdf7ab75edc45311fe29eafeb83e", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the stark-labs ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14166, "sha256": "ddc8145ef90635cd2c5ac97490e4018fe35c2b05826cb2563719056d18023325", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::881975224977:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::881975224977:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @stark-labs/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.stark-labs.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g7_new_server_env", "planted": [{"class": "G7", "file": ".mcp.json", "component": "datadog", "note": "new observability server"}], "expected_labels": [], "description": "docs-assistant のスナップショット。レビュー済み grantlock.json の上に G7 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 380, "sha256": "8dd200425189bb5657500551838d72d04ad4aec314754b924b698c8a4b1c4df9", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nSLACK_BOT_TOKEN=\nDATADOG_API_KEY=\nDATADOG_APP_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 272, "sha256": "2a84dbc68c8a186bdc135a667af822bab9402e176b79abd399911896a97ebbda", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @hooli/platform\n/.mcp.json @hooli/ml-infra\n/.env.example @hooli/ml-infra\n/src/ @hooli/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 1016, "sha256": "cf17398f9852855e29a47319954ae77915d80bfde5da5d6a8d039d86ec45e1c2", "content": "# docs-assistant の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n - name: カバレッジをアップロード\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 884, "sha256": "d3d55628acf760684f1685f83bfcfc39132894f3be36d20a9295e06fc32fde44", "content": "# docs-assistant を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://docs-assistant.hooli.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/310549921614/locations/global/workloadIdentityPools/github/providers/docs-assistant\n service_account: deployer@hooli-docs-assistant.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy docs-assistant --source . --region us-central1\n"}, {"path": ".github/workflows/docker.yml", "bytes": 744, "sha256": "a1308b5c4ab64b98acde05fb6c463debc43ad07ea976b4f304a40864efbd14a8", "content": "# コンテナイメージをビルドして GHCR に push する。\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: レジストリにログイン\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: イメージをビルドして push\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/hooli/docs-assistant:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1234, "sha256": "7595929ab79a77591c7ebd837a9bef72891940f724dbe30f54431d5dea1278ff", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0OCRLR6SM\",\n \"SLACK_CHANNEL_IDS\": \"C0OCRLR6SM\"\n }\n },\n \"datadog\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@winor30/mcp-server-datadog\"\n ],\n \"env\": {\n \"DATADOG_API_KEY\": \"${DATADOG_API_KEY}\",\n \"DATADOG_APP_KEY\": \"${DATADOG_APP_KEY}\",\n \"DATADOG_SITE\": \"datadoghq.com\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 524, "sha256": "92658181908ba4e6639728abbce7a2755b1937d0d554668d18950bbffc83b35a", "content": "# docs-assistant\n\ndocs-assistant は hooli の ml-infra チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14929, "sha256": "92ce4da91ae096306c719f1ed8ca3613cbb8883f592b0aaff7808a78de7bd4c2", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@hooli-docs-assistant.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@hooli-docs-assistant.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "7cb91ccd83faa2dd5aae472d3cc0f167b0ad91553136de57885f5b738aa379f2", "content": "[project]\nname = \"docs-assistant\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/docs_assistant/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/docs_assistant/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g7_prod_secret", "planted": [{"class": "G7", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "new secret in production deploy"}], "expected_labels": [], "description": "Snapshot of repo-gardener with one planted G7 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 272, "sha256": "04fbaa8db423ebfe7f95f1bb53369bbd96c480ace5f7ebdcb4e47f0c22b83d4c", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 270, "sha256": "fd4d177b755e205538114b90750b8525b38734dd5079cc31cc55f08b5d728acc", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @stark-labs/platform\n/.mcp.json @stark-labs/ai-platform\n/.env.example @stark-labs/ai-platform\n/src/ @stark-labs/ai-platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 774, "sha256": "709a92bcf5e5b4712ab97013f27a3a8fc3f2f0d266cb91cfd996ede69ea72b40", "content": "# Continuous integration for repo-gardener.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 743, "sha256": "df682361f315a176c4b206a7465119a92749e5e946651be838c039f3898f7173", "content": "# Deploys repo-gardener using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name repo-gardener\n env:\n DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1146, "sha256": "49fdf5577859df4063eda73fbe7fd5ff80a8fa0bd40f4dd3cb4ffef0c08480ed", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=ywxocpnkttduzwzfgfjt\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 393, "sha256": "e684f8112fdb511d24040c63b06a5022a07d34f19e049821b03faa3b3a09dd78", "content": "# repo-gardener\n\nrepo-gardener is an internal AI agent maintained by the stark-labs ai-platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12658, "sha256": "b1539ede74056df81d072ed3ae34e97227dcccea84a66b13aa2d83aa0a4fe3e9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@stark-labs/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @stark-labs/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@stark-labs/ai-platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @stark-labs/ai-platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G7-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g7_remote_oauth", "planted": [{"class": "G7", "file": ".mcp.json", "component": "asana", "note": "new remote server with delegated OAuth"}], "expected_labels": [], "description": "data-analyst-agent のスナップショット。レビュー済み grantlock.json の上に G7 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 271, "sha256": "80f0246a9b40f89f5718e9ec92894e950f9c0124384b79f939df5bcb91fe1e0d", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @soylent/platform\n/.mcp.json @soylent/devex\n/.env.example @soylent/devex\n/src/ @soylent/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 849, "sha256": "d6fbf6a5082e66cf6a2e73cd35ec13410530dd272830465c4e089c60d8c26e86", "content": "# data-analyst-agent の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 941, "sha256": "1586dda0fb373b7509f982e3245667ce5cef06d4680f923c2e70eba45c3e2da0", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"asana\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.asana.com/sse\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 531, "sha256": "94500e7d7230f2244f2122eb8da3c7bbba0ffc8aa82b9e860888c743d7752857", "content": "# data-analyst-agent\n\ndata-analyst-agent は soylent の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 8558, "sha256": "fdcee516e4dd93b1a09c429433358be9a06a9113be2492c7ec7c0e23acdb51ee", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 229, "sha256": "a5a03c076de405c47f3042c11a4627f9cd88d14c100d084d8904dac6cd414af4", "content": "[project]\nname = \"data-analyst-agent\"\nversion = \"0.4.0\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/data_analyst_agent/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/data_analyst_agent/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-01", "split": "dev", "kind": "planted", "lang": "en", "variant": "g8_remove_server", "planted": [{"class": "G8", "file": ".mcp.json", "component": "slack", "note": "server removed; credential still declared"}], "expected_labels": [], "description": "Snapshot of onboarding-buddy with one planted G8 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 251, "sha256": "8504258768d441163b0f06bd90de4c07a6b0c64fc41bc674e299de8256b334f3", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nSLACK_BOT_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 235, "sha256": "f4d9543e9495ec2691f0b28035620d76e7b1780f94abc2a1cb7952370dffa5e2", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @hooli/platform\n/.mcp.json @hooli/agents\n/.env.example @hooli/agents\n/src/ @hooli/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 732, "sha256": "302f2b904a0ac24187c868f9188203214010f3851fa6ad76025502d9b529d4ec", "content": "# Continuous integration for onboarding-buddy.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/docker.yml", "bytes": 683, "sha256": "524bf5348bc14151b89cbfcc4623fad06e28117079042e881fbc8c3d9fc353b2", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/hooli/onboarding-buddy:latest\n"}, {"path": ".github/workflows/release.yml", "bytes": 504, "sha256": "4d652921d344e96b02d9979bb7fc2931bca5af5e78d623dbd644facabf651d30", "content": "# Publishes releases via trusted publishing.\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: python -m pip install build && python -m build\n - name: Publish package\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 555, "sha256": "2c609852d06cbac4858a4ef46300a39b89468890cabecd3c156a7475135be9e8", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "62becca146e4bc755220ed97d698a3f54eb7149b7873aec2b8949214b26c031a", "content": "# onboarding-buddy\n\nonboarding-buddy is an internal AI agent maintained by the hooli agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 10307, "sha256": "57346c500c38d77cdd175cb3d860644495eefae95b0b9e184b32a7d5d5dfaebc", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 227, "sha256": "778e969ff474d4ae4949a311308cf370278c8bd3195973552e0c5833024c574e", "content": "[project]\nname = \"onboarding-buddy\"\nversion = \"0.4.7\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/onboarding_buddy/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/onboarding_buddy/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-02", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g8_remove_eval_wf", "planted": [{"class": "G8", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "eval workflow deleted"}], "expected_labels": [], "description": "research-scout のスナップショット。レビュー済み grantlock.json の上に G8 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 360, "sha256": "723e1fce2079d3397f42b441190e2c9a5660e31e3d569612cc899ce4b8e75e8b", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 263, "sha256": "396e6994d1c139e19b3ef4618e1a79ff9e1a0609649cd161419bd40f80fae475", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @hooli/platform\n/.mcp.json @hooli/devex\n/.env.example @hooli/devex\n/src/ @hooli/devex\n"}, {"path": ".github/workflows/ci.yml", "bytes": 845, "sha256": "50d55ba29395e03858a8919982e209bdc63e4a98102f15d9295b52476ca0eba9", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 733, "sha256": "17871632424c3256a2e82d4ea3763d36db59f53d6c56d13221637f271c35982d", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: デプロイ\n run: az webapp up --name research-scout\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 1096, "sha256": "704b1db5ba1384cf372ad1d3c862f90434df32cbfb40955bde8355469a897ffa", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 521, "sha256": "5eb793def22d8146738871a8f9590643087d4c99f0963cb059c0ee89e0fa8f2b", "content": "# research-scout\n\nresearch-scout は hooli の devex チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 14242, "sha256": "fadd5cae5924b71c6ac53d440d16e42ef08d00fd20f84e144aed7ae175c02acf", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/devex\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/devex\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-03", "split": "dev", "kind": "planted", "lang": "en", "variant": "g8_remove_codecov", "planted": [{"class": "G8", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "coverage upload removed"}], "expected_labels": [], "description": "Snapshot of billing-concierge with one planted G8 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 249, "sha256": "26994ae4ddd3152f4475ec554c36f25dec349b1089a55195122e1cf282969d06", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nBRAVE_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 235, "sha256": "f4d9543e9495ec2691f0b28035620d76e7b1780f94abc2a1cb7952370dffa5e2", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @hooli/platform\n/.mcp.json @hooli/agents\n/.env.example @hooli/agents\n/src/ @hooli/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 733, "sha256": "df86e3e3a78e2f7a6ce33040add265d336ec2e99f729333b0273bdb5495f691d", "content": "# Continuous integration for billing-concierge.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 797, "sha256": "2af6c6aebb559184f747b3135768d0a3ae841a33cf1d69ce29757e5372a2b648", "content": "# Deploys billing-concierge using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::039616330091:role/billing-concierge-deploy\n aws-region: eu-west-1\n - name: Deploy\n run: aws ecs update-service --cluster billing-concierge --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 684, "sha256": "c2a8a20ef1d93ecc8a9c0bd497409e2f9be42b48d4d77c2529572b0926dfa2e9", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/hooli/billing-concierge:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 900, "sha256": "c71d2469d8cefdbc89966b8a5c6b570aed19bee923bb927235acadfb4097f443", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"brave-search\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-brave-search\"\n ],\n \"env\": {\n \"BRAVE_API_KEY\": \"${BRAVE_API_KEY}\"\n }\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"linear\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.linear.app/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 391, "sha256": "b11a52a59d86b9725dbeeb1ff0273c43ae72d1578cdfbe2d4f2682a9a3d43e82", "content": "# billing-concierge\n\nbilling-concierge is an internal AI agent maintained by the hooli agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 14200, "sha256": "e9690f7b706bb3f66c58e0a02c2867fc62a6ae18fb4c7cf417c1aa285273a0cc", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::039616330091:role/billing-concierge-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::039616330091:role/billing-concierge-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"billing-concierge-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:billing-concierge-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#brave-search\",\n \"kind\": \"mcp_server\",\n \"name\": \"brave-search\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"BRAVE_API_KEY\",\n \"provider\": \"brave\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"brave:BRAVE_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-brave-search\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@hooli/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @hooli/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@hooli/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @hooli/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 228, "sha256": "32ce34a0fba6fa6b2d563eef2d19610130abaa2cf0510a82d63f4d8fd1dee1cc", "content": "[project]\nname = \"billing-concierge\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/billing_concierge/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/billing_concierge/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G8-04", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g8_remove_deploy_wf", "planted": [{"class": "G8", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deploy workflow removed"}], "expected_labels": [], "description": "repo-gardener のスナップショット。レビュー済み grantlock.json の上に G8 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 288, "sha256": "152ab74584bc486c02d1b2246619862bdd68d02fccf7c32e008ccfab67f5e1e2", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @cyberdyne/platform\n/.mcp.json @cyberdyne/platform\n/.env.example @cyberdyne/platform\n/src/ @cyberdyne/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 799, "sha256": "22e6f779f611b32fef027304ce22d26731896f7a2e6cddb6df2b28a54fa1ae99", "content": "# repo-gardener の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 846, "sha256": "0d3c5fd911f706989113386bb1428c74be34c55eb295ca01fa2152ffa4b524e2", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"GITHUB_HOST\": \"https://github.com\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"atlassian\": {\n \"type\": \"sse\",\n \"url\": \"https://mcp.atlassian.com/v1/sse\"\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n }\n }\n}\n"}, {"path": "README.md", "bytes": 526, "sha256": "301bccf421befbd5090db87ed44858d045b7a032a4cf345d69e181d88150307c", "content": "# repo-gardener\n\nrepo-gardener は cyberdyne の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 11079, "sha256": "4798c8c4a8942baf5e73103c5801715eaf70c0e3ad15068c34acadec149a78e7", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#atlassian\",\n \"kind\": \"mcp_server\",\n \"name\": \"atlassian\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.atlassian.com\",\n \"provider\": \"atlassian\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"atlassian:oauth:mcp.atlassian.com\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.atlassian.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"github.com\"\n },\n {\n \"kind\": \"host\",\n \"value\": \"proxy.internal\"\n },\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@cyberdyne/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @cyberdyne/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-05", "split": "dev", "kind": "planted", "lang": "en", "variant": "g8_remove_remote", "planted": [{"class": "G8", "file": ".mcp.json", "component": "linear", "note": "remote server removed"}], "expected_labels": [], "description": "Snapshot of repo-gardener with one planted G8 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 264, "sha256": "9f98e4e43bb4f0d8f482336118d6b8ea5a28fb1854034e3bb2a96ae675551a5d", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nNOTION_TOKEN=\nTAVILY_API_KEY=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 253, "sha256": "610708604f3e71aa7213ef668c0782ccf690a48cb1b81e03326281dd46c0f237", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @umbrella/platform\n/.mcp.json @umbrella/platform\n/.env.example @umbrella/platform\n/src/ @umbrella/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 859, "sha256": "fd83f9b37a23c91b1fcd06b2a19a9a07ccde5700dd2976721bd26287e8d39331", "content": "# Continuous integration for repo-gardener.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 676, "sha256": "c4930fd5e30a4c80624227a50cd43556410f83090eae5f485e145874f813a4e0", "content": "# Deploys repo-gardener using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: azure/login@v2\n with:\n client-id: ${{ secrets.AZURE_CLIENT_ID }}\n tenant-id: ${{ secrets.AZURE_TENANT_ID }}\n subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}\n - name: Deploy\n run: az webapp up --name repo-gardener\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 829, "sha256": "1c341f3dc25bc64313dabd1cbe2d47924bf698a081cde330ecd68882e9f1e06e", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\"\n }\n },\n \"notion\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@notionhq/notion-mcp-server\"\n ],\n \"env\": {\n \"NOTION_TOKEN\": \"${NOTION_TOKEN}\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 388, "sha256": "6386262f729fabf5c4b8c5a43270cc9c030b48ffc0c527c5ef3cb65f79d7417c", "content": "# repo-gardener\n\nrepo-gardener is an internal AI agent maintained by the umbrella platform team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 12205, "sha256": "1da57728831d967d82b956fb4501190fa464b97c8dcf9bfa89c7283fb0ce2bb9", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#linear\",\n \"kind\": \"mcp_server\",\n \"name\": \"linear\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.linear.app\",\n \"provider\": \"linear\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"linear:oauth:mcp.linear.app\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.linear.app\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#notion\",\n \"kind\": \"mcp_server\",\n \"name\": \"notion\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"NOTION_TOKEN\",\n \"provider\": \"notion\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"notion:NOTION_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@notionhq/notion-mcp-server\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@umbrella/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @umbrella/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 224, "sha256": "654553b0c885f756e4bda3754c58458cc05868d3805d6fda5e0f86c3af218267", "content": "[project]\nname = \"repo-gardener\"\nversion = \"0.4.4\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/repo_gardener/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/repo_gardener/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G8-06", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g8_remove_github", "planted": [{"class": "G8", "file": ".cursor/mcp.json", "component": "github", "note": "github server removed"}], "expected_labels": [], "description": "release-helper のスナップショット。レビュー済み grantlock.json の上に G8 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 644, "sha256": "d720285e15de3d58c677223869ebf45faf3c6dc5bd5d7b480b84c932a650855c", "content": "{\n \"mcpServers\": {\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"postgres\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${PG_READONLY_PASSWORD}@db.staging.tyrell.internal:5432/release_helper\"\n ]\n },\n \"slack\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-slack\"\n ],\n \"env\": {\n \"SLACK_BOT_TOKEN\": \"${SLACK_BOT_TOKEN}\",\n \"SLACK_TEAM_ID\": \"T0XYD3IVGK\",\n \"SLACK_CHANNEL_IDS\": \"C0XYD3IVGK\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 354, "sha256": "0b2ef782e39e1f3873e7419fd0082392577bba853d303f83f86067f552440d66", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSLACK_BOT_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 276, "sha256": "46ca21efe68fe585d649a048804ef3a2e4cc5f6b737ceef3f5023c4320c3dbee", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @tyrell/platform\n/.cursor/ @tyrell/platform\n/.env.example @tyrell/platform\n/src/ @tyrell/platform\n"}, {"path": ".github/workflows/ci.yml", "bytes": 820, "sha256": "69801f6b6e79f766aea31ec8ce7b9fe9424022ad2b65e653f54d9e03a3b2f89e", "content": "# release-helper の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".github/workflows/release.yml", "bytes": 555, "sha256": "da545edb66c9d30138170da228a60dd84b11b30b2cd98fa0152638b59a53b323", "content": "# Trusted Publishing でリリースを公開する。\nname: Release\non:\n release:\n types:\n - published\npermissions:\n contents: read\n\njobs:\n publish:\n runs-on: ubuntu-latest\n environment: pypi\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: python -m pip install build && python -m build\n - name: パッケージを公開\n uses: pypa/gh-action-pypi-publish@release/v1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 525, "sha256": "0432dbfb848751185ef7cececccb7273231555ae859658062b018332b8b21751", "content": "# release-helper\n\nrelease-helper は tyrell の platform チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 12488, "sha256": "34b9b39a4a9757346b6ff6cb0f8c6fa332137fd8f57df98486c003b9548bb35b", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/release.yml#publish\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.tyrell.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/release.yml\",\n \"id\": \"gha_workflow:.github/workflows/release.yml#publish\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Release/publish\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:trusted-publisher\",\n \"provider\": \"pypi\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"pypi:oidc:trusted-publisher\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"pypi\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"release\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#slack\",\n \"kind\": \"mcp_server\",\n \"name\": \"slack\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SLACK_BOT_TOKEN\",\n \"provider\": \"slack\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"slack:SLACK_BOT_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@tyrell/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @tyrell/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-slack\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G8-07", "split": "dev", "kind": "planted", "lang": "en", "variant": "g8_remove_server", "planted": [{"class": "G8", "file": ".mcp.json", "component": "postgres", "note": "server removed; credential still declared"}], "expected_labels": [], "description": "Snapshot of release-helper with one planted G8 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 279, "sha256": "3324ce401e083925c8f8135b9cb531437544c479a882aae362752e8341be73eb", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\nSUPABASE_ACCESS_TOKEN=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 251, "sha256": "4dce749898c2825badcc92e3c6d40a70371456535768df95e6a45f6ea9f7aabf", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @wayne-ent/platform\n/.mcp.json @wayne-ent/agents\n/.env.example @wayne-ent/agents\n/src/ @wayne-ent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 860, "sha256": "182c00c6475979907ddb1a566409a78fb72e30dd3011027ee390c78d72c59434", "content": "# Continuous integration for release-helper.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n - name: Upload coverage\n uses: codecov/codecov-action@v4\n with:\n token: ${{ secrets.CODECOV_TOKEN }}\n files: coverage.xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 793, "sha256": "0235e56735e9d8f5cf0208746fc69df94e42e8b2e989b19660e96ed3cd2281d1", "content": "# Deploys release-helper using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::568968181469:role/release-helper-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster release-helper --service api --force-new-deployment\n"}, {"path": ".github/workflows/docker.yml", "bytes": 685, "sha256": "aedd738b1f5aa5de0e38ac110a7e3395c29456cf595fda30c171b3320a1bf8b5", "content": "# Builds the container image and pushes it to GHCR.\nname: Container image\non:\n push:\n branches:\n - main\n tags:\n - v*\npermissions:\n contents: read\n\njobs:\n image:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n packages: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Log in to registry\n uses: docker/login-action@v3\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n - name: Build and push image\n uses: docker/build-push-action@v6\n with:\n push: true\n tags: ghcr.io/wayne-ent/release-helper:latest\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 878, "sha256": "0835411e7063a04e9933701cf82997b11ba24204ea9a0a2b0942d471c46b9f7f", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"API_TIMEOUT_MS\": \"30000\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"sentry\": {\n \"type\": \"http\",\n \"url\": \"https://mcp.sentry.dev/mcp\"\n },\n \"supabase\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@supabase/mcp-server-supabase@latest\",\n \"--read-only\",\n \"--project-ref=mykhdokmwrintbuovgoh\"\n ],\n \"env\": {\n \"SUPABASE_ACCESS_TOKEN\": \"${SUPABASE_ACCESS_TOKEN}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 389, "sha256": "5359866ee65b4696c0ecad84de87ba61607adb943ec465f7bc6ed74d25751fca", "content": "# release-helper\n\nrelease-helper is an internal AI agent maintained by the wayne-ent agents team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 16250, "sha256": "6a4a67a5c2ec16ccab576e5f10657d8deb9a21bd75cbb87a69351a1ae023e28e", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::568968181469:role/release-helper-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::568968181469:role/release-helper-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"release-helper-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:release-helper-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/docker.yml\",\n \"id\": \"gha_workflow:.github/workflows/docker.yml#image\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Container image/image\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/docker.yml#image\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"packages:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@wayne-ent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @wayne-ent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.wayne-ent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#sentry\",\n \"kind\": \"mcp_server\",\n \"name\": \"sentry\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oauth:mcp.sentry.dev\",\n \"provider\": \"sentry\",\n \"storage\": \"vault_ref\",\n \"type\": \"oauth\"\n },\n \"identity_id\": \"sentry:oauth:mcp.sentry.dev\",\n \"lifespan\": \"rotating\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"mcp.sentry.dev\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#supabase\",\n \"kind\": \"mcp_server\",\n \"name\": \"supabase\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"SUPABASE_ACCESS_TOKEN\",\n \"provider\": \"supabase\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"supabase:SUPABASE_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@wayne-ent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @wayne-ent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"@supabase/mcp-server-supabase@latest\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "aae5f6d220736d29c7a241c6822a834f87c924dd54d930a991b8cada72be8999", "content": "[project]\nname = \"release-helper\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/release_helper/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/release_helper/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}} {"case_id": "dev-planted-G8-08", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g8_remove_eval_wf", "planted": [{"class": "G8", "file": ".github/workflows/eval.yml", "component": "Agent eval/eval", "note": "eval workflow deleted"}], "expected_labels": [], "description": "research-scout のスナップショット。レビュー済み grantlock.json の上に G8 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 331, "sha256": "8456307a1e581efe8f53872d39fc55e181ef757c4d43f0f18e247a49e96d10ca", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nTAVILY_API_KEY=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 274, "sha256": "e0f6ce00e32108171f9eb577efdd059489cfa4428895725201894d346d11c168", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @soylent/platform\n/.mcp.json @soylent/agents\n/.env.example @soylent/agents\n/src/ @soylent/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 845, "sha256": "50d55ba29395e03858a8919982e209bdc63e4a98102f15d9295b52476ca0eba9", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n if: ${{ github.event_name == 'push' }}\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 888, "sha256": "f7e2163108c8c8a8ad87f14b1e6863d1c38d06d5dc0b1cf6b6a410b46f76761b", "content": "# research-scout を OIDC の短期認証でデプロイする(クラウドの鍵は保存しない)。\nname: Deploy\non:\n push:\n branches:\n - main\npermissions:\n contents: read\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment:\n name: production\n url: https://research-scout.soylent.example\n permissions:\n contents: read\n id-token: write\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: クラウド認証情報を設定\n uses: google-github-actions/auth@v2\n with:\n workload_identity_provider: projects/842039202689/locations/global/workloadIdentityPools/github/providers/research-scout\n service_account: deployer@soylent-research-scout.iam.gserviceaccount.com\n - name: デプロイ\n run: gcloud run deploy research-scout --source . --region us-central1\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".mcp.json", "bytes": 857, "sha256": "29d222ff278c942cdb2b2611f83ac5cfa1b1c5a3e2c32598f74639c987dee198", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n },\n \"tavily\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"tavily-mcp@0.2.4\"\n ],\n \"env\": {\n \"TAVILY_API_KEY\": \"${TAVILY_API_KEY}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 524, "sha256": "4c15e59b2f62d0555faa629211e35a5c28ed51d9ef8b96baedb6aa04256d712e", "content": "# research-scout\n\nresearch-scout は soylent の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 10916, "sha256": "71aca7fd18770df136f75f4ee1a131bdb78d53f2042f06df8cfacde3cffd376f", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:deployer@soylent-research-scout.iam.gserviceaccount.com\",\n \"provider\": \"gcp\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"gcp:oidc:deployer@soylent-research-scout.iam.gserviceaccount.com\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"deployer\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"service_account:deployer\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".mcp.json\",\n \"id\": \"mcp_server:.mcp.json#tavily\",\n \"kind\": \"mcp_server\",\n \"name\": \"tavily\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"TAVILY_API_KEY\",\n \"provider\": \"tavily\",\n \"storage\": \"env\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"tavily:TAVILY_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.mcp.json @soylent/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"package\",\n \"value\": \"tavily-mcp@0.2.4\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-09", "split": "dev", "kind": "planted", "lang": "en", "variant": "g8_remove_codecov", "planted": [{"class": "G8", "file": ".github/workflows/ci.yml", "component": "CI/test", "note": "coverage upload removed"}], "expected_labels": [], "description": "Snapshot of qa-pilot with one planted G8 risk on top of a reviewed grantlock.json.", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".env.example", "bytes": 256, "sha256": "f9a4d118264835abf956a42198446ece6e2ea147d8768131e6b3f390c5df8c94", "content": "# Copy this file to .env and fill in values. Never commit real secrets.\n\n# Credentials used by MCP servers (see .mcp config)\nGITHUB_PERSONAL_ACCESS_TOKEN=\nPG_READONLY_PASSWORD=\n\n# Application settings\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 249, "sha256": "e5da60b3e8fd4a06336b798a4d428b5a0dd5069831cd1fc9f4839402535c3ec4", "content": "# Code owners: agent credentials and CI must be reviewed by the owning team.\n/.github/ @soylent/platform\n/.vscode/ @soylent/ml-infra\n/.env.example @soylent/ml-infra\n/src/ @soylent/ml-infra\n"}, {"path": ".github/workflows/ci.yml", "bytes": 704, "sha256": "8db5792ea890a5fc86dbfaa4c2464731ea5d756b6cf58129168356ab518e00da", "content": "# Continuous integration for qa-pilot.\n# Keep permissions minimal; see SECURITY.md.\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: Install dependencies\n run: pip install -e '.[test]'\n - name: Run unit tests\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Lint\n run: pipx run ruff check .\n"}, {"path": ".github/workflows/deploy.yml", "bytes": 775, "sha256": "20ca2c0d7358e99941d28982c600fc53ecf38a7b46527bf774490aa338073c83", "content": "# Deploys qa-pilot using short-lived OIDC credentials (no stored cloud keys).\nname: Deploy\non:\n push:\n branches:\n - main\n workflow_dispatch:\npermissions:\n contents: read\nconcurrency:\n group: deploy-production\n cancel-in-progress: false\n\njobs:\n deploy:\n runs-on: ubuntu-latest\n environment: production\n permissions:\n contents: read\n id-token: write\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Configure cloud credentials\n uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::863953248079:role/qa-pilot-deploy\n aws-region: ap-northeast-1\n - name: Deploy\n run: aws ecs update-service --cluster qa-pilot --service api --force-new-deployment\n"}, {"path": ".github/workflows/eval.yml", "bytes": 595, "sha256": "83fd4f5d26fa5d6a20cd4c6796ffe2fddf1973028bc9d11d78327d0623a2a218", "content": "# Nightly evaluation of the agent against the regression set.\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: Check out repository\n uses: actions/checkout@v4\n - name: Install dependencies\n run: pip install -e '.[eval]'\n - name: Run agent evaluation suite\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": ".vscode/mcp.json", "bytes": 1470, "sha256": "f8192eda652331199efc5c3417ea6f1e59d4f30b109d175e71f43104059c2c40", "content": "// MCP servers for the qa-pilot workspace\n{\n \"inputs\": [\n {\n \"type\": \"promptString\",\n \"id\": \"github_mcp_pat\",\n \"description\": \"github mcp pat\",\n \"password\": true\n }\n ],\n \"servers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${env:GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\"\n }\n },\n \"fetch\": {\n \"type\": \"stdio\",\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"memory\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\",\n \"HTTPS_PROXY\": \"http://proxy.internal:3128\"\n }\n },\n \"postgres\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-postgres\",\n \"postgresql://readonly:${env:PG_READONLY_PASSWORD}@db.staging.soylent.internal:5432/qa_pilot\"\n ]\n },\n \"github-remote\": {\n \"type\": \"http\",\n \"url\": \"https://api.githubcopilot.com/mcp/\",\n \"headers\": {\n \"Authorization\": \"Bearer ${input:github_mcp_pat}\"\n }\n }\n }\n}\n"}, {"path": "README.md", "bytes": 377, "sha256": "2ab2b24953c6078aad700cc4386d6924b30818e31f4b9bc5ccb5a758ffc2f21c", "content": "# qa-pilot\n\nqa-pilot is an internal AI agent maintained by the soylent ml-infra team. It uses MCP servers for tool access and runs its evaluation suite in GitHub Actions.\n\n## Setup\n\n1. Copy `.env.example` to `.env` and fill in the values.\n2. Start the agent with `make dev`.\n\n## Security\n\nCredentials are referenced from the environment; do not paste tokens into config files.\n"}, {"path": "grantlock.json", "bytes": 13314, "sha256": "72576052a81839accedeff478ab35eec8cac5f8a9e66f86320c14905dd1d34b5", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:arn:aws:iam::863953248079:role/qa-pilot-deploy\",\n \"provider\": \"aws\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"aws:oidc:arn:aws:iam::863953248079:role/qa-pilot-deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"role\",\n \"value\": \"qa-pilot-deploy\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"role:qa-pilot-deploy\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"CODECOV_TOKEN\",\n \"provider\": \"codecov\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"codecov:CODECOV_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@soylent/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @soylent/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#github-remote\",\n \"kind\": \"mcp_server\",\n \"name\": \"github-remote\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"github_mcp_pat\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:github_mcp_pat\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"api.githubcopilot.com\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".vscode/mcp.json\",\n \"id\": \"mcp_server:.vscode/mcp.json#postgres\",\n \"kind\": \"mcp_server\",\n \"name\": \"postgres\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"PG_READONLY_PASSWORD\",\n \"provider\": \"postgres\",\n \"storage\": \"env\",\n \"type\": \"password\"\n },\n \"identity_id\": \"postgres:PG_READONLY_PASSWORD\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@soylent/ml-infra\"\n ],\n \"rule\": \".github/CODEOWNERS: /.vscode/ @soylent/ml-infra\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"host\",\n \"value\": \"db.staging.soylent.internal\"\n },\n {\n \"kind\": \"package\",\n \"value\": \"@modelcontextprotocol/server-postgres\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 219, "sha256": "6664c944d3801195b9fc7339ba5d606c5cf8b002f9b247486fe7649415a27b43", "content": "[project]\nname = \"qa-pilot\"\nversion = \"0.4.8\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/qa_pilot/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/qa_pilot/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}]}} {"case_id": "dev-planted-G8-10", "split": "dev", "kind": "planted", "lang": "ja", "variant": "g8_remove_deploy_wf", "planted": [{"class": "G8", "file": ".github/workflows/deploy.yml", "component": "Deploy/deploy", "note": "deploy workflow removed"}], "expected_labels": [], "description": "research-scout のスナップショット。レビュー済み grantlock.json の上に G8 のリスクを仕込んである。", "corpus_sha256": "806d821b43fe1813f21d0c7dded45e2b5871b50426a012fd791dbf5627aeae76", "snapshots": {"repo": [{"path": ".cursor/mcp.json", "bytes": 951, "sha256": "e2f615b1317af65b6ccf2d450d4769de5e9bdbb020f78dde5a9682d8a99f7f67", "content": "{\n \"mcpServers\": {\n \"github\": {\n \"command\": \"docker\",\n \"args\": [\n \"run\",\n \"-i\",\n \"--rm\",\n \"-e\",\n \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"-e\",\n \"GITHUB_TOOLSETS\",\n \"ghcr.io/github/github-mcp-server\"\n ],\n \"env\": {\n \"GITHUB_PERSONAL_ACCESS_TOKEN\": \"${GITHUB_PERSONAL_ACCESS_TOKEN}\",\n \"GITHUB_TOOLSETS\": \"repos,issues\",\n \"TOKEN_CACHE_DIR\": \"./.cache/tokens\"\n }\n },\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\n \"mcp-server-fetch\"\n ]\n },\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n \"./docs\",\n \"./runbooks\"\n ]\n },\n \"memory\": {\n \"command\": \"npx\",\n \"args\": [\n \"-y\",\n \"@modelcontextprotocol/server-memory\"\n ],\n \"env\": {\n \"MEMORY_FILE_PATH\": \"./.agent/memory.json\"\n }\n }\n }\n}\n"}, {"path": ".env.example", "bytes": 315, "sha256": "b816f458503a68a85c37ce5599e530b31fe6305868e3976f6257e85ddcffc06d", "content": "# このファイルを .env にコピーして値を設定してください。本物の秘密はコミットしないこと。\n\n# MCP サーバが使う認証情報(.mcp の設定を参照)\nGITHUB_PERSONAL_ACCESS_TOKEN=\n\n# アプリケーション設定\nLOG_LEVEL=info\nAGENT_MODEL=claude-sonnet-5-5\nPORT=8080\n"}, {"path": ".github/CODEOWNERS", "bytes": 274, "sha256": "a91a80a9ffe0f571518035d2fc1913131b93693bb33814718854c789e879d277", "content": "# コードオーナー: エージェントの認証情報と CI は担当チームのレビュー必須。\n/.github/ @initech/platform\n/.cursor/ @initech/agents\n/.env.example @initech/agents\n/src/ @initech/agents\n"}, {"path": ".github/workflows/ci.yml", "bytes": 820, "sha256": "f1c502bb0c1e9cb0c6aaab8aeea21b208df2b54d1d33b4162bd686a65c19eb3f", "content": "# research-scout の CI。\n# 権限は最小限にすること(SECURITY.md 参照)。\nname: CI\non:\n push:\n branches:\n - main\n pull_request:\npermissions:\n contents: read\n\njobs:\n test:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: Python をセットアップ\n uses: actions/setup-python@v5\n with:\n python-version: '3.12'\n - name: 依存関係をインストール\n run: pip install -e '.[test]'\n - name: ユニットテストを実行\n run: pytest -q --cov=src --cov-report=xml\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 静的解析\n run: pipx run ruff check .\n permissions: {}\n"}, {"path": ".github/workflows/eval.yml", "bytes": 650, "sha256": "fcdc9e2f976a14ef489628ccaae2a528f38e7ee9e8cf4df4298f265a7ce00885", "content": "# 回帰セットに対するエージェントの夜間評価。\nname: Agent eval\non:\n schedule:\n - cron: 17 3 * * *\n workflow_dispatch:\npermissions:\n contents: read\n\njobs:\n eval:\n runs-on: ubuntu-latest\n environment: staging\n timeout-minutes: 60\n steps:\n - name: リポジトリをチェックアウト\n uses: actions/checkout@v4\n - name: 依存関係をインストール\n run: pip install -e '.[eval]'\n - name: エージェント評価スイートを実行\n run: python -m evals.run --suite regression --report evals/report.json\n env:\n ANTHROPIC_API_KEY: ${{ secrets.EVAL_ANTHROPIC_API_KEY }}\n"}, {"path": ".gitignore", "bytes": 33, "sha256": "2971d29fa168d272c8478f5c2972434cc396841480737282445cf440750c4dec", "content": ".env\n.venv/\n__pycache__/\n.agent/\n"}, {"path": "README.md", "bytes": 524, "sha256": "78a051c5c8d2fe11ae6e72711856baa21e428a5b82933b2ac5e1064d3752ad86", "content": "# research-scout\n\nresearch-scout は initech の agents チームが保守する社内 AI エージェントです。ツール接続には MCP サーバを使い、評価スイートは GitHub Actions で実行します。\n\n## セットアップ\n\n1. `.env.example` を `.env` にコピーして値を設定します。\n2. `make dev` でエージェントを起動します。\n\n## セキュリティ\n\n認証情報は環境変数から参照します。設定ファイルにトークンを貼り付けないでください。\n"}, {"path": "grantlock.json", "bytes": 8984, "sha256": "4d6ee7ffddc1249350498e9a1ea0e89cc0797c98584dceb028f6e4040c663ce8", "content": "{\n \"document\": \"grantlock.lock\",\n \"entries\": [\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"EVAL_ANTHROPIC_API_KEY\",\n \"provider\": \"anthropic\",\n \"storage\": \"vault_ref\",\n \"type\": \"api_key\"\n },\n \"identity_id\": \"anthropic:EVAL_ANTHROPIC_API_KEY\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"oidc:secrets.AZURE_CLIENT_ID\",\n \"provider\": \"azure\",\n \"storage\": \"federated\",\n \"type\": \"service_account\"\n },\n \"identity_id\": \"azure:oidc:secrets.AZURE_CLIENT_ID\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".env.example\",\n \"id\": \"env_decl:.env.example#decl\",\n \"kind\": \"env_decl\",\n \"name\": \".env.example\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 4,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.env.example @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [],\n \"scope_source\": \"unknown\",\n \"scopes\": [],\n \"scopes_known\": false\n },\n {\n \"component\": {\n \"file\": \".cursor/mcp.json\",\n \"id\": \"mcp_server:.cursor/mcp.json#github\",\n \"kind\": \"mcp_server\",\n \"name\": \"github\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"env\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_PERSONAL_ACCESS_TOKEN\",\n \"lifespan\": \"long_lived\",\n \"owner\": {\n \"line\": 3,\n \"owners\": [\n \"@initech/agents\"\n ],\n \"rule\": \".github/CODEOWNERS: /.cursor/ @initech/agents\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"image\",\n \"value\": \"ghcr.io/github/github-mcp-server\"\n }\n ],\n \"scope_source\": \"declared\",\n \"scopes\": [\n \"toolset:issues\",\n \"toolset:repos\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#lint\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/lint\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#lint\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/ci.yml\",\n \"id\": \"gha_workflow:.github/workflows/ci.yml#test\",\n \"kind\": \"gha_workflow\",\n \"name\": \"CI/test\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/ci.yml#test\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"pull_request\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/deploy.yml\",\n \"id\": \"gha_workflow:.github/workflows/deploy.yml#deploy\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Deploy/deploy\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/deploy.yml#deploy\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"branch\",\n \"value\": \"main\"\n },\n {\n \"kind\": \"environment\",\n \"value\": \"production\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"push\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\",\n \"id-token:write\"\n ],\n \"scopes_known\": true\n },\n {\n \"component\": {\n \"file\": \".github/workflows/eval.yml\",\n \"id\": \"gha_workflow:.github/workflows/eval.yml#eval\",\n \"kind\": \"gha_workflow\",\n \"name\": \"Agent eval/eval\"\n },\n \"context\": {\n \"federation_available\": false,\n \"reason\": null\n },\n \"credential\": {\n \"format\": null,\n \"name\": \"GITHUB_TOKEN\",\n \"provider\": \"github\",\n \"storage\": \"vault_ref\",\n \"type\": \"token\"\n },\n \"identity_id\": \"github:GITHUB_TOKEN@.github/workflows/eval.yml#eval\",\n \"lifespan\": \"ephemeral\",\n \"owner\": {\n \"line\": 2,\n \"owners\": [\n \"@initech/platform\"\n ],\n \"rule\": \".github/CODEOWNERS: /.github/ @initech/platform\",\n \"source\": \"codeowners\"\n },\n \"resources\": [\n {\n \"kind\": \"environment\",\n \"value\": \"staging\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"schedule\"\n },\n {\n \"kind\": \"trigger\",\n \"value\": \"workflow_dispatch\"\n }\n ],\n \"scope_source\": \"explicit\",\n \"scopes\": [\n \"contents:read\"\n ],\n \"scopes_known\": true\n }\n ],\n \"generator\": {\n \"name\": \"grantlock\",\n \"version\": \"0.1.0\"\n },\n \"schema_version\": \"1.0\"\n}\n"}, {"path": "pyproject.toml", "bytes": 225, "sha256": "55b547bdb75e030dde69c7fda8aa393aeee26ff1b1ca0587af42d54eedeada96", "content": "[project]\nname = \"research-scout\"\nversion = \"0.4.5\"\nrequires-python = \">=3.11\"\ndependencies = [\"anthropic>=0.60\", \"mcp>=1.10\", \"httpx>=0.27\"]\n\n[project.optional-dependencies]\ntest = [\"pytest\", \"pytest-cov\"]\neval = [\"pandas\"]\n"}, {"path": "src/research_scout/__init__.py", "bytes": 25, "sha256": "b39a9ba57e2c37edeb05e29f377f9cce7753c480813e9072a69dd82e79262cf7", "content": "\"\"\"Agent entry point.\"\"\"\n"}, {"path": "src/research_scout/agent.py", "bytes": 190, "sha256": "13711e41995ce3c1d1b39d9042e3161135bfe6f0f1ecba2954ecd236346fa0fc", "content": "import os\n\nfrom anthropic import Anthropic\n\n\ndef client() -> Anthropic:\n # key comes from the environment, never from source\n return Anthropic(api_key=os.environ[\"ANTHROPIC_API_KEY\"])\n"}, {"path": "web/.env.example", "bytes": 79, "sha256": "b324447568be1c4f81184139f19a4861254df6b8c8146985e2644c35379e747e", "content": "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=\nNEXT_PUBLIC_SITE_URL=http://localhost:3000\n"}]}}