From d6ac74504d3fa1b463857e300c6ff9722428e464 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 30 Jun 2025 14:01:05 -0600 Subject: [PATCH 1/4] feat: change default mode to architect for new installations - Reordered modes array to put architect mode first - Updated test to reflect architect as the default mode - Maintains backward compatibility for existing users --- src/shared/__tests__/modes.spec.ts | 2 +- src/shared/modes.ts | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/shared/__tests__/modes.spec.ts b/src/shared/__tests__/modes.spec.ts index 8ca7eec150..acf7da84c8 100644 --- a/src/shared/__tests__/modes.spec.ts +++ b/src/shared/__tests__/modes.spec.ts @@ -356,7 +356,7 @@ describe("FileRestrictionError", () => { const result = await getFullModeDetails("non-existent") expect(result).toMatchObject({ ...modes[0], - customInstructions: "", + // The first mode (architect) has its own customInstructions }) }) }) diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 53bc2369db..2c34e36a15 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -61,16 +61,6 @@ export function getToolsForMode(groups: readonly GroupEntry[]): string[] { // Main modes configuration as an ordered array export const modes: readonly ModeConfig[] = [ - { - slug: "code", - name: "💻 Code", - roleDefinition: - "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.", - whenToUse: - "Use this mode when you need to write, modify, or refactor code. Ideal for implementing features, fixing bugs, creating new files, or making code improvements across any programming language or framework.", - description: "Write, modify, and refactor code", - groups: ["read", "edit", "browser", "command", "mcp"], - }, { slug: "architect", name: "🏗️ Architect", @@ -83,6 +73,16 @@ export const modes: readonly ModeConfig[] = [ 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.", }, + { + slug: "code", + name: "💻 Code", + roleDefinition: + "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.", + whenToUse: + "Use this mode when you need to write, modify, or refactor code. Ideal for implementing features, fixing bugs, creating new files, or making code improvements across any programming language or framework.", + description: "Write, modify, and refactor code", + groups: ["read", "edit", "browser", "command", "mcp"], + }, { slug: "ask", name: "❓ Ask", From 7cb9d49dcf84925c8dbaa5de3acf87708e1f4b68 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 30 Jun 2025 14:24:27 -0600 Subject: [PATCH 2/4] test: update snapshots and fix tests for architect default mode - Update all snapshot tests to reflect architect as the default mode - Fix mode destructuring in validateToolUse tests - All tests now pass with the new default mode configuration --- .../architect-mode-rules.snap | 2 +- .../code-mode-rules.snap | 2 +- .../combined-custom-instructions.snap | 2 +- .../empty-mode-instructions.snap | 2 +- .../generic-rules-fallback.snap | 2 +- .../global-and-mode-instructions.snap | 2 +- .../mcp-server-creation-disabled.snap | 39 +++++++------------ .../mcp-server-creation-enabled.snap | 39 +++++++------------ .../partial-reads-enabled.snap | 39 +++++++------------ .../prioritized-instructions-order.snap | 2 +- .../trimmed-mode-instructions.snap | 2 +- .../undefined-mode-instructions.snap | 2 +- .../with-custom-instructions.snap | 2 +- .../with-preferred-language.snap | 2 +- .../consistent-system-prompt.snap | 39 +++++++------------ .../with-computer-use-support.snap | 39 +++++++------------ .../with-diff-enabled-false.snap | 39 +++++++------------ .../system-prompt/with-diff-enabled-true.snap | 39 +++++++------------ .../with-diff-enabled-undefined.snap | 39 +++++++------------ .../with-different-viewport-size.snap | 39 +++++++------------ .../system-prompt/with-mcp-hub-provided.snap | 39 +++++++------------ .../system-prompt/with-undefined-mcp-hub.snap | 39 +++++++------------ .../tools/__tests__/validateToolUse.spec.ts | 4 +- 23 files changed, 179 insertions(+), 276 deletions(-) diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-rules.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-rules.snap index 8a4da6613d..1935611f44 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-rules.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-rules.snap @@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. Rules: -# Rules from .clinerules-architect: +# Rules from .clinerules-code: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/code-mode-rules.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/code-mode-rules.snap index 1935611f44..8a4da6613d 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/code-mode-rules.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/code-mode-rules.snap @@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/combined-custom-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/combined-custom-instructions.snap index d9e638e9fa..2a2c4ba78a 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/combined-custom-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/combined-custom-instructions.snap @@ -12,7 +12,7 @@ Mode-specific Instructions: Custom test instructions Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/empty-mode-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/empty-mode-instructions.snap index 1935611f44..8a4da6613d 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/empty-mode-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/empty-mode-instructions.snap @@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/generic-rules-fallback.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/generic-rules-fallback.snap index 1935611f44..8a4da6613d 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/generic-rules-fallback.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/generic-rules-fallback.snap @@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/global-and-mode-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/global-and-mode-instructions.snap index 2fb6cfece2..f4cd5cbec9 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/global-and-mode-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/global-and-mode-instructions.snap @@ -12,7 +12,7 @@ Mode-specific Instructions: Mode-specific instructions Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 bf9a0ef02f..7bed96ad21 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## use_mcp_tool Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. Parameters: @@ -558,8 +536,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 7b3e18690c..b3032babad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## use_mcp_tool Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. Parameters: @@ -564,8 +542,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 b77b77e1e2..66eeae3e7e 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -274,28 +274,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -501,8 +479,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/prioritized-instructions-order.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/prioritized-instructions-order.snap index 5adfbb744e..b72616ec3c 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/prioritized-instructions-order.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/prioritized-instructions-order.snap @@ -12,7 +12,7 @@ Mode-specific Instructions: Second instruction Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/trimmed-mode-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/trimmed-mode-instructions.snap index 28497df14f..18dc9547ab 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/trimmed-mode-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/trimmed-mode-instructions.snap @@ -9,7 +9,7 @@ Mode-specific Instructions: Custom mode instructions Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/undefined-mode-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/undefined-mode-instructions.snap index 1935611f44..8a4da6613d 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/undefined-mode-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/undefined-mode-instructions.snap @@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-custom-instructions.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-custom-instructions.snap index 9ee1dd3365..9e1f02ec2f 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-custom-instructions.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-custom-instructions.snap @@ -9,7 +9,7 @@ Mode-specific Instructions: Custom test instructions Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-preferred-language.snap b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-preferred-language.snap index 2fba8f9cbb..c563fa36fb 100644 --- a/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-preferred-language.snap +++ b/src/core/prompts/__tests__/__snapshots__/add-custom-instructions/with-preferred-language.snap @@ -9,7 +9,7 @@ Language Preference: You should always speak and think in the "es" language. Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 2f2a41916d..98ef98fcad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -496,8 +474,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 1cf0529e19..a525fba656 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -322,28 +322,6 @@ Example: Requesting to click on the element at coordinates 450,300 450,300 -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -552,8 +530,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 2f2a41916d..98ef98fcad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -496,8 +474,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 744cadfab4..e6b1dc7a85 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -357,28 +357,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -584,8 +562,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 2f2a41916d..98ef98fcad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -496,8 +474,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 28b31eefcf..25cf8be089 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -322,28 +322,6 @@ Example: Requesting to click on the element at coordinates 450,300 450,300 -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -552,8 +530,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 7b3e18690c..b3032babad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## use_mcp_tool Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. Parameters: @@ -564,8 +542,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file 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 2f2a41916d..98ef98fcad 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 @@ -1,4 +1,4 @@ -You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. +You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution. ==== @@ -269,28 +269,6 @@ Examples: true -## execute_command -Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Prefer relative commands and paths that avoid location sensitivity for terminal consistency, e.g: `touch ./testdata/example.file`, `dir ./examples/model1/data/yaml`, or `go test ./cmd/front --config ./cmd/front/config.yml`. If directed by the user, you may open a terminal in a different directory by using the `cwd` parameter. -Parameters: -- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. -- cwd: (optional) The working directory to execute the command in (default: /test/path) -Usage: - -Your command here -Working directory path (optional) - - -Example: Requesting to execute npm run dev - -npm run dev - - -Example: Requesting to execute ls in a specific directory if directed - -ls -la -/home/user/projects - - ## ask_followup_question Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. Parameters: @@ -496,8 +474,21 @@ The following additional instructions are provided by the user, and should be fo Language Preference: You should always speak and think in the "en" language. +Mode-specific Instructions: +1. Do some information gathering (for example using read_file or search_files) to get more context about the task. + +2. You should also ask the user clarifying questions to get a better understanding of the task. + +3. 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. + +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. + Rules: -# Rules from .clinerules-code: +# Rules from .clinerules-architect: Mock mode-specific rules # Rules from .clinerules: Mock generic rules \ No newline at end of file diff --git a/src/core/tools/__tests__/validateToolUse.spec.ts b/src/core/tools/__tests__/validateToolUse.spec.ts index 89d03fea70..7802674605 100644 --- a/src/core/tools/__tests__/validateToolUse.spec.ts +++ b/src/core/tools/__tests__/validateToolUse.spec.ts @@ -7,7 +7,9 @@ import { TOOL_GROUPS } from "../../../shared/tools" import { validateToolUse } from "../validateToolUse" -const [codeMode, architectMode, askMode] = modes.map((mode) => mode.slug) +const codeMode = modes.find((m) => m.slug === "code")?.slug || "code" +const architectMode = modes.find((m) => m.slug === "architect")?.slug || "architect" +const askMode = modes.find((m) => m.slug === "ask")?.slug || "ask" describe("mode-validator", () => { describe("isToolAllowedForMode", () => { From a77211d9cc5c6a7db6a9a7f14a36770a567afce5 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 30 Jun 2025 14:26:16 -0600 Subject: [PATCH 3/4] docs: add comment explaining mode ordering for default selection Addresses PR review feedback to clarify that the first mode in the array serves as the default for new installations --- src/shared/modes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 2c34e36a15..47387551ff 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -60,6 +60,7 @@ export function getToolsForMode(groups: readonly GroupEntry[]): string[] { } // Main modes configuration as an ordered array +// Note: The first mode in this array is the default mode for new installations export const modes: readonly ModeConfig[] = [ { slug: "architect", From cef275a97ced450d290ba43b0acd6f97e36f36c2 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 30 Jun 2025 14:39:07 -0600 Subject: [PATCH 4/4] fix: Update integration test to use lowercase mode name The test was using 'Ask' (capitalized) but modes are now lowercase 'ask'. This was causing the test to timeout as the mode validation failed. --- apps/vscode-e2e/src/suite/task.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/vscode-e2e/src/suite/task.test.ts b/apps/vscode-e2e/src/suite/task.test.ts index 96b1198fd4..31e03271b5 100644 --- a/apps/vscode-e2e/src/suite/task.test.ts +++ b/apps/vscode-e2e/src/suite/task.test.ts @@ -20,7 +20,7 @@ suite("Roo Code Task", function () { }) const taskId = await api.startNewTask({ - configuration: { mode: "Ask", alwaysAllowModeSwitch: true, autoApprovalEnabled: true }, + configuration: { mode: "ask", alwaysAllowModeSwitch: true, autoApprovalEnabled: true }, text: "Hello world, what is your name? Respond with 'My name is ...'", })