speccrew 0.7.73 → 0.7.75
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-feature-designer.md +96 -0
- package/.speccrew/agents/speccrew-product-manager.md +55 -0
- package/.speccrew/agents/speccrew-system-deployer.md +178 -0
- package/.speccrew/agents/speccrew-system-developer.md +177 -0
- package/.speccrew/agents/speccrew-task-worker.md +18 -0
- package/.speccrew/agents/speccrew-team-leader.md +56 -0
- package/.speccrew/agents/speccrew-test-manager.md +167 -0
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
- package/package.json +1 -1
- package/workspace-template/docs/rules/agentflow-spec.md +56 -8
|
@@ -1,106 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: speccrew-test-manager-orchestration
|
|
3
|
-
version: 1.0.0
|
|
4
3
|
description: Test Manager 的编排调度技能,负责执行三阶段测试工作流:测试用例设计 → 测试代码生成 → 测试执行与报告。支持单平台直接调用和多平台 Worker 并行调度。
|
|
5
4
|
tools: Read, Write, Glob, Grep, Bash, Agent
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
> **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md` — this defines all block types and action-to-tool mappings
|
|
11
|
-
>
|
|
12
|
-
> **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
|
|
13
|
-
>
|
|
14
|
-
> ```
|
|
15
|
-
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
|
-
> 🔧 Tool: [which IDE tool to call]
|
|
17
|
-
> ✅ Result: [output or status]
|
|
18
|
-
> ```
|
|
19
|
-
>
|
|
20
|
-
> Action-to-tool mapping:
|
|
21
|
-
> - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
|
|
22
|
-
> - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
|
|
23
|
-
> - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker`
|
|
24
|
-
> - `action="read-file"` → Read via **Read tool**
|
|
25
|
-
> - `action="log"` → Output message directly
|
|
26
|
-
> - `action="confirm"` → Present to user and wait for response
|
|
27
|
-
>
|
|
28
|
-
> **Step 3**: Execute ALL blocks sequentially without pausing (only stop at explicit `<event action="confirm">` blocks)
|
|
7
|
+
# Trigger Scenarios
|
|
29
8
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
1. **Stage Gate Verification** - 验证部署阶段已完成确认
|
|
35
|
-
2. **IDE Directory Detection** - 检测 IDE 目录并验证测试技能存在
|
|
36
|
-
3. **Preparation** - 识别迭代路径、定位输入文档、检查现有制品
|
|
37
|
-
4. **Knowledge Loading** - 加载功能规格、API契约、系统设计
|
|
38
|
-
5. **Test Case Design** - 测试用例设计(支持单平台/多平台模式)
|
|
39
|
-
6. **Test Code Generation** - 测试代码生成(含代码审查)
|
|
40
|
-
7. **Test Execution & Reporting** - 测试执行与缺陷报告
|
|
41
|
-
8. **Delivery Summary** - 交付总结确认
|
|
42
|
-
|
|
43
|
-
## Invocation Method
|
|
44
|
-
|
|
45
|
-
**CRITICAL**: This skill is loaded directly by Test Manager Agent — do NOT invoke via Worker Agent.
|
|
46
|
-
|
|
47
|
-
```xml
|
|
48
|
-
<block type="task" action="run-skill" desc="Test Manager orchestration workflow">
|
|
49
|
-
<field name="skill">speccrew-test-manager-orchestration</field>
|
|
50
|
-
</block>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Input Parameters
|
|
54
|
-
|
|
55
|
-
| Parameter | Type | Required | Description |
|
|
56
|
-
|-----------|------|----------|-------------|
|
|
57
|
-
| `workspace_path` | string | Yes | speccrew-workspace 根目录绝对路径 |
|
|
58
|
-
| `iteration_dir` | string | Yes | 当前迭代目录路径 |
|
|
59
|
-
| `update_progress_script` | string | Yes | update-progress.js 脚本路径 |
|
|
60
|
-
|
|
61
|
-
## Output
|
|
62
|
-
|
|
63
|
-
- `status` - Execution status (success / partial / failed)
|
|
64
|
-
- `test_cases_designed` - Number of test cases designed
|
|
65
|
-
- `test_code_generated` - Number of test code files generated
|
|
66
|
-
- `tests_passed` - Number of tests passed
|
|
67
|
-
- `tests_failed` - Number of tests failed
|
|
68
|
-
- `bug_reports` - List of bug report paths
|
|
69
|
-
- `output_files` - List of generated/modified files
|
|
70
|
-
- `summary` - Execution summary
|
|
71
|
-
- `next_steps` - Suggested next actions
|
|
72
|
-
|
|
73
|
-
---
|
|
9
|
+
- Test Manager Agent starts the three-phase testing workflow after development confirmation
|
|
10
|
+
- Development stage confirmed and test case design needs to begin
|
|
11
|
+
- User requests test execution or test report generation
|
|
74
12
|
|
|
75
13
|
## AgentFlow Definition
|
|
76
14
|
|
|
77
15
|
<!-- @agentflow: SKILL.xml -->
|
|
78
16
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## CONTINUOUS EXECUTION RULES
|
|
82
|
-
|
|
83
|
-
This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
84
|
-
|
|
85
|
-
### FORBIDDEN Interruptions
|
|
86
|
-
|
|
87
|
-
1. DO NOT ask user "Should I continue?" after completing a subtask
|
|
88
|
-
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
89
|
-
3. DO NOT pause to list what you plan to do next — just do it
|
|
90
|
-
4. DO NOT ask for confirmation before generating output files
|
|
91
|
-
5. DO NOT warn about "large number of files" — proceed with generation
|
|
92
|
-
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
93
|
-
|
|
94
|
-
### When to Pause (ONLY these cases)
|
|
95
|
-
|
|
96
|
-
1. CHECKPOINT gates defined in workflow (user confirmation required by design)
|
|
97
|
-
2. Ambiguous requirements that genuinely need clarification
|
|
98
|
-
3. Unrecoverable errors that prevent further progress
|
|
99
|
-
4. Security-sensitive operations (e.g., deleting existing files)
|
|
100
|
-
|
|
101
|
-
### Batch Execution Behavior
|
|
102
|
-
|
|
103
|
-
- When multiple items need processing, process ALL of them sequentially without asking
|
|
104
|
-
- Use DISPATCH-PROGRESS.json to track progress, enabling resumption if interrupted by context limits
|
|
105
|
-
- If context window is approaching limit, save progress to checkpoint and inform user how to resume
|
|
106
|
-
- NEVER voluntarily stop mid-batch to ask if user wants to continue
|
|
17
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
18
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -10,109 +10,9 @@ tools: Read, Write, Glob, Grep
|
|
|
10
10
|
- When user explicitly requests "generate test report", "create bug reports"
|
|
11
11
|
- When test execution results need to be converted to human-readable reports
|
|
12
12
|
|
|
13
|
-
# Role Positioning
|
|
14
|
-
|
|
15
|
-
**Primary Role**: Test Report Generator
|
|
16
|
-
|
|
17
|
-
**Responsibilities**:
|
|
18
|
-
- Read structured test execution results from speccrew-test-runner
|
|
19
|
-
- Generate comprehensive test reports with statistics and analysis
|
|
20
|
-
- Generate individual bug reports for each failed test case
|
|
21
|
-
- Perform detailed root cause analysis with impact assessment
|
|
22
|
-
- Classify bug severity for prioritization
|
|
23
|
-
- Output human-readable documents for stakeholders
|
|
24
|
-
|
|
25
|
-
**Upstream Dependencies**: speccrew-test-runner
|
|
26
|
-
**Downstream Consumers**: speccrew-test-manager, development teams, QA teams
|
|
27
|
-
|
|
28
13
|
## AgentFlow Definition
|
|
29
14
|
|
|
30
15
|
<!-- @agentflow: SKILL.xml -->
|
|
31
16
|
|
|
32
|
-
> **REQUIRED**: Before executing this workflow, read the XML workflow specification:
|
|
33
|
-
|
|
34
|
-
## Output
|
|
35
|
-
|
|
36
|
-
### Output Files
|
|
37
|
-
|
|
38
|
-
| File | Path | Description |
|
|
39
|
-
|------|------|-------------|
|
|
40
|
-
| Test Report | `{output_dir}/reports/{feature}-test-report.md` | Comprehensive test execution report |
|
|
41
|
-
| Bug Reports | `{output_dir}/bugs/{feature}-bug-{seq}.md` | Individual bug report per failure |
|
|
42
|
-
|
|
43
|
-
### Output Structure
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
{output_dir}/
|
|
47
|
-
├── reports/
|
|
48
|
-
│ └── {feature}-test-report.md
|
|
49
|
-
└── bugs/
|
|
50
|
-
├── {feature}-bug-001.md
|
|
51
|
-
├── {feature}-bug-002.md
|
|
52
|
-
└── ...
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
# Key Rules
|
|
56
|
-
|
|
57
|
-
| Rule | Description |
|
|
58
|
-
|------|-------------|
|
|
59
|
-
| **Template-First Workflow** | Always copy template before filling sections |
|
|
60
|
-
| **One Bug Per File** | Each bug gets its own report file for tracking |
|
|
61
|
-
| **Severity Classification** | Always classify bug severity for prioritization |
|
|
62
|
-
| **Actionable Reports** | Bug reports must include suggested fix direction |
|
|
63
|
-
| **TC ID Traceability** | Every bug must be traced back to its TC ID |
|
|
64
|
-
| **Root Cause Analysis** | Provide detailed analysis of failure causes |
|
|
65
|
-
| **No Execution** | This skill does NOT execute tests, only generates reports |
|
|
66
|
-
|
|
67
|
-
# Checklist
|
|
68
|
-
|
|
69
|
-
- [ ] Execution results document loaded successfully
|
|
70
|
-
- [ ] Test report generated with complete statistics
|
|
71
|
-
- [ ] Results broken down by test dimension
|
|
72
|
-
- [ ] Failed tests linked to corresponding bug reports
|
|
73
|
-
- [ ] Each FAIL/ERROR has a corresponding bug report
|
|
74
|
-
- [ ] Bug severity classified (Critical/High/Medium/Low)
|
|
75
|
-
- [ ] Root cause analysis completed for each bug
|
|
76
|
-
- [ ] All bug reports written to correct output path
|
|
77
|
-
- [ ] Test report written to correct output path
|
|
78
|
-
- [ ] Bug links updated in test report
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
# Task Completion Report
|
|
83
|
-
|
|
84
|
-
Upon completion (success or failure), output the following report format:
|
|
85
|
-
|
|
86
|
-
## Success Report
|
|
87
|
-
```
|
|
88
|
-
## Task Completion Report
|
|
89
|
-
- **Status**: SUCCESS
|
|
90
|
-
- **Task ID**: <from dispatch context, e.g., "test-reporter-web-vue">
|
|
91
|
-
- **Platform**: <platform_id, e.g., "web-vue">
|
|
92
|
-
- **Phase**: test_reporting
|
|
93
|
-
- **Output Files**:
|
|
94
|
-
- `{output_dir}/reports/{feature}-test-report.md`
|
|
95
|
-
- `{output_dir}/bugs/{feature}-bug-{seq}.md` (if any failures)
|
|
96
|
-
- **Summary**: Generated test report with {total} tests, {failed} bugs reported
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Failure Report
|
|
100
|
-
```
|
|
101
|
-
## Task Completion Report
|
|
102
|
-
- **Status**: FAILED
|
|
103
|
-
- **Task ID**: <from dispatch context>
|
|
104
|
-
- **Platform**: <platform_id>
|
|
105
|
-
- **Phase**: test_reporting
|
|
106
|
-
- **Output Files**: <list of partial outputs or "None">
|
|
107
|
-
- **Summary**: Test report generation failed during {step}
|
|
108
|
-
- **Error**: <detailed error description>
|
|
109
|
-
- **Error Category**: INPUT_MISSING | TEMPLATE_ERROR | WRITE_ERROR | BLOCKED
|
|
110
|
-
- **Partial Outputs**: <list of files that were generated before failure, or "None">
|
|
111
|
-
- **Recovery Hint**: <suggestion for recovery>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Error Category Definitions**:
|
|
115
|
-
- `INPUT_MISSING`: Required execution results or test cases document not available
|
|
116
|
-
- `TEMPLATE_ERROR`: Template file missing or malformed
|
|
117
|
-
- `WRITE_ERROR`: File system error during report generation
|
|
118
|
-
- `BLOCKED`: Blocked by missing upstream dependency
|
|
17
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
18
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -7,130 +7,12 @@ tools: Read, Write, Bash, Glob, Grep
|
|
|
7
7
|
# Trigger Scenarios
|
|
8
8
|
|
|
9
9
|
- When speccrew-test-manager dispatches test execution after test code is confirmed
|
|
10
|
-
- When speccrew-test-reporter needs raw execution results to generate reports
|
|
11
10
|
- When user explicitly requests "run tests", "execute tests", "run test suite"
|
|
12
|
-
|
|
13
|
-
# Role Positioning
|
|
14
|
-
|
|
15
|
-
**Primary Role**: Test Execution Engine
|
|
16
|
-
|
|
17
|
-
**Responsibilities**:
|
|
18
|
-
- Read and validate test code files
|
|
19
|
-
- Perform environment pre-checks (runtime, dependencies, test framework)
|
|
20
|
-
- Execute test commands for various platforms and frameworks
|
|
21
|
-
- Parse test framework output into structured data
|
|
22
|
-
- Detect deviations between expected and actual results
|
|
23
|
-
- Output structured execution results for downstream consumers
|
|
24
|
-
|
|
25
|
-
**Upstream Dependencies**: speccrew-test-manager, speccrew-test-code-generator
|
|
26
|
-
**Downstream Consumers**: speccrew-test-reporter
|
|
11
|
+
- When speccrew-test-reporter needs raw execution results to generate reports
|
|
27
12
|
|
|
28
13
|
## AgentFlow Definition
|
|
29
14
|
|
|
30
15
|
<!-- @agentflow: SKILL.xml -->
|
|
31
16
|
|
|
32
|
-
> **REQUIRED**: Before executing this workflow, read the XML workflow specification:
|
|
33
|
-
|
|
34
|
-
## Output
|
|
35
|
-
|
|
36
|
-
### Output Files
|
|
37
|
-
|
|
38
|
-
| File | Path | Description |
|
|
39
|
-
|------|------|-------------|
|
|
40
|
-
| Execution Results | `{output_dir}/{feature}-test-execution-results.md` | Structured test execution data |
|
|
41
|
-
|
|
42
|
-
### Output Format Contract
|
|
43
|
-
|
|
44
|
-
The execution results document serves as the **input contract** for speccrew-test-reporter:
|
|
45
|
-
|
|
46
|
-
```yaml
|
|
47
|
-
execution_summary:
|
|
48
|
-
feature_name: string
|
|
49
|
-
platform_id: string
|
|
50
|
-
framework: string
|
|
51
|
-
execution_date: ISO8601
|
|
52
|
-
duration_ms: number
|
|
53
|
-
total_tests: number
|
|
54
|
-
passed: number
|
|
55
|
-
failed: number
|
|
56
|
-
errors: number
|
|
57
|
-
skipped: number
|
|
58
|
-
pass_rate: percentage
|
|
59
|
-
|
|
60
|
-
test_results:
|
|
61
|
-
- tc_id: string
|
|
62
|
-
test_name: string
|
|
63
|
-
status: PASS|FAIL|ERROR|SKIP
|
|
64
|
-
duration_ms: number
|
|
65
|
-
error_message: string|null
|
|
66
|
-
stack_trace: string|null
|
|
67
|
-
expected_result: string
|
|
68
|
-
actual_result: string
|
|
69
|
-
|
|
70
|
-
deviations:
|
|
71
|
-
- tc_id: string
|
|
72
|
-
type: FAIL|ERROR|SKIP|FLAKY
|
|
73
|
-
severity: Critical|High|Medium|Low
|
|
74
|
-
description: string
|
|
75
|
-
|
|
76
|
-
environment:
|
|
77
|
-
os: string
|
|
78
|
-
runtime_version: string
|
|
79
|
-
framework_version: string
|
|
80
|
-
dependencies: list
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
# Key Rules
|
|
84
|
-
|
|
85
|
-
| Rule | Description |
|
|
86
|
-
|------|-------------|
|
|
87
|
-
| **Environment First** | Always verify environment before running tests |
|
|
88
|
-
| **Complete Output Capture** | Capture both stdout and stderr for diagnostics |
|
|
89
|
-
| **TC ID Traceability** | Every test result must be traced back to its TC ID |
|
|
90
|
-
| **No Report Generation** | This skill does NOT generate human-readable reports |
|
|
91
|
-
| **Structured Output Only** | Output must be structured data for downstream consumption |
|
|
92
|
-
| **Runner → Reporter Contract** | Output format must match speccrew-test-reporter input expectations |
|
|
93
|
-
|
|
94
|
-
# Checklist
|
|
95
|
-
|
|
96
|
-
- [ ] Environment pre-check passed before execution
|
|
97
|
-
- [ ] All test files from code plan were executed
|
|
98
|
-
- [ ] Test results are correctly parsed from framework output
|
|
99
|
-
- [ ] Failed tests are correctly traced back to TC IDs
|
|
100
|
-
- [ ] Deviation classification completed for all non-PASS results
|
|
101
|
-
- [ ] Execution results written to correct output path
|
|
102
|
-
- [ ] Output format follows contract for speccrew-test-reporter
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
# Task Completion Report
|
|
107
|
-
|
|
108
|
-
Upon completion (success or failure), output the following report format:
|
|
109
|
-
|
|
110
|
-
## Success Report
|
|
111
|
-
```
|
|
112
|
-
## Task Completion Report
|
|
113
|
-
- **Status**: SUCCESS
|
|
114
|
-
- **Task ID**: <from dispatch context, e.g., "test-runner-web-vue">
|
|
115
|
-
- **Platform**: <platform_id, e.g., "web-vue">
|
|
116
|
-
- **Phase**: test_execution
|
|
117
|
-
- **Output Files**:
|
|
118
|
-
- `{output_dir}/{feature}-test-execution-results.md`
|
|
119
|
-
- **Summary**: Test execution completed with {passed}/{total} passed, {failed} failed, {skipped} skipped
|
|
120
|
-
- **Next Step**: Dispatch to speccrew-test-reporter for report generation
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Failure Report
|
|
124
|
-
```
|
|
125
|
-
## Task Completion Report
|
|
126
|
-
- **Status**: FAILED
|
|
127
|
-
- **Task ID**: <from dispatch context>
|
|
128
|
-
- **Platform**: <platform_id>
|
|
129
|
-
- **Phase**: test_execution
|
|
130
|
-
- **Output Files**: <list of partial outputs or "None">
|
|
131
|
-
- **Summary**: Test execution failed during {step}
|
|
132
|
-
- **Error**: <detailed error description>
|
|
133
|
-
- **Error Category**: DEPENDENCY_MISSING | BUILD_FAILURE | VALIDATION_ERROR | RUNTIME_ERROR | BLOCKED
|
|
134
|
-
- **Partial Outputs**: <list of partially generated files or "None">
|
|
135
|
-
- **Recovery Hint**: <suggestion for recovery, e.g., "Check test dependencies are installed and test configuration is valid">
|
|
136
|
-
```
|
|
17
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
18
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
package/package.json
CHANGED
|
@@ -58,6 +58,8 @@ Executes an action. The primary execution block.
|
|
|
58
58
|
| `generate` | Generate content | Output path |
|
|
59
59
|
| `read-file` | Read file content | `<field name="path">` |
|
|
60
60
|
| `write-file` | Write file content | `<field name="path">`, content |
|
|
61
|
+
| `edit-file` | Edit existing file sections | `<field name="path">`, `<field name="section">` |
|
|
62
|
+
| `verify` | Verify output completeness | `<field name="verification_rules">` |
|
|
61
63
|
|
|
62
64
|
**Examples:**
|
|
63
65
|
|
|
@@ -349,19 +351,19 @@ Use `${variable_name}` syntax throughout block attributes and content.
|
|
|
349
351
|
</block>
|
|
350
352
|
```
|
|
351
353
|
|
|
352
|
-
##
|
|
354
|
+
## XML Workflow Execution Model
|
|
353
355
|
|
|
354
|
-
|
|
356
|
+
XML workflows are executed by **any agent** that loads and processes AgentFlow XML — including orchestrating agents (Team Leader, Product Manager, Feature Designer, System Designer) and worker agents (speccrew-task-worker). The execution protocol applies universally.
|
|
355
357
|
|
|
356
358
|
### Execution Protocol
|
|
357
359
|
|
|
358
|
-
When
|
|
360
|
+
When an agent loads a workflow skill (via Skill tool or by reading SKILL.xml directly):
|
|
359
361
|
|
|
360
|
-
1. **Load**:
|
|
362
|
+
1. **Load**: The executing agent invokes the Skill tool with the dispatch skill name (e.g., `speccrew-knowledge-bizs-dispatch-xml`)
|
|
361
363
|
2. **Parse**: Read and understand the complete AgentFlow XML workflow in the loaded SKILL.md
|
|
362
364
|
3. **Execute block-by-block**: Walk through each Stage's blocks in document order, mapping each `action` attribute to the correct IDE tool:
|
|
363
365
|
|
|
364
|
-
| Block Action | What
|
|
366
|
+
| Block Action | What The Executing Agent MUST Do |
|
|
365
367
|
|---|---|
|
|
366
368
|
| `action="run-script"` | Execute the command via **Terminal tool** (PowerShell/Bash) |
|
|
367
369
|
| `action="run-skill"` | Invoke the skill via **Skill tool** — do NOT manually read SKILL.md files |
|
|
@@ -388,20 +390,34 @@ When executing `<block type="task">` blocks, the `action` attribute determines w
|
|
|
388
390
|
| Action | IDE Tool to Use | How to Invoke |
|
|
389
391
|
|--------|----------------|---------------|
|
|
390
392
|
| `run-skill` | **Skill tool** | Call the IDE Skill tool with the skill name from `<field name="skill">`. Do NOT manually browse directories or read SKILL.md files — the Skill tool resolves paths automatically. |
|
|
391
|
-
| `dispatch-to-worker` | **Task tool** | Create a new
|
|
393
|
+
| `dispatch-to-worker` | **Agent/Task tool** | Create a new worker agent session via the IDE's agent/task creation tool (e.g., Agent tool in Qoder, Task tool in other IDEs). Pass all context fields as worker parameters. For `<loop parallel="true">`, create ALL worker sessions in a single batch. |
|
|
392
394
|
| `run-script` | **Bash / Terminal tool** | Execute the command from `<field name="command">` using the terminal tool. Use PowerShell syntax on Windows, Bash on Unix. |
|
|
393
395
|
| `read-file` | **Read tool** | Read the file at the path specified in `<field name="path">`. |
|
|
394
396
|
| `write-file` | **Write / Edit tool** | Write content to the file at `<field name="path">`. For new files use create_file; for modifications use search_replace. |
|
|
395
397
|
| `analyze` | **Direct execution** | Perform the analysis described in the block's `desc` attribute. Read relevant source files, extract information, and store results in the specified output variables. |
|
|
396
|
-
| `generate` | **
|
|
398
|
+
| `generate` | **Copy template + search_replace** | **Copy** the template file specified in `<field name="template">` to the output path, then **fill** placeholder sections using the IDE search_replace tool. Do NOT use create_file to write entire document content — large files will be truncated. Do NOT create helper scripts for template filling. |
|
|
399
|
+
| `edit-file` | **search_replace tool** | Use the IDE's search_replace tool to perform targeted section replacement on the file at `<field name="path">`. Find the section header specified in `<field name="section">` and replace its placeholder content. Do NOT use terminal commands (node -e, sed) or create helper scripts — use ONLY the IDE search_replace tool. |
|
|
400
|
+
| `verify` | **Read tool** | Read the output file and verify against `<field name="verification_rules">`. Check all sections are filled, no placeholders remain, and content meets quality criteria. |
|
|
397
401
|
|
|
398
402
|
### Critical Rules
|
|
399
403
|
|
|
400
404
|
1. **`run-skill` MUST use the Skill tool** — NEVER manually search for or read SKILL.md files. The IDE Skill tool handles path resolution across different IDE directories (.qoder/, .cursor/, .claude/).
|
|
401
|
-
2. **`dispatch-to-worker` MUST use the
|
|
405
|
+
2. **`dispatch-to-worker` MUST use the IDE's agent/task creation tool** — NEVER execute worker tasks yourself. Create a worker agent session (e.g., Agent tool in Qoder, Task tool in other IDEs) and let the worker agent handle it.
|
|
402
406
|
3. **`<loop parallel="true">` with `dispatch-to-worker`** — Create ALL worker tasks in ONE batch call, not sequentially. This enables true parallel execution.
|
|
403
407
|
4. **Variable binding** — After a tool call completes, bind the result to the variable specified in `<field name="output" var="..."/>` for use in subsequent blocks.
|
|
404
408
|
|
|
409
|
+
### FORBIDDEN Tool Substitutions
|
|
410
|
+
|
|
411
|
+
When executing XML workflow blocks, the following tool substitutions are strictly prohibited:
|
|
412
|
+
|
|
413
|
+
1. **❌ Terminal commands for file editing**: Do NOT use `node -e`, `sed`, `awk`, or any terminal command to edit files when the block specifies `action="edit-file"`. MUST use the IDE's search_replace tool.
|
|
414
|
+
2. **❌ Helper script creation**: Do NOT create .js/.sh/.ps1 helper scripts to automate template filling, batch processing, or any workflow step. Use IDE tools directly (search_replace, Read, Write).
|
|
415
|
+
3. **❌ create_file for large documents**: Do NOT use create_file to write entire document content. Large files (>200 lines) WILL be truncated. MUST copy template then fill sections with search_replace.
|
|
416
|
+
4. **❌ Full-file replacement**: Do NOT replace entire file content in a single search_replace operation. MUST perform targeted section-by-section replacements.
|
|
417
|
+
5. **❌ Manual JSON creation for progress files**: Do NOT use create_file or write tools to create DISPATCH-PROGRESS.json, .checkpoints.json, or WORKFLOW-PROGRESS.json. MUST use update-progress.js script commands.
|
|
418
|
+
|
|
419
|
+
**Rationale**: LLMs tend to create helper scripts or use terminal commands as "shortcuts" when faced with repetitive file editing tasks. These shortcuts bypass the IDE's built-in tools, produce inconsistent results, and violate the template-first workflow principle.
|
|
420
|
+
|
|
405
421
|
### Invocation Examples
|
|
406
422
|
|
|
407
423
|
**Example 1: `action="run-script"` — Team Leader runs terminal command directly**
|
|
@@ -483,6 +499,38 @@ Team Leader executes:
|
|
|
483
499
|
→ Wait for all tasks to complete before proceeding
|
|
484
500
|
```
|
|
485
501
|
|
|
502
|
+
**Example 5: `action="edit-file"` — Agent fills a template section using search_replace**
|
|
503
|
+
|
|
504
|
+
Given this XML block:
|
|
505
|
+
```xml
|
|
506
|
+
<block type="task" id="B13" action="edit-file" desc="Fill Component Tree section">
|
|
507
|
+
<field name="path">${module_doc_created.path}</field>
|
|
508
|
+
<field name="operation">search_replace</field>
|
|
509
|
+
<field name="content_source">${feature_spec}${conventions_design}</field>
|
|
510
|
+
<field name="section">Component Tree</field>
|
|
511
|
+
<field name="rules">
|
|
512
|
+
- Use actual framework patterns
|
|
513
|
+
- ALL component trees MUST use Mermaid syntax
|
|
514
|
+
- Mark each component as [EXISTING], [MODIFIED], or [NEW]
|
|
515
|
+
</field>
|
|
516
|
+
</block>
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
The executing agent MUST:
|
|
520
|
+
```
|
|
521
|
+
→ Use search_replace tool on the file at ${module_doc_created.path}
|
|
522
|
+
→ Find the "## Component Tree" section (or matching template placeholder)
|
|
523
|
+
→ Replace the placeholder content with actual component tree based on ${feature_spec} and ${conventions_design}
|
|
524
|
+
→ Follow the rules specified in <field name="rules">
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**FORBIDDEN approaches:**
|
|
528
|
+
```
|
|
529
|
+
❌ node -e "fs.readFileSync(...).replace(...)" ← Terminal command for editing
|
|
530
|
+
❌ Creating _fill-template.js script ← Helper script
|
|
531
|
+
❌ create_file with entire document content ← Full file creation (truncation risk)
|
|
532
|
+
```
|
|
533
|
+
|
|
486
534
|
## Execution Rules
|
|
487
535
|
|
|
488
536
|
1. **NEVER skip a block** — execute every block in document order
|