speccrew 0.7.12 → 0.7.14

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.
@@ -16,167 +16,6 @@ tools: Read, Write, Glob, Grep
16
16
 
17
17
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
18
18
 
19
- ```xml
20
- <?xml version="1.0" encoding="UTF-8"?>
21
- <workflow id="test-case-design-main" status="pending" version="1.0" desc="Design structured test cases from Feature Spec and API Contract documents">
22
-
23
- <!-- Input Parameters -->
24
- <block type="input" id="I1" desc="Workflow input parameters">
25
- <field name="feature_spec_path" required="true" type="string" desc="Path to feature specification document"/>
26
- <field name="api_contract_path" required="false" type="string" desc="Path to API contract document"/>
27
- <field name="system_design_path" required="false" type="string" desc="Path to system design document"/>
28
- <field name="output_dir" required="true" type="string" desc="Directory for test case design output"/>
29
- <field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
30
- <field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
31
- <field name="module" required="true" type="string" desc="Module abbreviation (3-4 letters)"/>
32
- </block>
33
-
34
- <!-- Global Constraints -->
35
- <block type="rule" id="R1" level="forbidden" desc="Document generation constraints">
36
- <field name="text">NEVER use create_file to write the test case design document directly</field>
37
- <field name="text">MUST copy template first, then fill sections with search_replace</field>
38
- <field name="text">NEVER replace entire document content in a single operation</field>
39
- </block>
40
-
41
- <block type="rule" id="R2" level="mandatory" desc="Template-first workflow">
42
- <field name="text">Copy template MUST execute before filling sections</field>
43
- <field name="text">All section titles MUST be preserved</field>
44
- </block>
45
-
46
- <!-- Main Processing Sequence -->
47
- <sequence id="S1" name="Test Case Design" status="pending" desc="Design test cases from feature specifications">
48
-
49
- <!-- Step 1: Read Feature Spec -->
50
- <block type="task" id="B1" action="read-file" desc="Read feature specification document">
51
- <field name="path" value="${feature_spec_path}"/>
52
- <field name="output" var="feature_spec"/>
53
- </block>
54
-
55
- <!-- Step 2: Read API Contract (if provided) -->
56
- <block type="gateway" id="G1" mode="exclusive" desc="Check if API contract path is provided">
57
- <branch test="${api_contract_path} != null AND ${api_contract_path} != ''">
58
- <block type="task" id="B2" action="read-file" desc="Read API contract document">
59
- <field name="path" value="${api_contract_path}"/>
60
- <field name="output" var="api_contract"/>
61
- </block>
62
- </branch>
63
- <branch default="true" name="No API Contract">
64
- <block type="event" id="E1" action="log" level="info" desc="Log API contract skip">
65
- <field name="message">API contract path not provided, skipping API contract analysis</field>
66
- </block>
67
- </branch>
68
- </block>
69
-
70
- <!-- Step 3: Read System Design (if provided) -->
71
- <block type="gateway" id="G2" mode="exclusive" desc="Check if system design path is provided">
72
- <branch test="${system_design_path} != null AND ${system_design_path} != ''">
73
- <block type="task" id="B3" action="read-file" desc="Read system design document">
74
- <field name="path" value="${system_design_path}"/>
75
- <field name="output" var="system_design"/>
76
- </block>
77
- </branch>
78
- <branch default="true" name="No System Design">
79
- <block type="event" id="E2" action="log" level="info" desc="Log system design skip">
80
- <field name="message">System design path not provided, skipping system design analysis</field>
81
- </block>
82
- </branch>
83
- </block>
84
-
85
- <!-- Step 4: Read Testing Conventions (optional) -->
86
- <block type="task" id="B4" action="read-file" desc="Read testing conventions if available">
87
- <field name="path" value="speccrew-workspace/knowledges/techs/${platform_id}/conventions-system-test.md"/>
88
- <field name="optional" value="true"/>
89
- <field name="output" var="testing_conventions"/>
90
- </block>
91
-
92
- <!-- Step 5: Analyze Test Dimensions -->
93
- <block type="task" id="B5" action="analyze" desc="Analyze test dimensions for comprehensive coverage">
94
- <field name="analysis_dimensions">
95
- - Functional Positive Tests (Happy Path)
96
- - Boundary Value Tests
97
- - Exception/Error Handling Tests
98
- - Business Rule Constraint Tests
99
- - Permission/Security Tests
100
- - Data Validation Tests
101
- - State Transition Tests (if applicable)
102
- </field>
103
- <field name="output" var="test_dimensions_analysis"/>
104
- </block>
105
-
106
- <!-- Step 6: Generate Test Case Matrix -->
107
- <block type="task" id="B6" action="generate" desc="Generate structured test case matrix">
108
- <field name="module" value="${module}"/>
109
- <field name="naming_convention">TC-{MODULE}-{SEQ}</field>
110
- <field name="priority_mapping">
111
- - P0 (Critical) → P0-Critical
112
- - P1 (Important) → P1-High
113
- - P2 (Standard) → P2-Medium
114
- - P3 (Minor) → P3-Low
115
- </field>
116
- <field name="output" var="test_case_matrix"/>
117
- </block>
118
-
119
- <!-- Step 7: Coverage Self-Check -->
120
- <block type="task" id="B7" action="analyze" desc="Perform coverage self-check against acceptance criteria">
121
- <field name="validation_rules">
122
- - Each acceptance criterion has corresponding test case(s)
123
- - Test case fully validates the criterion
124
- - Coverage status marked for each requirement
125
- </field>
126
- <field name="output" var="coverage_check"/>
127
- </block>
128
-
129
- <!-- Step 8: Read Template -->
130
- <block type="task" id="B8" action="read-file" desc="Read test case design template">
131
- <field name="path" value="speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md"/>
132
- <field name="output" var="template_content"/>
133
- </block>
134
-
135
- <!-- Step 9: Create Output Document -->
136
- <block type="task" id="B9" action="write-file" desc="Create test case design document from template">
137
- <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
138
- <field name="template" value="${template_content}"/>
139
- <field name="output" var="document_created"/>
140
- </block>
141
-
142
- <!-- Step 10: Fill Document Sections -->
143
- <block type="task" id="B10" action="edit-file" desc="Fill Test Overview section">
144
- <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
145
- <field name="section">Test Overview</field>
146
- </block>
147
-
148
- <block type="task" id="B11" action="edit-file" desc="Fill Test Case Matrix section">
149
- <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
150
- <field name="section">Test Case Matrix</field>
151
- </block>
152
-
153
- <block type="task" id="B12" action="edit-file" desc="Fill Test Data Definition section">
154
- <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
155
- <field name="section">Test Data Definition</field>
156
- </block>
157
-
158
- <block type="task" id="B13" action="edit-file" desc="Fill Coverage Traceability section">
159
- <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
160
- <field name="section">Coverage Traceability</field>
161
- </block>
162
-
163
- <!-- Checkpoint -->
164
- <block type="checkpoint" id="CP1" name="document-complete" desc="Verify test case design document is complete">
165
- <field name="file" value="${output_dir}/${feature_name}-test-case-design.md"/>
166
- </block>
167
-
168
- </sequence>
169
-
170
- <!-- Output Results -->
171
- <block type="output" id="O1" desc="Workflow output results">
172
- <field name="test_case_design_path" value="${output_dir}/${feature_name}-test-case-design.md" type="string" desc="Path to generated test case design document"/>
173
- <field name="test_case_count" type="number" desc="Total number of test cases designed"/>
174
- <field name="coverage_status" type="string" desc="Coverage status (full/partial)"/>
175
- </block>
176
-
177
- </workflow>
178
- ```
179
-
180
19
  # Key Rules
