diff --git a/.github/workflows/automated_pr_review.yaml b/.github/workflows/automated_pr_review.yaml index a512ae2427..af2da7e0ca 100644 --- a/.github/workflows/automated_pr_review.yaml +++ b/.github/workflows/automated_pr_review.yaml @@ -50,15 +50,6 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v8.3.0 - - name: Set up Python and Virtual Environment - run: | - uv python install 3.13 - uv venv --python 3.13 - - - name: Install Dependencies - run: | - uv pip install google-antigravity requests - - name: Run Antigravity Review env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} diff --git a/tools/private/reviewbot/antigravity_review.py b/tools/private/reviewbot/antigravity_review.py index 1bb23283be..e415e42a91 100644 --- a/tools/private/reviewbot/antigravity_review.py +++ b/tools/private/reviewbot/antigravity_review.py @@ -1,3 +1,10 @@ +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "google-antigravity", +# "requests", +# ] +# /// import argparse import asyncio from pathlib import Path @@ -17,10 +24,17 @@ async def main(): # Read prompt file prompt = Path(args.prompt).read_text() + # General coordinator instructions for the reviewer agent. + system_instructions = ( + "You are a code review assistant. Use your available skills to perform " + "reviews on pull requests." + ) + # Initialize the Antigravity Agent in read-only mode for security. # Register the review-pr skill from the local reviewbot folder. config = LocalAgentConfig( - skills_paths=["tools/private/reviewbot/skills/review-pr"], + system_instructions=system_instructions, + skills_paths=[str(Path(__file__).parent / "skills" / "review-pr" / "SKILL.md")], capabilities=CapabilitiesConfig( allow_filesystem_read=True, allow_filesystem_write=False, @@ -28,13 +42,7 @@ async def main(): ), ) - # General coordinator instructions for the reviewer agent. - system_instructions = ( - "You are a code review assistant. Use your available skills to perform " - "reviews on pull requests." - ) - - async with Agent(config, system_instructions=system_instructions) as agent: + async with Agent(config) as agent: response = await agent.chat(prompt) report = await response.text()