From 0b5c652548494ac1e384502cb6394b9dcfdec60c Mon Sep 17 00:00:00 2001 From: Christian Gunderman Date: Wed, 11 Feb 2026 17:26:20 -0800 Subject: [PATCH] Fix test. --- .../core/__snapshots__/prompts.test.ts.snap | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/packages/core/src/core/__snapshots__/prompts.test.ts.snap b/packages/core/src/core/__snapshots__/prompts.test.ts.snap index e944565366..a6a1e01aeb 100644 --- a/packages/core/src/core/__snapshots__/prompts.test.ts.snap +++ b/packages/core/src/core/__snapshots__/prompts.test.ts.snap @@ -520,8 +520,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -651,8 +653,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -747,8 +751,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1312,8 +1318,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1439,8 +1447,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1557,8 +1567,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1675,8 +1687,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1789,8 +1803,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -1903,8 +1919,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -2256,8 +2274,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -2370,8 +2390,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -2595,8 +2617,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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. @@ -2709,8 +2733,10 @@ 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 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. +- 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 by explicitly setting \`total_max_matches\` or \`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. +- Limit unnecessary context consumption from file reads by using grep_search (configured with \`max_matches_per_file\`) to search large files (> 1kb) or read_file with the desired offset and limit. +- If the file is small, prefer reading the whole thing over "scrolling" through it by reading ranges repeatedly. ## 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.