6_mode_testing_validation.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <mode_testing_validation>
  2. <overview>
  3. Guidelines for testing and validating newly created modes to ensure they function correctly and integrate well with the Roo Code ecosystem.
  4. </overview>
  5. <validation_checklist>
  6. <category name="configuration_validation">
  7. <item priority="critical">
  8. <check>Mode slug is unique and follows naming conventions</check>
  9. <validation>No spaces, lowercase, hyphens only</validation>
  10. </item>
  11. <item priority="critical">
  12. <check>All required fields are present and non-empty</check>
  13. <fields>slug, name, roleDefinition, groups</fields>
  14. </item>
  15. <item priority="critical">
  16. <check>No customInstructions field in .roomodes</check>
  17. <validation>All instructions must be in XML files in .roo/rules-[slug]/</validation>
  18. </item>
  19. <item priority="high">
  20. <check>File restrictions use valid regex patterns</check>
  21. <test_method><![CDATA[
  22. <search_files>
  23. <path>.</path>
  24. <regex>your_file_regex_here</regex>
  25. </search_files>
  26. ]]></test_method>
  27. </item>
  28. <item priority="high">
  29. <check>whenToUse clearly differentiates from other modes</check>
  30. <validation>Compare with existing mode descriptions</validation>
  31. </item>
  32. </category>
  33. <category name="instruction_validation">
  34. <item>
  35. <check>XML files are well-formed and valid</check>
  36. <validation>No syntax errors, proper closing tags</validation>
  37. </item>
  38. <item>
  39. <check>Instructions follow XML best practices</check>
  40. <validation>Semantic tag names, proper nesting</validation>
  41. </item>
  42. <item>
  43. <check>Examples use correct tool syntax</check>
  44. <validation>Tool parameters match current API</validation>
  45. </item>
  46. <item>
  47. <check>File paths in examples are consistent</check>
  48. <validation>Use project-relative paths</validation>
  49. </item>
  50. </category>
  51. <category name="functional_testing">
  52. <item>
  53. <check>Mode appears in mode list</check>
  54. <test>Switch to the new mode and verify it loads</test>
  55. </item>
  56. <item>
  57. <check>Tool permissions work as expected</check>
  58. <test>Try using each tool group and verify access</test>
  59. </item>
  60. <item>
  61. <check>File restrictions are enforced</check>
  62. <test>Attempt to edit allowed and restricted files</test>
  63. </item>
  64. <item>
  65. <check>Mode handles edge cases gracefully</check>
  66. <test>Test with minimal input, errors, edge cases</test>
  67. </item>
  68. </category>
  69. </validation_checklist>
  70. <testing_workflow>
  71. <step number="1">
  72. <title>Configuration Testing</title>
  73. <actions>
  74. <action>Verify mode appears in available modes list</action>
  75. <action>Check that mode metadata displays correctly</action>
  76. <action>Confirm mode can be activated</action>
  77. </actions>
  78. <verification><![CDATA[
  79. <ask_followup_question>
  80. <question>I've created the mode configuration. Can you see the new mode in your mode list?</question>
  81. <follow_up>
  82. <suggest>Yes, I can see the new mode and switch to it</suggest>
  83. <suggest>No, the mode doesn't appear in the list</suggest>
  84. <suggest>The mode appears but has errors when switching</suggest>
  85. </follow_up>
  86. </ask_followup_question>
  87. ]]></verification>
  88. </step>
  89. <step number="2">
  90. <title>Permission Testing</title>
  91. <test_cases>
  92. <test case="read_permissions">
  93. <action>Use read tools on various files</action>
  94. <expected>All read operations should work</expected>
  95. </test>
  96. <test case="edit_restrictions">
  97. <action>Try editing allowed file types</action>
  98. <expected>Edits succeed for matching patterns</expected>
  99. </test>
  100. <test case="edit_restrictions_negative">
  101. <action>Try editing restricted file types</action>
  102. <expected>FileRestrictionError for non-matching files</expected>
  103. </test>
  104. </test_cases>
  105. </step>
  106. <step number="3">
  107. <title>Workflow Testing</title>
  108. <actions>
  109. <action>Execute main workflow from start to finish</action>
  110. <action>Test each decision point</action>
  111. <action>Verify error handling</action>
  112. <action>Check completion criteria</action>
  113. </actions>
  114. </step>
  115. <step number="4">
  116. <title>Integration Testing</title>
  117. <areas>
  118. <area>Orchestrator mode compatibility</area>
  119. <area>Mode switching functionality</area>
  120. <area>Tool handoff between modes</area>
  121. <area>Consistent behavior with other modes</area>
  122. </areas>
  123. </step>
  124. </testing_workflow>
  125. <common_issues>
  126. <issue type="configuration">
  127. <problem>Mode doesn't appear in list</problem>
  128. <causes>
  129. <cause>Syntax error in YAML</cause>
  130. <cause>Invalid mode slug</cause>
  131. <cause>File not saved</cause>
  132. </causes>
  133. <solution>Check YAML syntax, validate slug format</solution>
  134. </issue>
  135. <issue type="permissions">
  136. <problem>File restriction not working</problem>
  137. <causes>
  138. <cause>Invalid regex pattern</cause>
  139. <cause>Escaping issues in regex</cause>
  140. <cause>Wrong file path format</cause>
  141. </causes>
  142. <solution>Test regex pattern, use proper escaping</solution>
  143. <example><![CDATA[
  144. # Wrong: *.ts (glob pattern)
  145. # Right: .*\.ts$ (regex pattern)
  146. ]]></example>
  147. </issue>
  148. <issue type="behavior">
  149. <problem>Mode not following instructions</problem>
  150. <causes>
  151. <cause>Instructions not in .roo/rules-[slug]/ folder</cause>
  152. <cause>XML parsing errors</cause>
  153. <cause>Conflicting instructions</cause>
  154. </causes>
  155. <solution>Verify file locations and XML validity</solution>
  156. </issue>
  157. </common_issues>
  158. <debugging_tools>
  159. <tool name="list_files">
  160. <usage>Verify instruction files exist in correct location</usage>
  161. <command><![CDATA[
  162. <list_files>
  163. <path>.roo</path>
  164. <recursive>true</recursive>
  165. </list_files>
  166. ]]></command>
  167. </tool>
  168. <tool name="read_file">
  169. <usage>Check mode configuration syntax</usage>
  170. <command><![CDATA[
  171. <read_file>
  172. <path>.roomodes</path>
  173. </read_file>
  174. ]]></command>
  175. </tool>
  176. <tool name="search_files">
  177. <usage>Test file restriction patterns</usage>
  178. <command><![CDATA[
  179. <search_files>
  180. <path>.</path>
  181. <regex>your_file_pattern_here</regex>
  182. </search_files>
  183. ]]></command>
  184. </tool>
  185. </debugging_tools>
  186. <best_practices>
  187. <practice>Test incrementally as you build the mode</practice>
  188. <practice>Start with minimal configuration and add complexity</practice>
  189. <practice>Document any special requirements or dependencies</practice>
  190. <practice>Consider edge cases and error scenarios</practice>
  191. <practice>Get feedback from potential users of the mode</practice>
  192. </best_practices>
  193. </mode_testing_validation>