From f6e71c4e8c8b2dbd0e29c80651239a00d92f8ae3 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Mon, 30 Jun 2025 21:06:27 +0000 Subject: [PATCH 1/2] Fixes #5294: Add instruction to Architect mode to avoid time estimates - Updated Architect mode custom instructions to explicitly prohibit providing time estimates - Added clear guidance to focus on actionable plans without speculating about implementation timeframes - Updated test snapshot to reflect the new instruction - All tests passing --- .../add-custom-instructions/architect-mode-prompt.snap | 2 ++ src/shared/modes.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap index 98ef98fcad..25d4a14488 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap @@ -487,6 +487,8 @@ Mode-specific Instructions: 6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** + Rules: # Rules from .clinerules-architect: Mock mode-specific rules diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 47387551ff..4d57ee4b05 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -72,7 +72,7 @@ export const modes: readonly ModeConfig[] = [ description: "Plan and design before implementation", groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"], customInstructions: - "1. Do some information gathering (for example using read_file or search_files) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, you should create a detailed plan for how to accomplish the task. Include Mermaid diagrams if they help make your plan clearer.\n\n4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.\n\n5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.\n\n6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.", + "1. Do some information gathering (for example using read_file or search_files) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, you should create a detailed plan for how to accomplish the task. Include Mermaid diagrams if they help make your plan clearer.\n\n4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.\n\n5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.\n\n6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.**", }, { slug: "code", From 94416e689656b9a122da63854f3bfd851f578c67 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Mon, 30 Jun 2025 23:41:14 -0400 Subject: [PATCH 2/2] More tweaks to prompt --- .../add-custom-instructions/architect-mode-prompt.snap | 4 +--- .../add-custom-instructions/mcp-server-creation-disabled.snap | 4 ++-- .../add-custom-instructions/mcp-server-creation-enabled.snap | 4 ++-- .../add-custom-instructions/partial-reads-enabled.snap | 4 ++-- .../__snapshots__/system-prompt/consistent-system-prompt.snap | 4 ++-- .../system-prompt/with-computer-use-support.snap | 4 ++-- .../__snapshots__/system-prompt/with-diff-enabled-false.snap | 4 ++-- .../__snapshots__/system-prompt/with-diff-enabled-true.snap | 4 ++-- .../system-prompt/with-diff-enabled-undefined.snap | 4 ++-- .../system-prompt/with-different-viewport-size.snap | 4 ++-- .../__snapshots__/system-prompt/with-mcp-hub-provided.snap | 4 ++-- .../__snapshots__/system-prompt/with-undefined-mcp-hub.snap | 4 ++-- src/shared/modes.ts | 2 +- 13 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap index 25d4a14488..47edfe467a 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-prompt.snap @@ -483,9 +483,7 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. - -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. **IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap index 7bed96ad21..c964d5f6ed 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap @@ -545,9 +545,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap index b3032babad..5a25768204 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap @@ -551,9 +551,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap index 66eeae3e7e..f74e394d2d 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap @@ -488,9 +488,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap index 98ef98fcad..47edfe467a 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/consistent-system-prompt.snap @@ -483,9 +483,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap index a525fba656..ecd22a6d6e 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-computer-use-support.snap @@ -539,9 +539,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap index 98ef98fcad..47edfe467a 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-false.snap @@ -483,9 +483,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap index e6b1dc7a85..9514c93ea3 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-true.snap @@ -571,9 +571,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap index 98ef98fcad..47edfe467a 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-diff-enabled-undefined.snap @@ -483,9 +483,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap index 25cf8be089..32acd4c169 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-different-viewport-size.snap @@ -539,9 +539,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap index b3032babad..5a25768204 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-mcp-hub-provided.snap @@ -551,9 +551,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap index 98ef98fcad..47edfe467a 100644 --- a/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap +++ b/src/core/prompts/__tests__/__snapshots__/system-prompt/with-undefined-mcp-hub.snap @@ -483,9 +483,9 @@ Mode-specific Instructions: 4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. -5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file. +5. Use the switch_mode tool to request that the user switch to another mode to implement the solution. -6. Use the switch_mode tool to request that the user switch to another mode to implement the solution. +**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.** Rules: # Rules from .clinerules-architect: diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 4d57ee4b05..23efdc45f7 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -72,7 +72,7 @@ export const modes: readonly ModeConfig[] = [ description: "Plan and design before implementation", groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"], customInstructions: - "1. Do some information gathering (for example using read_file or search_files) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, you should create a detailed plan for how to accomplish the task. Include Mermaid diagrams if they help make your plan clearer.\n\n4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.\n\n5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.\n\n6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.**", + "1. Do some information gathering (for example using read_file or search_files) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, you should create a detailed plan for how to accomplish the task. Include Mermaid diagrams if they help make your plan clearer.\n\n4. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it.\n\n5. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Do not provide time estimates for how long tasks will take to complete. Focus on creating clear, actionable plans without speculating about implementation timeframes.**", }, { slug: "code",