speccrew 0.7.26 → 0.7.28
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-product-manager.md +72 -33
- package/.speccrew/agents/speccrew-task-worker.md +26 -3
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +12 -0
- package/.speccrew/skills/speccrew-pm-phase0-init/templates/WORKFLOW-PROGRESS-TEMPLATE.json +56 -0
- package/.speccrew/skills/speccrew-pm-phase0-init/workflow.agentflow.xml +20 -1
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +43 -31
- package/.speccrew/skills/speccrew-task-worker-execution/workflow.agentflow.xml +17 -1
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ PM continues to next orchestration block
|
|
|
94
94
|
| Phase 3 | speccrew-pm-requirement-clarify | ✅ dispatch-to-worker |
|
|
95
95
|
| Phase 4a | speccrew-pm-requirement-model | ✅ dispatch-to-worker |
|
|
96
96
|
| Phase 4b | speccrew-pm-requirement-analysis | ✅ dispatch-to-worker |
|
|
97
|
-
| Phase 5 | speccrew-pm-phase5-subprd-dispatch |
|
|
97
|
+
| Phase 5 | speccrew-pm-phase5-subprd-dispatch | ⚡ PM direct execution |
|
|
98
98
|
| Phase 6 | speccrew-pm-phase6-verify-confirm | ✅ dispatch-to-worker |
|
|
99
99
|
|
|
100
100
|
---
|
|
@@ -155,7 +155,7 @@ Phase 0 done. Moving to Phase 1...
|
|
|
155
155
|
| **Phase 4a** | ISA-95 Modeling (complex) | `speccrew-pm-requirement-model` | Worker dispatch |
|
|
156
156
|
| **Phase 4b** | PRD Generation (complex) | `speccrew-pm-requirement-analysis` | Worker dispatch |
|
|
157
157
|
| **Phase 4** | Simple PRD Generation | `speccrew-pm-requirement-simple` | Worker dispatch |
|
|
158
|
-
| **Phase 5** | Sub-PRD Dispatch (complex) | `speccrew-pm-phase5-subprd-dispatch` |
|
|
158
|
+
| **Phase 5** | Sub-PRD Dispatch (complex) | `speccrew-pm-phase5-subprd-dispatch` | PM Direct Orchestration |
|
|
159
159
|
| **Phase 6** | Verification & Confirmation | `speccrew-pm-phase6-verify-confirm` | Worker dispatch |
|
|
160
160
|
|
|
161
161
|
---
|
|
@@ -400,21 +400,62 @@ Step 4b: Dispatch Worker with speccrew-pm-requirement-analysis
|
|
|
400
400
|
|
|
401
401
|
---
|
|
402
402
|
|
|
403
|
-
## Phase 5: Sub-PRD Worker Dispatch
|
|
403
|
+
## Phase 5: Sub-PRD Worker Dispatch (PM Direct Orchestration)
|
|
404
404
|
|
|
405
|
-
<!-- Phase 5
|
|
406
|
-
<!--
|
|
405
|
+
<!-- Phase 5 是 PM 直接执行的编排 Skill,PM 必须读取 workflow.agentflow.xml 并按步骤执行 -->
|
|
406
|
+
<!-- ⚠️ 这里的 dispatch-to-worker 块由 PM Agent 直接执行,不能委派给 Worker -->
|
|
407
|
+
|
|
408
|
+
**Purpose**: As the orchestration layer, PM Agent directly coordinates batch dispatch of Sub-PRD generation tasks to Worker Agents.
|
|
409
|
+
|
|
410
|
+
> 🛑 **CRITICAL ARCHITECTURE RULE (Harness Principle 17: Orchestration Layer Separation)**
|
|
411
|
+
>
|
|
412
|
+
> Phase 5 is an **orchestration skill** containing internal `dispatch-to-worker` blocks.
|
|
413
|
+
> - Workers CANNOT dispatch Workers (execution hierarchy)
|
|
414
|
+
> - Therefore, Phase 5 MUST be executed directly by PM Agent
|
|
415
|
+
> - PM Agent reads `workflow.agentflow.xml` and executes each block step-by-step
|
|
416
|
+
|
|
417
|
+
### 5.1 PM Agent Execution Protocol
|
|
418
|
+
|
|
419
|
+
**PM Agent MUST:**
|
|
420
|
+
1. Read the skill's `workflow.agentflow.xml` to understand execution steps
|
|
421
|
+
2. Execute each block in order: read plan → init progress → dispatch workers → verify
|
|
422
|
+
3. Use Agent tool to create `speccrew-task-worker` for EACH module
|
|
423
|
+
4. Pass `speccrew-pm-sub-prd-generate` skill name to each Worker
|
|
407
424
|
|
|
408
|
-
**
|
|
425
|
+
**PM Agent MUST NOT:**
|
|
426
|
+
- Dispatch Phase 5 to a Worker (Worker cannot dispatch sub-Workers)
|
|
427
|
+
- Skip reading the workflow.agentflow.xml
|
|
428
|
+
- Generate Sub-PRD content directly
|
|
409
429
|
|
|
410
|
-
### 5.
|
|
430
|
+
### 5.2 Prerequisites
|
|
411
431
|
|
|
412
432
|
- Phase 4b completed with valid Dispatch Plan
|
|
413
433
|
- Master PRD exists
|
|
414
434
|
- Dispatch Plan contains module list (count ≥ 2)
|
|
435
|
+
- `.sub-prd-dispatch-plan.json` exists in iteration directory
|
|
436
|
+
|
|
437
|
+
### 5.3 Workflow Steps (from workflow.agentflow.xml)
|
|
415
438
|
|
|
416
|
-
|
|
439
|
+
**Step 5.1: Read Dispatch Plan**
|
|
440
|
+
- Read `.sub-prd-dispatch-plan.json` from iteration directory
|
|
441
|
+
- Parse module list and verify required fields
|
|
417
442
|
|
|
443
|
+
**Step 5.2: Initialize Progress Tracking**
|
|
444
|
+
|
|
445
|
+
> 🛑 **MANDATORY: Initialize DISPATCH-PROGRESS.json BEFORE any Worker dispatch**
|
|
446
|
+
>
|
|
447
|
+
> PM Agent MUST:
|
|
448
|
+
> 1. Create temp task file: `.tasks-temp.json`
|
|
449
|
+
> 2. Run: `node {update_progress_script} init --file DISPATCH-PROGRESS.json --stage sub_prd_dispatch --tasks-file .tasks-temp.json`
|
|
450
|
+
> 3. Verify initialization (Total: N | Pending: N | Completed: 0)
|
|
451
|
+
>
|
|
452
|
+
> **FORBIDDEN:**
|
|
453
|
+
> - DO NOT dispatch ANY Worker before DISPATCH-PROGRESS.json is initialized
|
|
454
|
+
> - DO NOT create DISPATCH-PROGRESS.json manually via create_file
|
|
455
|
+
|
|
456
|
+
**Step 5.3: Batch Dispatch Workers**
|
|
457
|
+
|
|
458
|
+
Dispatch Strategy:
|
|
418
459
|
| Module Count | Dispatch Strategy |
|
|
419
460
|
|--------------|-------------------|
|
|
420
461
|
| 1-5 modules | Single batch, all parallel |
|
|
@@ -424,24 +465,25 @@ Step 4b: Dispatch Worker with speccrew-pm-requirement-analysis
|
|
|
424
465
|
|
|
425
466
|
**BATCH SIZE = 5 (maximum parallel Workers per batch)**
|
|
426
467
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
>
|
|
468
|
+
> 🛑 **MANDATORY: Update Progress After Each Worker Completes**
|
|
469
|
+
>
|
|
470
|
+
> After each Worker returns:
|
|
471
|
+
> 1. Run: `node {update_progress_script} update-task --file DISPATCH-PROGRESS.json --task-id {module_id} --status {completed|failed}`
|
|
472
|
+
> 2. Verify the update succeeded
|
|
473
|
+
>
|
|
474
|
+
> **FORBIDDEN:**
|
|
475
|
+
> - DO NOT skip progress update
|
|
476
|
+
> - DO NOT proceed to next batch until current batch is verified
|
|
430
477
|
|
|
431
|
-
**
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
4. Pass ALL required context parameters to each worker
|
|
436
|
-
5. Dispatch in batches of 5, wait for each batch to complete
|
|
437
|
-
6. After each Worker completes, update DISPATCH-PROGRESS.json via script
|
|
478
|
+
**Step 5.4: Failure Retry**
|
|
479
|
+
- Check for tasks with `failed` status
|
|
480
|
+
- Retry once if failures exist
|
|
481
|
+
- Log persistent failures and continue
|
|
438
482
|
|
|
439
|
-
**
|
|
440
|
-
-
|
|
441
|
-
-
|
|
442
|
-
-
|
|
443
|
-
- Create or edit any Sub-PRD content as fallback
|
|
444
|
-
- Skip worker dispatch and generate Sub-PRDs inline
|
|
483
|
+
**Step 5.5: Result Verification**
|
|
484
|
+
- Read final DISPATCH-PROGRESS.json
|
|
485
|
+
- Verify all Sub-PRD files exist and size > 3KB
|
|
486
|
+
- Update checkpoint via script
|
|
445
487
|
|
|
446
488
|
### 5.4 Worker Context Parameters
|
|
447
489
|
|
|
@@ -458,21 +500,18 @@ Step 4b: Dispatch Worker with speccrew-pm-requirement-analysis
|
|
|
458
500
|
| `output_path` | Computed | `{output_dir}/{feature_name}-sub-{module_key}.md` |
|
|
459
501
|
| `language` | Detected | User's language |
|
|
460
502
|
|
|
461
|
-
### 5.5
|
|
462
|
-
|
|
463
|
-
- Track progress in `DISPATCH-PROGRESS.json` via `update-progress.js` script
|
|
464
|
-
- After ALL workers complete, verify Sub-PRD files exist
|
|
465
|
-
- Update checkpoint `sub_prd_dispatch` to `passed`
|
|
466
|
-
|
|
467
|
-
### 5.6 Completion Verification
|
|
503
|
+
### 5.5 Completion Verification
|
|
468
504
|
|
|
469
505
|
Before proceeding to Phase 6, verify:
|
|
470
|
-
- [ ]
|
|
506
|
+
- [ ] PM Agent executed Phase 5 directly (NOT dispatched to Worker)
|
|
507
|
+
- [ ] DISPATCH-PROGRESS.json was initialized BEFORE any dispatch
|
|
508
|
+
- [ ] All workers were dispatched via Agent tool (one Worker per module)
|
|
509
|
+
- [ ] Progress was updated after each Worker completed
|
|
471
510
|
- [ ] No Sub-PRD was generated by PM Agent directly
|
|
472
511
|
- [ ] All workers completed (DISPATCH-PROGRESS.json counts.pending == 0)
|
|
473
512
|
- [ ] All Sub-PRD files exist and have valid size
|
|
474
513
|
- [ ] `.prd-feature-list.json` contains complete feature data
|
|
475
|
-
- [ ] Checkpoint updated
|
|
514
|
+
- [ ] Checkpoint updated via script
|
|
476
515
|
|
|
477
516
|
---
|
|
478
517
|
|
|
@@ -112,9 +112,11 @@ When Worker loads a skill (via `skill_name` or `skill_path` parameter):
|
|
|
112
112
|
**If `skill_path` or `skill_name` is provided:**
|
|
113
113
|
1. If `skill_path` is provided, use it directly; otherwise use Skill Discovery
|
|
114
114
|
2. If Skill file does not exist, immediately report error
|
|
115
|
-
3.
|
|
116
|
-
4.
|
|
117
|
-
5.
|
|
115
|
+
3. **Read SKILL.md** to understand skill overview, constraints, and templates
|
|
116
|
+
4. **Read workflow.agentflow.xml** — this is the AUTHORITATIVE execution definition
|
|
117
|
+
5. If `context` parameters exist, substitute them into placeholders
|
|
118
|
+
6. **Execute blocks defined in workflow.agentflow.xml sequentially** (top-to-bottom, announcing each block)
|
|
119
|
+
7. Complete the task and output results
|
|
118
120
|
|
|
119
121
|
> 🛑 **CRITICAL — Skill Execution Enforcement**:
|
|
120
122
|
> - If the Skill specifies script execution via `run_in_terminal` or `Bash` → You MUST execute the script via terminal. DO NOT substitute with manual file creation.
|
|
@@ -122,6 +124,23 @@ When Worker loads a skill (via `skill_name` or `skill_path` parameter):
|
|
|
122
124
|
> - If the Skill contains MANDATORY/FORBIDDEN constraints → You MUST follow them strictly.
|
|
123
125
|
> - DO NOT improvise alternative execution paths. If a step fails, report the error — do not attempt workarounds.
|
|
124
126
|
|
|
127
|
+
### MANDATORY: XML Workflow Loading Protocol
|
|
128
|
+
|
|
129
|
+
When executing any Skill that contains `workflow.agentflow.xml`:
|
|
130
|
+
|
|
131
|
+
1. **SKILL.md is METADATA ONLY** — it provides overview, constraints, and template references. It is NOT the execution plan.
|
|
132
|
+
2. **workflow.agentflow.xml is the AUTHORITATIVE execution plan** — Worker MUST read this file and execute its blocks in sequential document order.
|
|
133
|
+
3. **FORBIDDEN**: Starting task execution based solely on SKILL.md without reading workflow.agentflow.xml.
|
|
134
|
+
4. **FORBIDDEN**: Summarizing or paraphrasing the workflow — execute blocks exactly as defined.
|
|
135
|
+
5. **FORBIDDEN**: Skipping, reordering, or merging blocks.
|
|
136
|
+
|
|
137
|
+
**Execution sequence:**
|
|
138
|
+
```
|
|
139
|
+
Read SKILL.md → Read workflow.agentflow.xml → Execute blocks in XML order → Report results
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If workflow.agentflow.xml does not exist in the skill directory, fall back to SKILL.md-based execution.
|
|
143
|
+
|
|
125
144
|
### XML Workflow Block Announcement Protocol
|
|
126
145
|
|
|
127
146
|
When executing a Skill that uses XML workflow format (`<workflow>` root element), you MUST follow the Block Execution Announcement Protocol defined in `docs/rules/agentflow-spec.md`:
|
|
@@ -211,10 +230,14 @@ When the task fails or is blocked, output:
|
|
|
211
230
|
**MUST DO:**
|
|
212
231
|
- If `skill_name` is provided, MUST use Skill Discovery to resolve the full path and strictly follow the Skill definition
|
|
213
232
|
- If `skill_name` is provided but Skill file does not exist, immediately report error
|
|
233
|
+
- If Skill directory contains workflow.agentflow.xml, MUST read it and execute blocks in sequential order — this is the authoritative execution plan
|
|
234
|
+
- MUST announce each XML block before execution using the Block Announcement Protocol
|
|
214
235
|
- Only process the single task assigned to the current Worker
|
|
215
236
|
|
|
216
237
|
**MUST NOT DO:**
|
|
217
238
|
- Do not skip or ignore a provided Skill file
|
|
239
|
+
- Do not execute tasks based solely on SKILL.md when workflow.agentflow.xml exists — the XML workflow is authoritative
|
|
240
|
+
- Do not skip reading workflow.agentflow.xml even if SKILL.md seems sufficient
|
|
218
241
|
- Do not actively modify code beyond the task scope
|
|
219
242
|
- Do not overstep to handle other tasks
|
|
220
243
|
- Do not assume context information not provided
|
|
@@ -31,6 +31,12 @@ Applies workspace initialization principles:
|
|
|
31
31
|
- Progress tracking via WORKFLOW-PROGRESS.json
|
|
32
32
|
- Checkpoint recovery for session continuity
|
|
33
33
|
|
|
34
|
+
## Templates Used
|
|
35
|
+
|
|
36
|
+
| Template | Path | Purpose |
|
|
37
|
+
|----------|------|---------|
|
|
38
|
+
| WORKFLOW-PROGRESS | `templates/WORKFLOW-PROGRESS-TEMPLATE.json` | Standard workflow progress tracking with 7 predefined stages |
|
|
39
|
+
|
|
34
40
|
## Output Deliverables
|
|
35
41
|
|
|
36
42
|
| Deliverable | Path | Description |
|
|
@@ -68,9 +74,15 @@ Applies workspace initialization principles:
|
|
|
68
74
|
- Compute all path variables as absolute paths
|
|
69
75
|
- Check for active iteration before creating new one
|
|
70
76
|
- Copy requirement document to iteration's 00.docs directory
|
|
77
|
+
- Create EXACTLY two subdirectories: `00.docs/` (original requirement documents) and `01.product-requirement/` (PRD and clarification outputs)
|
|
78
|
+
- Initialize `WORKFLOW-PROGRESS.json` from `WORKFLOW-PROGRESS-TEMPLATE.json` template — stage names MUST match template exactly (01_prd, 02_feature_design, etc.)
|
|
71
79
|
|
|
72
80
|
**Must not do:**
|
|
73
81
|
- Manually create WORKFLOW-PROGRESS.json via Write/Edit tools
|
|
74
82
|
- Skip checkpoint recovery check
|
|
75
83
|
- Use relative paths in Worker dispatches
|
|
76
84
|
- Create iteration directory without proper naming convention
|
|
85
|
+
- Pre-create directories for later phases (`02.feature-design/`, `03.system-design/`, `04.development/`, `05.deployment/`, `06.system-test/`, `07.delivery/`) — each phase creates its own directory when needed
|
|
86
|
+
- Invent directory names not defined in `workspace-structure.md`
|
|
87
|
+
- Manually write WORKFLOW-PROGRESS.json content — MUST use template + update-progress.js script
|
|
88
|
+
- Invent custom stage names (e.g., phase0_initialization, phase1_requirement_analysis) — use template-defined names only
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"created_at": "{created_at}",
|
|
3
|
+
"updated_at": "{updated_at}",
|
|
4
|
+
"current_stage": null,
|
|
5
|
+
"stages": {
|
|
6
|
+
"01_prd": {
|
|
7
|
+
"status": "pending",
|
|
8
|
+
"started_at": null,
|
|
9
|
+
"completed_at": null,
|
|
10
|
+
"confirmed_at": null,
|
|
11
|
+
"output": null
|
|
12
|
+
},
|
|
13
|
+
"02_feature_design": {
|
|
14
|
+
"status": "pending",
|
|
15
|
+
"started_at": null,
|
|
16
|
+
"completed_at": null,
|
|
17
|
+
"confirmed_at": null,
|
|
18
|
+
"output": null
|
|
19
|
+
},
|
|
20
|
+
"03_system_design": {
|
|
21
|
+
"status": "pending",
|
|
22
|
+
"started_at": null,
|
|
23
|
+
"completed_at": null,
|
|
24
|
+
"confirmed_at": null,
|
|
25
|
+
"output": null
|
|
26
|
+
},
|
|
27
|
+
"04_development": {
|
|
28
|
+
"status": "pending",
|
|
29
|
+
"started_at": null,
|
|
30
|
+
"completed_at": null,
|
|
31
|
+
"confirmed_at": null,
|
|
32
|
+
"output": null
|
|
33
|
+
},
|
|
34
|
+
"05_deployment": {
|
|
35
|
+
"status": "pending",
|
|
36
|
+
"started_at": null,
|
|
37
|
+
"completed_at": null,
|
|
38
|
+
"confirmed_at": null,
|
|
39
|
+
"output": null
|
|
40
|
+
},
|
|
41
|
+
"06_system_test": {
|
|
42
|
+
"status": "pending",
|
|
43
|
+
"started_at": null,
|
|
44
|
+
"completed_at": null,
|
|
45
|
+
"confirmed_at": null,
|
|
46
|
+
"output": null
|
|
47
|
+
},
|
|
48
|
+
"07_delivery": {
|
|
49
|
+
"status": "pending",
|
|
50
|
+
"started_at": null,
|
|
51
|
+
"completed_at": null,
|
|
52
|
+
"confirmed_at": null,
|
|
53
|
+
"output": null
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
<field name="text">ALL WORKFLOW-PROGRESS.json operations MUST use update-progress.js script</field>
|
|
20
20
|
<field name="text">ALL path variables MUST be absolute paths</field>
|
|
21
21
|
<field name="text">Check for active iteration before creating new one</field>
|
|
22
|
+
<field name="text">Phase 0 MUST create EXACTLY TWO subdirectories: 00.docs and 01.product-requirement</field>
|
|
23
|
+
<field name="text">FORBIDDEN: Pre-creating directories for later phases (02.feature-design, 03.system-design, 04.development, etc.). Each phase creates its own directory when needed.</field>
|
|
22
24
|
</block>
|
|
23
25
|
|
|
24
26
|
<block type="rule" id="R2" level="forbidden" desc="Phase 0 Forbidden Actions">
|
|
@@ -118,7 +120,24 @@
|
|
|
118
120
|
<block type="task" id="P0-1-B9" action="run-script" status="pending" desc="Copy requirement document to iteration">
|
|
119
121
|
<field name="command">Copy-Item "${user_requirement}" "${iteration_path}/00.docs/" -ErrorAction SilentlyContinue</field>
|
|
120
122
|
</block>
|
|
121
|
-
|
|
123
|
+
|
|
124
|
+
<!-- Step 2.7: Load WORKFLOW-PROGRESS template -->
|
|
125
|
+
<block type="task" id="P0-1-B9A" action="read-file" status="pending" desc="Load WORKFLOW-PROGRESS template">
|
|
126
|
+
<field name="path" value="${skill_path}/templates/WORKFLOW-PROGRESS-TEMPLATE.json"/>
|
|
127
|
+
<field name="output" var="workflow_progress_template"/>
|
|
128
|
+
</block>
|
|
129
|
+
|
|
130
|
+
<!-- Step 2.8: Generate initial WORKFLOW-PROGRESS.json from template -->
|
|
131
|
+
<block type="task" id="P0-1-B9B" action="generate" status="pending" desc="Create WORKFLOW-PROGRESS.json from template">
|
|
132
|
+
<field name="template" value="${workflow_progress_template}"/>
|
|
133
|
+
<field name="output_path" value="${iteration_path}/WORKFLOW-PROGRESS.json"/>
|
|
134
|
+
<field name="vars">
|
|
135
|
+
- created_at: ${current_timestamp}
|
|
136
|
+
- updated_at: ${current_timestamp}
|
|
137
|
+
</field>
|
|
138
|
+
<field name="output" var="workflow_progress_path"/>
|
|
139
|
+
</block>
|
|
140
|
+
|
|
122
141
|
<!-- Step 0.1.1: Initialize WORKFLOW-PROGRESS.json -->
|
|
123
142
|
<block type="task" id="P0-1-B10" action="run-script" status="pending" desc="Initialize WORKFLOW-PROGRESS.json via script">
|
|
124
143
|
<!-- MANDATORY: Use update-progress.js script -->
|
|
@@ -2,15 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
PM Phase 5 Sub-PRD Batch Dispatch Skill.
|
|
5
|
+
PM Phase 5 Sub-PRD Batch Dispatch Skill. **Orchestration-layer skill** executed directly by PM Agent (NOT dispatched to Worker).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- Failure retry and result verification
|
|
7
|
+
This is an **orchestration skill** that PM Agent must execute directly:
|
|
8
|
+
- PM Agent reads `workflow.agentflow.xml` and executes each block step-by-step
|
|
9
|
+
- PM Agent uses Agent tool to dispatch Workers for Sub-PRD generation
|
|
10
|
+
- Workers generate Sub-PRD files; PM Agent only coordinates
|
|
12
11
|
|
|
13
|
-
**CRITICAL
|
|
12
|
+
**CRITICAL ARCHITECTURE RULE (Harness Principle 17: Orchestration Layer Separation)**:
|
|
13
|
+
- This skill contains internal `dispatch-to-worker` blocks
|
|
14
|
+
- Workers CANNOT dispatch Workers (execution hierarchy constraint)
|
|
15
|
+
- Therefore, this skill MUST be executed by PM Agent directly
|
|
16
|
+
- PM Agent MUST NOT dispatch this skill to a Worker
|
|
17
|
+
|
|
18
|
+
**Execution Method**: PM Agent reads `workflow.agentflow.xml` and follows the workflow steps.
|
|
19
|
+
|
|
20
|
+
## MANDATORY: PM Must Read workflow.agentflow.xml
|
|
21
|
+
|
|
22
|
+
> 🛑 **BEFORE executing this skill, PM Agent MUST:**
|
|
23
|
+
> 1. Read the `workflow.agentflow.xml` file in this skill directory
|
|
24
|
+
> 2. Parse each block and execute in order
|
|
25
|
+
> 3. Follow the exact workflow steps defined in the XML
|
|
26
|
+
>
|
|
27
|
+
> **FORBIDDEN:**
|
|
28
|
+
> - DO NOT execute this skill without reading the XML workflow
|
|
29
|
+
> - DO NOT skip blocks defined in the XML
|
|
30
|
+
> - DO NOT dispatch this skill to a Worker Agent
|
|
14
31
|
|
|
15
32
|
## Input Parameters
|
|
16
33
|
|
|
@@ -69,27 +86,22 @@ PM Agent loads and executes this skill directly to coordinate batch dispatch of
|
|
|
69
86
|
### Step 5.6: User Confirmation
|
|
70
87
|
- [ ] Wait for user confirmation of Sub-PRD generation results
|
|
71
88
|
|
|
72
|
-
##
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **
|
|
78
|
-
- **
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **
|
|
90
|
-
|
|
91
|
-
### FORBIDDEN - Prohibited Actions
|
|
92
|
-
- PM Agent directly generating Sub-PRD files is forbidden
|
|
93
|
-
- Dispatching one Worker to handle multiple modules is forbidden
|
|
94
|
-
- Skipping Worker dispatch as a fallback after failure is forbidden
|
|
95
|
-
- Marking checkpoint as passed before user confirmation is forbidden
|
|
89
|
+
## Must Do
|
|
90
|
+
|
|
91
|
+
- **READ workflow.agentflow.xml FIRST** — PM Agent must parse the XML workflow before any execution
|
|
92
|
+
- **Initialize DISPATCH-PROGRESS.json BEFORE any Worker dispatch** — Use update-progress.js init command
|
|
93
|
+
- **Dispatch one Worker per module** — Use Agent tool to create speccrew-task-worker with speccrew-pm-sub-prd-generate skill
|
|
94
|
+
- **Update progress after each Worker completes** — Use update-progress.js update-task command
|
|
95
|
+
- **Verify all Sub-PRD files exist** — Check file existence and size > 3KB
|
|
96
|
+
- **Update checkpoint via script** — Use update-progress.js write-checkpoint command
|
|
97
|
+
|
|
98
|
+
## Must Not Do
|
|
99
|
+
|
|
100
|
+
- **DO NOT dispatch this skill to a Worker** — Phase 5 is PM direct execution
|
|
101
|
+
- **DO NOT skip reading workflow.agentflow.xml** — XML workflow is the execution guide
|
|
102
|
+
- **DO NOT dispatch Workers before DISPATCH-PROGRESS.json is initialized** — Progress tracking is mandatory
|
|
103
|
+
- **DO NOT create DISPATCH-PROGRESS.json manually** — Must use update-progress.js script
|
|
104
|
+
- **DO NOT generate Sub-PRD content directly** — Only Workers generate Sub-PRDs
|
|
105
|
+
- **DO NOT skip progress update after Worker completes** — Must call update-task for each completed Worker
|
|
106
|
+
- **DO NOT dispatch one Worker for multiple modules** — One Worker per module
|
|
107
|
+
- **DO NOT proceed to Phase 6 without verifying all Sub-PRDs** — Completion verification is mandatory
|
|
@@ -134,7 +134,21 @@
|
|
|
134
134
|
<field name="output" var="skill_definition"/>
|
|
135
135
|
</block>
|
|
136
136
|
<block type="event" id="E8" action="log" desc="加载技能">📄 Loaded skill: ${resolved_skill_path}</block>
|
|
137
|
+
|
|
138
|
+
<!-- MANDATORY: Load XML Workflow Definition -->
|
|
139
|
+
<block type="rule" id="R-WORKFLOW-FIRST" level="mandatory" desc="XML workflow is the authoritative execution definition">
|
|
140
|
+
<field name="text">MANDATORY: workflow.agentflow.xml is the AUTHORITATIVE execution definition. SKILL.md is supplementary context only.</field>
|
|
141
|
+
<field name="text">Worker MUST read workflow.agentflow.xml BEFORE starting any task execution.</field>
|
|
142
|
+
<field name="text">Worker MUST execute ONLY the blocks defined in workflow.agentflow.xml, in sequential document order.</field>
|
|
143
|
+
<field name="text">FORBIDDEN: Executing tasks based solely on SKILL.md description without reading the XML workflow.</field>
|
|
144
|
+
</block>
|
|
137
145
|
|
|
146
|
+
<block type="task" id="T6b" action="read-file" desc="MANDATORY: Read XML workflow definition">
|
|
147
|
+
<field name="path">${skill_path}/workflow.agentflow.xml</field>
|
|
148
|
+
<field name="output" var="skill_workflow_xml"/>
|
|
149
|
+
</block>
|
|
150
|
+
<block type="event" id="E8b" action="log" desc="Loaded XML workflow">📄 Loaded workflow: ${skill_path}/workflow.agentflow.xml — This is the AUTHORITATIVE execution plan. Execute blocks in document order.</block>
|
|
151
|
+
|
|
138
152
|
<!-- 加载 AgentFlow 规范 -->
|
|
139
153
|
<block type="task" id="T7" action="read-file" desc="读取 AgentFlow 规范">
|
|
140
154
|
<field name="path">${workspace_root}/speccrew-workspace/docs/rules/agentflow-spec.md</field>
|
|
@@ -143,10 +157,12 @@
|
|
|
143
157
|
<block type="event" id="E9" action="log" desc="加载规范">📖 Loaded AgentFlow specification</block>
|
|
144
158
|
|
|
145
159
|
<!-- 执行技能工作流 -->
|
|
146
|
-
<block type="task" id="T8" action="run-skill" desc="
|
|
160
|
+
<block type="task" id="T8" action="run-skill" desc="Execute skill workflow — follow XML blocks sequentially">
|
|
147
161
|
<field name="skill">${resolved_skill_path}</field>
|
|
148
162
|
<field name="context">${context}</field>
|
|
149
163
|
<field name="skill_path">${skill_path}</field>
|
|
164
|
+
<field name="workflow_xml">${skill_workflow_xml}</field>
|
|
165
|
+
<field name="execution_mode">xml-block-sequential</field>
|
|
150
166
|
</block>
|
|
151
167
|
<field name="execution_status" value="success"/>
|
|
152
168
|
</branch>
|