This workflow guides you through creating new custom modes or editing existing modes for the Roo Code Software, ensuring comprehensive understanding and cohesive implementation. Determine User Intent Identify whether the user wants to create a new mode or edit an existing one User mentions a specific mode by name or slug User references a mode directory path (e.g., .roo/rules-[mode-slug]) User asks to modify, update, enhance, or fix an existing mode User says "edit this mode" or "change this mode" User asks to create a new mode User describes a new capability not covered by existing modes User says "make a mode for" or "create a mode that" I want to make sure I understand correctly. Are you looking to create a brand new mode or modify an existing one? Create a new mode for a specific purpose Edit an existing mode to add new capabilities Fix issues in an existing mode Enhance an existing mode with better workflows Gather Requirements for New Mode Understand what the user wants the new 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 Immerse in Existing Mode Fully understand the existing mode before making any changes Locate and read the mode configuration in .roomodes Read all XML instruction files in .roo/rules-[mode-slug]/ Analyze the mode's current capabilities and limitations Understand the mode's role in the broader ecosystem What specific aspects of the mode would you like to change or enhance? Add new capabilities or tool permissions Fix issues with current workflows or instructions Improve the mode's roleDefinition or whenToUse description Enhance XML instructions for better clarity Analyze Change Impact Understand how proposed changes will affect the mode Compatibility with existing workflows Impact on file permissions and tool access Consistency with mode's core purpose Integration with other modes I've analyzed the existing mode. Here's what I understand about your requested changes. Is this correct? Yes, that's exactly what I want to change Mostly correct, but let me clarify some details No, I meant something different I'd like to add additional changes Plan Modifications Create a detailed plan for modifying the mode Identify which files need to be modified Determine if new XML instruction files are needed Check for potential conflicts or contradictions Plan the order of changes for minimal disruption Implement Changes Apply the planned modifications to the mode Update .roomodes configuration if needed Modify existing XML instruction files Create new XML instruction files if required Update examples and documentation Validate Cohesion and Consistency Ensure all changes are cohesive and don't contradict each other Mode slug follows naming conventions File restrictions align with mode purpose Tool permissions are appropriate whenToUse clearly differentiates from other modes All XML files follow consistent structure No contradicting instructions between files Examples align with stated workflows Tool usage matches granted permissions Mode integrates well with Orchestrator Clear boundaries with other modes Handoff points are well-defined I've completed the validation checks. Would you like me to review any specific aspect in more detail? Review the file permission patterns Check for workflow contradictions Verify integration with other modes Everything looks good, proceed to testing 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 Changes don't break existing functionality (for edits) New capabilities work as expected 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 Use codebase_search to find existing mode implementations Read all XML files in a mode directory to understand its structure Always validate changes for cohesion and consistency