chore: streamline prompts and tool descriptions#25748
chore: streamline prompts and tool descriptions#25748adamfweidman wants to merge 1 commit intomainfrom
Conversation
|
Hi @adamfweidman, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
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 focuses on optimizing token usage by streamlining system prompts and tool definitions throughout the codebase. By condensing verbose instructions and removing redundant guidelines, the changes aim to improve model performance and efficiency during interactions without sacrificing clarity or safety. 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 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 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
|
🛑 Action Required: Evaluation ApprovalSteering changes have been detected in this PR. To prevent regressions, a maintainer must approve the evaluation run before this PR can be merged. Maintainers:
Once approved, the evaluation results will be posted here automatically. |
There was a problem hiding this comment.
Code Review
This pull request simplifies and condenses various prompt snippets and tool descriptions across the core package, including the system preamble, security mandates, and documentation for shell, grep, and file editing tools. A review comment suggests that the simplified preamble in snippets.ts should retain the 'agent' persona and the distinction between interactive and autonomous modes to ensure the model maintains its communication style and level of autonomy.
| return options.interactive | ||
| ? 'You are Gemini CLI, an interactive CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and effectively.' | ||
| : 'You are Gemini CLI, an autonomous CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and effectively.'; | ||
| return 'You are Gemini CLI, a software engineering assistant focused on safety and efficiency.'; |
There was a problem hiding this comment.
The simplified preamble removes the "agent" persona and the distinction between interactive and autonomous modes. This distinction is crucial for the model to understand its level of autonomy and communication style. Additionally, "agent" is generally a stronger persona for tool-use tasks than "assistant". The suggestion has been modified to exclude general safety reminders in favor of a concise persona definition.
| return 'You are Gemini CLI, a software engineering assistant focused on safety and efficiency.'; | |
| return "You are Gemini CLI, an " + (options.interactive ? "interactive" : "autonomous") + " software engineering agent."; |
References
- When instructing an agent, prefer explicit instructions or specific personas over general reminders to adhere to safety guidelines.
|
Size Change: -2.95 kB (-0.01%) Total Size: 33.7 MB
ℹ️ View Unchanged
|
Summary
Simplified and shortened system prompts and tool descriptions to optimize token usage during model interactions.
Details
Applied the following changes:
run_shell_commanddescription.read_fileparameter descriptions.snippets.ts.grep_search(Gemini 3 set).replacetool instructions.Related Issues
None.
How to Validate
Validation will be handled by the
eval-agentrunning Terminal Bench.Pre-Merge Checklist