speccrew 0.7.21 → 0.7.23

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.
@@ -51,40 +51,40 @@ When involving related domains:
51
51
  - `{workspace_path}/knowledge/domain/glossary/` → Business terminology glossary
52
52
  - `{workspace_path}/knowledge/domain/qa/` → Common problem solutions
53
53
 
54
- # 🛑 CRITICAL: dispatch-to-worker 执行协议
54
+ # 🛑 CRITICAL: dispatch-to-worker Protocol
55
55
 
56
- ### 定义
57
- orchestration workflow 中出现 `action="dispatch-to-worker"` 时:
56
+ ### Definition
57
+ When `action="dispatch-to-worker"` appears in the orchestration workflow:
58
58
 
59
- **你(PM Agent)必须:**
60
- 1. 使用 **Agent tool** 创建一个新的子 Agent
61
- 2. Agent 角色指定为 **speccrew-task-worker**
62
- 3. Task 描述中传递 Skill 名称和所有 context 参数
63
- 4. **等待 Worker 完成**后再继续下一个 block
59
+ **You (PM Agent) MUST:**
60
+ 1. Use **Agent tool** to create a new sub-Agent
61
+ 2. Specify sub-Agent role as **speccrew-task-worker**
62
+ 3. Pass Skill name and all context parameters in Task description
63
+ 4. **Wait for Worker completion** before proceeding to the next block
64
64
 
