validate-workflow.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <task id="_bmad/core/tasks/validate-workflow.xml" name="Validate Workflow Output">
  2. <objective>Run a checklist against a document with thorough analysis and produce a validation report</objective>
  3. <inputs>
  4. <input name="workflow" desc="Workflow path containing checklist.md" />
  5. <input name="checklist" desc="Checklist to validate against (defaults to workflow's checklist.md)" />
  6. <input name="document" desc="Document to validate (ask user if not specified)" />
  7. </inputs>
  8. <flow>
  9. <step n="1" title="Setup">
  10. <action>If checklist not provided, load checklist.md from workflow location</action>
  11. <action>Try to fuzzy match for files similar to the input document name or if user did not provide the document. If document not
  12. provided or unsure, ask user: "Which document should I validate?"</action>
  13. <action>Load both the checklist and document</action>
  14. </step>
  15. <step n="2" title="Validate" critical="true">
  16. <mandate>For EVERY checklist item, WITHOUT SKIPPING ANY:</mandate>
  17. <for-each-item>
  18. <action>Read requirement carefully</action>
  19. <action>Search document for evidence along with any ancillary loaded documents or artifacts (quotes with line numbers)</action>
  20. <action>Analyze deeply - look for explicit AND implied coverage</action>
  21. <mark-as>
  22. ✓ PASS - Requirement fully met (provide evidence)
  23. ⚠ PARTIAL - Some coverage but incomplete (explain gaps)
  24. ✗ FAIL - Not met or severely deficient (explain why)
  25. ➖ N/A - Not applicable (explain reason)
  26. </mark-as>
  27. </for-each-item>
  28. <critical>DO NOT SKIP ANY SECTIONS OR ITEMS</critical>
  29. </step>
  30. <step n="3" title="Generate Report">
  31. <action>Create validation-report-{timestamp}.md in document's folder</action>
  32. <report-format>
  33. # Validation Report
  34. **Document:** {document-path}
  35. **Checklist:** {checklist-path}
  36. **Date:** {timestamp}
  37. ## Summary
  38. - Overall: X/Y passed (Z%)
  39. - Critical Issues: {count}
  40. ## Section Results
  41. ### {Section Name}
  42. Pass Rate: X/Y (Z%)
  43. {For each item:}
  44. [MARK] {Item description}
  45. Evidence: {Quote with line# or explanation}
  46. {If FAIL/PARTIAL: Impact: {why this matters}}
  47. ## Failed Items
  48. {All ✗ items with recommendations}
  49. ## Partial Items
  50. {All ⚠ items with what's missing}
  51. ## Recommendations
  52. 1. Must Fix: {critical failures}
  53. 2. Should Improve: {important gaps}
  54. 3. Consider: {minor improvements}
  55. </report-format>
  56. </step>
  57. <step n="4" title="Summary for User">
  58. <action>Present section-by-section summary</action>
  59. <action>Highlight all critical issues</action>
  60. <action>Provide path to saved report</action>
  61. <action>HALT - do not continue unless user asks</action>
  62. </step>
  63. </flow>
  64. <critical-rules>
  65. <rule>NEVER skip sections - validate EVERYTHING</rule>
  66. <rule>ALWAYS provide evidence (quotes + line numbers) for marks</rule>
  67. <rule>Think deeply about each requirement - don't rush</rule>
  68. <rule>Save report to document's folder automatically</rule>
  69. <rule>HALT after presenting summary - wait for user</rule>
  70. </critical-rules>
  71. </task>