feat: move shell efficiency guidelines to tool description (#18614)

This commit is contained in:
N. Taylor Mullen
2026-02-09 10:51:13 -08:00
committed by GitHub
parent 469cbca67f
commit aebc107d2c
8 changed files with 147 additions and 91 deletions
@@ -245,6 +245,7 @@ export function renderOperationalGuidelines(
if (!options) return '';
return `
# Operational Guidelines
${shellEfficiencyGuidelines(options.enableShellEfficiency)}
## Tone and Style (CLI Interaction)
-12
View File
@@ -55,7 +55,6 @@ export interface PrimaryWorkflowsOptions {
export interface OperationalGuidelinesOptions {
interactive: boolean;
isGemini3: boolean;
enableShellEfficiency: boolean;
interactiveShellEnabled: boolean;
}
@@ -259,8 +258,6 @@ export function renderOperationalGuidelines(
return `
# Operational Guidelines
${shellEfficiencyGuidelines(options.enableShellEfficiency)}
## Tone and Style
- **Role:** A senior software engineer and collaborative peer programmer.
@@ -517,15 +514,6 @@ function planningPhaseSuggestion(options: PrimaryWorkflowsOptions): string {
return '';
}
function shellEfficiencyGuidelines(enabled: boolean): string {
if (!enabled) return '';
return `
## Shell Tool Efficiency
- **Quiet Flags:** Always prefer silent or quiet flags (e.g., \`npm install --silent\`, \`git --no-pager\`) to reduce output volume while still capturing necessary information.
- **Pagination:** Always disable terminal pagination to ensure commands terminate (e.g., use \`git --no-pager\`, \`systemctl --no-pager\`, or set \`PAGER=cat\`).`;
}
function toneAndStyleNoChitchat(isGemini3: boolean): string {
return isGemini3
? `