speccrew 0.6.69 → 0.7.1
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.
- package/.speccrew/agents/speccrew-task-worker.md +1 -1
- package/.speccrew/agents/speccrew-team-leader.md +336 -189
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
- package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
- package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
- package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
- package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
- package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
- package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
- package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
- package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
- package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
- package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
- package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
- package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
- package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
- package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
- package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
- package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
- package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
- package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
- package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
- package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
- package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
- package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
- package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
- package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
- package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
- package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
- package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
- package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
- package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
- package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
- package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
- package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
- package/bin/cli.js +8 -1
- package/lib/commands/init.js +11 -3
- package/lib/commands/update.js +11 -3
- package/lib/commands/validate.js +565 -0
- package/lib/utils.js +43 -0
- package/package.json +1 -1
- package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
- package/workspace-template/scripts/validate-agentflow.js +637 -0
- package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1087
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
|
@@ -25,248 +25,249 @@ tools: Read, Write, Bash, Glob, Grep
|
|
|
25
25
|
**Upstream Dependencies**: speccrew-test-manager, speccrew-test-code-generator
|
|
26
26
|
**Downstream Consumers**: speccrew-test-reporter
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
> **
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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-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>nul || npm ls vitest 2>nul</platform>
|
|
90
|
+
<platform id="backend-node">npm ls jest 2>nul || npm ls mocha 2>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>
|
|
100
270
|
```
|
|
101
|
-
Environment Error: Missing test dependencies
|
|
102
|
-
- Missing: {dependency_name}
|
|
103
|
-
- Install command: {install_command}
|
|
104
|
-
|
|
105
|
-
Please install dependencies before proceeding.
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### 2.3 Check Test Configuration Files
|
|
109
|
-
|
|
110
|
-
Verify test configuration files exist:
|
|
111
|
-
|
|
112
|
-
| Framework | Config Files |
|
|
113
|
-
|-----------|--------------|
|
|
114
|
-
| Jest | `jest.config.js`, `jest.config.ts`, or `jest` field in `package.json` |
|
|
115
|
-
| Vitest | `vitest.config.ts` or `vite.config.ts` with test section |
|
|
116
|
-
| Pytest | `pytest.ini`, `pyproject.toml`, or `setup.cfg` |
|
|
117
|
-
| JUnit | `junit.xml` or build tool configuration |
|
|
118
|
-
|
|
119
|
-
### 2.4 Check Service Dependencies
|
|
120
|
-
|
|
121
|
-
Determine if the system under test requires:
|
|
122
|
-
- Database service running
|
|
123
|
-
- API server running
|
|
124
|
-
- Mock services configured
|
|
125
|
-
|
|
126
|
-
**Checkpoint A**: If any environment check fails, report specific missing items and stop execution.
|
|
127
|
-
|
|
128
|
-
**STOP IF FAILED**: IF any pre-check fails THEN:
|
|
129
|
-
1. Stop workflow immediately
|
|
130
|
-
2. Report all failures to user
|
|
131
|
-
3. Do NOT proceed to test execution
|
|
132
|
-
4. Fix all environment issues before retry
|
|
133
|
-
|
|
134
|
-
## Step 3: Execute Tests
|
|
135
|
-
|
|
136
|
-
### 3.1 Determine Test Command
|
|
137
|
-
|
|
138
|
-
Based on platform and framework, execute appropriate test command:
|
|
139
|
-
|
|
140
|
-
| Platform | Framework | Default Command |
|
|
141
|
-
|----------|-----------|-----------------|
|
|
142
|
-
| Frontend | Jest | `npm test -- --json --outputFile=test-results.json` |
|
|
143
|
-
| Frontend | Vitest | `npx vitest run --reporter=json --outputFile=test-results.json` |
|
|
144
|
-
| Backend | Jest | `npm test -- --json --outputFile=test-results.json` |
|
|
145
|
-
| Backend | Pytest | `pytest --json-report --json-report-file=test-results.json` |
|
|
146
|
-
| Desktop | Platform-specific | Depends on technology stack |
|
|
147
|
-
| Mobile | Platform-specific | Depends on technology stack |
|
|
148
|
-
|
|
149
|
-
### 3.2 Execute and Collect Output
|
|
150
|
-
|
|
151
|
-
Run the test command and collect:
|
|
152
|
-
- **Standard Output (stdout)**: Test progress and summary
|
|
153
|
-
- **Standard Error (stderr)**: Error messages and stack traces
|
|
154
|
-
- **Exit Code**: Success (0) or failure (non-zero)
|
|
155
|
-
- **Execution Duration**: Total time taken
|
|
156
|
-
- **Result Files**: JSON/XML reports if supported by framework
|
|
157
|
-
|
|
158
|
-
### 3.3 Handle Execution Errors
|
|
159
|
-
|
|
160
|
-
If test execution fails completely (e.g., syntax errors, configuration errors):
|
|
161
|
-
```
|
|
162
|
-
Test Execution Failed
|
|
163
|
-
- Error Type: {error_type}
|
|
164
|
-
- Error Message: {error_message}
|
|
165
|
-
- Suggested Fix: {suggestion}
|
|
166
|
-
|
|
167
|
-
Please fix the issue and retry.
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Step 4: Parse Results
|
|
171
|
-
|
|
172
|
-
### 4.1 Extract Test Summary
|
|
173
|
-
|
|
174
|
-
Parse test framework output to extract:
|
|
175
|
-
|
|
176
|
-
| Metric | Description |
|
|
177
|
-
|--------|-------------|
|
|
178
|
-
| Total | Total number of test cases executed |
|
|
179
|
-
| Passed | Number of passed tests |
|
|
180
|
-
| Failed | Number of failed tests |
|
|
181
|
-
| Errors | Number of tests with runtime errors |
|
|
182
|
-
| Skipped | Number of skipped tests |
|
|
183
|
-
| Duration | Total execution time |
|
|
184
|
-
|
|
185
|
-
### 4.2 Extract Test Details
|
|
186
|
-
|
|
187
|
-
For each test, extract:
|
|
188
|
-
- **Test Function Name**: Full test name/suite
|
|
189
|
-
- **TC ID**: Associated test case ID from comments
|
|
190
|
-
- **Status**: PASS / FAIL / ERROR / SKIP
|
|
191
|
-
- **Error Message**: Primary error description (if failed)
|
|
192
|
-
- **Stack Trace**: Call stack leading to failure (if failed)
|
|
193
|
-
- **Assertion Details**: Expected vs actual values (if available)
|
|
194
|
-
- **Duration**: Individual test execution time
|
|
195
|
-
|
|
196
|
-
### 4.3 Map Tests to TC IDs
|
|
197
|
-
|
|
198
|
-
Use TC ID comments in test code to reverse-map:
|
|
199
|
-
```
|
|
200
|
-
// TC-ID: TC-001
|
|
201
|
-
test('should validate user input', () => { ... });
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
Extract TC IDs from:
|
|
205
|
-
- Test file comments
|
|
206
|
-
- Test description patterns
|
|
207
|
-
- Test code plan mapping
|
|
208
|
-
|
|
209
|
-
## Step 5: Deviation Detection
|
|
210
|
-
|
|
211
|
-
### 5.1 Compare Expected vs Actual
|
|
212
|
-
|
|
213
|
-
For each test case:
|
|
214
|
-
1. Read expected result from test cases document
|
|
215
|
-
2. Compare with actual test result
|
|
216
|
-
3. Classify deviation type
|
|
217
|
-
|
|
218
|
-
### 5.2 Classify Deviation Types
|
|
219
|
-
|
|
220
|
-
| Type | Code | Description | Severity |
|
|
221
|
-
|------|------|-------------|----------|
|
|
222
|
-
| PASS | PASS | Test passed as expected | - |
|
|
223
|
-
| FAIL | FAIL | Test assertion failed - actual result differs from expected | High |
|
|
224
|
-
| ERROR | ERROR | Runtime error - code threw exception or crashed | Critical |
|
|
225
|
-
| SKIP | SKIP | Test was skipped - preconditions not met | Medium |
|
|
226
|
-
| FLAKY | FLAKY | Intermittent failure - non-deterministic behavior | High |
|
|
227
|
-
|
|
228
|
-
### 5.3 Root Cause Analysis (Basic)
|
|
229
|
-
|
|
230
|
-
For each deviation, perform initial analysis:
|
|
231
|
-
- **Assertion Failure**: Which specific assertion failed and why
|
|
232
|
-
- **Runtime Error**: Exception type and location
|
|
233
|
-
- **Skip Reason**: Why test could not execute
|
|
234
|
-
- **Flaky Pattern**: Conditions causing intermittent failure
|
|
235
|
-
|
|
236
|
-
> **Note**: Detailed root cause analysis with impact assessment is performed by speccrew-test-reporter.
|
|
237
|
-
|
|
238
|
-
## Step 6: Generate Execution Results
|
|
239
|
-
|
|
240
|
-
### 6.1 Read Template
|
|
241
|
-
|
|
242
|
-
Read template: `templates/TEST-EXECUTION-RESULT-TEMPLATE.md`
|
|
243
|
-
|
|
244
|
-
### 6.2 Copy Template to Output Path
|
|
245
|
-
|
|
246
|
-
1. **Read template** from Step 6.1
|
|
247
|
-
2. **Replace top-level placeholders** (feature name, platform, execution date, etc.)
|
|
248
|
-
3. **Create the document** using `create_file` at: `{output_dir}/{feature}-test-execution-results.md`
|
|
249
|
-
4. **Verify**: Document has complete section structure
|
|
250
|
-
|
|
251
|
-
### 6.3 Fill Each Section Using search_replace
|
|
252
|
-
|
|
253
|
-
Fill each section with test execution data.
|
|
254
|
-
|
|
255
|
-
> **CRITICAL CONSTRAINTS:**
|
|
256
|
-
> - **FORBIDDEN: `create_file` to rewrite the entire document**
|
|
257
|
-
> - **MUST use `search_replace` to fill each section individually**
|
|
258
|
-
> - **All section titles MUST be preserved**
|
|
259
|
-
|
|
260
|
-
**Section Filling Guide:**
|
|
261
|
-
|
|
262
|
-
| Section | Content |
|
|
263
|
-
|---------|---------|
|
|
264
|
-
| **Execution Summary** | Feature name, platform, test framework, execution date, duration, overall pass rate |
|
|
265
|
-
| **Results Overview** | Counts and percentages for all result types |
|
|
266
|
-
| **Test Results Detail** | Table with TC ID, test name, status, duration, error message |
|
|
267
|
-
| **Deviation Analysis** | List of all FAIL/ERROR/SKIP deviations with classification |
|
|
268
|
-
| **Environment Information** | OS, runtime, framework versions, key dependencies |
|
|
269
|
-
| **Raw Output** | Captured stdout/stderr excerpts for debugging |
|
|
270
271
|
|
|
271
272
|
## Output
|
|
272
273
|
|