7_validation_cohesion_checking.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <validation_cohesion_checking>
  2. <overview>
  3. Guidelines for thoroughly validating mode changes to ensure cohesion,
  4. consistency, and prevent contradictions across all mode components.
  5. </overview>
  6. <validation_principles>
  7. <principle name="comprehensive_review">
  8. <description>
  9. Every change must be reviewed in context of the entire mode
  10. </description>
  11. <checklist>
  12. <item>Read all existing XML instruction files</item>
  13. <item>Verify new changes align with existing patterns</item>
  14. <item>Check for duplicate or conflicting instructions</item>
  15. <item>Ensure terminology is consistent throughout</item>
  16. </checklist>
  17. </principle>
  18. <principle name="aggressive_questioning">
  19. <description>
  20. Use ask_followup_question extensively to clarify ambiguities
  21. </description>
  22. <when_to_ask>
  23. <scenario>User's intent is unclear</scenario>
  24. <scenario>Multiple interpretations are possible</scenario>
  25. <scenario>Changes might conflict with existing functionality</scenario>
  26. <scenario>Impact on other modes needs clarification</scenario>
  27. </when_to_ask>
  28. <example><![CDATA[
  29. <ask_followup_question>
  30. <question>I notice this change might affect how the mode interacts with file permissions. Should we also update the file regex patterns to match?</question>
  31. <follow_up>
  32. <suggest>Yes, update the file regex to include the new file types</suggest>
  33. <suggest>No, keep the current file restrictions as they are</suggest>
  34. <suggest>Let me explain what file types I need to work with</suggest>
  35. <suggest>Show me the current file restrictions first</suggest>
  36. </follow_up>
  37. </ask_followup_question>
  38. ]]></example>
  39. </principle>
  40. <principle name="contradiction_detection">
  41. <description>
  42. Actively search for and resolve contradictions
  43. </description>
  44. <common_contradictions>
  45. <contradiction>
  46. <type>Permission Mismatch</type>
  47. <description>Instructions reference tools the mode doesn't have access to</description>
  48. <resolution>Either grant the tool permission or update the instructions</resolution>
  49. </contradiction>
  50. <contradiction>
  51. <type>Workflow Conflicts</type>
  52. <description>Different XML files describe conflicting workflows</description>
  53. <resolution>Consolidate workflows and ensure single source of truth</resolution>
  54. </contradiction>
  55. <contradiction>
  56. <type>Role Confusion</type>
  57. <description>Mode's roleDefinition doesn't match its actual capabilities</description>
  58. <resolution>Update roleDefinition to accurately reflect the mode's purpose</resolution>
  59. </contradiction>
  60. </common_contradictions>
  61. </principle>
  62. </validation_principles>
  63. <validation_workflow>
  64. <phase name="pre_change_analysis">
  65. <description>Before making any changes</description>
  66. <steps>
  67. <step>Read and understand all existing mode files</step>
  68. <step>Create a mental model of current mode behavior</step>
  69. <step>Identify potential impact areas</step>
  70. <step>Ask clarifying questions about intended changes</step>
  71. </steps>
  72. </phase>
  73. <phase name="change_implementation">
  74. <description>While making changes</description>
  75. <steps>
  76. <step>Document each change and its rationale</step>
  77. <step>Cross-reference with other files after each change</step>
  78. <step>Verify examples still work with new changes</step>
  79. <step>Update related documentation immediately</step>
  80. </steps>
  81. </phase>
  82. <phase name="post_change_validation">
  83. <description>After changes are complete</description>
  84. <validation_checklist>
  85. <category name="structural_validation">
  86. <check>All XML files are well-formed and valid</check>
  87. <check>File naming follows established patterns</check>
  88. <check>Tag names are consistent across files</check>
  89. <check>No orphaned or unused instructions</check>
  90. </category>
  91. <category name="content_validation">
  92. <check>roleDefinition accurately describes the mode</check>
  93. <check>whenToUse is clear and distinguishable</check>
  94. <check>Tool permissions match instruction requirements</check>
  95. <check>File restrictions align with mode purpose</check>
  96. <check>Examples are accurate and functional</check>
  97. </category>
  98. <category name="integration_validation">
  99. <check>Mode boundaries are well-defined</check>
  100. <check>Handoff points to other modes are clear</check>
  101. <check>No overlap with other modes' responsibilities</check>
  102. <check>Orchestrator can correctly route to this mode</check>
  103. </category>
  104. </validation_checklist>
  105. </phase>
  106. </validation_workflow>
  107. <cohesion_patterns>
  108. <pattern name="consistent_voice">
  109. <description>Maintain consistent tone and terminology</description>
  110. <guidelines>
  111. <guideline>Use the same terms for the same concepts throughout</guideline>
  112. <guideline>Keep instruction style consistent across files</guideline>
  113. <guideline>Maintain the same level of detail in similar sections</guideline>
  114. </guidelines>
  115. </pattern>
  116. <pattern name="logical_flow">
  117. <description>Ensure instructions flow logically</description>
  118. <guidelines>
  119. <guideline>Prerequisites come before dependent steps</guideline>
  120. <guideline>Complex concepts build on simpler ones</guideline>
  121. <guideline>Examples follow the explained patterns</guideline>
  122. </guidelines>
  123. </pattern>
  124. <pattern name="complete_coverage">
  125. <description>Ensure all aspects are covered without gaps</description>
  126. <guidelines>
  127. <guideline>Every mentioned tool has usage instructions</guideline>
  128. <guideline>All workflows have complete examples</guideline>
  129. <guideline>Error scenarios are addressed</guideline>
  130. </guidelines>
  131. </pattern>
  132. </cohesion_patterns>
  133. <validation_questions>
  134. <question_set name="before_changes">
  135. <ask_followup_question>
  136. <question>Before we proceed with changes, I want to ensure I understand the full scope. What is the main goal of these modifications?</question>
  137. <follow_up>
  138. <suggest>Add new functionality while keeping existing features</suggest>
  139. <suggest>Fix issues with current implementation</suggest>
  140. <suggest>Refactor for better organization</suggest>
  141. <suggest>Expand the mode's capabilities into new areas</suggest>
  142. </follow_up>
  143. </ask_followup_question>
  144. </question_set>
  145. <question_set name="during_changes">
  146. <ask_followup_question>
  147. <question>This change might affect other parts of the mode. How should we handle the impact on [specific area]?</question>
  148. <follow_up>
  149. <suggest>Update all affected areas to maintain consistency</suggest>
  150. <suggest>Keep the existing behavior for backward compatibility</suggest>
  151. <suggest>Create a migration path from old to new behavior</suggest>
  152. <suggest>Let me review the impact first</suggest>
  153. </follow_up>
  154. </ask_followup_question>
  155. </question_set>
  156. <question_set name="after_changes">
  157. <ask_followup_question>
  158. <question>I've completed the changes and validation. Which aspect would you like me to test more thoroughly?</question>
  159. <follow_up>
  160. <suggest>Test the new workflow end-to-end</suggest>
  161. <suggest>Verify file permissions work correctly</suggest>
  162. <suggest>Check integration with other modes</suggest>
  163. <suggest>Review all changes one more time</suggest>
  164. </follow_up>
  165. </ask_followup_question>
  166. </question_set>
  167. </validation_questions>
  168. <red_flags>
  169. <flag priority="high">
  170. <description>Instructions reference tools not in the mode's groups</description>
  171. <action>Either add the tool group or remove the instruction</action>
  172. </flag>
  173. <flag priority="high">
  174. <description>File regex doesn't match described file types</description>
  175. <action>Update regex pattern to match intended files</action>
  176. </flag>
  177. <flag priority="medium">
  178. <description>Examples don't follow stated best practices</description>
  179. <action>Update examples to demonstrate best practices</action>
  180. </flag>
  181. <flag priority="medium">
  182. <description>Duplicate instructions in different files</description>
  183. <action>Consolidate to single location and reference</action>
  184. </flag>
  185. </red_flags>
  186. </validation_cohesion_checking>