You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/custom-modes.md
+57-2Lines changed: 57 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,8 @@ Mode configurations are applied in this order:
153
153
2. Global mode configurations (from `custom_modes.json`)
154
154
3. Default mode configurations
155
155
156
-
This means that project-specific configurations will override global configurations, which in turn override default configurations.
156
+
This means that project-specific configurations will override global configurations, which in turn override default configurations. You can override any default mode (like "code", "debug", etc.) by including a mode with the same slug in either your global or project-specific configuration.
157
+
157
158
***Note on Instruction Files:** Within the loading of mode-specific instructions from the filesystem, the directory `.roo/rules-{mode-slug}/` takes precedence over the single file `.roorules-{mode-slug}` found in the workspace root.
158
159
159
160
## Creating Custom Modes
@@ -236,7 +237,45 @@ Each example shows different aspects of mode configuration:
236
237
}
237
238
```
238
239
240
+
## Overriding Default Modes
241
+
242
+
You can override Roo Code's built-in modes (like "code", "debug", "ask") with customized versions that better suit your workflow. This is done by creating a custom mode with the same slug as a default mode.
243
+
244
+
### Overriding Modes Globally
245
+
246
+
To customize a default mode across all your projects:
247
+
248
+
1.**Open Prompts Tab:** Click the <Codiconname="notebook" /> icon in the Roo Code top menu bar
249
+
2.**Access Settings Menu:** Click the <Codiconname="bracket" /> button to the right of the Modes heading
250
+
3.**Edit Global Modes:** Select "Edit Global Modes" to edit `custom_modes.json`
251
+
4.**Add Your Override:** Create an entry with the same slug as the built-in mode you want to override
252
+
253
+
```json
254
+
{
255
+
"customModes": [{
256
+
"slug": "code",
257
+
"name": "Code",
258
+
"roleDefinition": "You are a software engineer with global-specific constraints",
"customInstructions": "Focus on project-specific JS/TS development"
264
+
}]
265
+
}
266
+
```
267
+
268
+
This example replaces the default "Code" mode with a custom version that can only edit JavaScript and TypeScript files.
269
+
239
270
### Project-Specific Mode Override
271
+
272
+
To override a default mode for just one project:
273
+
274
+
1.**Open Prompts Tab:** Click the <Codiconname="notebook" /> icon in the Roo Code top menu bar
275
+
2.**Access Settings Menu:** Click the <Codiconname="bracket" /> button to the right of the Modes heading
276
+
3.**Edit Project Modes:** Select "Edit Project Modes" to edit the `.roomodes` file
277
+
4.**Add Your Override:** Create an entry with the same slug as the built-in mode you want to override
278
+
240
279
```json
241
280
{
242
281
"customModes": [{
@@ -251,7 +290,23 @@ Each example shows different aspects of mode configuration:
251
290
}]
252
291
}
253
292
```
254
-
By following these instructions, you can create and manage custom modes to enhance your workflow with Roo-Code.
293
+
294
+
Project-specific overrides take precedence over global overrides, which in turn override the built-in defaults.
295
+
296
+
### Common Use Cases for Overriding Default Modes
297
+
298
+
Common reasons to override built-in modes include:
299
+
300
+
***Restricting file access:** Limit a mode to specific file types for safety (e.g., restricting "Code" mode to only edit non-production files)
301
+
***Specializing behavior:** Customize a mode's expertise for your tech stack (e.g., making "Debug" mode focus on your framework)
302
+
***Adding custom instructions:** Integrate project standards or team guidelines directly into modes
303
+
***Changing available tools:** Remove certain tools from modes to prevent unwanted operations
304
+
305
+
:::tip
306
+
When overriding default modes, test your configuration carefully. Small changes to core modes can significantly impact functionality. Consider creating a backup of your original configuration before making substantial changes.
307
+
:::
308
+
309
+
By following these instructions, you can create and manage custom modes to enhance your workflow with Roo Code.
0 commit comments