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.
@@ -31,244 +31,6 @@ tools: Read, Write, Bash, 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-runner-main" status="pending" version="1.0" desc="Execute test code, parse results, and detect deviations between expected and actual outcomes">
37
-
38
- <!-- Input Parameters -->
39
- <block type="input" id="I1" desc="Workflow input parameters">
40
- <field name="test_code_plan_path" required="true" type="string" desc="Path to test code plan document with test file mappings"/>
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 execution results 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="mandatory" desc="Environment verification">
49
- <field name="text">Always verify environment before running tests - never skip pre-checks</field>
50
- <field name="text">Capture both stdout and stderr for diagnostics</field>
51
- </block>
52
-
53
- <block type="rule" id="R2" level="mandatory" desc="TC ID traceability">
54
- <field name="text">Every test result must be traced back to its TC ID</field>
55
- <field name="text">Extract TC IDs from test file comments</field>
56
- </block>
57
-
58
- <block type="rule" id="R3" level="forbidden" desc="Report generation restriction">
59
- <field name="text">This skill does NOT generate human-readable reports or bug documents</field>
60
- <field name="text">Output must be structured data for downstream consumption</field>
61
- </block>
62
-
63
- <!-- Main Processing Sequence -->
64
- <sequence id="S1" name="Test Execution" status="pending" desc="Execute tests and generate structured results">
65
-
66
- <!-- Step 1: Read Inputs -->
67
- <block type="task" id="B1" action="read-file" desc="Read test code plan document">
68
- <field name="path" value="${test_code_plan_path}"/>
69
- <field name="output" var="test_code_plan"/>
70
- </block>
71
-
72
- <block type="task" id="B2" action="read-file" desc="Read test cases document">
73
- <field name="path" value="${test_cases_path}"/>
74
- <field name="output" var="test_cases"/>
75
- </block>
76
-
77
- <!-- Step 2: Environment Pre-check -->
78
- <block type="task" id="B3" action="run-script" desc="Check runtime availability">
79
- <field name="command">
80
- <platform id="frontend">node --version</platform>
81
- <platform id="backend-node">node --version</platform>
82
- <platform id="backend-python">python --version</platform>
83
- </field>
84
- <field name="output" var="runtime_check"/>
85
- </block>
86
-
87
- <block type="task" id="B4" action="run-script" desc="Check test dependencies">
88
- <field name="command">
89
- <platform id="frontend">npm ls jest 2&gt;nul || npm ls vitest 2&gt;nul</platform>
90
- <platform id="backend-node">npm ls jest 2&gt;nul || npm ls mocha 2&gt;nul</platform>
91
- <platform id="backend-python">pip show pytest</platform>
92
- </field>
93
- <field name="output" var="dependency_check"/>
94
- </block>
95
-
96
- <block type="task" id="B5" action="analyze" desc="Check test configuration files">
97
- <field name="config_files">
98
- - Jest: jest.config.js, jest.config.ts, or jest field in package.json
99
- - Vitest: vitest.config.ts or vite.config.ts with test section
100
- - Pytest: pytest.ini, pyproject.toml, or setup.cfg
101
- - JUnit: junit.xml or build tool configuration
102
- </field>
103
- <field name="output" var="config_check"/>
104
- </block>
105
-
106
- <block type="task" id="B6" action="analyze" desc="Check service dependencies">
107
- <field name="check_items">
108
- - Database service running
109
- - API server running
110
- - Mock services configured
111
- </field>
112
- <field name="output" var="service_check"/>
113
- </block>
114
-
115
- <!-- Gateway: Stop if environment check fails -->
116
- <block type="gateway" id="G1" mode="guard" desc="Validate environment pre-check"
117
- test="${runtime_check.success} == true AND ${dependency_check.success} == true"
118
- fail-action="stop">
119
- <field name="message">Environment pre-check failed</field>
120
- </block>
121
-
122
- <!-- Step 3: Execute Tests -->
123
- <block type="task" id="B7" action="analyze" desc="Determine test command">
124
- <field name="command_mapping">
125
- - Frontend/Jest: npm test -- --json --outputFile=test-results.json
126
- - Frontend/Vitest: npx vitest run --reporter=json --outputFile=test-results.json
127
- - Backend/Jest: npm test -- --json --outputFile=test-results.json
128
- - Backend/Pytest: pytest --json-report --json-report-file=test-results.json
129
- </field>
130
- <field name="output" var="test_command"/>
131
- </block>
132
-
133
- <block type="task" id="B8" action="run-script" desc="Execute test command">
134
- <field name="command" value="${test_command}"/>
135
- <field name="capture_stdout" value="true"/>
136
- <field name="capture_stderr" value="true"/>
137
- <field name="capture_exit_code" value="true"/>
138
- <field name="output" var="test_execution"/>
139
- </block>
140
-
141
- <!-- Step 4: Parse Results -->
142
- <block type="task" id="B9" action="analyze" desc="Extract test summary">
143
- <field name="extract_fields">
144
- - total: Total number of test cases executed
145
- - passed: Number of passed tests
146
- - failed: Number of failed tests
147
- - errors: Number of tests with runtime errors
148
- - skipped: Number of skipped tests
149
- - duration: Total execution time
150
- </field>
151
- <field name="output" var="test_summary"/>
152
- </block>
153
-
154
- <block type="task" id="B10" action="analyze" desc="Extract test details">
155
- <field name="extract_fields">
156
- - test_function_name: Full test name/suite
157
- - tc_id: Associated test case ID from comments
158
- - status: PASS / FAIL / ERROR / SKIP
159
- - error_message: Primary error description
160
- - stack_trace: Call stack leading to failure
161
- - assertion_details: Expected vs actual values
162
- - duration: Individual test execution time
163
- </field>
164
- <field name="output" var="test_details"/>
165
- </block>
166
-
167
- <block type="task" id="B11" action="analyze" desc="Map tests to TC IDs">
168
- <field name="tc_id_pattern">TC-{MODULE}-{SEQ}</field>
169
- <field name="extraction_sources">
170
- - Test file comments
171
- - Test description patterns
172
- - Test code plan mapping
173
- </field>
174
- <field name="output" var="tc_id_mapping"/>
175
- </block>
176
-
177
- <!-- Step 5: Deviation Detection -->
178
- <block type="task" id="B12" action="analyze" desc="Compare expected vs actual results">
179
- <field name="comparison_fields">
180
- - expected_result: From test cases document
181
- - actual_result: From test execution
182
- - deviation_type: Classification of difference
183
- </field>
184
- <field name="output" var="deviation_comparison"/>
185
- </block>
186
-
187
- <block type="task" id="B13" action="analyze" desc="Classify deviation types">
188
- <field name="deviation_types">
189
- - PASS: Test passed as expected
190
- - FAIL: Test assertion failed - actual differs from expected (Severity: High)
191
- - ERROR: Runtime error - code threw exception (Severity: Critical)
192
- - SKIP: Test was skipped - preconditions not met (Severity: Medium)
193
- - FLAKY: Intermittent failure - non-deterministic behavior (Severity: High)
194
- </field>
195
- <field name="output" var="deviation_classification"/>
196
- </block>
197
-
198
- <block type="task" id="B14" action="analyze" desc="Perform basic root cause analysis">
199
- <field name="analysis_focus">
200
- - Assertion Failure: Which specific assertion failed and why
201
- - Runtime Error: Exception type and location
202
- - Skip Reason: Why test could not execute
203
- - Flaky Pattern: Conditions causing intermittent failure
204
- </field>
205
- <field name="output" var="root_cause_basic"/>
206
- </block>
207
-
208
- <!-- Step 6: Generate Execution Results -->
209
- <block type="task" id="B15" action="read-file" desc="Read test execution results template">
210
- <field name="path" value="speccrew-test-runner/templates/TEST-EXECUTION-RESULT-TEMPLATE.md"/>
211
- <field name="output" var="results_template"/>
212
- </block>
213
-
214
- <block type="task" id="B16" action="write-file" desc="Create execution results document">
215
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
216
- <field name="template" value="${results_template}"/>
217
- <field name="output" var="results_created"/>
218
- </block>
219
-
220
- <block type="task" id="B17" action="edit-file" desc="Fill Execution Summary section">
221
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
222
- <field name="section">Execution Summary</field>
223
- </block>
224
-
225
- <block type="task" id="B18" action="edit-file" desc="Fill Results Overview section">
226
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
227
- <field name="section">Results Overview</field>
228
- </block>
229
-
230
- <block type="task" id="B19" action="edit-file" desc="Fill Test Results Detail section">
231
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
232
- <field name="section">Test Results Detail</field>
233
- </block>
234
-
235
- <block type="task" id="B20" action="edit-file" desc="Fill Deviation Analysis section">
236
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
237
- <field name="section">Deviation Analysis</field>
238
- </block>
239
-
240
- <block type="task" id="B21" action="edit-file" desc="Fill Environment Information section">
241
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
242
- <field name="section">Environment Information</field>
243
- </block>
244
-
245
- <block type="task" id="B22" action="edit-file" desc="Fill Raw Output section">
246
- <field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
247
- <field name="section">Raw Output</field>
248
- </block>
249
-
250
- <!-- Checkpoint -->
251
- <block type="checkpoint" id="CP1" name="execution-results-generated" desc="Verify execution results generated">
252
- <field name="file" value="${output_dir}/${feature_name}-test-execution-results.md"/>
253
- </block>
254
-
255
- </sequence>
256
-
257
- <!-- Output Results -->
258
- <block type="output" id="O1" desc="Workflow output results">
259
- <field name="execution_results_path" value="${output_dir}/${feature_name}-test-execution-results.md" type="string" desc="Path to structured test execution results"/>
260
- <field name="total_tests" type="number" desc="Total number of tests executed"/>
261
- <field name="passed" type="number" desc="Number of passed tests"/>
262
- <field name="failed" type="number" desc="Number of failed tests"/>
263
- <field name="errors" type="number" desc="Number of tests with errors"/>
264
- <field name="skipped" type="number" desc="Number of skipped tests"/>
265
- <field name="pass_rate" type="string" desc="Overall pass rate percentage"/>
266
- <field name="next_step" value="Dispatch to speccrew-test-reporter for report generation" type="string" desc="Recommended next step"/>
267
- </block>
268
-
269
- </workflow>
270
- ```
271
-
272
34
  ## Output
273
35
 
274
36
  ### Output Files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.12",
3
+ "version": "0.7.14",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {