This workflow guides you through creating a new custom mode to be used in the Roo Code Software, from initial requirements gathering to final implementation. Gather Requirements Understand what the user wants the mode to accomplish Ask about the mode's primary purpose and use cases Identify what types of tasks the mode should handle Determine what tools and file access the mode needs Clarify any special behaviors or restrictions What is the primary purpose of this new mode? What types of tasks should it handle? A mode for writing and maintaining documentation A mode for database schema design and migrations A mode for API endpoint development and testing A mode for performance optimization and profiling Design Mode Configuration Create the mode definition with all required fields Unique identifier (lowercase, hyphens allowed) Keep it short and descriptive (e.g., "api-dev", "docs-writer") Display name with optional emoji Use an emoji that represents the mode's purpose Detailed description of the mode's role and expertise Start with "You are Roo Code, a [specialist type]..." List specific areas of expertise Mention key technologies or methodologies Tool groups the mode can access Clear description for the Orchestrator Explain specific scenarios and task types Do not include customInstructions in the .roomodes configuration. All detailed instructions should be placed in XML files within the .roo/rules-[mode-slug]/ directory instead. Implement File Restrictions Configure appropriate file access permissions Restrict edit access to specific file types groups: - read - - edit - fileRegex: \.(md|txt|rst)$ description: Documentation files only - command Use regex patterns to limit file editing scope Provide clear descriptions for restrictions Consider the principle of least privilege Create XML Instruction Files Design structured instruction files in .roo/rules-[mode-slug]/ Main workflow and step-by-step processes Guidelines and conventions Reusable code patterns and examples Specific tool usage instructions Complete workflow examples Use semantic tag names that describe content Nest tags hierarchically for better organization Include code examples in CDATA sections when needed Add comments to explain complex sections Test and Refine Verify the mode works as intended Mode appears in the mode list File restrictions work correctly Instructions are clear and actionable Mode integrates well with Orchestrator All examples are accurate and helpful Create mode in .roomodes for project-specific modes Create mode in global custom_modes.yaml for system-wide modes Use list_files to verify .roo folder structure Test file regex patterns with search_files