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 slugUser references a mode directory path (e.g., .roo/rules-[mode-slug])User asks to modify, update, enhance, or fix an existing modeUser says "edit this mode" or "change this mode"User asks to create a new modeUser describes a new capability not covered by existing modesUser 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 purposeEdit an existing mode to add new capabilitiesFix issues in an existing modeEnhance an existing mode with better workflowsGather Requirements for New Mode
Understand what the user wants the new mode to accomplish
Ask about the mode's primary purpose and use casesIdentify what types of tasks the mode should handleDetermine what tools and file access the mode needsClarify any special behaviors or restrictionsWhat is the primary purpose of this new mode? What types of tasks should it handle?A mode for writing and maintaining documentationA mode for database schema design and migrationsA mode for API endpoint development and testingA mode for performance optimization and profilingDesign 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 emojiUse an emoji that represents the mode's purposeDetailed 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 accessClear description for the OrchestratorExplain 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 scopeProvide clear descriptions for restrictionsConsider the principle of least privilegeCreate XML Instruction Files
Design structured instruction files in .roo/rules-[mode-slug]/
Main workflow and step-by-step processesGuidelines and conventionsReusable code patterns and examplesSpecific tool usage instructionsComplete workflow examplesUse semantic tag names that describe contentNest tags hierarchically for better organizationInclude code examples in CDATA sections when neededAdd comments to explain complex sectionsImmerse in Existing Mode
Fully understand the existing mode before making any changes
Locate and read the mode configuration in .roomodesRead all XML instruction files in .roo/rules-[mode-slug]/Analyze the mode's current capabilities and limitationsUnderstand the mode's role in the broader ecosystemWhat specific aspects of the mode would you like to change or enhance?Add new capabilities or tool permissionsFix issues with current workflows or instructionsImprove the mode's roleDefinition or whenToUse descriptionEnhance XML instructions for better clarityAnalyze 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 changeMostly correct, but let me clarify some detailsNo, I meant something differentI'd like to add additional changesPlan Modifications
Create a detailed plan for modifying the mode
Identify which files need to be modifiedDetermine if new XML instruction files are neededCheck for potential conflicts or contradictionsPlan the order of changes for minimal disruptionImplement Changes
Apply the planned modifications to the mode
Update .roomodes configuration if neededModify existing XML instruction filesCreate new XML instruction files if requiredUpdate examples and documentationValidate Cohesion and Consistency
Ensure all changes are cohesive and don't contradict each other
Mode slug follows naming conventionsFile restrictions align with mode purposeTool permissions are appropriatewhenToUse clearly differentiates from other modesAll XML files follow consistent structureNo contradicting instructions between filesExamples align with stated workflowsTool usage matches granted permissionsMode integrates well with OrchestratorClear boundaries with other modesHandoff points are well-definedI've completed the validation checks. Would you like me to review any specific aspect in more detail?Review the file permission patternsCheck for workflow contradictionsVerify integration with other modesEverything looks good, proceed to testingTest and Refine
Verify the mode works as intended
Mode appears in the mode listFile restrictions work correctlyInstructions are clear and actionableMode integrates well with OrchestratorAll examples are accurate and helpfulChanges don't break existing functionality (for edits)New capabilities work as expectedCreate mode in .roomodes for project-specific modesCreate mode in global custom_modes.yaml for system-wide modesUse list_files to verify .roo folder structureTest file regex patterns with search_filesUse codebase_search to find existing mode implementationsRead all XML files in a mode directory to understand its structureAlways validate changes for cohesion and consistency