181
20
 
182
21
  | Rule | Description |
@@ -16,206 +16,6 @@ tools: Read, Write, Glob, Grep
16
16
 
17
17
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
18
18
 
19
- ```xml
20
- <?xml version="1.0" encoding="UTF-8"?>
21
- <workflow id="test-code-gen-main" status="pending" version="1.0" desc="Generate executable test code from confirmed test case documents">
22
-
23
- <!-- Input Parameters -->
24
- <block type="input" id="I1" desc="Workflow input parameters">
25
- <field name="test_cases_path" required="true" type="string" desc="Path to test cases document"/>
26
- <field name="system_design_path" required="false" type="string" desc="Path to system design document"/>
27
- <field name="output_dir" required="true" type="string" desc="Directory for test code output"/>
28
- <field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
29
- <field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
30
- <field name="module" required="true" type="string" desc="Module name for file organization"/>
31
- </block>
32
-
33
- <!-- Global Constraints -->
34
- <block type="rule" id="R1" level="forbidden" desc="Document generation constraints">
35
- <field name="text">NEVER use create_file to write the test code plan document directly</field>
36
- <field name="text">MUST copy template first, then fill sections with search_replace for plan document</field>
37
- <field name="text">NEVER replace entire document content in a single operation</field>
38
- </block>
39
-
40
- <block type="rule" id="R2" level="mandatory" desc="Template-first workflow for plan document">
41
- <field name="text">Copy template MUST execute before filling sections for code plan document</field>
42
- <field name="text">Test source code files are written directly (NOT template-filled)</field>
43
- </block>
44
-
45
- <block type="rule" id="R3" level="mandatory" desc="TC ID traceability">
46
- <field name="text">Every test function MUST have a TC ID comment</field>
47
- <field name="text">Format: // TC-{MODULE}-{SEQ}: {description}</field>
48
- </block>
49
-
50
- <!-- Main Processing Sequence -->
51
- <sequence id="S1" name="Test Code Generation" status="pending" desc="Generate test code from test cases">
52
-
53
- <!-- Step 1: Read Test Cases -->
54
- <block type="task" id="B1" action="read-file" desc="Read confirmed test case document">
55
- <field name="path" value="${test_cases_path}"/>
56
- <field name="output" var="test_cases"/>
57
- </block>
58
-
59
- <!-- Step 2: Read Technical Conventions -->
60
- <block type="task" id="B2" action="read-file" desc="Read platform testing conventions">
61
- <field name="path" value="speccrew-workspace/knowledges/techs/${platform_id}/conventions-system-test.md"/>
62
- <field name="optional" value="true"/>
63
- <field name="output" var="system_test_conventions"/>
64
- </block>
65
-
66
- <!-- Fallback: Read unit test conventions -->
67
- <block type="gateway" id="G1" mode="exclusive" desc="Check if system test conventions found">
68
- <branch test="${system_test_conventions} == null">
69
- <block type="task" id="B3" action="read-file" desc="Read unit test conventions as fallback">
70
- <field name="path" value="speccrew-workspace/knowledges/techs/${platform_id}/conventions-unit-test.md"/>
71
- <field name="optional" value="true"/>
72
- <field name="output" var="unit_test_conventions"/>
73
- </block>
74
- </branch>
75
- </block>
76
-
77
- <!-- Step 3: Read System Design (if provided) -->
78
- <block type="gateway" id="G2" mode="exclusive" desc="Check if system design path is provided">
79
- <branch test="${system_design_path} != null AND ${system_design_path} != ''">
80
- <block type="task" id="B4" action="read-file" desc="Read system design document">
81
- <field name="path" value="${system_design_path}"/>
82
- <field name="output" var="system_design"/>
83
- </block>
84
- </branch>
85
- </block>
86
-
87
- <!-- Step 4: Generate Code Plan -->
88
- <block type="task" id="B5" action="analyze" desc="Determine file grouping strategy">
89
- <field name="grouping_rules">
90
- - IF test cases share same module/component THEN group into single test file
91
- - IF test cases are independent THEN one test file per test case
92
- - Maximum test cases per file: 10
93
- - Naming convention: {module-name}.test.{ext} or {module-name}.spec.{ext}
94
- </field>
95
- <field name="output" var="file_grouping_strategy"/>
96
- </block>
97
-
98
- <block type="task" id="B6" action="analyze" desc="Plan test file structure">
99
- <field name="analysis_focus">
100
- - Files per module
101
- - Single vs multiple files
102
- - Integration test separation
103
- </field>
104
- <field name="output" var="test_file_structure"/>
105
- </block>
106
-
107
- <block type="task" id="B7" action="analyze" desc="Plan shared resources">
108
- <field name="resource_types">
109
- - Fixtures: Common test data
110
- - Helpers: Reusable test utilities
111
- - Mocks: Shared mock definitions
112
- </field>
113
- <field name="output" var="shared_resources_plan"/>
114
- </block>
115
-
116
- <block type="task" id="B8" action="analyze" desc="Plan mock/stub strategy">
117
- <field name="dependency_types">
118
- - Database: Mock repository/DAO or use test database
119
- - External API: Mock HTTP client or use stub server
120
- - File System: Mock file operations or use temp directory
121
- - Message Queue: Mock producer/consumer
122
- - Cache: Mock cache client or use in-memory cache
123
- </field>
124
- <field name="output" var="mock_strategy"/>
125
- </block>
126
-
127
- <block type="task" id="B9" action="analyze" desc="Create file-to-testcase mapping">
128
- <field name="output" var="file_case_mapping"/>
129
- </block>
130
-
131
- <!-- Step 5: Checkpoint - Present Code Plan for Confirmation -->
132
- <block type="task" id="B10" action="generate" desc="Generate code plan summary">
133
- <field name="output" var="code_plan_summary"/>
134
- </block>
135
-
136
- <block type="event" id="E1" action="confirm" title="Confirm Test Code Plan" type="yesno" desc="Wait for user confirmation before generating code">
137
- <field name="preview" value="${code_plan_summary}"/>
138
- <on-confirm>
139
- <field name="confirmed" value="true"/>
140
- </on-confirm>
141
- <on-cancel>
142
- <field name="workflow.status" value="cancelled"/>
143
- </on-cancel>
144
- </block>
145
-
146
- <!-- Step 6: Generate Test Code -->
147
- <block type="task" id="B11" action="generate" desc="Generate fixtures">
148
- <field name="output_dir" value="${output_dir}/__fixtures__"/>
149
- <field name="output" var="fixtures_generated"/>
150
- </block>
151
-
152
- <block type="task" id="B12" action="generate" desc="Generate helpers">
153
- <field name="output_dir" value="${output_dir}/__helpers__"/>
154
- <field name="output" var="helpers_generated"/>
155
- </block>
156
-
157
- <block type="task" id="B13" action="generate" desc="Generate mocks">
158
- <field name="output_dir" value="${output_dir}/__mocks__"/>
159
- <field name="output" var="mocks_generated"/>
160
- </block>
161
-
162
- <block type="loop" id="L1" over="${file_case_mapping.files}" as="file_mapping" desc="Generate test files">
163
- <block type="task" id="B14" action="generate" desc="Generate test file ${file_mapping.file_name}">
164
- <field name="tc_annotation_format">// TC-{MODULE}-{SEQ}: {description}</field>
165
- <field name="test_structure">Arrange-Act-Assert</field>
166
- <field name="output_path" value="${output_dir}/${file_mapping.file_name}"/>
167
- </block>
168
- </block>
169
-
170
- <!-- Step 7: Write Code Plan Document -->
171
- <block type="task" id="B15" action="read-file" desc="Read test code plan template">
172
- <field name="path" value="speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md"/>
173
- <field name="output" var="plan_template"/>
174
- </block>
175
-
176
- <block type="task" id="B16" action="write-file" desc="Create test code plan document">
177
- <field name="path" value="${output_dir}/${feature_name}-test-code-plan.md"/>
178
- <field name="template" value="${plan_template}"/>
179
- <field name="output" var="plan_document_created"/>
180
- </block>
181
-
182
- <block type="task" id="B17" action="edit-file" desc="Fill File-to-TestCase Mapping section">
183
- <field name="path" value="${output_dir}/${feature_name}-test-code-plan.md"/>
184
- <field name="section">File-to-TestCase Mapping</field>
185
- </block>
186
-
187
- <block type="task" id="B18" action="edit-file" desc="Fill Mock Strategy section">
188
- <field name="path" value="${output_dir}/${feature_name}-test-code-plan.md"/>
189
- <field name="section">Mock Strategy</field>
190
- </block>
191
-
192
- <block type="task" id="B19" action="edit-file" desc="Fill Shared Resources section">
193
- <field name="path" value="${output_dir}/${feature_name}-test-code-plan.md"/>
194
- <field name="section">Shared Resources</field>
195
- </block>
196
-
197
- <block type="task" id="B20" action="edit-file" desc="Fill Test File Structure section">
198
- <field name="path" value="${output_dir}/${feature_name}-test-code-plan.md"/>
199
- <field name="section">Test File Structure</field>
200
- </block>
201
-
202
- <!-- Checkpoint -->
203
- <block type="checkpoint" id="CP1" name="code-generation-complete" desc="Verify test code generation complete">
204
- <field name="file" value="${output_dir}/${feature_name}-test-code-plan.md"/>
205
- </block>
206
-
207
- </sequence>
208
-
209
- <!-- Output Results -->
210
- <block type="output" id="O1" desc="Workflow output results">
211
- <field name="test_code_plan_path" value="${output_dir}/${feature_name}-test-code-plan.md" type="string" desc="Path to test code plan document"/>
212
- <field name="test_files" type="array" desc="List of generated test files"/>
213
- <field name="total_test_cases" type="number" desc="Total number of test cases implemented"/>
214
- </block>
215
-
216
- </workflow>
217
- ```
218
-
219
19
  # Key Rules
