speccrew 0.6.68 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.speccrew/agents/speccrew-task-worker.md +1 -1
  2. package/.speccrew/agents/speccrew-team-leader.md +336 -189
  3. package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
  4. package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
  5. package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
  6. package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
  7. package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
  8. package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
  9. package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
  10. package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
  11. package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
  12. package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
  13. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
  14. package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
  15. package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
  16. package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
  17. package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
  18. package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
  19. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
  20. package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
  21. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
  22. package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
  23. package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
  24. package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
  25. package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
  26. package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
  27. package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
  28. package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
  29. package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
  30. package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
  31. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
  32. package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
  33. package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
  34. package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
  35. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
  36. package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
  37. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
  38. package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
  40. package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
  41. package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
  42. package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
  43. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
  44. package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
  45. package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
  46. package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
  47. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
  48. package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
  49. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
  50. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
  52. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
  54. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
  56. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
  57. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
  61. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
  62. package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
  63. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
  64. package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
  65. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
  66. package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
  67. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
  68. package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
  70. package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
  72. package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
  74. package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
  75. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
  76. package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
  77. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
  78. package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
  79. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
  80. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
  81. package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
  82. package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
  83. package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
  84. package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
  85. package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
  86. package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
  87. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
  88. package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
  89. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
  90. package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
  91. package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
  92. package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
  93. package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
  94. package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
  95. package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
  96. package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
  97. package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
  98. package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
  99. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
  100. package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
  101. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
  102. package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
  103. package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
  104. package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
  105. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
  106. package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
  107. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
  108. package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
  109. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
  110. package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
  111. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
  112. package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
  113. package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
  114. package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
  115. package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
  116. package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
  117. package/bin/cli.js +8 -1
  118. package/lib/commands/validate.js +565 -0
  119. package/package.json +1 -1
  120. package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
  121. package/workspace-template/scripts/validate-agentflow.js +637 -0
  122. package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
  123. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
  124. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
  125. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
  126. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
  127. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
  128. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
  129. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
  130. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
  131. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
  132. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1071
  133. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
  134. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
