More grep prompt tweaks (#18846)

This commit is contained in:
Christian Gunderman
2026-02-11 21:55:27 +00:00
committed by GitHub
parent 00966062b8
commit 6c1773170e
3 changed files with 51 additions and 27 deletions
@@ -520,7 +520,8 @@ exports[`Core System Prompt (prompts.ts) > should append userMemory with separat
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -650,7 +651,8 @@ exports[`Core System Prompt (prompts.ts) > should handle CodebaseInvestigator wi
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -745,7 +747,8 @@ exports[`Core System Prompt (prompts.ts) > should handle CodebaseInvestigator wi
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1309,7 +1312,8 @@ exports[`Core System Prompt (prompts.ts) > should include available_skills with
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1435,7 +1439,8 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1552,7 +1557,8 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1669,7 +1675,8 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1782,7 +1789,8 @@ exports[`Core System Prompt (prompts.ts) > should include planning phase suggest
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -1895,7 +1903,8 @@ exports[`Core System Prompt (prompts.ts) > should include sub-agents in XML for
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -2247,7 +2256,8 @@ exports[`Core System Prompt (prompts.ts) > should return the base prompt when us
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -2360,7 +2370,8 @@ exports[`Core System Prompt (prompts.ts) > should return the base prompt when us
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -2584,7 +2595,8 @@ exports[`Core System Prompt (prompts.ts) > should use chatty system prompt for p
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
@@ -2697,7 +2709,8 @@ exports[`Core System Prompt (prompts.ts) > should use chatty system prompt for p
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your grep_search searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in \`GEMINI.md\` files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.
+2 -1
View File
@@ -165,7 +165,8 @@ export function renderCoreMandates(options?: CoreMandatesOptions): string {
- **Source Control:** Do not stage or commit changes unless specifically requested by the user.
## Context Efficiency:
- Always minimize wasted context window by scoping and limiting all of your ${GREP_TOOL_NAME} searches. e.g.: pass total_max_matches, include, and max_matches_per_file.
- Always scope and limit your searches to avoid context window exhaustion and ensure high-signal results. Use include to target relevant files and strictly limit results using total_max_matches and max_matches_per_file, especially during the research phase.
- For broad discovery, use names_only=true or max_matches_per_file=1 to identify files without retrieving their context.
## Engineering Standards
- **Contextual Precedence:** Instructions found in ${formattedFilenames} files are foundational mandates. They take absolute precedence over the general workflows and tool defaults described in this system prompt.