Skip to content

feat: prompt user to generate repo-intel in skill#9

Merged
avifenesh merged 1 commit intomainfrom
feat/skill-repo-intel-prompt
Mar 15, 2026
Merged

feat: prompt user to generate repo-intel in skill#9
avifenesh merged 1 commit intomainfrom
feat/skill-repo-intel-prompt

Conversation

@avifenesh
Copy link
Copy Markdown
Contributor

Summary

  • Pre-check step offers to generate repo-intel for doc-drift detection
  • Falls back gracefully when user declines

Test plan

  • Skill works when user selects "Skip"

Prompt user when repo-intel.json is missing instead of silently
skipping doc-drift detection.
@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 enhances the sync-docs skill by integrating a proactive mechanism to ensure the availability of repo-intel data. This data is crucial for effective documentation drift detection, improving the accuracy and utility of the skill. The change provides a user-friendly prompt to generate this intelligence, while also ensuring the skill remains functional even if the user opts out or generation fails.

Highlights

  • Pre-check for Repo-Intel: Introduced a new pre-check step in the sync-docs skill that verifies the existence of a repo-intel map before analysis begins.
  • User Prompt for Generation: If the repo-intel map is not found, the user is now prompted to generate it, with an explanation of its benefits for doc-drift detection.
  • Graceful Fallback: The skill gracefully handles scenarios where the user declines to generate the repo-intel map or if the necessary binary for generation is unavailable, allowing the process to continue without it.
Activity
  • No specific activity has been recorded for this pull request yet.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@avifenesh avifenesh merged commit f2f8438 into main Mar 15, 2026
4 checks passed
@avifenesh avifenesh deleted the feat/skill-repo-intel-prompt branch March 15, 2026 16:51
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 adds a pre-check to prompt the user for generating repo-intel. The implementation is a good step, but I have a couple of suggestions for improvement. First, the logic for determining the state directory is duplicated and doesn't handle all cases (like the AI_STATE_DIR environment variable); it would be better to use the centralized function for this. Second, the error handling for repo-intel generation is too broad and silent; it should log errors to inform the user if something goes wrong after they've opted in.

Comment on lines +33 to +34
const stateDir = ['.claude', '.opencode', '.codex']
.find(d => fs.existsSync(path.join(cwd, d))) || '.claude';
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

This implementation for determining the stateDir is a simplified version of the logic in lib/platform/state-dir.js. It is incorrect as it does not respect the AI_STATE_DIR environment variable, which can lead to inconsistent behavior.

To fix this and avoid code duplication, please use the centralized getStateDir function from lib/platform/state-dir.js.

Suggested change
const stateDir = ['.claude', '.opencode', '.codex']
.find(d => fs.existsSync(path.join(cwd, d))) || '.claude';
const stateDir = require('../../lib/platform/state-dir').getStateDir(cwd);

Comment on lines +56 to +58
} catch (e) {
// Binary not available - proceed without
}
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

The catch block is too broad and silently ignores all errors, including failures in file system operations like mkdirSync or writeFileSync. If generating the repo-intel.json file fails after the user has opted in, they should be notified. The comment is also misleading as this block will catch any error within the try block, not just the binary being unavailable.

Suggested change
} catch (e) {
// Binary not available - proceed without
}
} catch (e) {
// The operation to generate repo-intel failed. This can be due to the
// binary not being available or a file system error. Proceeding without.
console.error(`Failed to generate repo-intel: ${e.message}`);
}

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