Skip to content

feat: wire symbols/painspots into next-task + downgrade exploration-agent to sonnet#22

Merged
avifenesh merged 3 commits intomainfrom
feat/wire-symbols-painspots
Mar 22, 2026
Merged

feat: wire symbols/painspots into next-task + downgrade exploration-agent to sonnet#22
avifenesh merged 3 commits intomainfrom
feat/wire-symbols-painspots

Conversation

@avifenesh
Copy link
Contributor

Summary

  • exploration-agent: queries symbols for primary files to expose exported names and blast radius of changes
  • planning-agent: queries painspots (hotspot × complexity × bug density) for planned files; uses these as high-risk signals in the implementation plan
  • exploration-agent model: Opus → Sonnet (pre-fetched structured data reduces need for open-ended reasoning)

Why the model downgrade is safe

exploration-agent now receives pre-fetched structured signals from agent-analyzer:

  • Hotspots, bugspots, coupling, ownership (already had these)
  • Symbols with exported names per primary file (new: reveals blast radius)

The agent curates and formats this structured data. Complex reasoning (dependency strategy, risk assessment) happens in planning-agent (Opus), which receives the enriched report. Same pattern that worked for onboard-agent and can-i-help-agent.

Test plan

  • Run /next-task on a real GitHub issue - verify exploration report includes symbol exports section
  • Verify exploration-agent uses Sonnet (check modelUsage in output JSON)
  • Verify planning report includes painspots risk table when repo-intel.json exists
  • Verify planning-agent still uses Opus

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 enhances the risk assessment capabilities of the exploration and planning agents by integrating symbol information and painspot analysis. It also optimizes the exploration agent's performance by downgrading its model to Sonnet, which is now feasible due to pre-fetched structured signals. These changes aim to provide more informed and efficient task planning and code review processes.

Highlights

  • Exploration Agent Update: The exploration agent now uses symbols to expose exported names and the blast radius of changes, enhancing risk assessment.
  • Planning Agent Enhancement: The planning agent now incorporates painspots (hotspot × complexity × bug density) for planned files, using these as high-risk signals in the implementation plan.
  • Model Downgrade: The exploration agent's model has been downgraded from Opus to Sonnet, leveraging pre-fetched structured data to reduce the need for open-ended reasoning.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. 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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request wires up symbols and painspots data into the exploration and planning agents, respectively, to provide them with more context about code structure and risk. It also refactors several files to use a centralized function for locating the state directory, which is a great improvement for maintainability. The exploration agent's model is also downgraded to Sonnet, with the justification that more structured data reduces the need for a more powerful model. My feedback focuses on improving error handling and code style for better debuggability and consistency.

exploration-agent now pre-fetches structured repo-intel data (hotspots,
bugspots, coupling, ownership, symbols/blast-radius) via the agent-analyzer
binary. With this enrichment, the agent curates and presents structured
data rather than reasoning under ambiguity - the same condition that
justified the Sonnet downgrade for onboard-agent and can-i-help-agent.

planning-agent remains Opus; it receives the enriched exploration report
and must reason about dependency impact, risk, and implementation strategy.
The frontmatter already set model: sonnet but the prose section still
said "This agent uses opus". Update rationale to reflect the downgrade
reason: pre-fetched repo-intel signals make the agent a data curator
rather than a deep analyst.
- Move require('path') to named const instead of inline usage (x2)
- Add console.warn to q helper and symbols catch for debuggability
@avifenesh avifenesh force-pushed the feat/wire-symbols-painspots branch from 91f3429 to 311550c Compare March 22, 2026 19:14
@avifenesh avifenesh merged commit 2078bd0 into main Mar 22, 2026
2 of 3 checks passed
@avifenesh avifenesh deleted the feat/wire-symbols-painspots branch March 22, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant