speccrew 0.7.56 → 0.7.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,8 +31,8 @@ Phase 2: Resource Verification
|
|
|
31
31
|
Phase 3: Framework Evaluation (HARD STOP)
|
|
32
32
|
└── Dispatch speccrew-sd-framework-evaluate skill → User confirms
|
|
33
33
|
↓
|
|
34
|
-
Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH)
|
|
35
|
-
└── Dispatch speccrew-sd-design-overview-generate skill → Wait for worker → Validate
|
|
34
|
+
Phase 4: Generate DESIGN-OVERVIEW.md (WORKER-DISPATCH + HARD STOP)
|
|
35
|
+
└── Dispatch speccrew-sd-design-overview-generate skill → Wait for worker → Validate → User confirms
|
|
36
36
|
↓
|
|
37
37
|
Phase 5: Dispatch Per-Platform Skills
|
|
38
38
|
├── Single Feature + Single Platform → Direct skill invocation
|
|
@@ -126,7 +126,7 @@ This agent MUST execute tasks continuously without unnecessary interruptions.
|
|
|
126
126
|
| Phase 2 | KNOWLEDGE-FIRST | MUST load ALL techs knowledge before Phase 3. DO NOT assume technology stack |
|
|
127
127
|
| Phase 3 | WORKER-DISPATCH | Framework evaluation MUST be dispatched to speccrew-task-worker via **Agent tool**. Agent MUST NOT invoke speccrew-sd-framework-evaluate via Skill tool. |
|
|
128
128
|
| Phase 3 | HARD STOP | User must confirm framework decisions before proceeding to Phase 4 |
|
|
129
|
-
| Phase 4 | WORKER-DISPATCH | DESIGN-OVERVIEW.md generation MUST be dispatched to speccrew-task-worker via **Agent tool**.
|
|
129
|
+
| Phase 4 | WORKER-DISPATCH + HARD STOP | DESIGN-OVERVIEW.md generation MUST be dispatched to speccrew-task-worker via **Agent tool**. After worker completes, present summary to user and WAIT for confirmation before Phase 5. |
|
|
130
130
|
| Phase 5 | SKILL-ONLY | Platform design workers MUST use platform-specific design skills. Agent MUST NOT write design documents itself |
|
|
131
131
|
| Phase 6 | HARD STOP | User must confirm all designs before finalizing |
|
|
132
132
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT generate content manually as fallback |
|
|
@@ -544,6 +544,20 @@ Proceed to Phase 4? (Confirm/Cancel)
|
|
|
544
544
|
> - ❌ DO NOT generate DESIGN-OVERVIEW.md yourself
|
|
545
545
|
> - ❌ DO NOT use Skill tool to invoke speccrew-sd-design-overview-generate
|
|
546
546
|
|
|
547
|
+
> ⚠️ **HARD STOP — Phase 4.5: DESIGN-OVERVIEW.md Confirmation**
|
|
548
|
+
> After worker completes and DESIGN-OVERVIEW.md passes validation:
|
|
549
|
+
> 1. Present summary to user: feature count, platform count, matrix entries, key design decisions
|
|
550
|
+
> 2. **STOP** — Wait for user explicit confirmation
|
|
551
|
+
> 3. User responses:
|
|
552
|
+
> - "确认" or "OK" → Update checkpoint, proceed to Phase 5
|
|
553
|
+
> - "修改" + specific changes → Re-dispatch worker with adjustments
|
|
554
|
+
> - "取消" → Abort workflow
|
|
555
|
+
> **FORBIDDEN during HARD STOP**:
|
|
556
|
+
> - ❌ DO NOT update checkpoint until user confirms
|
|
557
|
+
> - ❌ DO NOT suggest next steps
|
|
558
|
+
> - ❌ DO NOT proceed to Phase 5
|
|
559
|
+
> - ❌ DO NOT auto-approve even if all validations pass
|
|
560
|
+
|
|
547
561
|
Create the top-level overview at:
|
|
548
562
|
`{iterations_dir}/{current}/03.system-design/DESIGN-OVERVIEW.md`
|
|
549
563
|
|
|
@@ -772,6 +786,20 @@ node {update_progress_script} update-task --file {iterations_dir}/{current}/03.s
|
|
|
772
786
|
|
|
773
787
|
All workers execute simultaneously to maximize efficiency.
|
|
774
788
|
|
|
789
|
+
> 🛑 **CRITICAL: Phase 5 dispatch-to-worker Protocol**
|
|
790
|
+
> 1. **ONE Worker per Feature×Platform combination** — DO NOT group
|
|
791
|
+
> 2. Use **Agent tool** to create `speccrew-task-worker` for each task
|
|
792
|
+
> 3. Pass `skill_path`: `${ide_skills_dir}/${skill_name}/SKILL.md` (platform-specific skill)
|
|
793
|
+
> 4. Pass context: task_id, feature_id, feature_name, platform_id, feature_spec_path, api_contract_path, techs_knowledge_paths, framework_decisions, output_base_path
|
|
794
|
+
> 5. Dispatch ALL Workers in the same batch **SIMULTANEOUSLY** in a single turn
|
|
795
|
+
> 6. **Wait** for ALL Workers in the batch to complete before dispatching next batch
|
|
796
|
+
> 7. Update DISPATCH-PROGRESS.json after each Worker completes
|
|
797
|
+
> **FORBIDDEN**:
|
|
798
|
+
> - ❌ DO NOT group multiple features into one Worker
|
|
799
|
+
> - ❌ DO NOT use Skill tool to invoke platform skills (when Features ≥ 2 OR Platforms ≥ 2)
|
|
800
|
+
> - ❌ DO NOT dispatch Workers sequentially — ALL in same batch must be simultaneous
|
|
801
|
+
> - ❌ DO NOT generate *-design.md files yourself as fallback
|
|
802
|
+
|
|
775
803
|
### 5.5 Update DISPATCH-PROGRESS.json
|
|
776
804
|
|
|
777
805
|
After each worker completes, parse its **Task Completion Report** and update:
|
|
@@ -114,13 +114,40 @@ This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
|
114
114
|
4. **Wait** for the worker agent to complete and return results
|
|
115
115
|
5. After worker completes, verify DESIGN-OVERVIEW.md exists at output_path
|
|
116
116
|
6. Then proceed to Phase 4 checkpoint validation (P4-CP1)
|
|
117
|
+
7. Present DESIGN-OVERVIEW.md summary to user (feature count, platform count, matrix entries)
|
|
118
|
+
8. **⚠️ HARD STOP** — Wait for user explicit confirmation before proceeding to Phase 5
|
|
117
119
|
|
|
118
120
|
**CRITICAL**: The `Agent tool` creates a NEW agent session — this is completely different from the `Skill tool` which executes inline.
|
|
119
121
|
|
|
122
|
+
### Phase 5 Execution Method — Feature×Platform Worker Dispatch
|
|
123
|
+
|
|
124
|
+
**DISPATCH GRANULARITY**: ONE Worker per Feature×Platform combination — NO EXCEPTIONS.
|
|
125
|
+
|
|
126
|
+
**HOW TO DISPATCH**: When executing Phase 5 dispatch blocks (action="dispatch-to-worker"):
|
|
127
|
+
1. Build Feature×Platform matrix from DESIGN-OVERVIEW.md Platform Design Index
|
|
128
|
+
2. Create `.tasks-temp.json` with one entry per Feature×Platform combination
|
|
129
|
+
3. Initialize DISPATCH-PROGRESS.json via `update-progress.js init`
|
|
130
|
+
4. Compute batch plan (batch size = 6)
|
|
131
|
+
5. For each batch:
|
|
132
|
+
a. Use **Agent tool** to create `speccrew-task-worker` agents for ALL tasks in the batch **SIMULTANEOUSLY**
|
|
133
|
+
b. Each Worker receives: `skill_path` (platform-specific skill), `task_id`, `feature_id`, `feature_name`, `platform_id`, `feature_spec_path`, `api_contract_path`, `techs_knowledge_paths`, `framework_decisions`, `output_base_path`
|
|
134
|
+
c. **Wait** for ALL Workers in the batch to complete
|
|
135
|
+
d. Update DISPATCH-PROGRESS.json for each completed Worker
|
|
136
|
+
e. Log batch progress
|
|
137
|
+
6. After all batches complete, read final progress summary
|
|
138
|
+
|
|
139
|
+
**CRITICAL**: Each Worker handles exactly ONE feature on ONE platform. DO NOT group multiple features or platforms into a single Worker.
|
|
140
|
+
|
|
141
|
+
**Example** (5 features × 3 platforms = 15 workers, 3 batches of 6/6/3):
|
|
142
|
+
- Batch 1: Workers 1-6 (parallel)
|
|
143
|
+
- Batch 2: Workers 7-12 (parallel, after batch 1 completes)
|
|
144
|
+
- Batch 3: Workers 13-15 (parallel, after batch 2 completes)
|
|
145
|
+
|
|
120
146
|
### HARD STOP Checkpoints
|
|
121
147
|
|
|
122
148
|
This workflow has **mandatory HARD STOP** checkpoints at:
|
|
123
|
-
- **Phase 3.5**: Framework evaluation confirmation (user MUST approve)
|
|
149
|
+
- **Phase 3.5**: Framework evaluation confirmation (user MUST approve framework decisions)
|
|
150
|
+
- **Phase 4.5**: Design overview confirmation (user MUST approve DESIGN-OVERVIEW.md before Phase 5 dispatch)
|
|
124
151
|
- **Phase 6.1**: Joint design confirmation (user MUST approve all designs)
|
|
125
152
|
|
|
126
153
|
DO NOT proceed past these checkpoints without explicit user confirmation.
|
|
@@ -144,3 +171,5 @@ DO NOT proceed past these checkpoints without explicit user confirmation.
|
|
|
144
171
|
- **DO NOT skip reading workflow.agentflow.xml** — XML is the execution authority
|
|
145
172
|
- **DO NOT generate DESIGN-OVERVIEW.md yourself** — Dispatch speccrew-task-worker with speccrew-sd-design-overview-generate skill
|
|
146
173
|
- **DO NOT use Skill tool for Phase 4 design overview generation** — Skill tool executes inline, Agent tool creates a worker
|
|
174
|
+
- **DO NOT group multiple features into a single Worker** — Each Worker handles exactly ONE feature on ONE platform
|
|
175
|
+
- **DO NOT dispatch Workers sequentially** — ALL Workers in the same batch MUST be dispatched simultaneously
|
|
@@ -285,6 +285,15 @@
|
|
|
285
285
|
<block type="checkpoint" id="P4-CP1" name="design_overview" desc="DESIGN-OVERVIEW validation">
|
|
286
286
|
<field name="conditions">file_exists, has_design_scope_section, has_tech_decisions_section, has_platform_design_index, index_covers_all_feature_platform_combinations</field>
|
|
287
287
|
</block>
|
|
288
|
+
|
|
289
|
+
<!-- Phase 4.5: HARD STOP — User must confirm DESIGN-OVERVIEW.md -->
|
|
290
|
+
<block type="rule" id="P4-HS1" level="mandatory" desc="HARD STOP — DESIGN-OVERVIEW.md confirmation required">
|
|
291
|
+
<field name="text">⚠️ HARD STOP — WAIT FOR USER CONFIRMATION</field>
|
|
292
|
+
<field name="text">Present DESIGN-OVERVIEW.md summary to user (feature count, platform count, matrix entries, key sections)</field>
|
|
293
|
+
<field name="text">User responses: "确认"/"OK" → proceed to Phase 5 | "修改" + changes → re-dispatch worker | "取消" → abort</field>
|
|
294
|
+
<field name="text">FORBIDDEN: Do NOT update checkpoint, suggest next steps, or proceed to Phase 5 until user explicitly confirms</field>
|
|
295
|
+
<field name="text">FORBIDDEN: Do NOT auto-approve even if validation passes — user review is mandatory</field>
|
|
296
|
+
</block>
|
|
288
297
|
</sequence>
|
|
289
298
|
|
|
290
299
|
<!-- ========== Phase 5: Dispatch Per-Platform Skills ========== -->
|
|
@@ -332,25 +341,91 @@
|
|
|
332
341
|
</block>
|
|
333
342
|
</branch>
|
|
334
343
|
<branch default="true" name="Multi Feature/Platform - Worker Dispatch Required">
|
|
335
|
-
<!-- Parallel Worker Dispatch -->
|
|
336
|
-
<block type="rule" id="P5-R2" level="mandatory" desc="
|
|
337
|
-
<field name="text">
|
|
338
|
-
<field name="text">
|
|
344
|
+
<!-- Parallel Worker Dispatch with Batch Loop -->
|
|
345
|
+
<block type="rule" id="P5-R2" level="mandatory" desc="Feature×Platform dispatch rules">
|
|
346
|
+
<field name="text">ONE Worker per Feature×Platform combination — NO EXCEPTIONS</field>
|
|
347
|
+
<field name="text">DO NOT group multiple features or platforms into a single Worker</field>
|
|
348
|
+
<field name="text">ALL Workers in the same batch MUST be dispatched IN PARALLEL — sequential dispatch is FORBIDDEN</field>
|
|
349
|
+
<field name="text">ALL Worker dispatch calls MUST be issued SIMULTANEOUSLY in a SINGLE orchestration turn</field>
|
|
350
|
+
<field name="text">DO NOT wait for any Worker to complete before dispatching the next Worker in the same batch</field>
|
|
351
|
+
<field name="text">Batch size is 6 — DO NOT exceed</field>
|
|
352
|
+
<field name="text">Each Worker MUST receive a single feature_spec_path and single platform_id — NOT arrays</field>
|
|
353
|
+
</block>
|
|
354
|
+
|
|
355
|
+
<!-- Compute batch plan from dispatch_tasks_matrix -->
|
|
356
|
+
<block type="task" id="P5-B4-BATCH" action="compute-batches" status="pending"
|
|
357
|
+
desc="Calculate batch plan from Feature×Platform matrix">
|
|
358
|
+
<field name="items" value="${dispatch_tasks_matrix}"/>
|
|
359
|
+
<field name="batch_size" value="6"/>
|
|
360
|
+
<field name="output" var="batch_plan"/>
|
|
339
361
|
</block>
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
362
|
+
|
|
363
|
+
<!-- Batch Loop: Process all Feature×Platform tasks in batches of 6 -->
|
|
364
|
+
<block type="loop" id="P5-L-MAIN" over="${batch_plan.batches}" as="batch"
|
|
365
|
+
desc="Process batches sequentially — wait for each batch to complete before next">
|
|
366
|
+
|
|
367
|
+
<!-- Parallel dispatch for each task in current batch -->
|
|
368
|
+
<block type="loop" id="P5-L-INNER" over="${batch.tasks}" as="task" parallel="true" max-concurrency="6"
|
|
369
|
+
desc="Dispatch Worker for each Feature×Platform combination IN PARALLEL">
|
|
370
|
+
|
|
371
|
+
<!-- Update task status to in_progress -->
|
|
372
|
+
<block type="task" id="P5-B4-PRE" action="run-script" status="pending"
|
|
373
|
+
desc="Update task status to in_progress before dispatch">
|
|
374
|
+
<field name="command">node "${update_progress_script}" update-task --file "${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json" --task-id "${task.id}" --status in_progress</field>
|
|
375
|
+
</block>
|
|
376
|
+
|
|
377
|
+
<!-- Dispatch single Worker for ONE Feature × ONE Platform -->
|
|
378
|
+
<block type="task" id="P5-B4-DISPATCH" action="dispatch-to-worker" status="pending"
|
|
379
|
+
desc="Dispatch Worker: ${task.feature_id} on ${task.platform_id}">
|
|
380
|
+
<field name="agent">speccrew-task-worker</field>
|
|
381
|
+
<field name="skill">${task.skill}</field>
|
|
382
|
+
<field name="skill_path">${ide_skills_dir}/${task.skill}/SKILL.md</field>
|
|
383
|
+
<field name="context">
|
|
384
|
+
task_id: ${task.id},
|
|
385
|
+
feature_id: ${task.feature_id},
|
|
386
|
+
feature_name: ${task.feature_name},
|
|
387
|
+
platform_id: ${task.platform_id},
|
|
388
|
+
feature_spec_path: ${task.feature_spec_path},
|
|
389
|
+
api_contract_path: ${task.api_contract_path},
|
|
390
|
+
techs_knowledge_paths: ${task.techs_knowledge_paths},
|
|
391
|
+
framework_decisions: ${framework_result.decisions},
|
|
392
|
+
output_base_path: ${iterations_dir}/${current_iteration}/03.system-design
|
|
393
|
+
</field>
|
|
394
|
+
<field name="output" var="worker_result_${task.id}"/>
|
|
395
|
+
</block>
|
|
396
|
+
|
|
397
|
+
<!-- Update progress after worker completes -->
|
|
398
|
+
<block type="task" id="P5-B4-POST" action="run-script" status="pending"
|
|
399
|
+
desc="Update task progress after worker completes">
|
|
400
|
+
<field name="command">node "${update_progress_script}" update-task --file "${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json" --task-id "${task.id}" --status ${worker_result_${task.id}.status}</field>
|
|
401
|
+
</block>
|
|
402
|
+
|
|
403
|
+
</block>
|
|
404
|
+
|
|
405
|
+
<!-- Log batch completion -->
|
|
406
|
+
<block type="task" id="P5-B4-BATCH-READ" action="run-script" status="pending"
|
|
407
|
+
desc="Read current progress after batch">
|
|
408
|
+
<field name="command">node "${update_progress_script}" read --file "${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json" --summary</field>
|
|
409
|
+
<field name="output" var="batch_progress"/>
|
|
410
|
+
</block>
|
|
411
|
+
|
|
412
|
+
<block type="event" id="P5-E-BATCH-END" action="log" level="info"
|
|
413
|
+
desc="Log batch completion">
|
|
414
|
+
<field name="message">✅ Batch ${batch.index} Complete
|
|
415
|
+
├── Progress: ${batch_progress.counts.completed}/${dispatch_tasks_matrix.length} completed
|
|
416
|
+
├── Failed: ${batch_progress.counts.failed}
|
|
417
|
+
└── Remaining: ${batch_progress.counts.pending}</field>
|
|
418
|
+
</block>
|
|
419
|
+
|
|
346
420
|
</block>
|
|
347
421
|
</branch>
|
|
348
422
|
</block>
|
|
349
423
|
|
|
350
|
-
<!-- Step 5.5:
|
|
424
|
+
<!-- Step 5.5: Read final dispatch progress -->
|
|
351
425
|
<block type="task" id="P5-B5" action="run-script" status="pending"
|
|
352
|
-
desc="
|
|
353
|
-
<field name="command">node ${update_progress_script}
|
|
426
|
+
desc="Read final dispatch progress summary">
|
|
427
|
+
<field name="command">node "${update_progress_script}" read --file "${iterations_dir}/${current_iteration}/03.system-design/DISPATCH-PROGRESS.json" --summary</field>
|
|
428
|
+
<field name="output" var="final_dispatch_progress"/>
|
|
354
429
|
</block>
|
|
355
430
|
|
|
356
431
|
<!-- Step 5.6: Error Handling -->
|