feat(pr-generator-agent): implement Antigravity agent runner and prompt templates …#28434
feat(pr-generator-agent): implement Antigravity agent runner and prompt templates …#28434joneba-google wants to merge 2 commits into
Conversation
…for coding and evaluation
|
📊 PR Size: size/L
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes the foundational infrastructure for the Gemini CLI Issue-to-PR pipeline. By introducing modular system prompts and a robust execution runner, the changes enable automated, iterative code generation and validation, significantly streamlining the workflow from issue identification to pull request submission. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces system prompts for automated bug fixing, code evaluation, and code revision agents, alongside a Python runner (agent_runner.py) utilizing the Google Antigravity SDK to manage these agents. The review feedback highlights critical security and concurrency concerns in the runner implementation. Specifically, there are risks of Remote Code Execution (RCE) due to unrestricted tool auto-approval and permissive policies, a path traversal vulnerability in _load_prompt_file, and concurrency issues arising from process-wide directory changes (os.chdir) that must be serialized using an asynchronous lock. Additionally, the module docstring should be updated to accurately reflect these serialization controls.
…obal, restricted tool calls, sanitized prompt file
Overview
This PR introduces the system prompt markdown templates for the Gemini CLI SSR Code Generation Pipeline. These prompts guide the headless Antigravity AI agents through the iterative code generation, quality assurance, and feedback refinement lifecycle.
──────
Summary of Changes
1. Automated Bug Fixer Prompt (bug_fixer_prompt.md)
• Configures the Coding Agent role for initial bug resolution and test-driven implementation.
• Enforces strict execution rules: mandatory file edits using sandbox editing tools (replace_file_content / write_file) and prohibits ending turns after passive file viewing.
• Outlines the structured four-phase workflow: specification ingestion from firestore_doc.json, code patch application, targeted test execution (e.g., Vitest/Jest), and local verification.
2. Code Evaluator Prompt (code_evaluator_prompt.md)
• Configures the Evaluator Agent acting as the quality gatekeeper before PR submission.
• Evaluates code changes (changes.diff) across correctness, ReDoS/security risks, readability standards, and test coverage against the original issue spec.
• Instructs the agent to inspect pre-generated ESLint reports (linter_output.txt) and output a structured verdict to verdict.json (APPROVED vs NEEDS_REVISION).
• Defines formatting rules for pr_details.md (generating standardized commit messages and PR descriptions) or pr_feedback.md (actionable feedback on failure).
3. Code Revision Prompt (code_revision_prompt.md)
• Configures the Revision Agent for subsequent loop iterations when an initial patch is rejected.
• Guides the agent to ingest evaluator feedback from pr_feedback.md, cross-reference the original issue spec, and address identified correctness, security, or linting defects.
• Implements a strict turn budget (maximum 3 turns) and prohibits exploratory Git overhead to optimize execution speed.