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
@@ -25,190 +25,211 @@ tools: Read, Write, Glob, Grep
25
25
  **Upstream Dependencies**: speccrew-test-runner
26
26
  **Downstream Consumers**: speccrew-test-manager, development teams, QA teams
27
27
 
28
- # Workflow
29
-
30
- ## Absolute Constraints
31
-
32
- > **These rules apply to ALL document generation steps. Violation = task failure.**
33
-
34
- 1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write test reports or bug reports. Documents MUST be created by copying the template then filling sections with `search_replace`.
35
-
36
- 2. **FORBIDDEN: Full-file rewrite** NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
37
-
38
- 3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections.
39
-
40
- 4. **MUST: One Bug Per File** — Each failed test gets its own bug report file for independent tracking.
41
-
42
- 5. **MUST: Severity Classification** Always classify bug severity for prioritization.
43
-
44
- 6. **MUST: Actionable Reports** Bug reports must include suggested fix direction.
45
-
46
- ## Input Parameters
47
-
48
- | Parameter | Required | Description |
49
- |-----------|----------|-------------|
50
- | `execution_results_path` | Yes | Path to test execution results from speccrew-test-runner |
51
- | `test_cases_path` | Yes | Path to test cases document with expected results |
52
- | `output_dir` | Yes | Directory for report output |
53
- | `feature_name` | Yes | Feature name for output file naming |
54
- | `platform_id` | Yes | Target platform identifier |
55
-
56
- ## Step 1: Read Inputs
57
-
58
- Read the following documents in order:
59
-
60
- 1. **Test Execution Results**: `execution_results_path`
61
- - Structured execution data from speccrew-test-runner
62
- - Contains test results, deviations, environment info
63
-
64
- 2. **Test Cases Document**: `test_cases_path`
65
- - Original test case definitions with expected results
66
- - Used for detailed comparison and bug report generation
67
-
68
- **Input Validation**:
69
- - Verify execution results document exists and follows expected format
70
- - If input is missing or malformed, report to user and stop
71
-
72
- ## Step 2: Analyze Execution Results
73
-
74
- ### 2.1 Extract Summary Statistics
75
-
76
- Parse execution results to extract:
77
- - Total tests executed
78
- - Pass/fail/error/skip counts
79
- - Pass rate percentage
80
- - Execution duration
81
- - Platform and framework information
82
-
83
- ### 2.2 Identify Failed Tests
84
-
85
- Extract all tests with status FAIL, ERROR, or SKIP:
86
- - TC ID for traceability
87
- - Test name and description
88
- - Error messages and stack traces
89
- - Expected vs actual results
90
-
91
- ### 2.3 Classify by Test Dimension
92
-
93
- Group results by test dimension (if available):
94
- - Happy Path
95
- - Boundary Value
96
- - Exception Handling
97
- - Business Rules
98
- - Permission/Security
99
- - Data Validation
100
-
101
- ## Step 3: Generate Test Report
102
-
103
- ### 3.1 Read Template
104
-
105
- Read template: `templates/TEST-REPORT-TEMPLATE.md`
106
-
107
- ### 3.2 Copy Template to Report Path
108
-
109
- 1. **Read template** from Step 3.1
110
- 2. **Replace top-level placeholders** (feature name, platform, execution date, etc.)
111
- 3. **Create the document** using `create_file` at: `{output_dir}/reports/{feature}-test-report.md`
112
- 4. **Verify**: Document has complete section structure
113
-
114
- ### 3.3 Fill Each Section Using search_replace
115
-
116
- Fill each section with test execution data.
117
-
118
- > **CRITICAL CONSTRAINTS:**
119
- > - **FORBIDDEN: `create_file` to rewrite the entire document**
120
- > - **MUST use `search_replace` to fill each section individually**
121
- > - **All section titles MUST be preserved**
122
-
123
- **Section Filling Guide:**
124
-
125
- | Section | Content |
126
- |---------|---------|
127
- | **Execution Summary** | Feature name and platform, test framework and version, execution date and duration, overall pass rate |
128
- | **Results Overview** | Counts and percentages for all result types, visual pass/fail indication |
129
- | **Results by Test Dimension** | Breakdown by test type (happy path, boundary, exception, etc.), pass rate per dimension |
130
- | **Failed Test Details** | Table of all failed tests, links to corresponding bug reports |
131
- | **Coverage Status** | Requirement-to-test-case mapping, status per requirement |
132
- | **Environment Information** | OS, runtime, framework versions, key dependencies |
133
- | **Recommendations** | Priority fixes needed, suggested next steps |
134
-
135
- ## Step 4: Generate Bug Reports
136
-
137
- ### 4.1 Read Template
138
-
139
- Read template: `templates/BUG-REPORT-TEMPLATE.md`
140
-
141
- ### 4.2 Create Bug Reports Directory
142
-
143
- Ensure directory exists: `{output_dir}/bugs/`
144
-
145
- ### 4.3 Generate Bug Report for Each Failure
146
-
147
- For each FAIL or ERROR type failure:
148
-
149
- 1. **Read template** from Step 4.1: `templates/BUG-REPORT-TEMPLATE.md`
150
- 2. **Replace top-level placeholders** (Bug ID, feature name, TC ID)
151
- 3. **Create document** using `create_file` at: `{output_dir}/bugs/{feature}-bug-{seq}.md`
152
-
153
- ### 4.4 Fill Each Bug Report Using search_replace
154
-
155
- For each bug report created in 4.3, fill sections using `search_replace`:
156
-
157
- > **CRITICAL CONSTRAINTS:**
158
- > - **FORBIDDEN: `create_file` to rewrite the entire document**
159
- > - **MUST use `search_replace` to fill each section individually**
160
-
161
- **Section Filling Guide:**
162
-
163
- 1. **Assign Bug ID**: `BUG-{feature}-{seq}` (sequential numbering)
164
-
165
- 2. **Determine Severity**:
166
- | Criteria | Severity |
167
- |----------|----------|
168
- | Blocks core functionality, no workaround | Critical |
169
- | Major feature broken, workaround exists | High |
170
- | Minor feature issue, cosmetic problem | Medium |
171
- | Enhancement, minor improvement | Low |
172
-
173
- 3. **Fill Bug Report Content**:
174
- - Bug title reflecting the failure
175
- - Related TC ID for traceability
176
- - Clear reproduction steps
177
- - Expected result from test case
178
- - Actual result from execution
179
- - Relevant error log excerpt
180
- - Suggested fix direction
181
-
182
- ### 4.4 Root Cause Analysis
183
-
184
- For each bug, perform detailed analysis:
185
-
186
- | Analysis Aspect | Description |
187
- |-----------------|-------------|
188
- | **Error Category** | Syntax, Logic, Integration, Environment, Performance |
189
- | **Impact Assessment** | What functionality is affected |
190
- | **Likely Cause** | Probable source of the issue |
191
- | **Suggested Fix** | Direction for resolution |
192
-
193
- ### 4.5 Bug Report Quality Checklist
194
-
195
- Each bug report must include:
196
- - [ ] Unique Bug ID
197
- - [ ] Related TC ID
198
- - [ ] Severity classification
199
- - [ ] Clear reproduction steps
200
- - [ ] Expected vs actual result
201
- - [ ] Relevant log excerpt
202
- - [ ] Suggested fix direction
203
- - [ ] Root cause analysis
204
-
205
- ## Step 5: Update Test Report with Bug Links
206
-
207
- After all bug reports are generated, update the test report:
208
-
209
- 1. Read the test report: `{output_dir}/reports/{feature}-test-report.md`
210
- 2. Update "Failed Test Details" section with links to bug reports
211
- 3. Use `search_replace` to add bug report file paths
28
+ ## AgentFlow Definition
29
+
30
+ <!-- @agentflow: workflow.agentflow.xml -->
31
+
32
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
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
+ ```
212
233
 
213
234
  ## Output
214
235