Guidelines for testing and validating newly created modes to ensure they function correctly and integrate well with the Roo Code ecosystem. Mode slug is unique and follows naming conventions No spaces, lowercase, hyphens only All required fields are present and non-empty slug, name, roleDefinition, groups Avoid large customInstructions blocks in .roomodes Prefer storing substantial mode guidance in XML files under .roo/rules-[slug]/. Small, high-level glue text in customInstructions is acceptable when needed. File restrictions use valid regex patterns Validate by comparing the regex pattern against the intended file sets; confirm patterns match intended files and avoid overbroad matches. whenToUse clearly differentiates from other modes Compare with existing mode descriptions XML files are well-formed and valid No syntax errors, proper closing tags Instructions follow XML best practices Semantic tag names, proper nesting Examples avoid runtime implementation details Examples align with current permissions and constraints File paths in examples are consistent Use project-relative paths Mode appears in mode list Switch to the new mode and verify it loads Permissions work as expected Verify representative actions for each permission category File restrictions are enforced Attempt to edit allowed and restricted files Mode handles edge cases gracefully Test with minimal input, errors, edge cases Configuration Testing Verify mode appears in available modes list Check that mode metadata displays correctly Confirm mode can be activated Confirm via user feedback. If unclear, ask a focused clarifying question with options like: "Visible and switchable", "Not visible", or "Visible but errors". Permission Testing Verify read access works for representative files All read operations should work Try editing allowed file types Edits succeed for matching patterns Try editing restricted file types An explicit permission/restriction error for non-matching files Workflow Testing Execute main workflow from start to finish Test each decision point Verify error handling Check completion criteria Integration Testing Orchestrator mode compatibility Mode switching functionality Capability handoff between modes Consistent behavior with other modes Mode doesn't appear in list Syntax error in YAML Invalid mode slug File not saved Check YAML syntax, validate slug format File restriction not working Invalid regex pattern Escaping issues in regex Wrong file path format Test regex pattern, use proper escaping # Wrong: *.ts (glob pattern) # Right: .*\.ts$ (regex pattern) Mode not following instructions Instructions not in .roo/rules-[slug]/ folder XML parsing errors Conflicting instructions Verify file locations and XML validity Directory/file inventory Verify instruction files exist in the correct location Check the .roo directory structure and ensure the expected rules-[slug] folder and XML files exist. Configuration review Check mode configuration syntax Review .roomodes to validate YAML structure and entries for the target mode. Regex validation Test file restriction patterns Use targeted checks conceptually to confirm fileRegex patterns match intended files and exclude others. Test incrementally as you build the mode Start with minimal configuration and add complexity Document any special requirements or dependencies Consider edge cases and error scenarios Get feedback from potential users of the mode