Skip to content

Commit 73e42c5

Browse files
richardwhiteiiRichardellipsis-dev[bot]
authored
Updated roomodes documentation and added to the community projects page (#45)
* Refine documentation for custom modes, enhancing clarity and structure * Add VibeMode documentation, introducing natural language programming and flow-based development * update gitignore * Update docs/advanced-usage/custom-modes.md Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update docs/advanced-usage/custom-modes.md Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: Richard <richard@me> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 8c8fa03 commit 73e42c5

File tree

3 files changed

+124
-16
lines changed

3 files changed

+124
-16
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@
2020
npm-debug.log*
2121
yarn-debug.log*
2222
yarn-error.log*
23+
24+
.devcontainer

docs/advanced-usage/custom-modes.md

Lines changed: 102 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Custom Modes
22

3-
Roo Code allows you to create **custom modes** that can be either global (available across all projects) or project-specific (defined within a single project). These modes let you tailor Roo's behavior to specific tasks or workflows by defining:
3+
Roo Code allows you to create **custom modes** to tailor Roo's behavior to specific tasks or workflows. Custom modes can be either **global** (available across all projects) or **project-specific** (defined within a single project). They allow you to define:
44

55
* **A unique name and slug:** For easy identification.
66
* **A role definition:** A description of the mode's purpose and expertise.
@@ -15,7 +15,7 @@ Roo Code allows you to create **custom modes** that can be either global (availa
1515
* **Experimentation:** Safely experiment with different prompts and configurations without affecting other modes.
1616
* **Team Collaboration:** Share custom modes with your team to standardize workflows.
1717

18-
## Creating a Custom Mode
18+
## Creating Custom Modes
1919

2020
You have three options for creating custom modes:
2121

@@ -33,36 +33,54 @@ Roo Code will guide you through the process.
3333

3434
### 2. Using the Prompts Tab
3535

36-
1. **Open the Prompts Tab:** Click the <Codicon name="notebook" /> icon in the Roo Code top menu bar.
36+
1. **Open the Prompts Tab:** Click the notebook icon in the Roo Code top menu bar.
3737
2. **Click "Create New Mode":** Use the "+" button to add a new mode.
3838
3. **Fill in the Fields:** Enter the mode's name, role definition, custom instructions, and select the allowed tool groups.
3939
4. **Click "Create Mode":** Save your new mode.
4040

4141
Note: Adding/editing file type restrictions is not yet supported in the prompts tab UI.
4242

43-
### 3. Manual Configuration (Advanced)
43+
### 3. Manual Configuration
4444

45-
Custom modes can be configured in two locations:
45+
Custom modes can be configured by directly editing JSON files. There are two locations for custom mode configurations:
4646

47-
1. **Global Configuration:**
48-
- Located at `~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json`
49-
- These modes are available across all projects
47+
1. **Global Configuration:**
48+
* Located at `~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json`
49+
* These modes are available across all projects.
5050

51-
2. **Project-Specific Configuration:**
52-
- Located in `.roomodes` file in your project's root directory
53-
- These modes are only available within that specific project
54-
- Project-specific modes take precedence over global modes with the same slug
51+
2. **Project-Specific Configuration:**
52+
* Located in a `.roomodes` file in your project's root directory.
53+
* These modes are only available within that specific project.
54+
* **Project-specific modes take precedence over global modes with the same slug.** This means if you define a mode with the slug "code" in your `.roomodes` file, it will override the global "code" mode when you're working in that project.
5555

5656
To edit either configuration:
5757

58-
1. **Open the Prompts Tab:** Click the <Codicon name="notebook" /> icon in the Roo Code top menu bar.
59-
2. **Open the Settings File:** Click the <Codicon name="code" /> in the top right corner of the "Prompts" tab.
58+
1. **Open the Prompts Tab:** Click the notebook icon in the Roo Code top menu bar.
59+
2. **Open the Settings File:** Click the code icon (`<>`) in the top right corner of the "Prompts" tab. (This will allow you to edit either the Global or project-specific configuration file. You can also edit a project-specific configuration, by manually creating/opening the `.roomodes` file in your project's root directory.)
6060
3. **Edit the JSON:** Add or modify mode configurations within the `customModes` array, following the format described below.
6161
4. **Save the File:** Roo Code will automatically detect the changes.
6262

6363
## Custom Mode Configuration (JSON Format)
6464

65-
Both global and project-specific configuration files use the same JSON format. Here's an example:
65+
Both global and project-specific configuration files use the same JSON format. The configuration is a JSON object with a `customModes` key, which contains an array of mode definitions. Each mode definition is a JSON object with the following properties:
66+
67+
* `slug`: (Required) A unique identifier for the mode (lowercase letters, numbers, and hyphens). Shorter is better.
68+
* `name`: (Required) The display name for the mode.
69+
* `roleDefinition`: (Required) A detailed description of the mode's role and capabilities.
70+
* `groups`: (Required) An array of allowed tool groups. Each group can be specified either as a string (e.g., `"edit"` to allow editing any file) or with file restrictions (e.g., `["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }]` to only allow editing markdown files).
71+
* Available tool groups are: `"read"`, `"edit"`, `"browser"`, `"command"`, `"mcp"`.
72+
* **Understanding `fileRegex`:** The `fileRegex` property uses a *regular expression* (or *regex*) to define which files the mode is allowed to edit. A regular expression is a sequence of characters that specifies a search pattern. Here's a breakdown of some common regex components used in the examples:
73+
* `\.`: Matches a literal dot (`.`). The backslash is used to "escape" the dot, since a dot has a special meaning in regular expressions (matching any character).
74+
* `(test|spec)`: Matches either "test" or "spec". The parentheses create a *capturing group*, and the pipe (`|`) acts as an "or".
75+
* `(js|ts|jsx|tsx)`: Matches "js", "ts", "jsx", or "tsx".
76+
* `$`: Matches the end of the string. This ensures that the entire filename matches the pattern, not just a part of it.
77+
* For example, `\\.md$` matches any filename that ends with ".md". `\\.(test|spec)\\.(js|ts|jsx|tsx)$` matches filenames like "myComponent.test.js", "utils.spec.ts", etc.
78+
* You can learn more about regular expressions on websites like [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
79+
* `customInstructions`: (Optional) Additional instructions for the mode.
80+
81+
Here are some examples:
82+
83+
**Example 1: A simple documentation writer mode (could be global or project-specific):**
6684

6785
```json
6886
{
@@ -76,7 +94,16 @@ Both global and project-specific configuration files use the same JSON format. H
7694
"read",
7795
["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }]
7896
]
79-
},
97+
}
98+
]
99+
}
100+
```
101+
102+
**Example 2: A test engineer mode (could be global or project-specific):**
103+
104+
```json
105+
{
106+
"customModes": [
80107
{
81108
"slug": "test-engineer",
82109
"name": "Test Engineer",
@@ -90,6 +117,65 @@ Both global and project-specific configuration files use the same JSON format. H
90117
}
91118
```
92119

120+
**Example 3: Adding a new mode in a `.roomodes` file (project-specific):**
121+
122+
```json
123+
{
124+
"customModes": [
125+
{
126+
"slug": "data-scientist",
127+
"name": "Data Scientist",
128+
"roleDefinition": "You are Roo, a data scientist with expertise in data analysis, machine learning, and statistical modeling.",
129+
"groups": [
130+
"read",
131+
"edit",
132+
"command"
133+
],
134+
"customInstructions": "Focus on data analysis and machine learning tasks."
135+
}
136+
]
137+
}
138+
```
139+
140+
**Example 4: Overriding an existing mode in a `.roomodes` file (project-specific):**
141+
142+
```json
143+
{
144+
"customModes": [
145+
{
146+
"slug": "code"
147+
"name": "Code (Project-Specific)",
148+
"roleDefinition": "You are Roo, a highly skilled software engineer. In this project, you have limited file access.",
149+
"groups": [
150+
"read",
151+
["edit", { "fileRegex": "\\.(js|ts)$", "description": "JavaScript and TypeScript files only" }]
152+
],
153+
"customInstructions": "Focus on JS and TS files in this project."
154+
}
155+
]
156+
}
157+
```
158+
159+
**Example 5: Mode with File Restrictions (can be used in global or .roomodes)**
160+
```json
161+
{
162+
"customModes": [
163+
{
164+
"slug": "markdown-editor",
165+
"name": "Markdown Editor",
166+
"roleDefinition": "You are Roo, a markdown editor with expertise in editing and formatting markdown files.",
167+
"groups": [
168+
"read",
169+
["edit", { "fileRegex": "\\.md$", "description": "Markdown files only" }],
170+
"browser"
171+
],
172+
"customInstructions": "Focus on editing and formatting markdown files."
173+
}
174+
]
175+
}
176+
```
177+
By following these instructions, you can create and manage custom modes to enhance your workflow with Roo-Code.
178+
93179
## Community Gallery
94180

95181
Ready to explore more? Check out the [Custom Modes Gallery](../community#custom-modes-gallery) to discover and share custom modes created by the community!

docs/community.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,23 @@ A specialized mode for writing and maintaining Jest test suites with TypeScript
3939
"customInstructions": "When writing tests:\n- Always use describe/it blocks for clear test organization\n- Include meaningful test descriptions\n- Use beforeEach/afterEach for proper test isolation\n- Implement proper error cases\n- Add JSDoc comments for complex test scenarios\n- Ensure mocks are properly typed\n- Verify both positive and negative test cases"
4040
}
4141
```
42+
43+
### VibeMode by [@richardwhiteii](https://github.com/richardwhiteii)
44+
45+
A mode for transforming natural language descriptions into working code, embracing intuitive and flow-based development.
46+
47+
```json
48+
{
49+
"slug": "vibemode",
50+
"name": "VibeMode",
51+
"roleDefinition": "You are Roo, a Vibe Coding assistant that transforms natural language descriptions into working code. You embrace the philosophy that coding should be intuitive and flow-based, where developers can 'give in to the vibes' and focus on what they want to build rather than how to build it.\n\nDescription: An AI coding partner focused on natural language programming and vibe-based development with continuous testing\n\nSystem Prompt: You are a Vibe Coding assistant that helps transform natural language descriptions into working code. Focus on understanding intent over technical specifics while ensuring functionality through continuous testing. Embrace experimentation and rapid iteration with built-in validation.\n\nGoals:\n- Transform natural language descriptions into functional code\n- Maintain flow state by handling technical details automatically\n- Suggest improvements while preserving user intent\n- Handle error resolution autonomously when possible\n- Ensure code quality through continuous testing\n- Validate each iteration before proceeding\n\nPrimary Responsibilities:\n\nNatural Language Programming\n- Transform conversational descriptions into functional code\n- Handle technical implementation details automatically\n- Maintain creative flow by managing error resolution autonomously\n- Suggest improvements while preserving user intent\n- Generate appropriate tests for new functionality\n\nWorkflow Optimization\n- Minimize keyboard interaction by supporting voice-to-text input\n- Handle error messages through simple copy-paste resolution\n- Maintain context across development sessions\n- Switch to appropriate specialized modes when needed\n- Run tests automatically after each significant change\n- Provide immediate feedback on test results\n\nTest-Driven Development\n- Create tests before implementing new features\n- Validate changes through automated testing\n- Maintain test coverage throughout development\n- Flag potential issues early in the development cycle\n- Ensure backwards compatibility with existing functionality\n\nPrompt Templates:\n- Initialization: 'I want to create {description}'\n- Refinement: 'Can you modify this to {change}'\n- Error Handling: 'Fix this error: {error}'\n- Iteration: 'Let's improve {aspect}'\n- Test Creation: 'Generate tests for {feature}'\n- Validation: 'Verify the changes to {component}'",
52+
"groups": [
53+
"read",
54+
"edit",
55+
"browser",
56+
"command",
57+
"mcp"
58+
],
59+
"customInstructions": "Prioritize working solutions over perfect code. Use error messages as learning opportunities. Maintain a conversational, encouraging tone. Suggest improvements without breaking flow. Document key decisions and assumptions. Focus on understanding intent over technical specifics. Embrace experimentation and rapid iteration. Switch to architect mode when structural changes are needed. Switch to ask mode when research is required. Switch to code mode when precise implementation is needed. Maintain context across mode transitions. Handle errors autonomously when possible. Preserve code context and conversation history. Support voice-to-text input through SuperWhisper integration. Generate and run tests for each new feature. Validate all changes through automated testing. Maintain test coverage throughout development. Provide immediate feedback on test results. Flag potential issues early in development cycle. Ensure backwards compatibility."
60+
}
61+
```

0 commit comments

Comments
 (0)