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
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<workflow id="test-runner-main" status="pending" version="1.0" desc="Execute test code, parse results, and detect deviations between expected and actual outcomes">
|
|
3
|
+
|
|
4
|
+
<!-- ============================================================
|
|
5
|
+
Input Parameters Definition
|
|
6
|
+
============================================================ -->
|
|
7
|
+
<block type="input" id="I1" desc="Workflow input parameters">
|
|
8
|
+
<field name="test_code_plan_path" required="true" type="string" desc="Path to test code plan document with test file mappings"/>
|
|
9
|
+
<field name="test_cases_path" required="true" type="string" desc="Path to test cases document with expected results"/>
|
|
10
|
+
<field name="output_dir" required="true" type="string" desc="Directory for execution results output"/>
|
|
11
|
+
<field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
|
|
12
|
+
<field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
|
|
13
|
+
</block>
|
|
14
|
+
|
|
15
|
+
<!-- ============================================================
|
|
16
|
+
Global Constraints
|
|
17
|
+
============================================================ -->
|
|
18
|
+
<block type="rule" id="R1" level="mandatory" desc="Environment verification">
|
|
19
|
+
<field name="text">Always verify environment before running tests - never skip pre-checks</field>
|
|
20
|
+
<field name="text">Capture both stdout and stderr for diagnostics</field>
|
|
21
|
+
</block>
|
|
22
|
+
|
|
23
|
+
<block type="rule" id="R2" level="mandatory" desc="TC ID traceability">
|
|
24
|
+
<field name="text">Every test result must be traced back to its TC ID</field>
|
|
25
|
+
<field name="text">Extract TC IDs from test file comments</field>
|
|
26
|
+
</block>
|
|
27
|
+
|
|
28
|
+
<block type="rule" id="R3" level="forbidden" desc="Report generation restriction">
|
|
29
|
+
<field name="text">This skill does NOT generate human-readable reports or bug documents</field>
|
|
30
|
+
<field name="text">Output must be structured data for downstream consumption</field>
|
|
31
|
+
</block>
|
|
32
|
+
|
|
33
|
+
<!-- ============================================================
|
|
34
|
+
Main Processing Sequence
|
|
35
|
+
============================================================ -->
|
|
36
|
+
<sequence id="S1" name="Test Execution" status="pending" desc="Execute tests and generate structured results">
|
|
37
|
+
|
|
38
|
+
<!-- Step 1: Read Inputs -->
|
|
39
|
+
<block type="task" id="B1" action="read-file" desc="Read test code plan document">
|
|
40
|
+
<field name="path" value="${test_code_plan_path}"/>
|
|
41
|
+
<field name="output" var="test_code_plan"/>
|
|
42
|
+
</block>
|
|
43
|
+
|
|
44
|
+
<block type="task" id="B2" action="read-file" desc="Read test cases document">
|
|
45
|
+
<field name="path" value="${test_cases_path}"/>
|
|
46
|
+
<field name="output" var="test_cases"/>
|
|
47
|
+
</block>
|
|
48
|
+
|
|
49
|
+
<!-- Step 2: Environment Pre-check -->
|
|
50
|
+
<block type="task" id="B3" action="run-script" desc="Check runtime availability">
|
|
51
|
+
<field name="command">
|
|
52
|
+
<platform id="frontend">node --version</platform>
|
|
53
|
+
<platform id="backend-node">node --version</platform>
|
|
54
|
+
<platform id="backend-python">python --version</platform>
|
|
55
|
+
<platform id="default">echo "Runtime check for ${platform_id}"</platform>
|
|
56
|
+
</field>
|
|
57
|
+
<field name="output" var="runtime_check"/>
|
|
58
|
+
</block>
|
|
59
|
+
|
|
60
|
+
<block type="task" id="B4" action="run-script" desc="Check test dependencies">
|
|
61
|
+
<field name="command">
|
|
62
|
+
<platform id="frontend">npm ls jest 2>nul || npm ls vitest 2>nul</platform>
|
|
63
|
+
<platform id="backend-node">npm ls jest 2>nul || npm ls mocha 2>nul</platform>
|
|
64
|
+
<platform id="backend-python">pip show pytest</platform>
|
|
65
|
+
<platform id="default">echo "Dependency check for ${platform_id}"</platform>
|
|
66
|
+
</field>
|
|
67
|
+
<field name="output" var="dependency_check"/>
|
|
68
|
+
</block>
|
|
69
|
+
|
|
70
|
+
<block type="task" id="B5" action="analyze" desc="Check test configuration files">
|
|
71
|
+
<field name="platform_id" value="${platform_id}"/>
|
|
72
|
+
<field name="framework" value="${test_code_plan.framework}"/>
|
|
73
|
+
<field name="config_files">
|
|
74
|
+
- Jest: jest.config.js, jest.config.ts, or jest field in package.json
|
|
75
|
+
- Vitest: vitest.config.ts or vite.config.ts with test section
|
|
76
|
+
- Pytest: pytest.ini, pyproject.toml, or setup.cfg
|
|
77
|
+
- JUnit: junit.xml or build tool configuration
|
|
78
|
+
</field>
|
|
79
|
+
<field name="output" var="config_check"/>
|
|
80
|
+
</block>
|
|
81
|
+
|
|
82
|
+
<block type="task" id="B6" action="analyze" desc="Check service dependencies">
|
|
83
|
+
<field name="test_code_plan" value="${test_code_plan}"/>
|
|
84
|
+
<field name="check_items">
|
|
85
|
+
- Database service running
|
|
86
|
+
- API server running
|
|
87
|
+
- Mock services configured
|
|
88
|
+
</field>
|
|
89
|
+
<field name="output" var="service_check"/>
|
|
90
|
+
</block>
|
|
91
|
+
|
|
92
|
+
<!-- Gateway: Stop if environment check fails -->
|
|
93
|
+
<block type="gateway" id="G1" mode="guard" desc="Validate environment pre-check"
|
|
94
|
+
test="${runtime_check.success} == true AND ${dependency_check.success} == true AND ${config_check.exists} == true"
|
|
95
|
+
fail-action="stop">
|
|
96
|
+
<field name="message">Environment pre-check failed. Runtime: ${runtime_check.success}, Dependencies: ${dependency_check.success}, Config: ${config_check.exists}</field>
|
|
97
|
+
</block>
|
|
98
|
+
|
|
99
|
+
<!-- Step 3: Execute Tests -->
|
|
100
|
+
<block type="task" id="B7" action="analyze" desc="Determine test command">
|
|
101
|
+
<field name="platform_id" value="${platform_id}"/>
|
|
102
|
+
<field name="framework" value="${test_code_plan.framework}"/>
|
|
103
|
+
<field name="command_mapping">
|
|
104
|
+
- Frontend/Jest: npm test -- --json --outputFile=test-results.json
|
|
105
|
+
- Frontend/Vitest: npx vitest run --reporter=json --outputFile=test-results.json
|
|
106
|
+
- Backend/Jest: npm test -- --json --outputFile=test-results.json
|
|
107
|
+
- Backend/Pytest: pytest --json-report --json-report-file=test-results.json
|
|
108
|
+
</field>
|
|
109
|
+
<field name="output" var="test_command"/>
|
|
110
|
+
</block>
|
|
111
|
+
|
|
112
|
+
<block type="task" id="B8" action="run-script" desc="Execute test command">
|
|
113
|
+
<field name="command" value="${test_command}"/>
|
|
114
|
+
<field name="capture_stdout" value="true"/>
|
|
115
|
+
<field name="capture_stderr" value="true"/>
|
|
116
|
+
<field name="capture_exit_code" value="true"/>
|
|
117
|
+
<field name="output" var="test_execution"/>
|
|
118
|
+
</block>
|
|
119
|
+
|
|
120
|
+
<!-- Gateway: Handle execution errors -->
|
|
121
|
+
<block type="gateway" id="G2" mode="exclusive" desc="Check test execution result">
|
|
122
|
+
<branch test="${test_execution.exit_code} != 0 AND ${test_execution.syntax_error} == true">
|
|
123
|
+
<block type="event" id="E1" action="log" level="error" desc="Log syntax error">
|
|
124
|
+
<field name="message">Test execution failed due to syntax errors: ${test_execution.stderr}</field>
|
|
125
|
+
</block>
|
|
126
|
+
<block type="error-handler" id="EH1" desc="Handle syntax error">
|
|
127
|
+
<catch error-type="syntax_error">
|
|
128
|
+
<field name="action">STOP - Fix syntax errors and retry</field>
|
|
129
|
+
</catch>
|
|
130
|
+
</block>
|
|
131
|
+
</branch>
|
|
132
|
+
<branch test="${test_execution.exit_code} != 0 AND ${test_execution.config_error} == true">
|
|
133
|
+
<block type="event" id="E2" action="log" level="error" desc="Log config error">
|
|
134
|
+
<field name="message">Test execution failed due to configuration errors: ${test_execution.stderr}</field>
|
|
135
|
+
</block>
|
|
136
|
+
<block type="error-handler" id="EH2" desc="Handle config error">
|
|
137
|
+
<catch error-type="config_error">
|
|
138
|
+
<field name="action">STOP - Fix configuration and retry</field>
|
|
139
|
+
</catch>
|
|
140
|
+
</block>
|
|
141
|
+
</branch>
|
|
142
|
+
</block>
|
|
143
|
+
|
|
144
|
+
<!-- Step 4: Parse Results -->
|
|
145
|
+
<block type="task" id="B9" action="analyze" desc="Extract test summary">
|
|
146
|
+
<field name="input_execution" value="${test_execution}"/>
|
|
147
|
+
<field name="extract_fields">
|
|
148
|
+
- total: Total number of test cases executed
|
|
149
|
+
- passed: Number of passed tests
|
|
150
|
+
- failed: Number of failed tests
|
|
151
|
+
- errors: Number of tests with runtime errors
|
|
152
|
+
- skipped: Number of skipped tests
|
|
153
|
+
- duration: Total execution time
|
|
154
|
+
</field>
|
|
155
|
+
<field name="output" var="test_summary"/>
|
|
156
|
+
</block>
|
|
157
|
+
|
|
158
|
+
<block type="task" id="B10" action="analyze" desc="Extract test details">
|
|
159
|
+
<field name="input_execution" value="${test_execution}"/>
|
|
160
|
+
<field name="input_test_files" value="${test_code_plan.test_files}"/>
|
|
161
|
+
<field name="extract_fields">
|
|
162
|
+
- test_function_name: Full test name/suite
|
|
163
|
+
- tc_id: Associated test case ID from comments
|
|
164
|
+
- status: PASS / FAIL / ERROR / SKIP
|
|
165
|
+
- error_message: Primary error description
|
|
166
|
+
- stack_trace: Call stack leading to failure
|
|
167
|
+
- assertion_details: Expected vs actual values
|
|
168
|
+
- duration: Individual test execution time
|
|
169
|
+
</field>
|
|
170
|
+
<field name="output" var="test_details"/>
|
|
171
|
+
</block>
|
|
172
|
+
|
|
173
|
+
<block type="task" id="B11" action="analyze" desc="Map tests to TC IDs">
|
|
174
|
+
<field name="input_test_details" value="${test_details}"/>
|
|
175
|
+
<field name="input_test_cases" value="${test_cases}"/>
|
|
176
|
+
<field name="tc_id_pattern">TC-{MODULE}-{SEQ}</field>
|
|
177
|
+
<field name="extraction_sources">
|
|
178
|
+
- Test file comments
|
|
179
|
+
- Test description patterns
|
|
180
|
+
- Test code plan mapping
|
|
181
|
+
</field>
|
|
182
|
+
<field name="output" var="tc_id_mapping"/>
|
|
183
|
+
</block>
|
|
184
|
+
|
|
185
|
+
<!-- Step 5: Deviation Detection -->
|
|
186
|
+
<block type="task" id="B12" action="analyze" desc="Compare expected vs actual results">
|
|
187
|
+
<field name="input_test_results" value="${test_details}"/>
|
|
188
|
+
<field name="input_expected_results" value="${test_cases}"/>
|
|
189
|
+
<field name="comparison_fields">
|
|
190
|
+
- expected_result: From test cases document
|
|
191
|
+
- actual_result: From test execution
|
|
192
|
+
- deviation_type: Classification of difference
|
|
193
|
+
</field>
|
|
194
|
+
<field name="output" var="deviation_comparison"/>
|
|
195
|
+
</block>
|
|
196
|
+
|
|
197
|
+
<block type="task" id="B13" action="analyze" desc="Classify deviation types">
|
|
198
|
+
<field name="input_deviations" value="${deviation_comparison}"/>
|
|
199
|
+
<field name="deviation_types">
|
|
200
|
+
- PASS: Test passed as expected
|
|
201
|
+
- FAIL: Test assertion failed - actual differs from expected (Severity: High)
|
|
202
|
+
- ERROR: Runtime error - code threw exception (Severity: Critical)
|
|
203
|
+
- SKIP: Test was skipped - preconditions not met (Severity: Medium)
|
|
204
|
+
- FLAKY: Intermittent failure - non-deterministic behavior (Severity: High)
|
|
205
|
+
</field>
|
|
206
|
+
<field name="output" var="deviation_classification"/>
|
|
207
|
+
</block>
|
|
208
|
+
|
|
209
|
+
<block type="task" id="B14" action="analyze" desc="Perform basic root cause analysis">
|
|
210
|
+
<field name="input_deviations" value="${deviation_classification}"/>
|
|
211
|
+
<field name="analysis_focus">
|
|
212
|
+
- Assertion Failure: Which specific assertion failed and why
|
|
213
|
+
- Runtime Error: Exception type and location
|
|
214
|
+
- Skip Reason: Why test could not execute
|
|
215
|
+
- Flaky Pattern: Conditions causing intermittent failure
|
|
216
|
+
</field>
|
|
217
|
+
<field name="output" var="root_cause_basic"/>
|
|
218
|
+
</block>
|
|
219
|
+
|
|
220
|
+
<!-- Step 6: Generate Execution Results -->
|
|
221
|
+
<block type="task" id="B15" action="read-file" desc="Read test execution results template">
|
|
222
|
+
<field name="path" value="speccrew-test-runner/templates/TEST-EXECUTION-RESULT-TEMPLATE.md"/>
|
|
223
|
+
<field name="output" var="results_template"/>
|
|
224
|
+
</block>
|
|
225
|
+
|
|
226
|
+
<block type="task" id="B16" action="write-file" desc="Create execution results document">
|
|
227
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
228
|
+
<field name="template" value="${results_template}"/>
|
|
229
|
+
<field name="placeholders">
|
|
230
|
+
- feature_name: ${feature_name}
|
|
231
|
+
- platform_id: ${platform_id}
|
|
232
|
+
- date: ${timestamp}
|
|
233
|
+
</field>
|
|
234
|
+
<field name="output" var="results_created"/>
|
|
235
|
+
</block>
|
|
236
|
+
|
|
237
|
+
<block type="task" id="B17" action="edit-file" desc="Fill Execution Summary section">
|
|
238
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
239
|
+
<field name="section">Execution Summary</field>
|
|
240
|
+
<field name="content">
|
|
241
|
+
Feature: ${feature_name}
|
|
242
|
+
Platform: ${platform_id}
|
|
243
|
+
Framework: ${test_code_plan.framework}
|
|
244
|
+
Execution Date: ${timestamp}
|
|
245
|
+
Duration: ${test_summary.duration}ms
|
|
246
|
+
Pass Rate: ${test_summary.pass_rate}%
|
|
247
|
+
</field>
|
|
248
|
+
</block>
|
|
249
|
+
|
|
250
|
+
<block type="task" id="B18" action="edit-file" desc="Fill Results Overview section">
|
|
251
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
252
|
+
<field name="section">Results Overview</field>
|
|
253
|
+
<field name="content" value="${test_summary}"/>
|
|
254
|
+
</block>
|
|
255
|
+
|
|
256
|
+
<block type="task" id="B19" action="edit-file" desc="Fill Test Results Detail section">
|
|
257
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
258
|
+
<field name="section">Test Results Detail</field>
|
|
259
|
+
<field name="content" value="${test_details}"/>
|
|
260
|
+
</block>
|
|
261
|
+
|
|
262
|
+
<block type="task" id="B20" action="edit-file" desc="Fill Deviation Analysis section">
|
|
263
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
264
|
+
<field name="section">Deviation Analysis</field>
|
|
265
|
+
<field name="content" value="${deviation_classification}"/>
|
|
266
|
+
</block>
|
|
267
|
+
|
|
268
|
+
<block type="task" id="B21" action="edit-file" desc="Fill Environment Information section">
|
|
269
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
270
|
+
<field name="section">Environment Information</field>
|
|
271
|
+
<field name="content">
|
|
272
|
+
OS: ${runtime_check.os}
|
|
273
|
+
Runtime Version: ${runtime_check.version}
|
|
274
|
+
Framework Version: ${dependency_check.version}
|
|
275
|
+
Dependencies: ${dependency_check.dependencies}
|
|
276
|
+
</field>
|
|
277
|
+
</block>
|
|
278
|
+
|
|
279
|
+
<block type="task" id="B22" action="edit-file" desc="Fill Raw Output section">
|
|
280
|
+
<field name="path" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
281
|
+
<field name="section">Raw Output</field>
|
|
282
|
+
<field name="content">
|
|
283
|
+
STDOUT:
|
|
284
|
+
${test_execution.stdout}
|
|
285
|
+
|
|
286
|
+
STDERR:
|
|
287
|
+
${test_execution.stderr}
|
|
288
|
+
</field>
|
|
289
|
+
</block>
|
|
290
|
+
|
|
291
|
+
<!-- Checkpoint: Verify output -->
|
|
292
|
+
<block type="checkpoint" id="CP1" name="execution-results-generated" desc="Verify execution results generated">
|
|
293
|
+
<field name="file" value="${output_dir}/${feature_name}-test-execution-results.md"/>
|
|
294
|
+
<field name="verify" value="file_exists(${output_dir}/${feature_name}-test-execution-results.md)"/>
|
|
295
|
+
</block>
|
|
296
|
+
|
|
297
|
+
</sequence>
|
|
298
|
+
|
|
299
|
+
<!-- ============================================================
|
|
300
|
+
Output Results
|
|
301
|
+
============================================================ -->
|
|
302
|
+
<block type="output" id="O1" desc="Workflow output results">
|
|
303
|
+
<field name="execution_results_path" value="${output_dir}/${feature_name}-test-execution-results.md" type="string" desc="Path to structured test execution results"/>
|
|
304
|
+
<field name="total_tests" from="${test_summary.total}" type="number" desc="Total number of tests executed"/>
|
|
305
|
+
<field name="passed" from="${test_summary.passed}" type="number" desc="Number of passed tests"/>
|
|
306
|
+
<field name="failed" from="${test_summary.failed}" type="number" desc="Number of failed tests"/>
|
|
307
|
+
<field name="errors" from="${test_summary.errors}" type="number" desc="Number of tests with errors"/>
|
|
308
|
+
<field name="skipped" from="${test_summary.skipped}" type="number" desc="Number of skipped tests"/>
|
|
309
|
+
<field name="pass_rate" from="${test_summary.pass_rate}" type="string" desc="Overall pass rate percentage"/>
|
|
310
|
+
<field name="deviations" from="${deviation_classification}" type="array" desc="List of all deviations detected"/>
|
|
311
|
+
<field name="next_step" value="Dispatch to speccrew-test-reporter for report generation" type="string" desc="Recommended next step"/>
|
|
312
|
+
</block>
|
|
313
|
+
|
|
314
|
+
</workflow>
|
package/bin/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const command = process.argv[2];
|
|
@@ -15,6 +15,7 @@ Commands:
|
|
|
15
15
|
init Initialize SpecCrew in the current project
|
|
16
16
|
update Update SpecCrew agents and skills
|
|
17
17
|
doctor Check environment and installation health
|
|
18
|
+
validate Validate AgentFlow XML files
|
|
18
19
|
uninstall Remove SpecCrew from the current project
|
|
19
20
|
list List installed agents and skills
|
|
20
21
|
|
|
@@ -39,6 +40,12 @@ switch (command) {
|
|
|
39
40
|
case 'doctor':
|
|
40
41
|
require('../lib/commands/doctor').run(projectRoot, args);
|
|
41
42
|
break;
|
|
43
|
+
case 'validate':
|
|
44
|
+
const success = require('../lib/commands/validate').run(projectRoot, args);
|
|
45
|
+
if (!success) {
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
42
49
|
case 'uninstall':
|
|
43
50
|
require('../lib/commands/uninstall').run(projectRoot, args).then((result) => {
|
|
44
51
|
if (!result) {
|
package/lib/commands/init.js
CHANGED
|
@@ -11,7 +11,9 @@ const {
|
|
|
11
11
|
ensureDirectories,
|
|
12
12
|
removeDirRecursive,
|
|
13
13
|
DEPRECATED_SKILLS,
|
|
14
|
+
DEPRECATED_AGENTS,
|
|
14
15
|
cleanDeprecatedSkills,
|
|
16
|
+
cleanDeprecatedAgents,
|
|
15
17
|
} = require('../utils');
|
|
16
18
|
const { resolveIDE, transformAgentForIDE, transformSkillForIDE } = require('../ide-adapters');
|
|
17
19
|
|
|
@@ -347,9 +349,15 @@ async function runInit(options = {}) {
|
|
|
347
349
|
const skillsResult = copySkills(skillsSourceDir, skillsDestDir, ideConfig);
|
|
348
350
|
|
|
349
351
|
// Clean up deprecated skills
|
|
350
|
-
const
|
|
351
|
-
if (
|
|
352
|
-
log(` Cleaned up ${
|
|
352
|
+
const cleanedSkillCount = cleanDeprecatedSkills(skillsDestDir, DEPRECATED_SKILLS);
|
|
353
|
+
if (cleanedSkillCount > 0 && !silent) {
|
|
354
|
+
log(` Cleaned up ${cleanedSkillCount} deprecated skill(s) from ${ideConfig.name}`);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Clean up deprecated agents
|
|
358
|
+
const cleanedAgentCount = cleanDeprecatedAgents(agentsDestDir, DEPRECATED_AGENTS);
|
|
359
|
+
if (cleanedAgentCount > 0 && !silent) {
|
|
360
|
+
log(` Cleaned up ${cleanedAgentCount} deprecated agent(s) from ${ideConfig.name}`);
|
|
353
361
|
}
|
|
354
362
|
|
|
355
363
|
stats.ides.push({
|
package/lib/commands/update.js
CHANGED
|
@@ -10,7 +10,9 @@ const {
|
|
|
10
10
|
copyDirRecursive,
|
|
11
11
|
removeDirRecursive,
|
|
12
12
|
DEPRECATED_SKILLS,
|
|
13
|
+
DEPRECATED_AGENTS,
|
|
13
14
|
cleanDeprecatedSkills,
|
|
15
|
+
cleanDeprecatedAgents,
|
|
14
16
|
} = require('../utils');
|
|
15
17
|
const { resolveIDE, getIDEConfig, transformAgentForIDE, transformSkillForIDE } = require('../ide-adapters');
|
|
16
18
|
|
|
@@ -456,9 +458,15 @@ function run() {
|
|
|
456
458
|
totalStats.extraDirs.push(...skillStats.extraDirs);
|
|
457
459
|
|
|
458
460
|
// Clean up deprecated skills
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
console.log(` Cleaned up ${
|
|
461
|
+
const cleanedSkillCount = cleanDeprecatedSkills(destSkillsDir, DEPRECATED_SKILLS);
|
|
462
|
+
if (cleanedSkillCount > 0) {
|
|
463
|
+
console.log(` Cleaned up ${cleanedSkillCount} deprecated skill(s) from ${ide.name}`);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// Clean up deprecated agents
|
|
467
|
+
const cleanedAgentCount = cleanDeprecatedAgents(destAgentsDir, DEPRECATED_AGENTS);
|
|
468
|
+
if (cleanedAgentCount > 0) {
|
|
469
|
+
console.log(` Cleaned up ${cleanedAgentCount} deprecated agent(s) from ${ide.name}`);
|
|
462
470
|
}
|
|
463
471
|
}
|
|
464
472
|
|