220
20
 
221
21
  | Rule | Description |
@@ -31,206 +31,6 @@ tools: Read, Write, Glob, Grep
31
31
 
32
32
  > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
33
33
 
34
- ```xml
35
- <?xml version="1.0" encoding="UTF-8"?>
36
- <workflow id="test-reporter-main" status="pending" version="1.0" desc="Generate comprehensive test reports and individual bug reports from test execution results">
37
-
38
- <!-- Input Parameters -->
39
- <block type="input" id="I1" desc="Workflow input parameters">
40
- <field name="execution_results_path" required="true" type="string" desc="Path to test execution results from speccrew-test-runner"/>
41
- <field name="test_cases_path" required="true" type="string" desc="Path to test cases document with expected results"/>
42
- <field name="output_dir" required="true" type="string" desc="Directory for report output"/>
43
- <field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
44
- <field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
45
- </block>
46
-
47
- <!-- Global Constraints -->
48
- <block type="rule" id="R1" level="forbidden" desc="Document generation constraints">
49
- <field name="text">NEVER use create_file to write test reports or bug reports directly</field>
50
- <field name="text">MUST copy template first, then fill sections with search_replace</field>
51
- <field name="text">NEVER replace entire document content in a single operation</field>
52
- </block>
53
-
54
- <block type="rule" id="R2" level="mandatory" desc="Template-first workflow">
55
- <field name="text">Copy template MUST execute before filling sections</field>
56
- <field name="text">All section titles MUST be preserved</field>
57
- </block>
58
-
59
- <block type="rule" id="R3" level="mandatory" desc="Bug report requirements">
60
- <field name="text">Each failed test gets its own bug report file for independent tracking</field>
61
- <field name="text">Always classify bug severity for prioritization</field>
62
- <field name="text">Bug reports must include suggested fix direction</field>
63
- </block>
64
-
65
- <!-- Main Processing Sequence -->
66
- <sequence id="S1" name="Test Reporting" status="pending" desc="Generate test reports and bug reports">
67
-
68
- <!-- Step 1: Read Inputs -->
69
- <block type="task" id="B1" action="read-file" desc="Read test execution results">
70
- <field name="path" value="${execution_results_path}"/>
71
- <field name="output" var="execution_results"/>
72
- </block>
73
-
74
- <block type="task" id="B2" action="read-file" desc="Read test cases document">
75
- <field name="path" value="${test_cases_path}"/>
76
- <field name="output" var="test_cases"/>
77
- </block>
78
-
79
- <!-- Step 2: Analyze Execution Results -->
80
- <block type="task" id="B3" action="analyze" desc="Extract summary statistics">
81
- <field name="extract_fields">
82
- - total_tests
83
- - passed
84
- - failed
85
- - errors
86
- - skipped
87
- - pass_rate
88
- - execution_duration
89
- - platform
90
- - framework
91
- </field>
92
- <field name="output" var="summary_stats"/>
93
- </block>
94
-
95
- <block type="task" id="B4" action="analyze" desc="Identify failed tests">
96
- <field name="filter_status">FAIL, ERROR, SKIP</field>
97
- <field name="output" var="failed_tests"/>
98
- </block>
99
-
100
- <block type="task" id="B5" action="analyze" desc="Classify by test dimension">
101
- <field name="dimensions">
102
- - Happy Path
103
- - Boundary Value
104
- - Exception Handling
105
- - Business Rules
106
- - Permission/Security
107
- - Data Validation
108
- </field>
109
- <field name="output" var="dimension_breakdown"/>
110
- </block>
111
-
112
- <!-- Step 3: Generate Test Report -->
113
- <block type="task" id="B6" action="read-file" desc="Read test report template">
114
- <field name="path" value="speccrew-test-reporter/templates/TEST-REPORT-TEMPLATE.md"/>
115
- <field name="output" var="report_template"/>
116
- </block>
117
-
118
- <block type="task" id="B7" action="write-file" desc="Create test report document">
119
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
120
- <field name="template" value="${report_template}"/>
121
- <field name="output" var="report_created"/>
122
- </block>
123
-
124
- <block type="task" id="B8" action="edit-file" desc="Fill Execution Summary section">
125
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
126
- <field name="section">Execution Summary</field>
127
- </block>
128
-
129
- <block type="task" id="B9" action="edit-file" desc="Fill Results Overview section">
130
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
131
- <field name="section">Results Overview</field>
132
- </block>
133
-
134
- <block type="task" id="B10" action="edit-file" desc="Fill Results by Test Dimension section">
135
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
136
- <field name="section">Results by Test Dimension</field>
137
- </block>
138
-
139
- <block type="task" id="B11" action="edit-file" desc="Fill Failed Test Details section">
140
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
141
- <field name="section">Failed Test Details</field>
142
- </block>
143
-
144
- <block type="task" id="B12" action="edit-file" desc="Fill Coverage Status section">
145
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
146
- <field name="section">Coverage Status</field>
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
- </block>
153
-
154
- <block type="task" id="B14" action="edit-file" desc="Fill Recommendations section">
155
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
156
- <field name="section">Recommendations</field>
157
- </block>
158
-
159
- <!-- Step 4: Generate Bug Reports -->
160
- <block type="gateway" id="G1" mode="exclusive" desc="Check if there are failed tests">
161
- <branch test="${failed_tests.count} > 0">
162
- <block type="task" id="B15" action="read-file" desc="Read bug report template">
163
- <field name="path" value="speccrew-test-reporter/templates/BUG-REPORT-TEMPLATE.md"/>
164
- <field name="output" var="bug_template"/>
165
- </block>
166
-
167
- <block type="loop" id="L1" over="${failed_tests.items}" as="failure" desc="Generate bug report for each failure">
168
- <block type="task" id="B16" action="analyze" desc="Determine bug severity">
169
- <field name="severity_criteria">
170
- - Critical: Blocks core functionality, no workaround
171
- - High: Major feature broken, workaround exists
172
- - Medium: Minor feature issue, cosmetic problem
173
- - Low: Enhancement, minor improvement
174
- </field>
175
- <field name="output" var="bug_severity"/>
176
- </block>
177
-
178
- <block type="task" id="B17" action="analyze" desc="Perform root cause analysis">
179
- <field name="analysis_aspects">
180
- - Error Category: Syntax, Logic, Integration, Environment, Performance
181
- - Impact Assessment: What functionality is affected
182
- - Likely Cause: Probable source of the issue
183
- - Suggested Fix: Direction for resolution
184
- </field>
185
- <field name="output" var="root_cause_analysis"/>
186
- </block>
187
-
188
- <block type="task" id="B18" action="write-file" desc="Create bug report">
189
- <field name="path" value="${output_dir}/bugs/${feature_name}-bug-${failure.sequence}.md"/>
190
- <field name="template" value="${bug_template}"/>
191
- </block>
192
-
193
- <block type="task" id="B19" action="edit-file" desc="Fill Bug Description section"/>
194
- <block type="task" id="B20" action="edit-file" desc="Fill Reproduction Steps section"/>
195
- <block type="task" id="B21" action="edit-file" desc="Fill Expected vs Actual section"/>
196
- <block type="task" id="B22" action="edit-file" desc="Fill Error Log section"/>
197
- <block type="task" id="B23" action="edit-file" desc="Fill Root Cause Analysis section"/>
198
- <block type="task" id="B24" action="edit-file" desc="Fill Suggested Fix section"/>
199
- </block>
200
- </branch>
201
- </block>
202
-
203
- <!-- Step 5: Update Test Report with Bug Links -->
204
- <block type="gateway" id="G2" mode="exclusive" desc="Check if bug reports were generated">
205
- <branch test="${failed_tests.count} > 0">
206
- <block type="task" id="B25" action="edit-file" desc="Update Failed Test Details with bug links">
207
- <field name="path" value="${output_dir}/reports/${feature_name}-test-report.md"/>
208
- <field name="section">Failed Test Details</field>
209
- </block>
210
- </branch>
211
- </block>
212
-
213
- <!-- Checkpoint -->
214
- <block type="checkpoint" id="CP1" name="reports-generated" desc="Verify test report generated">
215
- <field name="file" value="${output_dir}/reports/${feature_name}-test-report.md"/>
216
- </block>
217
-
218
- </sequence>
219
-
220
- <!-- Output Results -->
221
- <block type="output" id="O1" desc="Workflow output results">
222
- <field name="test_report_path" value="${output_dir}/reports/${feature_name}-test-report.md" type="string" desc="Path to generated test report"/>
223
- <field name="bug_reports_dir" value="${output_dir}/bugs/" type="string" desc="Directory containing bug reports"/>
224
- <field name="total_tests" type="number" desc="Total number of tests"/>
225
- <field name="passed_tests" type="number" desc="Number of passed tests"/>
226
- <field name="failed_tests" type="number" desc="Number of failed tests"/>
227
- <field name="bug_report_count" type="number" desc="Number of bug reports generated"/>
228
- <field name="pass_rate" type="string" desc="Overall pass rate percentage"/>
229
- </block>
230
-
231
- </workflow>
232
- ```
233
-
234
34
  ## Output
235
35
 
236
36
  ### Output Files