@@ -0,0 +1,284 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <workflow id="test-reporter-main" status="pending" version="1.0" desc="Generate comprehensive test reports and individual bug reports from test execution results">
3
+
4
+ <!-- ============================================================
5
+ Input Parameters Definition
6
+ ============================================================ -->
7
+ <block type="input" id="I1" desc="Workflow input parameters">
8
+ <field name="execution_results_path" required="true" type="string" desc="Path to test execution results from speccrew-test-runner"/>
9
+ <field name="test_cases_path" required="true" type="string" desc="Path to test cases document with expected results"/>
10
+ <field name="output_dir" required="true" type="string" desc="Directory for report output"/>
11
+ <field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
12
+ <field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
13
+ </block>
14
+
15
+ <!-- ============================================================
16
+ Global Constraints
17
+ ============================================================ -->
18
+ <block type="rule" id="R1" level="forbidden" desc="Document generation constraints">
19
+ <field name="text">NEVER use create_file to write test reports or bug reports directly</field>
20
+ <field name="text">MUST copy template first, then fill sections with search_replace</field>
21
+ <field name="text">NEVER replace entire document content in a single operation</field>
22
+ </block>
23
+
24
+ <block type="rule" id="R2" level="mandatory" desc="Template-first workflow">
25
+ <field name="text">Copy template MUST execute before filling sections</field>
26
+ <field name="text">All section titles MUST be preserved</field>
27
+ </block>
28
+
29
+ <block type="rule" id="R3" level="mandatory" desc="Bug report requirements">
30
+ <field name="text">Each failed test gets its own bug report file for independent tracking</field>
31
+ <field name="text">Always classify bug severity for prioritization</field>
32
+ <field name="text">Bug reports must include suggested fix direction</field>
33
+ </block>
34
+
35
+ <!-- ============================================================
36
+ Main Processing Sequence
37
+ ============================================================ -->
38
+ <sequence id="S1" name="Test Reporting" status="pending" desc="Generate test reports and bug reports">
39
+
40
+ <!-- Step 1: Read Inputs -->
41
+ <block type="task" id="B1" action="read-file" desc="Read test execution results">
42
+ <field name="path" value="${execution_results_path}"/>
43
+ <field name="output" var="execution_results"/>
44
+ </block>
45
+
46
+ <block type="task" id="B2" action="read-file" desc="Read test cases document">
47
+ <field name="path" value="${test_cases_path}"/>
48
+ <field name="output" var="test_cases"/>
49
+ </block>
50
+
51
+ <!-- Gateway: Validate inputs -->
52
+ <block type="gateway" id="G1" mode="guard" desc="Validate execution results format"
53
+ test="${execution_results} != null AND ${execution_results.execution_summary} != null"
54
+ fail-action="stop">
55
+ <field name="message">Execution results document is missing or malformed: ${execution_results_path}</field>
56
+ </block>
57
+
58
+ <!-- Step 2: Analyze Execution Results -->
59
+ <block type="task" id="B3" action="analyze" desc="Extract summary statistics">
60
+ <field name="input_results" value="${execution_results}"/>
61
+ <field name="extract_fields">
62
+ - total_tests
63
+ - passed
64
+ - failed
65
+ - errors
66
+ - skipped
67
+ - pass_rate
68
+ - execution_duration
69
+ - platform
70
+ - framework
71
+ </field>
72
+ <field name="output" var="summary_stats"/>
73
+ </block>
74
+
75
+ <block type="task" id="B4" action="analyze" desc="Identify failed tests">
76
+ <field name="input_results" value="${execution_results}"/>
77
+ <field name="filter_status">FAIL, ERROR, SKIP</field>
78
+ <field name="extract_fields">
79
+ - TC ID
80
+ - test name
81
+ - description
82
+ - error messages
83
+ - stack traces
84
+ - expected vs actual results
85
+ </field>
86
+ <field name="output" var="failed_tests"/>
87
+ </block>
88
+
89
+ <block type="task" id="B5" action="analyze" desc="Classify by test dimension">
90
+ <field name="input_results" value="${execution_results}"/>
91
+ <field name="dimensions">
92
+ - Happy Path
93
+ - Boundary Value
94
+ - Exception Handling
95
+ - Business Rules
96
+ - Permission/Security
97
+ - Data Validation
98
+ </field>
99
+ <field name="output" var="dimension_breakdown"/>
100
+ </block>
101
+
102
+ <!-- Step 3: Generate Test Report -->
103
+ <block type="task" id="B6" action="read-file" desc="Read test report template">
104
+ <field name="path" value="speccrew-test-reporter/templates/TEST-REPORT-TEMPLATE.md"/>
105
+ <field name="output" var="report_template"/>
106
+ </block>
107
+
108
+ <block type="task" id="B7" action="write-file" desc="Create test report document">
109
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
110
+ <field name="template" value="${report_template}"/>
111
+ <field name="placeholders">
112
+ - feature_name: ${feature_name}
113
+ - platform_id: ${platform_id}
114
+ - date: ${timestamp}
115
+ </field>
116
+ <field name="output" var="report_created"/>
117
+ </block>
118
+
119
+ <block type="task" id="B8" action="edit-file" desc="Fill Execution Summary section">
120
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
121
+ <field name="section">Execution Summary</field>
122
+ <field name="content" value="${summary_stats}"/>
123
+ </block>
124
+
125
+ <block type="task" id="B9" action="edit-file" desc="Fill Results Overview section">
126
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
127
+ <field name="section">Results Overview</field>
128
+ <field name="content" value="${summary_stats.counts}"/>
129
+ </block>
130
+
131
+ <block type="task" id="B10" action="edit-file" desc="Fill Results by Test Dimension section">
132
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
133
+ <field name="section">Results by Test Dimension</field>
134
+ <field name="content" value="${dimension_breakdown}"/>
135
+ </block>
136
+
137
+ <block type="task" id="B11" action="edit-file" desc="Fill Failed Test Details section">
138
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
139
+ <field name="section">Failed Test Details</field>
140
+ <field name="content" value="${failed_tests}"/>
141
+ </block>
142
+
143
+ <block type="task" id="B12" action="edit-file" desc="Fill Coverage Status section">
144
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
145
+ <field name="section">Coverage Status</field>
146
+ <field name="content" value="${execution_results.coverage}"/>
147
+ </block>
148
+
149
+ <block type="task" id="B13" action="edit-file" desc="Fill Environment Information section">
150
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
151
+ <field name="section">Environment Information</field>
152
+ <field name="content" value="${execution_results.environment}"/>
153
+ </block>
154
+
155
+ <block type="task" id="B14" action="edit-file" desc="Fill Recommendations section">
156
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
157
+ <field name="section">Recommendations</field>
158
+ <field name="content" value="${failed_tests.recommendations}"/>
159
+ </block>
160
+
161
+ <!-- Step 4: Generate Bug Reports -->
162
+ <block type="gateway" id="G2" mode="exclusive" desc="Check if there are failed tests">
163
+ <branch test="${failed_tests.count} > 0">
164
+ <block type="task" id="B15" action="read-file" desc="Read bug report template">
165
+ <field name="path" value="speccrew-test-reporter/templates/BUG-REPORT-TEMPLATE.md"/>
166
+ <field name="output" var="bug_template"/>
167
+ </block>
168
+
169
+ <block type="loop" id="L1" over="${failed_tests.items}" as="failure" desc="Generate bug report for each failure">
170
+ <block type="task" id="B16" action="analyze" desc="Determine bug severity for ${failure.tc_id}">
171
+ <field name="failure_data" value="${failure}"/>
172
+ <field name="severity_criteria">
173
+ - Critical: Blocks core functionality, no workaround
174
+ - High: Major feature broken, workaround exists
175
+ - Medium: Minor feature issue, cosmetic problem
176
+ - Low: Enhancement, minor improvement
177
+ </field>
178
+ <field name="output" var="bug_severity"/>
179
+ </block>
180
+
181
+ <block type="task" id="B17" action="analyze" desc="Perform root cause analysis for ${failure.tc_id}">
182
+ <field name="failure_data" value="${failure}"/>
183
+ <field name="test_case" value="${test_cases.find(tc => tc.id == failure.tc_id)}"/>
184
+ <field name="analysis_aspects">
185
+ - Error Category: Syntax, Logic, Integration, Environment, Performance
186
+ - Impact Assessment: What functionality is affected
187
+ - Likely Cause: Probable source of the issue
188
+ - Suggested Fix: Direction for resolution
189
+ </field>
190
+ <field name="output" var="root_cause_analysis"/>
191
+ </block>
192
+
193
+ <block type="task" id="B18" action="write-file" desc="Create bug report for ${failure.tc_id}">
194
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
195
+ <field name="template" value="${bug_template}"/>
196
+ <field name="placeholders">
197
+ - bug_id: BUG-${feature_name}-${failure.sequence}
198
+ - tc_id: ${failure.tc_id}
199
+ - feature_name: ${feature_name}
200
+ - severity: ${bug_severity}
201
+ </field>
202
+ <field name="output" var="bug_report_created"/>
203
+ </block>
204
+
205
+ <block type="task" id="B19" action="edit-file" desc="Fill Bug Description section">
206
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
207
+ <field name="section">Bug Description</field>
208
+ <field name="content" value="${failure.description}"/>
209
+ </block>
210
+
211
+ <block type="task" id="B20" action="edit-file" desc="Fill Reproduction Steps section">
212
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
213
+ <field name="section">Reproduction Steps</field>
214
+ <field name="content" value="${failure.reproduction_steps}"/>
215
+ </block>
216
+
217
+ <block type="task" id="B21" action="edit-file" desc="Fill Expected vs Actual section">
218
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
219
+ <field name="section">Expected vs Actual</field>
220
+ <field name="content">
221
+ Expected: ${failure.expected_result}
222
+ Actual: ${failure.actual_result}
223
+ </field>
224
+ </block>
225
+
226
+ <block type="task" id="B22" action="edit-file" desc="Fill Error Log section">
227
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
228
+ <field name="section">Error Log</field>
229
+ <field name="content" value="${failure.error_message}"/>
230
+ </block>
231
+
232
+ <block type="task" id="B23" action="edit-file" desc="Fill Root Cause Analysis section">
233
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
234
+ <field name="section">Root Cause Analysis</field>
235
+ <field name="content" value="${root_cause_analysis}"/>
236
+ </block>
237
+
238
+ <block type="task" id="B24" action="edit-file" desc="Fill Suggested Fix section">
239
+ <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
240
+ <field name="section">Suggested Fix</field>
241
+ <field name="content" value="${root_cause_analysis.suggested_fix}"/>
242
+ </block>
243
+ </block>
244
+ </branch>
245
+ <branch default="true" name="No Failures">
246
+ <block type="event" id="E1" action="log" level="info" desc="Log no failures">
247
+ <field name="message">No failed tests - skipping bug report generation</field>
248
+ </block>
249
+ </branch>
250
+ </block>
251
+
252
+ <!-- Step 5: Update Test Report with Bug Links -->
253
+ <block type="gateway" id="G3" mode="exclusive" desc="Check if bug reports were generated">
254
+ <branch test="${failed_tests.count} > 0">
255
+ <block type="task" id="B25" action="edit-file" desc="Update Failed Test Details with bug links">
256
+ <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
257
+ <field name="section">Failed Test Details</field>
258
+ <field name="content" value="${failed_tests.with_bug_links}"/>
259
+ </block>
260
+ </branch>
261
+ </block>
262
+
263
+ <!-- Checkpoint: Verify outputs -->
264
+ <block type="checkpoint" id="CP1" name="reports-generated" desc="Verify test report generated">
265
+ <field name="file" value="${output_dir}/reports/${feature_name}-test-report.md"/>
266
+ <field name="verify" value="file_exists(${output_dir}/reports/${feature_name}-test-report.md)"/>
267
+ </block>
268
+
269
+ </sequence>
270
+
271
+ <!-- ============================================================
272
+ Output Results
273
+ ============================================================ -->
274
+ <block type="output" id="O1" desc="Workflow output results">
275
+ <field name="test_report_path" value="${output_dir}/reports/${feature_name}-test-report.md" type="string" desc="Path to generated test report"/>
276
+ <field name="bug_reports_dir" value="${output_dir}/bugs/" type="string" desc="Directory containing bug reports"/>
277
+ <field name="total_tests" from="${summary_stats.total_tests}" type="number" desc="Total number of tests"/>
278
+ <field name="passed_tests" from="${summary_stats.passed}" type="number" desc="Number of passed tests"/>
279
+ <field name="failed_tests" from="${summary_stats.failed}" type="number" desc="Number of failed tests"/>
280
+ <field name="bug_report_count" from="${failed_tests.count}" type="number" desc="Number of bug reports generated"/>
281
+ <field name="pass_rate" from="${summary_stats.pass_rate}" type="string" desc="Overall pass rate percentage"/>
282
+ </block>
283
+
284
+ </workflow>