Skip to content

Commit 18c3f5d

Browse files
feat: change default mode to architect for new installations (RooCodeInc#5289)
* 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 * 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 * 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 * 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.
1 parent 298908f commit 18c3f5d

26 files changed

+192
-288
lines changed

apps/vscode-e2e/src/suite/task.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ suite("Roo Code Task", function () {
2020
})
2121

2222
const taskId = await api.startNewTask({
23-
configuration: { mode: "Ask", alwaysAllowModeSwitch: true, autoApprovalEnabled: true },
23+
configuration: { mode: "ask", alwaysAllowModeSwitch: true, autoApprovalEnabled: true },
2424
text: "Hello world, what is your name? Respond with 'My name is ...'",
2525
})
2626

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/architect-mode-rules.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS
66
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.
77

88
Rules:
9-
# Rules from .clinerules-architect:
9+
# Rules from .clinerules-code:
1010
Mock mode-specific rules
1111
# Rules from .clinerules:
1212
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/code-mode-rules.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS
66
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.
77

88
Rules:
9-
# Rules from .clinerules-code:
9+
# Rules from .clinerules-architect:
1010
Mock mode-specific rules
1111
# Rules from .clinerules:
1212
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/combined-custom-instructions.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Mode-specific Instructions:
1212
Custom test instructions
1313

1414
Rules:
15-
# Rules from .clinerules-code:
15+
# Rules from .clinerules-architect:
1616
Mock mode-specific rules
1717
# Rules from .clinerules:
1818
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/empty-mode-instructions.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS
66
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.
77

88
Rules:
9-
# Rules from .clinerules-code:
9+
# Rules from .clinerules-architect:
1010
Mock mode-specific rules
1111
# Rules from .clinerules:
1212
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/generic-rules-fallback.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ USER'S CUSTOM INSTRUCTIONS
66
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.
77

88
Rules:
9-
# Rules from .clinerules-code:
9+
# Rules from .clinerules-architect:
1010
Mock mode-specific rules
1111
# Rules from .clinerules:
1212
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/global-and-mode-instructions.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Mode-specific Instructions:
1212
Mode-specific instructions
1313

1414
Rules:
15-
# Rules from .clinerules-code:
15+
# Rules from .clinerules-architect:
1616
Mock mode-specific rules
1717
# Rules from .clinerules:
1818
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-disabled.snap

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
1+
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.
22

33
====
44

@@ -269,28 +269,6 @@ Examples:
269269
<ignore_case>true</ignore_case>
270270
</search_and_replace>
271271

272-
## execute_command
273-
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.
274-
Parameters:
275-
- 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.
276-
- cwd: (optional) The working directory to execute the command in (default: /test/path)
277-
Usage:
278-
<execute_command>
279-
<command>Your command here</command>
280-
<cwd>Working directory path (optional)</cwd>
281-
</execute_command>
282-
283-
Example: Requesting to execute npm run dev
284-
<execute_command>
285-
<command>npm run dev</command>
286-
</execute_command>
287-
288-
Example: Requesting to execute ls in a specific directory if directed
289-
<execute_command>
290-
<command>ls -la</command>
291-
<cwd>/home/user/projects</cwd>
292-
</execute_command>
293-
294272
## use_mcp_tool
295273
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.
296274
Parameters:
@@ -558,8 +536,21 @@ The following additional instructions are provided by the user, and should be fo
558536
Language Preference:
559537
You should always speak and think in the "en" language.
560538

539+
Mode-specific Instructions:
540+
1. Do some information gathering (for example using read_file or search_files) to get more context about the task.
541+
542+
2. You should also ask the user clarifying questions to get a better understanding of the task.
543+
544+
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.
545+
546+
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.
547+
548+
5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.
549+
550+
6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.
551+
561552
Rules:
562-
# Rules from .clinerules-code:
553+
# Rules from .clinerules-architect:
563554
Mock mode-specific rules
564555
# Rules from .clinerules:
565556
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/mcp-server-creation-enabled.snap

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
1+
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.
22

33
====
44

@@ -269,28 +269,6 @@ Examples:
269269
<ignore_case>true</ignore_case>
270270
</search_and_replace>
271271

272-
## execute_command
273-
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.
274-
Parameters:
275-
- 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.
276-
- cwd: (optional) The working directory to execute the command in (default: /test/path)
277-
Usage:
278-
<execute_command>
279-
<command>Your command here</command>
280-
<cwd>Working directory path (optional)</cwd>
281-
</execute_command>
282-
283-
Example: Requesting to execute npm run dev
284-
<execute_command>
285-
<command>npm run dev</command>
286-
</execute_command>
287-
288-
Example: Requesting to execute ls in a specific directory if directed
289-
<execute_command>
290-
<command>ls -la</command>
291-
<cwd>/home/user/projects</cwd>
292-
</execute_command>
293-
294272
## use_mcp_tool
295273
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.
296274
Parameters:
@@ -564,8 +542,21 @@ The following additional instructions are provided by the user, and should be fo
564542
Language Preference:
565543
You should always speak and think in the "en" language.
566544

545+
Mode-specific Instructions:
546+
1. Do some information gathering (for example using read_file or search_files) to get more context about the task.
547+
548+
2. You should also ask the user clarifying questions to get a better understanding of the task.
549+
550+
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.
551+
552+
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.
553+
554+
5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.
555+
556+
6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.
557+
567558
Rules:
568-
# Rules from .clinerules-code:
559+
# Rules from .clinerules-architect:
569560
Mock mode-specific rules
570561
# Rules from .clinerules:
571562
Mock generic rules

src/core/prompts/__tests__/__snapshots__/add-custom-instructions/partial-reads-enabled.snap

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
1+
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.
22

33
====
44

@@ -274,28 +274,6 @@ Examples:
274274
<ignore_case>true</ignore_case>
275275
</search_and_replace>
276276

277-
## execute_command
278-
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.
279-
Parameters:
280-
- 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.
281-
- cwd: (optional) The working directory to execute the command in (default: /test/path)
282-
Usage:
283-
<execute_command>
284-
<command>Your command here</command>
285-
<cwd>Working directory path (optional)</cwd>
286-
</execute_command>
287-
288-
Example: Requesting to execute npm run dev
289-
<execute_command>
290-
<command>npm run dev</command>
291-
</execute_command>
292-
293-
Example: Requesting to execute ls in a specific directory if directed
294-
<execute_command>
295-
<command>ls -la</command>
296-
<cwd>/home/user/projects</cwd>
297-
</execute_command>
298-
299277
## ask_followup_question
300278
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.
301279
Parameters:
@@ -501,8 +479,21 @@ The following additional instructions are provided by the user, and should be fo
501479
Language Preference:
502480
You should always speak and think in the "en" language.
503481

482+
Mode-specific Instructions:
483+
1. Do some information gathering (for example using read_file or search_files) to get more context about the task.
484+
485+
2. You should also ask the user clarifying questions to get a better understanding of the task.
486+
487+
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.
488+
489+
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.
490+
491+
5. Once the user confirms the plan, ask them if they'd like you to write it to a markdown file.
492+
493+
6. Use the switch_mode tool to request that the user switch to another mode to implement the solution.
494+
504495
Rules:
505-
# Rules from .clinerules-code:
496+
# Rules from .clinerules-architect:
506497
Mock mode-specific rules
507498
# Rules from .clinerules:
508499
Mock generic rules

0 commit comments

Comments
 (0)