Skip to content

Commit 6f6f244

Browse files
Add documentation for .roomodes feature
Fixes #8 Add detailed documentation for the `.roomodes` feature in a new `README-roomodes.md` file. * **Overview**: Describe the `.roomodes` feature and its purpose. * **Creating and Managing Custom Modes**: Provide step-by-step instructions on how to create and manage custom modes in the `.roomodes` file. * **Precedence of .roomodes over Global Settings**: Explain how project-specific modes in `.roomodes` take precedence over global settings. * **Examples of Valid .roomodes Configurations**: Include examples of valid `.roomodes` configurations, such as adding a new mode, overriding an existing mode, and a mode with file restrictions. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/richardwhiteii/Roo-Code/issues/8?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent 5b070bb commit 6f6f244

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

README-roomodes.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# .roomodes Feature Documentation
2+
3+
## Overview
4+
5+
The `.roomodes` feature in Roo-Code allows you to define project-specific custom modes. These custom modes can override global modes or add new modes specific to a project. The `.roomodes` file is placed in the root directory of your project and contains the configuration for these custom modes.
6+
7+
## Creating and Managing Custom Modes
8+
9+
To create and manage custom modes in `.roomodes`, follow these steps:
10+
11+
1. **Create the `.roomodes` file**: In the root directory of your project, create a file named `.roomodes`.
12+
13+
2. **Define custom modes**: Add the custom modes configuration in JSON format. Each mode should have a unique `slug`, a `name`, a `roleDefinition`, and an array of `groups`. Optionally, you can add `customInstructions`.
14+
15+
Example `.roomodes` file:
16+
```json
17+
{
18+
"customModes": [
19+
{
20+
"slug": "designer",
21+
"name": "Designer",
22+
"roleDefinition": "You are Roo, a UI/UX expert specializing in design systems and frontend development. Your expertise includes:\n- Creating and maintaining design systems\n- Implementing responsive and accessible web interfaces\n- Working with CSS, HTML, and modern frontend frameworks\n- Ensuring consistent user experiences across platforms",
23+
"groups": [
24+
"read",
25+
"edit",
26+
"browser",
27+
"command",
28+
"mcp"
29+
],
30+
"customInstructions": "Additional instructions for the Designer mode"
31+
}
32+
]
33+
}
34+
```
35+
36+
3. **Save the file**: Save the `.roomodes` file in the root directory of your project.
37+
38+
## Precedence of .roomodes over Global Settings
39+
40+
When both global custom modes and project-specific custom modes are defined, the project-specific modes in `.roomodes` take precedence. This means that if a mode with the same `slug` exists in both the global settings and `.roomodes`, the configuration in `.roomodes` will be used.
41+
42+
## Examples of Valid .roomodes Configurations
43+
44+
Here are some examples of valid `.roomodes` configurations:
45+
46+
### Example 1: Adding a New Mode
47+
```json
48+
{
49+
"customModes": [
50+
{
51+
"slug": "data-scientist",
52+
"name": "Data Scientist",
53+
"roleDefinition": "You are Roo, a data scientist with expertise in data analysis, machine learning, and statistical modeling.",
54+
"groups": [
55+
"read",
56+
"edit",
57+
"command"
58+
],
59+
"customInstructions": "Focus on data analysis and machine learning tasks."
60+
}
61+
]
62+
}
63+
```
64+
65+
### Example 2: Overriding an Existing Mode
66+
```json
67+
{
68+
"customModes": [
69+
{
70+
"slug": "code",
71+
"name": "Code",
72+
"roleDefinition": "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
73+
"groups": [
74+
"read",
75+
"edit",
76+
"browser",
77+
"command",
78+
"mcp"
79+
],
80+
"customInstructions": "Additional instructions for the Code mode"
81+
}
82+
]
83+
}
84+
```
85+
86+
### Example 3: Mode with File Restrictions
87+
```json
88+
{
89+
"customModes": [
90+
{
91+
"slug": "markdown-editor",
92+
"name": "Markdown Editor",
93+
"roleDefinition": "You are Roo, a markdown editor with expertise in editing and formatting markdown files.",
94+
"groups": [
95+
"read",
96+
["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }],
97+
"browser"
98+
],
99+
"customInstructions": "Focus on editing and formatting markdown files."
100+
}
101+
]
102+
}
103+
```
104+
105+
By following these instructions, you can create and manage custom modes in your project using the `.roomodes` feature in Roo-Code.

0 commit comments

Comments
 (0)