Skip to content

Commit 60af029

Browse files
docs: enhance custom instructions and modes documentation with file structure examples (#123)
1 parent edc295b commit 60af029

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

docs/features/custom-instructions.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,45 @@
22

33
Custom Instructions allow you to personalize how Roo behaves, providing specific guidance that shapes responses, coding style, and decision-making processes.
44

5+
:::info Instruction File Locations
6+
You can provide custom instructions using dedicated files or directories within your workspace. This allows for better organization and version control.
7+
8+
**Workspace-Wide Instructions:** Apply to all modes in the project.
9+
* **Preferred Method: Directory (`.roo/rules/`)**
10+
```
11+
.
12+
├── .roo/
13+
│ └── rules/ # Workspace-wide rules
14+
│ ├── 01-general.md
15+
│ └── 02-coding-style.txt
16+
└── ... (other project files)
17+
```
18+
* **Fallback Method: Single File (`.roorules`)**
19+
```
20+
.
21+
├── .roorules # Workspace-wide rules (single file)
22+
└── ... (other project files)
23+
```
24+
25+
**Mode-Specific Instructions:** Apply only to a specific mode (e.g., `code`).
26+
* **Preferred Method: Directory (`.roo/rules-{modeSlug}/`)**
27+
```
28+
.
29+
├── .roo/
30+
│ └── rules-code/ # Rules for "code" mode
31+
│ ├── 01-js-style.md
32+
│ └── 02-ts-style.md
33+
└── ... (other project files)
34+
```
35+
* **Fallback Method: Single File (`.roorules-{modeSlug}`)**
36+
```
37+
.
38+
├── .roorules-code # Rules for "code" mode (single file)
39+
└── ... (other project files)
40+
```
41+
The directory methods take precedence if they exist and contain files. See [Workspace-Level Instructions](#workspace-level-instructions) and [Mode-Specific Instructions](#mode-specific-instructions) for details.
42+
:::
43+
544
## What Are Custom Instructions?
645
746
Custom Instructions define specific behaviors, preferences, and constraints beyond Roo's basic role definition. Examples include coding style, documentation standards, testing requirements, and workflow guidelines.

docs/features/custom-modes.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
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).
44

5+
:::info Mode-Specific Instruction File Locations
6+
You can provide instructions for custom modes using dedicated files or directories within your workspace. This allows for better organization and version control compared to only using the JSON `customInstructions` property.
7+
8+
**Preferred Method: Directory (`.roo/rules-{mode-slug}/`)**
9+
```
10+
.
11+
├── .roo/
12+
│ └── rules-docs-writer/ # Example for mode slug "docs-writer"
13+
│ ├── 01-style-guide.md
14+
│ └── 02-formatting.txt
15+
└── ... (other project files)
16+
```
17+
18+
**Fallback Method: Single File (`.roorules-{mode-slug}`)**
19+
```
20+
.
21+
├── .roorules-docs-writer # Example for mode slug "docs-writer"
22+
└── ... (other project files)
23+
```
24+
The directory method takes precedence if it exists and contains files. See [Mode-Specific Instructions via Files/Directories](#mode-specific-instructions-via-filesdirectories) for details.
25+
:::
26+
527
## Why Use Custom Modes?
628

729
* **Specialization:** Create modes optimized for specific tasks, like "Documentation Writer," "Test Engineer," or "Refactoring Expert"

0 commit comments

Comments
 (0)