From 031c2f5b0559339f4dec8d47a095d4bfc5a596aa Mon Sep 17 00:00:00 2001 From: Robin Newhouse Date: Thu, 18 Dec 2025 12:18:23 -0800 Subject: [PATCH] fix: correct typos in gemini system prompt overrides (#8183) Co-authored-by: CandiedUniverse <132302818+candieduniverse@users.noreply.github.com> --- .changeset/loose-candies-go.md | 5 +++++ .../__tests__/__snapshots__/vertex_gemini_3-basic.snap | 10 +++++----- .../__snapshots__/vertex_gemini_3-no-browser.snap | 10 +++++----- .../__snapshots__/vertex_gemini_3-no-focus-chain.snap | 10 +++++----- .../__snapshots__/vertex_gemini_3-no-mcp.snap | 10 +++++----- .../system-prompt/variants/gemini-3/overrides.ts | 10 +++++----- 6 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 .changeset/loose-candies-go.md diff --git a/.changeset/loose-candies-go.md b/.changeset/loose-candies-go.md new file mode 100644 index 00000000..903a3dd3 --- /dev/null +++ b/.changeset/loose-candies-go.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix: correct typos in gemini system prompt overrides diff --git a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-basic.snap b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-basic.snap index 7a15fdae..f988b70f 100644 --- a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-basic.snap +++ b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-basic.snap @@ -24,14 +24,14 @@ Plan Mode is for deep analysis and strategic planning before implementation. You ### Phase 1: Silent Investigation -Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targetted searcg commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incrporate key words and principles from the user's input into your targetted search patterns and strategy. +Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targeted search commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incorporate key words and principles from the user's input into your targeted search patterns and strategy. **Research Activities:** - Use read_file, search_files, and list_code_definition_names extensively to understand architecture, patterns, and conventions -- Execute targetted terminal commands to search and gather information about structure and dependencies. +- Execute targeted terminal commands to search and gather information about structure and dependencies. - Identify technical constraints, existing patterns, and potential risks - Ask targeted clarifying questions only when they will directly influence your implementation approach -- Ensure complete converage- before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. +- Ensure complete coverage - before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. ### Phase 2: Plan Presentation @@ -66,7 +66,7 @@ Engage with the user to discuss the plan, answer questions, and incorporate feed ### Phase 4: Transition to Implementation -Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implemnent the planned changes. +Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implement the planned changes. ## Act Mode Workflow @@ -215,7 +215,7 @@ RULES - The current working directory is `/test/project` - this is the directory where all the tools will be executed from. - When executing terminal commands, new terminals always open in the workspace directory. Use relative paths or chain commands with proper shell operators (e.g., `cd path && command` to change directory and run a command together). -- Whean searching, prefer the search_files tool over using grep in the terminal. If you are directly instruted to use grep, ensure your search patterns are targetted and not too vague to prevent extremely large outputs. +- When searching, prefer the search_files tool over using grep in the terminal. If you are directly instructed to use grep, ensure your search patterns are targeted and not too vague to prevent extremely large outputs. - When using replace_in_file, pay careful attention to the EDITING FILES section above. The most common errors are: - Not matching content exactly (every character, space, and newline must match) - Using incomplete lines in SEARCH blocks (always include complete lines from start to end) diff --git a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-browser.snap b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-browser.snap index de620ced..84dc579a 100644 --- a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-browser.snap +++ b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-browser.snap @@ -24,14 +24,14 @@ Plan Mode is for deep analysis and strategic planning before implementation. You ### Phase 1: Silent Investigation -Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targetted searcg commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incrporate key words and principles from the user's input into your targetted search patterns and strategy. +Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targeted search commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incorporate key words and principles from the user's input into your targeted search patterns and strategy. **Research Activities:** - Use read_file, search_files, and list_code_definition_names extensively to understand architecture, patterns, and conventions -- Execute targetted terminal commands to search and gather information about structure and dependencies. +- Execute targeted terminal commands to search and gather information about structure and dependencies. - Identify technical constraints, existing patterns, and potential risks - Ask targeted clarifying questions only when they will directly influence your implementation approach -- Ensure complete converage- before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. +- Ensure complete coverage - before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. ### Phase 2: Plan Presentation @@ -66,7 +66,7 @@ Engage with the user to discuss the plan, answer questions, and incorporate feed ### Phase 4: Transition to Implementation -Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implemnent the planned changes. +Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implement the planned changes. ## Act Mode Workflow @@ -213,7 +213,7 @@ RULES - The current working directory is `/test/project` - this is the directory where all the tools will be executed from. - When executing terminal commands, new terminals always open in the workspace directory. Use relative paths or chain commands with proper shell operators (e.g., `cd path && command` to change directory and run a command together). -- Whean searching, prefer the search_files tool over using grep in the terminal. If you are directly instruted to use grep, ensure your search patterns are targetted and not too vague to prevent extremely large outputs. +- When searching, prefer the search_files tool over using grep in the terminal. If you are directly instructed to use grep, ensure your search patterns are targeted and not too vague to prevent extremely large outputs. - When using replace_in_file, pay careful attention to the EDITING FILES section above. The most common errors are: - Not matching content exactly (every character, space, and newline must match) - Using incomplete lines in SEARCH blocks (always include complete lines from start to end) diff --git a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-focus-chain.snap b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-focus-chain.snap index f46f3073..d26c6fe9 100644 --- a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-focus-chain.snap +++ b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-focus-chain.snap @@ -24,14 +24,14 @@ Plan Mode is for deep analysis and strategic planning before implementation. You ### Phase 1: Silent Investigation -Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targetted searcg commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incrporate key words and principles from the user's input into your targetted search patterns and strategy. +Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targeted search commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incorporate key words and principles from the user's input into your targeted search patterns and strategy. **Research Activities:** - Use read_file, search_files, and list_code_definition_names extensively to understand architecture, patterns, and conventions -- Execute targetted terminal commands to search and gather information about structure and dependencies. +- Execute targeted terminal commands to search and gather information about structure and dependencies. - Identify technical constraints, existing patterns, and potential risks - Ask targeted clarifying questions only when they will directly influence your implementation approach -- Ensure complete converage- before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. +- Ensure complete coverage - before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. ### Phase 2: Plan Presentation @@ -66,7 +66,7 @@ Engage with the user to discuss the plan, answer questions, and incorporate feed ### Phase 4: Transition to Implementation -Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implemnent the planned changes. +Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implement the planned changes. ## Act Mode Workflow @@ -193,7 +193,7 @@ RULES - The current working directory is `/test/project` - this is the directory where all the tools will be executed from. - When executing terminal commands, new terminals always open in the workspace directory. Use relative paths or chain commands with proper shell operators (e.g., `cd path && command` to change directory and run a command together). -- Whean searching, prefer the search_files tool over using grep in the terminal. If you are directly instruted to use grep, ensure your search patterns are targetted and not too vague to prevent extremely large outputs. +- When searching, prefer the search_files tool over using grep in the terminal. If you are directly instructed to use grep, ensure your search patterns are targeted and not too vague to prevent extremely large outputs. - When using replace_in_file, pay careful attention to the EDITING FILES section above. The most common errors are: - Not matching content exactly (every character, space, and newline must match) - Using incomplete lines in SEARCH blocks (always include complete lines from start to end) diff --git a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-mcp.snap b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-mcp.snap index 7a15fdae..f988b70f 100644 --- a/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-mcp.snap +++ b/src/core/prompts/system-prompt/__tests__/__snapshots__/vertex_gemini_3-no-mcp.snap @@ -24,14 +24,14 @@ Plan Mode is for deep analysis and strategic planning before implementation. You ### Phase 1: Silent Investigation -Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targetted searcg commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incrporate key words and principles from the user's input into your targetted search patterns and strategy. +Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targeted search commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incorporate key words and principles from the user's input into your targeted search patterns and strategy. **Research Activities:** - Use read_file, search_files, and list_code_definition_names extensively to understand architecture, patterns, and conventions -- Execute targetted terminal commands to search and gather information about structure and dependencies. +- Execute targeted terminal commands to search and gather information about structure and dependencies. - Identify technical constraints, existing patterns, and potential risks - Ask targeted clarifying questions only when they will directly influence your implementation approach -- Ensure complete converage- before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. +- Ensure complete coverage - before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. ### Phase 2: Plan Presentation @@ -66,7 +66,7 @@ Engage with the user to discuss the plan, answer questions, and incorporate feed ### Phase 4: Transition to Implementation -Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implemnent the planned changes. +Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implement the planned changes. ## Act Mode Workflow @@ -215,7 +215,7 @@ RULES - The current working directory is `/test/project` - this is the directory where all the tools will be executed from. - When executing terminal commands, new terminals always open in the workspace directory. Use relative paths or chain commands with proper shell operators (e.g., `cd path && command` to change directory and run a command together). -- Whean searching, prefer the search_files tool over using grep in the terminal. If you are directly instruted to use grep, ensure your search patterns are targetted and not too vague to prevent extremely large outputs. +- When searching, prefer the search_files tool over using grep in the terminal. If you are directly instructed to use grep, ensure your search patterns are targeted and not too vague to prevent extremely large outputs. - When using replace_in_file, pay careful attention to the EDITING FILES section above. The most common errors are: - Not matching content exactly (every character, space, and newline must match) - Using incomplete lines in SEARCH blocks (always include complete lines from start to end) diff --git a/src/core/prompts/system-prompt/variants/gemini-3/overrides.ts b/src/core/prompts/system-prompt/variants/gemini-3/overrides.ts index bcd8c01c..3f121095 100644 --- a/src/core/prompts/system-prompt/variants/gemini-3/overrides.ts +++ b/src/core/prompts/system-prompt/variants/gemini-3/overrides.ts @@ -129,7 +129,7 @@ const GEMINI_3_RULES_TEMPLATE = (_context: SystemPromptContext) => `RULES - The current working directory is \`{{CWD}}\` - this is the directory where all the tools will be executed from. - When executing terminal commands, new terminals always open in the workspace directory. Use relative paths or chain commands with proper shell operators (e.g., \`cd path && command\` to change directory and run a command together). -- Whean searching, prefer the search_files tool over using grep in the terminal. If you are directly instruted to use grep, ensure your search patterns are targetted and not too vague to prevent extremely large outputs. +- When searching, prefer the search_files tool over using grep in the terminal. If you are directly instructed to use grep, ensure your search patterns are targeted and not too vague to prevent extremely large outputs. - When using replace_in_file, pay careful attention to the EDITING FILES section above. The most common errors are: - Not matching content exactly (every character, space, and newline must match) - Using incomplete lines in SEARCH blocks (always include complete lines from start to end) @@ -157,13 +157,13 @@ Plan Mode is for deep analysis and strategic planning before implementation. You ### Phase 1: Silent Investigation -Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targetted searcg commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incrporate key words and principles from the user's input into your targetted search patterns and strategy. +Perform comprehensive research to build complete understanding of the codebase. Work silently - execute targeted search commands and read files without explaining what you're doing. Only ask questions when truly necessary for planning. You must strongly incorporate key words and principles from the user's input into your targeted search patterns and strategy. **Research Activities:** - Use read_file, search_files, and list_code_definition_names extensively to understand architecture, patterns, and conventions -- Execute targetted terminal commands to search and gather information about structure and dependencies. +- Execute targeted terminal commands to search and gather information about structure and dependencies. - Identify technical constraints, existing patterns, and potential risks${context.yoloModeToggled !== true ? "\n- Ask targeted clarifying questions only when they will directly influence your implementation approach" : ""} -- Ensure complete converage- before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. +- Ensure complete coverage - before presenting a plan, you should identify all related functions, classes, calls, and methods that are involved or affected by the proposed changes. ### Phase 2: Plan Presentation @@ -198,7 +198,7 @@ Engage with the user to discuss the plan, answer questions, and incorporate feed ### Phase 4: Transition to Implementation -Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implemnent the planned changes. +Once the plan is finalized and approved, you MUST direct the user to switch to ACT MODE. In Act Mode, you'll execute the plan step-by-step as outlined. If you not specifically ask the user to switch to ACT MODE, you will not be able to implement the planned changes. ## Act Mode Workflow