Skip to content

Commit 0aa1548

Browse files
docs: enhance documentation for /init command and add reference link in release notes (#322)
1 parent 70f560d commit 0aa1548

File tree

3 files changed

+63
-22
lines changed

3 files changed

+63
-22
lines changed

docs/features/slash-commands.mdx

Lines changed: 59 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ The filename becomes the command name. For example:
7070
When creating commands through the UI, command names are automatically processed:
7171
- Converted to lowercase
7272
- Spaces replaced with dashes
73-
- Special characters removed
73+
- Special characters removed (except dashes)
74+
- Multiple consecutive dashes replaced with single dash
7475
- Leading/trailing dashes removed
7576

7677
Example: "My Cool Command!" becomes `my-cool-command`
@@ -125,23 +126,20 @@ Please perform a thorough security review of the selected code:
125126

126127
---
127128

128-
## Command Management UI
129+
## Command Management
129130

130-
Roo Code provides a dedicated UI for managing custom commands.
131-
132-
<img src="/img/slash-commands/slash-commands-4.png" alt="Accessing the command manager from Roo Code panel" width="600" />
133-
134-
*Click the commands icon in the Roo Code panel to open the command manager*
131+
Roo Code provides multiple ways to manage custom commands.
135132

136133
**Creating a New Command:**
137134

138-
1. Type your command name in the input field (e.g., "Sample command name")
139-
2. Click the `+` button to create the command
135+
1. Type `/` in the chat to open the slash command menu
136+
2. Type your command name in the input field (e.g., "Sample command name")
137+
3. Click the `+` button to create the command
140138

141139
<img src="/img/slash-commands/slash-commands-1.png" alt="Custom Commands Management Interface" width="400" />
142140

143-
144-
3. A new file will be created and opened automatically (e.g., `sample-command-name.md`)
141+
4. A new file will be created and opened automatically (e.g., `sample-command-name.md`)
142+
5. The file will contain template content to help you get started
145143

146144
<img src="/img/slash-commands/slash-commands-2.png" alt="Creating a new command by typing name and clicking plus button" width="600" />
147145

@@ -150,16 +148,15 @@ Roo Code provides a dedicated UI for managing custom commands.
150148

151149
## Using Slash Commands
152150

153-
Type `/` in the chat to see a unified menu containing both types of commands. The menu shows both custom workflow commands and mode-switching commands in the same interface.
151+
Type `/` in the chat to see a unified menu containing all available commands. The menu shows custom workflow commands, mode-switching commands, and built-in commands in the same interface.
154152

155153
<img src="/img/slash-commands/slash-commands-3.png" alt="Newly created command file opened in editor" width="600" />
156154

157-
158-
1. **Unified Menu**: Both custom commands and mode-switching commands appear together
155+
1. **Unified Menu**: All command types appear together
159156
2. **Autocomplete**: Start typing to filter commands (e.g., `/sam` shows `sample-command-name`)
160-
3. **Fuzzy Search**: Find commands even with partial matches
157+
3. **Basic Filtering**: Find commands with text matching
161158
4. **Description Preview**: See command descriptions in the menu
162-
5. **Visual Indicators**: Mode commands are distinguished from custom commands with special icons
159+
5. **Command Priority**: Project commands override global commands with the same name
163160

164161
---
165162

@@ -368,23 +365,63 @@ Analyze the current test coverage and:
368365

369366
---
370367

368+
## Built-in Commands
369+
370+
Roo Code includes powerful built-in commands that provide specialized functionality:
371+
372+
### The `init` Command
373+
374+
The `/init` command is a comprehensive AI assistant setup tool that analyzes your codebase and creates tailored configuration files. This powerful command:
375+
376+
**Performs Multi-Phase Analysis:**
377+
- **Discovery Phase**: Scans your project structure and identifies key technologies
378+
- **Project Identification**: Determines project type, frameworks, and dependencies
379+
- **Architecture Mapping**: Analyzes code organization and patterns
380+
- **Build/Test Detection**: Identifies build tools, test frameworks, and scripts
381+
- **Code Style Extraction**: Captures coding conventions and patterns
382+
383+
**Creates AI Assistant Configuration:**
384+
- Generates mode-specific `AGENTS.md` files in `.roo/rules-*` directories
385+
- Creates detailed rules for different AI assistant modes (Code, Architect, Debug, etc.)
386+
- Produces concise, high-signal documentation following the "non-obvious-only" principle
387+
- Supports multiple AI assistant formats (Claude, Cursor, Copilot)
388+
389+
**Manages Project Setup:**
390+
- Creates comprehensive todo lists for project initialization
391+
- Identifies security and performance considerations
392+
- Documents project-specific conventions and patterns
393+
- Enforces quality criteria for generated documentation
394+
395+
**Usage:**
396+
Simply type `/init` in the chat to analyze your codebase and set up AI assistant configuration files tailored to your project.
397+
398+
:::tip
399+
The `init` command is especially useful when starting work on a new project or when you want to establish consistent AI assistant behavior across your team.
400+
:::
401+
371402
## Troubleshooting
372403

373404
**Commands Not Appearing:**
374405
- **Check file location**: Ensure custom command files are in `.roo/commands/` or `~/.roo/commands/`
375406
- **Verify file extension**: Custom commands must be `.md` files
407+
- **Reload window**: Sometimes VS Code needs to be reloaded to detect new command files
376408

377409
**Command Not Found:**
378-
When a slash command isn't found, the LLM will see:
379-
```
380-
Command 'command-name' not found. Available commands can be found in .roo/commands/ or ~/.roo/commands/
381-
```
410+
When a slash command isn't found, the LLM will see an error message indicating where commands should be located. This helps guide you to create the command in the right place.
411+
412+
**Command Template Content:**
413+
New commands created through the UI receive template content to help you get started. This template includes basic structure and examples that you can customize.
382414

383415
**Command Conflicts:**
384-
- Custom project commands override global custom commands with the same name
385-
- Use unique names to avoid conflicts
416+
- Project commands (`.roo/commands/`) override global commands (`~/.roo/commands/`) with the same name
417+
- Built-in commands cannot be overridden
386418
- When creating duplicate names through the UI, numbers are appended (e.g., `new-command-1`, `new-command-2`)
387419

420+
**File System Errors:**
421+
- **Permission Issues**: Ensure you have write permissions to the `.roo/commands/` directory
422+
- **Directory Creation**: The system will attempt to create the commands directory if it doesn't exist
423+
- **Symbolic Links**: Command directories support symbolic links for sharing commands across projects
424+
388425
:::info About Mode Commands
389426
The slash menu includes mode-switching commands (like `/code`, `/ask`) that fundamentally change the AI's operational mode - they don't just inject text but switch the entire AI context. Custom modes you create also appear as slash commands (e.g., a mode with slug `reviewer` becomes `/reviewer`). These mode commands cannot be overridden by custom workflow commands. Learn more in [Using Modes](/basic-usage/using-modes) and [Custom Modes](/features/custom-modes).
390427
:::

docs/update-notes/v3.26.0.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ We've added a new /init slash command for project onboarding ([#7381](https://gi
3838

3939
The /init command helps LLMs understand your project's unique patterns and conventions by documenting project-specific information that isn't obvious from the code structure alone.
4040

41+
> 📚 Documentation: See [Slash Commands - The init command](/features/slash-commands#the-init-command) for details.
42+
4143
## Qwen Code CLI API Support
4244

4345
We've integrated with the Qwen Code CLI tool, allowing Roo Code to leverage its free access tier for Alibaba's Qwen3 Coder models ([#7380](https://github.com/RooCodeInc/Roo-Code/pull/7380)):

docs/update-notes/v3.26.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ We've added a new /init slash command for project onboarding ([#7381](https://gi
4242

4343
The /init command helps LLMs understand your project's unique patterns and conventions by documenting project-specific information that isn't obvious from the code structure alone.
4444

45+
> 📚 Documentation: See [Slash Commands - The init command](/features/slash-commands#the-init-command) for details.
46+
4547
### Qwen Code CLI API Support
4648

4749
We've integrated with the Qwen Code CLI tool, allowing Roo Code to leverage its free access tier for Alibaba's Qwen3 Coder models ([#7380](https://github.com/RooCodeInc/Roo-Code/pull/7380)):

0 commit comments

Comments
 (0)