Skip to content

feat: wire Phase 2-4 repo-intel data#15

Merged
avifenesh merged 1 commit intomainfrom
feat/wire-phase-2-4
Mar 22, 2026
Merged

feat: wire Phase 2-4 repo-intel data#15
avifenesh merged 1 commit intomainfrom
feat/wire-phase-2-4

Conversation

@avifenesh
Copy link
Copy Markdown
Contributor

Summary

Wire Phase 2-4 repo-intel data into plugin. Requires agent-analyzer v0.3.0.

Changes

  • Add stale-docs query (symbol-level doc staleness from Phase 4)
  • Add conventions query (naming patterns, test framework from Phase 2)
  • Add project-info query (languages, CI, license from Phase 3)
  • Fix inline state dir detection -> use getStateDirPath() from agent-core

Test plan

  • CI passes
  • Plugin works when repo-intel.json exists (new queries return data)
  • Plugin works when repo-intel.json is missing (graceful degradation)
  • Plugin works with old binary (new queries return null via safe wrapper)

- Query stale-docs for precise symbol-level references (deleted, renamed, hotspot)
- Keep doc-drift as supplementary heuristic signal
- Fix inline state dir detection -> use getStateDirPath()
@chatgpt-codex-connector
Copy link
Copy Markdown

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
Copy Markdown
Contributor

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 significantly enhances the plugin's repository intelligence capabilities by integrating data from Phases 2, 3, and 4 of the repo-intel system. It introduces new queries for detailed documentation analysis, code conventions, and project metadata, providing a richer and more accurate understanding of the codebase. Additionally, a critical fix for state directory detection ensures robust and consistent operation. This update requires agent-analyzer v0.3.0 for full functionality.

Highlights

  • Stale Docs Query Integration: Integrated a new query for symbol-level stale documentation references (Phase 4), providing more precise insights into documentation freshness.
  • Conventions Query Addition: Added support for a query related to code conventions, including naming patterns and test framework usage (Phase 2).
  • Project Info Query Enhancement: Incorporated a query to retrieve project-level information such as programming languages, CI configurations, and license details (Phase 3).
  • State Directory Detection Fix: Corrected the method for detecting the state directory by utilizing the getStateDirPath() function from agent-core for improved reliability.
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
Copy Markdown
Contributor

@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 enhances the sync-docs command by incorporating more detailed repository intelligence data. The changes include fetching symbol-level stale documentation references and heuristic-based document drift, which will provide more accurate and prioritized information for keeping documentation up-to-date. The refactoring to use a centralized getStateDirPath function and a safe query wrapper q for analyzer calls are excellent improvements for maintainability and robustness. I have one minor suggestion to make the string building more idiomatic.

Comment on lines +78 to +83
if (staleDocs && staleDocs.length > 0) {
repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):';
staleDocs.forEach(s => {
repoIntelContext += `\n ${s.doc}:${s.line} "${s.reference}" [${s.issue}] ${s.suggestion}`;
});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

While the current implementation is correct, using map and join is a more idiomatic and performant way to build strings from an array in JavaScript compared to using forEach with repeated string concatenation. This change would also make the code slightly more concise.

Suggested change
if (staleDocs && staleDocs.length > 0) {
repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):';
staleDocs.forEach(s => {
repoIntelContext += `\n ${s.doc}:${s.line} "${s.reference}" [${s.issue}] ${s.suggestion}`;
});
}
if (staleDocs && staleDocs.length > 0) {
const staleDocItems = staleDocs.map(s => `\n ${s.doc}:${s.line} \"${s.reference}\" [${s.issue}] ${s.suggestion}`);
repoIntelContext += '\n\nStale doc references (symbol-level - highest priority):' + staleDocItems.join('');
}

@avifenesh avifenesh merged commit 7d54caf into main Mar 22, 2026
5 of 6 checks passed
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