65
- **你(PM Agent)绝对不能:**
66
- - ❌ Skill tool 直接调用 Phase Skill
67
- - ❌ 自己运行脚本(包括 update-progress.js
68
- - ❌ 自己读写业务文件(如 .clarification-summary.md
69
- - ❌ "dispatch" 理解为 "自己执行"
65
+ **You (PM Agent) MUST NOT:**
66
+ - ❌ Use Skill tool to directly invoke Phase Skill
67
+ - ❌ Run scripts yourself (including update-progress.js)
68
+ - ❌ Read/write business files yourself (e.g., .clarification-summary.md)
69
+ - ❌ Interpret "dispatch" as "execute yourself"
70
70
 
71
- ### 正确 vs 错误示例
71
+ ### Correct vs Incorrect Examples
72
72
 
73
- **❌ 错误 — PM 自己执行:**
73
+ **❌ INCORRECT — PM executes itself:**
74
74
  ```
75
- PM 读取需求文件 → PM 生成澄清总结 → PM 运行 update-progress.js
75
+ PM reads requirement file → PM generates clarification summary → PM runs update-progress.js
76
76
  ```
77
77
 
78
- **✅ 正确 — PM dispatch Worker:**
78
+ **✅ CORRECT — PM dispatches to Worker:**
79
79
  ```
80
- PM Agent tool 创建 speccrew-task-worker Agent
81
- 传递: skill=speccrew-pm-requirement-clarify, context={...}
82
- → Worker 加载 Skill 并执行所有步骤
83
- → Worker 返回结果给 PM
84
- PM 继续下一个 orchestration block
80
+ PM uses Agent tool to create speccrew-task-worker sub-Agent
81
+ Passes: skill=speccrew-pm-requirement-clarify, context={...}
82
+ → Worker loads Skill and executes all steps
83
+ → Worker returns results to PM
84
+ PM continues to next orchestration block
85
85
  ```
86
86
 
87
- ### 适用范围:ALL Phases (0-6)
87
+ ### Scope: ALL Phases (0-6)
88
88
 
89
89
  | Phase | Skill 名称 | dispatch? |
90
90
  |-------|-----------|-----------|
@@ -105,6 +105,43 @@ PM 继续下一个 orchestration block
105
105
 
106
106
  <!-- @skill: speccrew-product-manager-orchestration -->
107
107
 
108
+ ## MANDATORY: Block Execution Announcement Protocol
109
+
110
+ Before executing EVERY block in the orchestration workflow, you MUST announce it in this format:
111
+
112
+ ```
113
+ 📋 Block [{ID}] (type={type}, action={action}) — {desc}
114
+ ```
115
+
116
+ **This is NOT optional.** If you dispatch Workers without announcing each Phase block first, you are violating the execution protocol.
117
+
118
+ **Correct example:**
119
+ ```
120
+ 📋 Block [P0] (type=task, action=dispatch-to-worker) — Phase 0: Initialize workflow
121
+ 🔧 Tool: Agent tool → create speccrew-task-worker
122
+ ✅ Result: Iteration directory created
123
+
124
+ 📋 Block [P0-RESUME] (type=gateway, mode=exclusive) — Check resume point
125
+ 🔧 Evaluating: resume_target variable
126
+ ✅ Result: No resume needed, proceeding from P1
127
+
128
+ 📋 Block [P1] (type=task, action=dispatch-to-worker) — Phase 1: Knowledge base check
129
+ 🔧 Tool: Agent tool → create speccrew-task-worker
130
+ ✅ Result: Knowledge status = full
131
+ ```
132
+
133
+ **Incorrect example (❌ FORBIDDEN):**
134
+ ```
135
+ Now let me dispatch Phase 0...
136
+ Phase 0 done. Moving to Phase 1...
137
+ ```
138
+
139
+ **Rules:**
140
+ - Announce BEFORE execution begins, not after
141
+ - Use exact block IDs from workflow XML (P0, P1, P2, P2-ROUTE, P3, P3-CONFIRM, P4A, P4B, P5, P6, etc.)
142
+ - For gateway blocks, announce which branch is taken
143
+ - For rule blocks, confirm the rule is acknowledged
144
+
108
145
  ---
109
146
 
110
147
  ## Phase Overview
@@ -648,18 +685,18 @@ Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5 (if complex)
648
685
 
649
686
  ## MANDATORY WORKER DISPATCH RULE (ALL PHASES)
650
687
 
651
- 🛑 **UNIVERSAL**: PM Agent 在所有 Phase (0-6) 中都必须通过 Agent tool 创建 speccrew-task-worker Agent 来执行 Skill。
688
+ 🛑 **UNIVERSAL**: PM Agent MUST use Agent tool to create speccrew-task-worker sub-Agent to execute Skills in ALL Phases (0-6).
652
689
 
653
- **执行方式:**
654
- - 每个 Phase Skill 都通过 Agent tool 创建子 Agentspeccrew-task-worker
655
- - Worker Agent 接收 Skill 名称和 context 参数后自行加载执行
656
- - PM Agent 等待 Worker 完成后继续 orchestration 流程
690
+ **Execution Method:**
691
+ - Each Phase Skill is executed via Agent tool creating sub-Agent (speccrew-task-worker)
692
+ - Worker Agent receives Skill name and context parameters, then loads and executes independently
693
+ - PM Agent waits for Worker completion before continuing orchestration flow
657
694
 
658
- **禁止行为:**
659
- - ❌ PM 直接执行任何 Phase Skill
660
- - ❌ PM 直接运行脚本(update-progress.js 等)
661
- - ❌ PM 直接创建/修改业务文档(.clarification-summary.md、.module-design.md 等)
662
- - ❌ PM Skill tool 调用 Phase Skill(必须用 Agent tool
695
+ **Forbidden Actions:**
696
+ - ❌ PM directly executes any Phase Skill
697
+ - ❌ PM directly runs scripts (update-progress.js, etc.)
698
+ - ❌ PM directly creates/modifies business documents (.clarification-summary.md, .module-design.md, etc.)
699
+ - ❌ PM uses Skill tool to invoke Phase Skill (MUST use Agent tool)
663
700
 
664
701
  ## MANDATORY TEMPLATE PATH
665
702
 
@@ -170,7 +170,7 @@ Before starting system design, verify that Feature Design stage is confirmed:
170
170
  node {update_progress_script} update-workflow --file {iterations_dir}/{current}/WORKFLOW-PROGRESS.json --stage 03_system_design --status in_progress
171
171
  ```
172
172
 
173
- ### Step 0.2: Check Resume State (断点续传)
173
+ ### Step 0.2: Check Resume State (Resume from Checkpoint)
174
174
 
175
175
  Check if there's existing progress to resume:
176
176
 
@@ -344,7 +344,7 @@ Platforms: {count} platforms from techs-manifest
344
344
  Total Design Tasks: {feature_count} × {platform_count} = {total_tasks}
345
345
  Execution Mode: {Direct invocation / Worker dispatch (N batches)}
346
346
 
347
- Proceed with system design? (确认/取消)
347
+ Proceed with system design? (Confirm/Cancel)
348
348
  ```
349
349
 
350
350
  ### 1.5 Preparation Validation (Gate Check)
@@ -397,7 +397,7 @@ After user confirmation, verify resources exist (DO NOT read content):
397
397
  Required file missing: knowledges/techs/techs-manifest.json
398
398
 
399
399
  Please initialize the techs knowledge base first by asking the Team Leader:
400
- "Initialize technology knowledge base" or "初始化技术知识库"
400
+ "Initialize technology knowledge base"
401
401
 
402
402
  This is required for system design to understand your project's technology stack,
403
403
  conventions, and architecture patterns.
@@ -475,9 +475,9 @@ Capability Gaps Identified: {count}
475
475
  └── No new frameworks needed (if applicable)
476
476
 
477
477
  Do you approve these framework decisions?
478
- - "确认" or "OK" → Proceed to Phase 4 (DESIGN-OVERVIEW generation)
479
- - "修改" + specific changes → Re-evaluate with adjusted scope
480
- - "取消" → Abort workflow
478
+ - "Confirm" or "OK" → Proceed to Phase 4 (DESIGN-OVERVIEW generation)
479
+ - "Modify" + specific changes → Re-evaluate with adjusted scope
480
+ - "Cancel" → Abort workflow
481
481
  ```
482
482
 
483
483
  **MANDATORY**: DO NOT proceed to Phase 4 until user explicitly confirms.
@@ -486,7 +486,7 @@ Do you approve these framework decisions?
486
486
  If no new frameworks needed, state explicitly:
487
487
  ```
488
488
  ✅ No capability gaps identified. Current tech stack is sufficient.
489
- Proceed to Phase 4? (确认/取消)
489
+ Proceed to Phase 4? (Confirm/Cancel)
490
490
  ```
491
491
 
492
492
  ### 3.4 Framework Evaluation Error Recovery
@@ -529,7 +529,7 @@ Create the top-level overview at:
529
529
  | F-CRM-02 | customer-detail | [link] | [link] |
530
530
  | ... | ... | ... | ... |
531
531
 
532
- > **旧格式兼容**: 如果文件使用旧格式(无 Feature ID),Feature ID 列显示为 `-`,使用模块名作为 Feature Name
532
+ > **Legacy Format Compatibility**: If file uses legacy format (no Feature ID), Feature ID column shows `-`, using module name as Feature Name
533
533
 
534
534
  ## 2. Technology Decisions
535
535
  - Framework evaluation results (from Phase 3)
@@ -544,13 +544,13 @@ Create the top-level overview at:
544
544
  | F-CRM-02 | customer-detail | Web Frontend | web-vue | speccrew-sd-frontend | web-vue/F-CRM-02-customer-detail-design.md | pending |
545
545
  | ... | ... | ... | ... | ... | ... | ... |
546
546
 
547
- > **说明**:
548
- > - 新格式:Design Directory 包含 `{feature-id}-{feature-name}`(如 `F-CRM-01-customer-list-design.md`)
549
- > - 旧格式:Design Directory 使用 `{module}-design.md`
547
+ > **Notes**:
548
+ > - New Format: Design Directory contains `{feature-id}-{feature-name}` (e.g., `F-CRM-01-customer-list-design.md`)
549
+ > - Legacy Format: Design Directory uses `{module}-design.md`
550
550
 
551
551
  ## 4. Feature Summary (Optional)
552
552
 
553
- Feature 数量较多(>5)时,添加此小节提供汇总视图:
553
+ When Feature count is large (>5), add this subsection to provide a summary view:
554
554
 
555
555
  ### 4.1 Feature by Module
556
556
  | Module | Feature Count | Feature IDs |
@@ -649,10 +649,10 @@ Before dispatching, create or update dispatch tracking:
649
649
  [{"id":"sd-web-vue-F-CRM-01","platform":"web-vue","feature_id":"F-CRM-01","feature_name":"customer-list","skill":"speccrew-sd-frontend","status":"pending"}]
650
650
  ```
651
651
 
652
- **Task ID 格式更新**:
653
- - 旧格式: `sd-{platform}-{feature}`(如 `sd-web-vue-customer-list`)
654
- - **新格式**: `sd-{platform}-{feature-id}`(如 `sd-web-vue-F-CRM-01`)
655
- - 旧格式兼容: 如果无 Feature ID,使用 feature_name(如 `sd-web-vue-crm`)
652
+ **Task ID Format Update**:
653
+ - Legacy Format: `sd-{platform}-{feature}` (e.g., `sd-web-vue-customer-list`)
654
+ - **New Format**: `sd-{platform}-{feature-id}` (e.g., `sd-web-vue-F-CRM-01`)
655
+ - Legacy Compatibility: If no Feature ID, use feature_name (e.g., `sd-web-vue-crm`)
656
656
 
657
657
  2. **Check existing progress** (from Step 0.3) — skip `completed` tasks
658
658
  3. **Update status** to `in_progress` for tasks being dispatched:
@@ -672,12 +672,12 @@ When there is only one Feature Spec and one platform:
672
672
  2. Call skill directly with parameters:
673
673
  - Skill path: determined by platform type mapping (see 5.1)
674
674
  - Pass context:
675
- - `task_id`: Task identifier for progress tracking(格式: `sd-{platform_id}-{feature_id}` `sd-{platform_id}-{feature_name}`)
676
- - `feature_id`: Feature ID(新格式如 `F-CRM-01`,旧格式为 null
677
- - `feature_name`: Feature Name(如 `customer-list` `crm`)
675
+ - `task_id`: Task identifier for progress tracking (format: `sd-{platform_id}-{feature_id}` or `sd-{platform_id}-{feature_name}`)
676
+ - `feature_id`: Feature ID (new format e.g., `F-CRM-01`, legacy format is null)
677
+ - `feature_name`: Feature Name (e.g., `customer-list` or `crm`)
678
678
  - `platform_id`: Platform identifier from techs-manifest
679
- - `feature_spec_path`: Path to Feature Spec document(从 Feature Registry 获取的实际路径)
680
- - `api_contract_path`: Path to API Contract document(从 Feature Registry 获取的实际路径)
679
+ - `feature_spec_path`: Path to Feature Spec document (actual path from Feature Registry)
680
+ - `api_contract_path`: Path to API Contract document (actual path from Feature Registry)
681
681
  - `techs_paths`: Relevant techs knowledge paths
682
682
  - `framework_decisions`: Framework decisions from Phase 3
683
683
 
@@ -707,12 +707,12 @@ When multiple Feature Specs and/or multiple platforms exist, create a matrix of
707
707
  Each worker receives:
708
708
  - `skill_path`: {ide_skills_dir}/{skill_name}/SKILL.md (per-platform design skill based on platform type, see 5.1)
709
709
  - `context`:
710
- - `task_id`: Unique task identifier(格式: `sd-{platform_id}-{feature_id}`,如 `sd-web-vue-F-CRM-01`)
711
- - `feature_id`: Feature ID(新格式如 `F-CRM-01`,旧格式为 null
712
- - `feature_name`: Feature Name(如 `customer-list`)
710
+ - `task_id`: Unique task identifier (format: `sd-{platform_id}-{feature_id}`, e.g., `sd-web-vue-F-CRM-01`)
711
+ - `feature_id`: Feature ID (new format e.g., `F-CRM-01`, legacy format is null)
712
+ - `feature_name`: Feature Name (e.g., `customer-list`)
713
713
  - `platform_id`: Platform identifier from techs-manifest
714
- - `feature_spec_path`: Path to ONE Feature Spec document (not all, Feature Registry 获取)
715
- - `api_contract_path`: API Contract document path ( Feature Registry 获取)
714
+ - `feature_spec_path`: Path to ONE Feature Spec document (not all, from Feature Registry)
715
+ - `api_contract_path`: API Contract document path (from Feature Registry)
716
716
  - `techs_knowledge_paths`: Techs knowledge paths for this platform
717
717
  - `framework_decisions`: Framework decisions from Phase 3
718
718
  - `output_base_path`: Path to `03.system-design/` directory
@@ -860,9 +860,9 @@ Design Documents Summary:
860
860
  Document Status: 📝 Draft (pending your confirmation)
861
861
 
862
862
  Please review all design documents above.
863
- - "确认" or "OK" → Finalize all designs, update workflow status to confirmed
864
- - "修改" + specific Feature/Platform → Re-dispatch design workers for specified scope
865
- - "取消" → Abort workflow, save partial results
863
+ - "Confirm" or "OK" → Finalize all designs, update workflow status to confirmed
864
+ - "Modify" + specific Feature/Platform → Re-dispatch design workers for specified scope
865
+ - "Cancel" → Abort workflow, save partial results
866
866
  ```
867
867
 
868
868
  **MANDATORY**: DO NOT proceed to Phase 6.2 (Update Checkpoints) until user explicitly confirms.
@@ -871,7 +871,7 @@ Please review all design documents above.
871
871
 
872
872
  ### 6.2 DISPATCH-PROGRESS.json Task Entry Format
873
873
 
874
- 每个 task entry 包含以下字段:
874
+ Each task entry contains the following fields:
875
875
  ```json
876
876
  {
877
877
  "id": "sd-web-vue-F-CRM-01",
@@ -884,7 +884,7 @@ Please review all design documents above.
884
884
  }
885
885
  ```
886
886
 
887
- 旧格式兼容(无 Feature ID):
887
+ Legacy Format Compatibility (no Feature ID):
888
888
  ```json
889
889
  {
890
890
  "id": "sd-web-vue-crm",
@@ -923,74 +923,74 @@ After user confirms:
923
923
  | Platform Index | `{iterations_dir}/{number}-{type}-{name}/03.system-design/{platform_id}/INDEX.md` | `speccrew-sd-frontend/templates/INDEX-TEMPLATE.md`, `speccrew-sd-backend/templates/INDEX-TEMPLATE.md`, `speccrew-sd-mobile/templates/INDEX-TEMPLATE.md`, or `speccrew-sd-desktop/templates/INDEX-TEMPLATE.md` |
924
924
  | Module Design | `{iterations_dir}/{number}-{type}-{name}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md` | `speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md`, `speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md`, `speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md`, or `speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md` |
925
925
 
926
- **输出文件命名规则**:
926
+ **Output File Naming Rules**:
927
927
 
928
- 1. **新格式**(有 Feature ID):
929
- - 格式: `{feature-id}-{feature-name}-design.md`
930
- - 示例: `F-CRM-01-customer-list-design.md`
931
- - 路径: `03.system-design/web-vue/F-CRM-01-customer-list-design.md`
928
+ 1. **New Format** (with Feature ID):
929
+ - Format: `{feature-id}-{feature-name}-design.md`
930
+ - Example: `F-CRM-01-customer-list-design.md`
931
+ - Path: `03.system-design/web-vue/F-CRM-01-customer-list-design.md`
932
932
 
933
- 2. **旧格式兼容**(无 Feature ID):
934
- - 格式: `{module}-design.md`
935
- - 示例: `crm-design.md`
936
- - 路径: `03.system-design/web-vue/crm-design.md`
933
+ 2. **Legacy Format Compatibility** (no Feature ID):
934
+ - Format: `{module}-design.md`
935
+ - Example: `crm-design.md`
936
+ - Path: `03.system-design/web-vue/crm-design.md`
937
937
 
938
- **向后兼容逻辑**:
939
- - 如果 `feature_id` 存在使用 `{feature-id}-{feature-name}-design.md`
940
- - 如果 `feature_id` null(旧格式)→ 使用 `{module}-design.md`
938
+ **Backward Compatibility Logic**:
939
+ - If `feature_id` existsuse `{feature-id}-{feature-name}-design.md`
940
+ - If `feature_id` is null (legacy format) → use `{module}-design.md`
941
941
 
942
942
  # Backward Compatibility
943
943
 
944
- Agent 支持新旧两种 Feature Spec 文件格式:
944
+ This Agent supports both new and legacy Feature Spec file formats:
945
945
 
946
- ## 新格式(细粒度 Feature
946
+ ## New Format (Fine-grained Feature)
947
947
 
948
- **文件名格式**:
948
+ **File Name Format**:
949
949
  - Feature Spec: `{feature-id}-{feature-name}-feature-spec.md`
950
950
  - API Contract: `{feature-id}-{feature-name}-api-contract.md`
951
951
 
952
- **示例**:
952
+ **Examples**:
953
953
  - `F-CRM-01-customer-list-feature-spec.md`
954
954
  - `F-CRM-01-customer-list-api-contract.md`
955
955
 
956
- **特征**:
957
- - 文件名以 `F-` 开头
958
- - 包含 Feature ID(如 `F-CRM-01`)
959
- - Feature ID 格式: `F-{MODULE}-{NN}`
956
+ **Characteristics**:
957
+ - File name starts with `F-`
958
+ - Contains Feature ID (e.g., `F-CRM-01`)
959
+ - Feature ID format: `F-{MODULE}-{NN}`
960
960
 
961
- ## 旧格式(模块级 Feature
961
+ ## Legacy Format (Module-level Feature)
962
962
 
963
- **文件名格式**:
963
+ **File Name Format**:
964
964
  - Feature Spec: `{module-name}-feature-spec.md`
965
965
  - API Contract: `{module-name}-api-contract.md`
966
966
 
967
- **示例**:
967
+ **Examples**:
968
968
  - `crm-feature-spec.md`
969
969
  - `crm-api-contract.md`
970
970
 
971
- **特征**:
972
- - 文件名不以 `F-` 开头
973
- - Feature ID
974
- - 使用模块名作为标识
971
+ **Characteristics**:
972
+ - File name does not start with `F-`
973
+ - No Feature ID
974
+ - Uses module name as identifier
975
975
 
976
- ## 格式检测逻辑
976
+ ## Format Detection Logic
977
977
 
978
978
  ```
979
- 文件名以 "F-" 开头 且匹配正则 ^F-[A-Z]+-\d+-
980
- 新格式,提取 Feature ID
981
- 否则
982
- 旧格式,使用模块名
979
+ File name starts with "F-" and matches regex ^F-[A-Z]+-\d+-
980
+ New format, extract Feature ID
981
+ Otherwise
982
+ Legacy format, use module name
983
983
  ```
984
984
 
985
- ## 向后兼容处理
985
+ ## Backward Compatibility Handling
986
986
 
987
- | 场景 | 处理方式 |
988
- |------|----------|
989
- | Feature ID | 新格式: 提取 `F-{MODULE}-{NN}`;旧格式: null |
990
- | Feature Name | 新格式: 从文件名提取;旧格式: 模块名 |
991
- | Task ID | 新格式: `sd-{platform}-{feature-id}`;旧格式: `sd-{platform}-{feature_name}` |
992
- | 输出文件名 | 新格式: `{feature-id}-{feature-name}-design.md`;旧格式: `{module}-design.md` |
993
- | DESIGN-OVERVIEW | Feature ID 列显示 `-` 或实际 ID |
987
+ | Scenario | Handling |
988
+ |----------|----------|
989
+ | Feature ID | New format: extract `F-{MODULE}-{NN}`; Legacy format: null |
990
+ | Feature Name | New format: extract from filename; Legacy format: module name |
991
+ | Task ID | New format: `sd-{platform}-{feature-id}`; Legacy format: `sd-{platform}-{feature_name}` |
992
+ | Output Filename | New format: `{feature-id}-{feature-name}-design.md`; Legacy format: `{module}-design.md` |
993
+ | DESIGN-OVERVIEW | Feature ID column shows `-` or actual ID |
994
994
 
995
995
  # Constraints
996
996
 
@@ -108,3 +108,4 @@ PM Agent (speccrew-product-manager)
108
108
  3. **Read-Only Assessment**: This skill performs assessment only, no file modifications
109
109
  4. **Escalation Path**: Simple workflow can escalate to complex if scope expands during execution
110
110
  5. **Single Gateway**: Use exclusive gateway for routing decision - only one path selected
111
+ 6. **FORBIDDEN File Generation**: Phase 2 MUST NOT create any output files (evaluation reports, assessment JSON, markdown summaries, etc.). All output must be returned as variables only via the output block. Creating files outside of block definitions violates Strict Block Adherence.
@@ -18,6 +18,8 @@
18
18
  <field name="text">This skill is READ-ONLY - do not modify any files</field>
19
19
  <field name="text">Phase 2.0 verification is MANDATORY - cannot be skipped</field>
20
20
  <field name="text">If knowledge initialization incomplete, report error and STOP</field>
21
+ <field name="text">FORBIDDEN: DO NOT create evaluation reports, assessment JSON files, or any other output files. All output must be returned as variables in the output block only.</field>
22
+ <field name="text">Any file created outside of block-defined output paths is considered an error and violates Strict Block Adherence.</field>
21
23
  </block>
22
24
 
23
25
  <!-- ============================================================
@@ -2,14 +2,15 @@
2
2
 
3
3
  ## Description
4
4
 
5
- PM Phase 5 Sub-PRD Batch Dispatch Skill. Responsible for dispatching Sub-PRD generation tasks (split from complex requirements) to Worker Agents in batches.
6
-
7
- This Skill is the core orchestration component of the Master-Sub PRD workflow, implementing:
8
- - Reading Dispatch Plan from Master PRD (Sub-PRD grouping information)
9
- - Initializing dispatch progress tracking file DISPATCH-PROGRESS.json
10
- - Batch parallel dispatch of Workers to generate Sub-PRDs for each module
11
- - Failure retry mechanism (max 1 retry)
12
- - Result collection and completeness verification
5
+ PM Phase 5 Sub-PRD Batch Dispatch Skill. Core orchestration component for Master-Sub PRD workflow, executed directly by PM Agent (NOT dispatched to Worker).
6
+
7
+ PM Agent loads and executes this skill directly to coordinate batch dispatch of Sub-PRD generation tasks to Worker Agents, implementing:
8
+ - Reading Dispatch Plan from Master PRD
9
+ - Initializing dispatch progress tracking
10
+ - Dispatching Workers in parallel batches for Sub-PRD generation per module
11
+ - Failure retry and result verification
12
+
13
+ **CRITICAL**: This skill contains dispatch-to-worker logic internally. It MUST be executed by PM Agent (who has Agent tool access), NOT by a Worker Agent (who cannot create sub-Workers).
13
14
 
14
15
  ## Input Parameters
15
16
 
@@ -17,9 +17,9 @@
17
17
  Global Invocation Rules
18
18
  ============================================================ -->
19
19
  <block type="rule" id="GLOBAL-R-INVOCATION" level="mandatory" desc="Invocation constraints - NEVER violate">
20
- <field name="text">This skill MUST be loaded directly by PM Agent via Skill tool</field>
21
- <field name="text">Worker Agents MUST NOT execute this dispatch skill - if loaded by a Worker, report error and abort</field>
22
- <field name="text">Sub-PRD generation skill (speccrew-pm-sub-prd-generate) MUST be dispatched via speccrew-task-worker</field>
20
+ <field name="text">This skill MUST be loaded and executed directly by PM Agent (via run-skill action in orchestration)</field>
21
+ <field name="text">PM Agent will internally dispatch Workers to execute speccrew-pm-sub-prd-generate via dispatch-to-worker</field>
22
+ <field name="text">Worker Agents MUST NOT attempt to execute this skill - this is an orchestration-level skill</field>
23
23
  </block>
24
24
 
25
25
  <!-- ============================================================
@@ -94,3 +94,12 @@ Applies ISA-95 Stage 1 (Domain Description) for clarification:
94
94
  - Each clarification round MUST wait for user to fill in answers before proceeding
95
95
  - Checkpoint writing is FORBIDDEN in this Skill — checkpoints are managed by the orchestration layer
96
96
  - The sufficiency check result is ONLY valid when based on real user-provided answers
97
+
98
+ ### CRITICAL: Summary Generation Guard
99
+
100
+ Worker MUST strictly enforce the following before generating `.clarification-summary.md`:
101
+
102
+ 1. **Guard Check**: `sufficiency_checks_passed` MUST be `true` before proceeding to summary generation
103
+ 2. **Event Block Execution**: When encountering `user-confirm` event blocks (E-ROUND-CONFIRM), Worker MUST pause and wait for user confirmation. Worker MUST NOT auto-confirm or skip.
104
+ 3. **Variable State Verification**: After loop L1 exits, verify `sufficiency_checks_passed == true`. If false, do NOT generate summary — report error and exit.
105
+ 4. **FORBIDDEN**: Generating `.clarification-summary.md` when user has not answered clarification questions is a CRITICAL workflow violation.
@@ -168,34 +168,53 @@
168
168
  </branch>
169
169
  </block>
170
170
 
171
- <!-- Step 6: Generate .clarification-summary.md -->
172
- <block type="task" id="B10-load-template" action="read-file" desc="Load summary template">
173
- <field name="path" value="${skill_path}/templates/CLARIFICATION-SUMMARY-TEMPLATE.md"/>
174
- <field name="output" var="summary_template"/>
171
+ <!-- ============================================================
172
+ Summary Generation Guard
173
+ ============================================================ -->
174
+ <block type="rule" id="R-SUMMARY-GUARD" level="mandatory" desc="Summary generation guard - only when sufficiency checks pass">
175
+ <field name="text">MANDATORY: .clarification-summary.md can ONLY be generated when ALL sufficiency checks have passed (sufficiency_checks_passed == true).</field>
176
+ <field name="text">If sufficiency_checks_passed is false, Worker MUST NOT generate summary. Instead, Worker MUST exit and return control to PM Agent with error status.</field>
177
+ <field name="text">Generating a summary without completed user answers is a CRITICAL workflow violation.</field>
175
178
  </block>
176
179
 
177
- <block type="task" id="B10" action="generate" desc="Generate clarification summary from template">
178
- <field name="template" value="${summary_template}"/>
179
- <field name="output_path" value="${iteration_path}/01.product-requirement/.clarification-summary.md"/>
180
- <field name="vars">
181
- - iteration_name: ${iteration_name}
182
- - total_rounds: ${round_number - 1}
183
- - date: ${current_date}
184
- - sufficiency_result: ${sufficiency_result.all_passed ? 'PASSED' : 'PARTIAL'}
185
- - checks_passed: ${sufficiency_result.passed_count}
186
- - requirement_overview: ${requirement_summary}
187
- - business_complexity: ${complexity}
188
- - technical_complexity: ${complexity}
189
- - integration_complexity: ${complexity}
190
- - overall_complexity: ${complexity}
191
- </field>
192
- <field name="output" var="summary_path"/>
193
- </block>
180
+ <!-- Step 6: Generate .clarification-summary.md (Guarded by G3) -->
181
+ <block type="gateway" id="G3" mode="exclusive" desc="Guard: Only generate summary if sufficiency checks passed">
182
+ <branch test="${sufficiency_checks_passed} == true" name="Sufficiency Passed - Generate Summary">
183
+ <block type="task" id="B10-load-template" action="read-file" desc="Load summary template">
184
+ <field name="path" value="${skill_path}/templates/CLARIFICATION-SUMMARY-TEMPLATE.md"/>
185
+ <field name="output" var="summary_template"/>
186
+ </block>
187
+
188
+ <block type="task" id="B10" action="generate" desc="Generate clarification summary from template">
189
+ <field name="template" value="${summary_template}"/>
190
+ <field name="output_path" value="${iteration_path}/01.product-requirement/.clarification-summary.md"/>
191
+ <field name="vars">
192
+ - iteration_name: ${iteration_name}
193
+ - total_rounds: ${round_number - 1}
194
+ - date: ${current_date}
195
+ - sufficiency_result: ${sufficiency_result.all_passed ? 'PASSED' : 'PARTIAL'}
196
+ - checks_passed: ${sufficiency_result.passed_count}
197
+ - requirement_overview: ${requirement_summary}
198
+ - business_complexity: ${complexity}
199
+ - technical_complexity: ${complexity}
200
+ - integration_complexity: ${complexity}
201
+ - overall_complexity: ${complexity}
202
+ </field>
203
+ <field name="output" var="summary_path"/>
204
+ </block>
194
205
 
195
- <!-- Checkpoint: Clarification complete -->
196
- <block type="checkpoint" id="CP1" name="clarification-complete" desc="Verify clarification completed">
197
- <field name="file" value="${summary_path}"/>
198
- <field name="verify" value="file_exists(${summary_path})"/>
206
+ <!-- Checkpoint: Clarification complete -->
207
+ <block type="checkpoint" id="CP1" name="clarification-complete" desc="Verify clarification completed">
208
+ <field name="file" value="${summary_path}"/>
209
+ <field name="verify" value="file_exists(${summary_path})"/>
210
+ </block>
211
+ </branch>
212
+ <branch default="true" name="Sufficiency Failed - Exit with Error">
213
+ <block type="task" id="B-INSUFFICIENCY-EXIT" action="set-variable" desc="Set error status for insufficient clarification">
214
+ <field name="error_type">INSUFFICIENT_CLARIFICATION</field>
215
+ <field name="message">Requirement clarification did not achieve sufficiency. Worker exits and returns control to PM Agent.</field>
216
+ </block>
217
+ </branch>
199
218
  </block>
200
219
 
201
220
  </sequence>
@@ -16,6 +16,8 @@ tools: Read, Write, Glob, Grep, Bash, Agent
16
16
  > 🔧 Tool: [which IDE tool to call]
17
17
  > ✅ Result: [output or status]
18
18
  > ```
19
+
20
+ > ⚠️ **CRITICAL ENFORCEMENT**: Every orchestration workflow execution MUST include block-by-block announcements. If you find yourself dispatching Workers without announcing each Phase block, STOP and correct your execution. This protocol is mandatory and non-negotiable.
19
21
  >
20
22
  > Action-to-tool mapping:
21
23
  > - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
@@ -194,15 +194,16 @@
194
194
  <branch default="true" name="Execute Phase 5" goto="P5"/>
195
195
  </block>
196
196
 
197
- <block type="task" id="P5" action="dispatch-to-worker" desc="Phase 5: Sub-PRD dispatch">
198
- <field name="worker">speccrew-task-worker</field>
197
+ <block type="task" id="P5" action="run-skill" desc="Phase 5: Sub-PRD dispatch (PM executes directly)">
199
198
  <field name="skill">speccrew-pm-phase5-subprd-dispatch</field>
200
199
  <field name="context">{
200
+ "prd_output": {
201
+ "master_prd_path": "${phase4b_result.master_prd_path}",
202
+ "dispatch_plan_path": "${phase4b_result.dispatch_plan_path}"
203
+ },
201
204
  "workspace_path": "${phase0_result.workspace_path}",
202
205
  "iteration_path": "${phase0_result.iteration_path}",
203
206
  "update_progress_script": "${phase0_result.update_progress_script}",
204
- "master_prd_path": "${phase4b_result.master_prd_path}",
205
- "dispatch_plan_path": "${phase4b_result.dispatch_plan_path}",
206
207
  "language": "${language}"
207
208
  }</field>
208
209
  <field name="output" var="phase5_result"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.21",
3
+ "version": "0.7.23",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {