speccrew 0.7.19 → 0.7.21

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.
@@ -2,93 +2,93 @@
2
2
 
3
3
  ## Description
4
4
 
5
- PM Phase 5 Sub-PRD 批量派遣 Skill。负责将复杂需求拆分后的 Sub-PRD 生成任务批量派遣给 Worker Agents 执行。
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
6
 
7
- Skill Master-Sub PRD 工作流的核心编排组件,实现:
8
- - Master PRD 读取 Dispatch Plan(Sub-PRD 分组信息)
9
- - 初始化派遣进度追踪文件 DISPATCH-PROGRESS.json
10
- - 批量并行派遣 Workers 生成各模块 Sub-PRD
11
- - 失败重试机制(最多 1 次)
12
- - 结果收集与完整性验证
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
13
13
 
14
14
  ## Input Parameters
15
15
 
16
16
  | Parameter | Type | Required | Description |
17
17
  |-----------|------|----------|-------------|
18
- | `prd_output` | object | true | Phase 4 PRD 生成输出,包含 master_prd_pathdispatch_plan_path |
19
- | `iteration_path` | string | true | 当前迭代目录绝对路径 |
20
- | `language` | string | false | 用户语言(默认 zh |
21
- | `workspace_path` | string | true | speccrew-workspace 根目录绝对路径 |
22
- | `update_progress_script` | string | true | update-progress.js 脚本绝对路径 |
23
- | `max_concurrent_workers` | number | false | 最大并行 Worker 数(默认 5 |
18
+ | `prd_output` | object | true | Phase 4 PRD generation output, containing master_prd_path, dispatch_plan_path, etc. |
19
+ | `iteration_path` | string | true | Absolute path to current iteration directory |
20
+ | `language` | string | false | User language (default: zh) |
21
+ | `workspace_path` | string | true | Absolute path to speccrew-workspace root directory |
22
+ | `update_progress_script` | string | true | Absolute path to update-progress.js script |
23
+ | `max_concurrent_workers` | number | false | Maximum concurrent Workers (default: 5) |
24
24
 
25
25
  ## Outputs
26
26
 
27
27
  | Output | Type | Description |
28
28
  |--------|------|-------------|
29
- | `dispatch_result` | string | 派遣结果状态:success / partial / failed |
30
- | `total_subprds` | number | Sub-PRD 总数 |
31
- | `success_count` | number | 成功生成的 Sub-PRD 数量 |
32
- | `failure_count` | number | 失败的 Sub-PRD 数量 |
33
- | `sub_prd_files` | array | 生成的 Sub-PRD 文件路径列表 |
34
- | `feature_list_path` | string | Feature List 文件路径 |
29
+ | `dispatch_result` | string | Dispatch result status: success / partial / failed |
30
+ | `total_subprds` | number | Total Sub-PRD count |
31
+ | `success_count` | number | Successfully generated Sub-PRD count |
32
+ | `failure_count` | number | Failed Sub-PRD count |
33
+ | `sub_prd_files` | array | List of generated Sub-PRD file paths |
34
+ | `feature_list_path` | string | Feature List file path |
35
35
 
36
36
  <!-- @agentflow: workflow.agentflow.xml -->
37
37
 
38
38
  ## Checklist
39
39
 
40
- ### Step 5.1: 读取 Dispatch Plan
41
- - [ ] 读取 Master PRD 中的 dispatch-plan(Sub-PRD 分组信息)
42
- - [ ] 解析 sub_prd_groups 数组
43
- - [ ] 验证每组包含必需字段:module_id, module_name, module_key, module_scope, module_entities
44
-
45
- ### Step 5.2: 初始化进度追踪
46
- - [ ] 创建临时任务定义文件 .tasks-temp.json
47
- - [ ] 使用 update-progress.js 脚本初始化 DISPATCH-PROGRESS.json
48
- - [ ] 验证初始化成功(Total: N | Pending: N | Completed: 0
49
-
50
- ### Step 5.3: 批量派遣 Workers
51
- - [ ] 5 个一批分组进行并行派遣
52
- - [ ] 每个 Worker 携带完整 context 参数
53
- - [ ] 每批完成后更新 DISPATCH-PROGRESS.json
54
- - [ ] 继续下一批直到所有模块处理完成
55
-
56
- ### Step 5.4: 失败重试
57
- - [ ] 检查是否有 failed 状态的任务
58
- - [ ] 有失败 -> 重试一次(单次重试机制)
59
- - [ ] 重试后仍有失败 -> 记录并继续
60
-
61
- ### Step 5.5: 结果收集与验证
62
- - [ ] 读取最终 DISPATCH-PROGRESS.json
63
- - [ ] 验证所有 Sub-PRD 文件存在且大小 > 3KB
64
- - [ ] 生成汇总报告
65
- - [ ] 更新 checkpoint
66
- - [ ] 验证 feature list 完整性
67
-
68
- ### Step 5.6: 用户确认
69
- - [ ] 等待用户确认 Sub-PRD 生成结果
40
+ ### Step 5.1: Read Dispatch Plan
41
+ - [ ] Read dispatch-plan from Master PRD (Sub-PRD grouping information)
42
+ - [ ] Parse sub_prd_groups array
43
+ - [ ] Verify each group contains required fields: module_id, module_name, module_key, module_scope, module_entities
44
+
45
+ ### Step 5.2: Initialize Progress Tracking
46
+ - [ ] Create temporary task definition file .tasks-temp.json
47
+ - [ ] Initialize DISPATCH-PROGRESS.json using update-progress.js script
48
+ - [ ] Verify initialization success (Total: N | Pending: N | Completed: 0)
49
+
50
+ ### Step 5.3: Batch Dispatch Workers
51
+ - [ ] Group in batches of 5 for parallel dispatch
52
+ - [ ] Each Worker carries complete context parameters
53
+ - [ ] Update DISPATCH-PROGRESS.json after each batch completes
54
+ - [ ] Continue to next batch until all modules are processed
55
+
56
+ ### Step 5.4: Failure Retry
57
+ - [ ] Check for tasks with failed status
58
+ - [ ] If failures exist -> retry once (single retry mechanism)
59
+ - [ ] If still failing after retry -> log and continue
60
+
61
+ ### Step 5.5: Result Collection and Verification
62
+ - [ ] Read final DISPATCH-PROGRESS.json
63
+ - [ ] Verify all Sub-PRD files exist and size > 3KB
64
+ - [ ] Generate summary report
65
+ - [ ] Update checkpoint
66
+ - [ ] Verify feature list completeness
67
+
68
+ ### Step 5.6: User Confirmation
69
+ - [ ] Wait for user confirmation of Sub-PRD generation results
70
70
 
71
71
  ## Key Rules
72
72
 
73
- ### MANDATORY - Worker 派遣规则
74
- - **ONE Worker per Module** - 每个 Sub-PRD 模块派遣一个独立 Worker
75
- - **禁止 PM 自行生成** - PM Agent 不得直接生成 Sub-PRD 内容
76
- - **必须通过 dispatch-to-worker** - 所有 Worker 必须通过 `dispatch-to-worker` action 执行
77
- - **禁止直接调用 Skill** - 不得直接调用 `speccrew-pm-sub-prd-generate` skill
78
-
79
- ### MANDATORY - 批处理规则
80
- - **Batch Size = 5** - 每批最多 5 个并行 Worker
81
- - **并行派遣** - 同一批次的 Worker 必须同时派遣
82
- - **顺序等待** - 等待当前批次完成后再派遣下一批
83
- - **进度更新** - 每个 Worker 完成后立即更新 DISPATCH-PROGRESS.json
84
-
85
- ### MANDATORY - 进度追踪规则
86
- - **脚本初始化** - DISPATCH-PROGRESS.json 必须通过 update-progress.js 创建
87
- - **禁止手动创建** - 不得通过 create_file PowerShell 直接创建进度文件
88
- - **幂等更新** - 使用 `update-task` 命令更新单个任务状态
89
-
90
- ### FORBIDDEN - 禁止行为
91
- - 禁止 PM Agent 直接生成 Sub-PRD 文件
92
- - 禁止派遣一个 Worker 处理多个模块
93
- - 禁止跳过 Worker 派遣作为失败后的回退方案
94
- - 禁止在用户确认前标记 checkpoint passed
73
+ ### MANDATORY - Worker Dispatch Rules
74
+ - **ONE Worker per Module** - Dispatch one independent Worker per Sub-PRD module
75
+ - **PM Must Not Generate Directly** - PM Agent must NOT directly generate Sub-PRD content
76
+ - **Must Use dispatch-to-worker** - All Workers must be executed via `dispatch-to-worker` action
77
+ - **Direct Skill Invocation Forbidden** - Must NOT directly invoke `speccrew-pm-sub-prd-generate` skill
78
+
79
+ ### MANDATORY - Batch Processing Rules
80
+ - **Batch Size = 5** - Maximum 5 parallel Workers per batch
81
+ - **Parallel Dispatch** - Workers in the same batch must be dispatched simultaneously
82
+ - **Sequential Wait** - Wait for current batch to complete before dispatching next batch
83
+ - **Progress Update** - Immediately update DISPATCH-PROGRESS.json after each Worker completes
84
+
85
+ ### MANDATORY - Progress Tracking Rules
86
+ - **Script Initialization** - DISPATCH-PROGRESS.json must be created via update-progress.js
87
+ - **Manual Creation Forbidden** - Must NOT create progress files directly via create_file or PowerShell
88
+ - **Idempotent Update** - Use `update-task` command to update individual task status
89
+
90
+ ### FORBIDDEN - Prohibited Actions
91
+ - PM Agent directly generating Sub-PRD files is forbidden
92
+ - Dispatching one Worker to handle multiple modules is forbidden
93
+ - Skipping Worker dispatch as a fallback after failure is forbidden
94
+ - Marking checkpoint as passed before user confirmation is forbidden
@@ -35,7 +35,7 @@ Applies three-stage gated verification:
35
35
 
36
36
  ## PM Stage Content Boundary
37
37
 
38
- > **DO NOT:** Update checkpoints before user confirmation, skip user review gate, auto-proceed without explicit "确认" or "OK", modify PRD document status before confirmation.
38
+ > **DO NOT:** Update checkpoints before user confirmation, skip user review gate, auto-proceed without explicit "confirm" or "OK", modify PRD document status before confirmation.
39
39
 
40
40
  ## Templates Used
41
41
 
@@ -75,7 +75,7 @@ Applies three-stage gated verification:
75
75
 
76
76
  **Must do:**
77
77
  - Execute all verification steps in order: 6.1 → 6.2 → 6.3
78
- - Wait for explicit user confirmation ("确认" or "OK") before Phase 6.3
78
+ - Wait for explicit user confirmation ("confirm" or "OK") before Phase 6.3
79
79
  - Use `update-progress.js` for all JSON file updates
80
80
  - Present complete verification summary to user
81
81
  - Report all deliverables with file paths and sizes
@@ -1,49 +1,49 @@
1
- # 需求澄清问卷 - Round {round_number}
1
+ # Requirement Clarification Questionnaire - Round {round_number}
2
2
 
3
3
  > **Iteration**: {iteration_name}
4
4
  > **Date**: {date}
5
5
  > **Complexity**: {complexity_level}
6
6
 
7
- ## 澄清背景
7
+ ## Clarification Context
8
8
 
9
- 基于用户需求:"{requirement_summary}",以下问题需要进一步确认。
9
+ Based on the user requirement: "{requirement_summary}", the following items need further clarification.
10
10
 
11
- ## 待确认事项
11
+ ## Items to Confirm
12
12
 
13
- ### 🎯 业务范围与边界
13
+ ### 🎯 Business Scope & Boundaries
14
14
 
15
- | # | 问题 | 优先级 | 用户回答 |
15
+ | # | Question | Priority | User Answer |
16
16
  |---|------|--------|---------|
17
- | 1 | {question} | {priority} | _待回答_ |
17
+ | 1 | {question} | {priority} | _To be answered_ |
18
18
 
19
- ### 👥 用户角色与权限
19
+ ### 👥 User Roles & Permissions
20
20
 
21
- | # | 问题 | 优先级 | 用户回答 |
21
+ | # | Question | Priority | User Answer |
22
22
  |---|------|--------|---------|
23
- | 1 | {question} | {priority} | _待回答_ |
23
+ | 1 | {question} | {priority} | _To be answered_ |
24
24
 
25
- ### 🔄 业务规则与流程
25
+ ### 🔄 Business Rules & Processes
26
26
 
27
- | # | 问题 | 优先级 | 用户回答 |
27
+ | # | Question | Priority | User Answer |
28
28
  |---|------|--------|---------|
29
- | 1 | {question} | {priority} | _待回答_ |
29
+ | 1 | {question} | {priority} | _To be answered_ |
30
30
 
31
- ### 🔗 集成与依赖
31
+ ### 🔗 Integration & Dependencies
32
32
 
33
- | # | 问题 | 优先级 | 用户回答 |
33
+ | # | Question | Priority | User Answer |
34
34
  |---|------|--------|---------|
35
- | 1 | {question} | {priority} | _待回答_ |
35
+ | 1 | {question} | {priority} | _To be answered_ |
36
36
 
37
- ### ⚡ 性能与约束
37
+ ### ⚡ Performance & Constraints
38
38
 
39
- | # | 问题 | 优先级 | 用户回答 |
39
+ | # | Question | Priority | User Answer |
40
40
  |---|------|--------|---------|
41
- | 1 | {question} | {priority} | _待回答_ |
41
+ | 1 | {question} | {priority} | _To be answered_ |
42
42
 
43
43
  ---
44
44
 
45
- ## 填写说明
45
+ ## Instructions
46
46
 
47
- 1. 请在"用户回答"列直接填写您的回答
48
- 2. 如果某个问题不适用,请填写"N/A"并简要说明原因
49
- 3. 如需补充信息,可在回答后追加说明
47
+ 1. Please fill in your answers directly in the "User Answer" column
48
+ 2. If a question is not applicable, enter "N/A" with a brief explanation
49
+ 3. If additional information is needed, you may append notes after your answer
@@ -1,52 +1,52 @@
1
- # 需求澄清总结
1
+ # Requirement Clarification Summary
2
2
 
3
3
  > **Iteration**: {iteration_name}
4
4
  > **Total Rounds**: {total_rounds}
5
5
  > **Date**: {date}
6
6
  > **Final Sufficiency**: {sufficiency_result} ({checks_passed}/4)
7
7
 
8
- ## 1. 需求概述
8
+ ## 1. Requirement Overview
9
9
 
10
10
  {requirement_overview}
11
11
 
12
- ## 2. 复杂度评估
12
+ ## 2. Complexity Assessment
13
13
 
14
- | 维度 | 评估 | 理由 |
14
+ | Dimension | Assessment | Rationale |
15
15
  |------|------|------|
16
- | 业务复杂度 | {business_complexity} | {reason} |
17
- | 技术复杂度 | {technical_complexity} | {reason} |
18
- | 集成复杂度 | {integration_complexity} | {reason} |
19
- | **综合判定** | **{overall_complexity}** | |
16
+ | Business Complexity | {business_complexity} | {reason} |
17
+ | Technical Complexity | {technical_complexity} | {reason} |
18
+ | Integration Complexity | {integration_complexity} | {reason} |
19
+ | **Overall Assessment** | **{overall_complexity}** | |
20
20
 
21
- ## 3. 关键决策记录
21
+ ## 3. Key Decision Log
22
22
 
23
- | # | 决策项 | 决策结果 | 确认轮次 |
23
+ | # | Decision Item | Decision Result | Confirmed Round |
24
24
  |---|--------|---------|---------|
25
25
  | 1 | {decision_item} | {decision_result} | Round {N} |
26
26
 
27
- ## 4. 澄清 Q&A 汇总
27
+ ## 4. Clarification Q&A Summary
28
28
 
29
29
  ### Round {N}
30
30
 
31
- | # | 问题 | 回答 | 分类 |
31
+ | # | Question | Answer | Category |
32
32
  |---|------|------|------|
33
33
  | 1 | {question} | {answer} | {category} |
34
34
 
35
- ## 5. 充分性检查结果
35
+ ## 5. Sufficiency Check Results
36
36
 
37
- | # | 检查项 | 状态 | 说明 |
37
+ | # | Check Item | Status | Detail |
38
38
  |---|--------|------|------|
39
- | 1 | 范围边界清晰 | {status} | {detail} |
40
- | 2 | 关键业务规则已文档化 | {status} | {detail} |
41
- | 3 | 优先级/分期决策已确定 | {status} | {detail} |
42
- | 4 | 集成边界已识别 | {status} | {detail} |
39
+ | 1 | Scope boundaries are clear | {status} | {detail} |
40
+ | 2 | Key business rules documented | {status} | {detail} |
41
+ | 3 | Priority/phasing decisions made | {status} | {detail} |
42
+ | 4 | Integration boundaries identified | {status} | {detail} |
43
43
 
44
- ## 6. 遗留问题与风险
44
+ ## 6. Open Issues & Risks
45
45
 
46
- | # | 问题/风险 | 影响 | 建议处理方式 |
46
+ | # | Issue/Risk | Impact | Suggested Resolution |
47
47
  |---|----------|------|------------|
48
48
  | 1 | {issue} | {impact} | {suggestion} |
49
49
 
50
- ## 7. 下一步建议
50
+ ## 7. Next Steps
51
51
 
52
52
  {next_steps}
@@ -76,3 +76,13 @@ Applies ISA-95 Stages 1-3 as structured analysis framework:
76
76
  - Include technical implementation details
77
77
  - Create circular module dependencies
78
78
  - Manually write JSON files
79
+
80
+ ### Diagram Format Rule (MANDATORY)
81
+ - All diagrams MUST use Mermaid syntax (graph TB, graph TD, graph LR, etc.)
82
+ - ASCII art diagrams are FORBIDDEN
83
+ - Reference `mermaid-rule.md` for compatibility
84
+
85
+ ### Template
86
+ - Module design document MUST follow `templates/MODULE-DESIGN-TEMPLATE.md` structure
87
+ - All 10 sections are required
88
+ - Fill template with analyzed data from ISA-95 stages
@@ -0,0 +1,175 @@
1
+ # Module Design Document (.module-design.md)
2
+
3
+ > **Iteration**: iteration_name
4
+ > **Generated**: date
5
+ > **System**: system_name
6
+ > **Tech Stack**: tech_stack
7
+ > **Document Type**: ISA-95 Business Modeling & Module Decomposition
8
+
9
+ ---
10
+
11
+ ## 1. Business Domain Analysis (ISA-95 Stage 1: Domain Description)
12
+
13
+ ### 1.1 Domain Boundary Definition
14
+
15
+ <!-- Describe system positioning -->
16
+
17
+ #### System Scope (IN-SCOPE)
18
+ | Domain | Description |
19
+ |--------|-------------|
20
+ | domain | description |
21
+
22
+ #### Out of Scope (OUT-OF-SCOPE)
23
+ | Domain | Description | Planned Phase |
24
+ |--------|-------------|---------------|
25
+ | domain | description | phase |
26
+
27
+ ### 1.2 Actor Definition
28
+ | Actor ID | Actor Name | Responsibilities | Data Scope | Typical Scenario |
29
+ |----------|------------|------------------|------------|------------------|
30
+ | role_id | role_name | responsibility | data_scope | scenario |
31
+
32
+ ### 1.3 Core Business Glossary
33
+ | Term | Definition | Business Rule | Related Module |
34
+ |------|------------|---------------|----------------|
35
+ | term | definition | rule | module |
36
+
37
+ ### 1.4 Domain Model Diagram
38
+
39
+ ```mermaid
40
+ graph TB
41
+ M01[M01 System Foundation] --> M02[M02 Module Name]
42
+ M01 --> M04[M04 Module Name]
43
+ M02 --> M03[M03 Module Name]
44
+ %% Draw based on actual module dependencies
45
+ ```
46
+
47
+ ---
48
+
49
+ ## 2. Function Decomposition (ISA-95 Stage 2: Functions in Domain)
50
+
51
+ ### 2.1 WBS Work Breakdown Structure
52
+
53
+ #### module_id - module_name (count function points)
54
+ | Function ID | Function Name | Description | Priority | Dependencies |
55
+ |-------------|---------------|-------------|----------|--------------|
56
+ | func_id | func_name | description | priority | dependency |
57
+
58
+ ### 2.2 Function Priority Distribution
59
+ | Priority | Function Points | Percentage | Module Distribution |
60
+ |----------|-----------------|------------|--------------------|
61
+ | **P0 (Core)** | count | percent | modules |
62
+ | **P1 (Important)** | count | percent | modules |
63
+ | **P2 (Optional)** | count | percent | modules |
64
+
65
+ ---
66
+
67
+ ## 3. Module Priority & Phasing (ISA-95 Stage 3: Functions of Interest)
68
+
69
+ ### 3.1 MoSCoW Priority Analysis
70
+ | Priority | Definition | Module | Description |
71
+ |----------|------------|--------|-------------|
72
+
73
+ ### 3.2 Implementation Phases
74
+
75
+ #### Phase 1 (MVP - Minimum Viable Product)
76
+ **Core Chain**: core_chain
77
+ | Module | Function Points | Deliverables |
78
+ |--------|-----------------|--------------|
79
+
80
+ **MVP Acceptance Criteria**:
81
+ - ✅ criteria
82
+
83
+ #### Phase 2 (Full Version - Stage 1)
84
+ <!-- Same structure as above -->
85
+
86
+ #### Phase 3 (Stage 2 Planning)
87
+ <!-- Same structure as above -->
88
+
89
+ ---
90
+
91
+ ## 4. Module Dependencies
92
+
93
+ ### 4.1 Dependency Matrix
94
+ | Module | Dependent Module | Dependency Type | Description |
95
+ |--------|------------------|-----------------|-------------|
96
+
97
+ ### 4.2 Dependency Graph
98
+
99
+ ```mermaid
100
+ graph TD
101
+ M01[M01 System Foundation] --> M02[M02 Module Name]
102
+ M01 --> M04[M04 Module Name]
103
+ M02 --> M03[M03 Module Name]
104
+ %% Draw directed acyclic graph based on dependency matrix
105
+ ```
106
+
107
+ ### 4.3 Circular Dependency Check
108
+ <!-- Must confirm no circular dependencies -->
109
+
110
+ ---
111
+
112
+ ## 5. Module Implementation Sequence
113
+
114
+ ### 5.1 Implementation Phase Ordering
115
+
116
+ ```mermaid
117
+ graph LR
118
+ P0[Phase 0: Infrastructure] --> P1[Phase 1: Core Entities]
119
+ P1 --> P2[Phase 2: Core Workflows]
120
+ P2 --> P3[Phase 3: Value-Added Features]
121
+ P3 --> P4[Phase 4: Data Analytics]
122
+ %% Adjust based on actual phases
123
+ ```
124
+
125
+ ### 5.2 Parallel Development Recommendations
126
+ | Phase | Parallel Modules | Description |
127
+ |-------|------------------|-------------|
128
+
129
+ ---
130
+
131
+ ## 6. Module Boundary Definition
132
+
133
+ ### 6.1 Module Responsibility Boundaries
134
+ | Module | Core Responsibilities | Excluded Responsibilities | Boundary Notes |
135
+ |--------|----------------------|--------------------------|----------------|
136
+
137
+ ### 6.2 Data Ownership
138
+ | Data Entity | Owner Module | Read-Only Modules | Description |
139
+ |-------------|--------------|-------------------|-------------|
140
+
141
+ ---
142
+
143
+ ## 7. Tech Stack Capability Reuse Analysis
144
+
145
+ ### 7.1 Reusable Capabilities
146
+ | Required Function | Existing Capability | Reuse Level | Development Effort | Notes |
147
+ |-------------------|---------------------|-------------|--------------------|-------|
148
+
149
+ ### 7.2 New Development Capabilities
150
+ | Capability | Module | Development Priority | Estimated Effort | Notes |
151
+ |------------|--------|---------------------|------------------|-------|
152
+
153
+ ---
154
+
155
+ ## 8. Risks & Mitigation Measures
156
+
157
+ ### 8.1 Technical Risks
158
+ | Risk Item | Affected Modules | Impact Level | Probability | Mitigation Measures |
159
+ |-----------|------------------|--------------|-------------|---------------------|
160
+
161
+ ### 8.2 Business Risks
162
+ | Risk Item | Affected Modules | Impact Level | Probability | Mitigation Measures |
163
+ |-----------|------------------|--------------|-------------|---------------------|
164
+
165
+ ---
166
+
167
+ ## 9. Module Summary
168
+ | Module ID | Module Name | Function Points | Priority | Implementation Phase | Dependencies | Core Responsibilities |
169
+ |-----------|-------------|-----------------|----------|---------------------|--------------|-----------------------|
170
+
171
+ ---
172
+
173
+ ## 10. Sign-off
174
+ | Role | Name | Date | Signature |
175
+ |------|------|------|-----------|
@@ -27,6 +27,12 @@
27
27
  <field name="text">Manually write JSON files</field>
28
28
  </block>
29
29
 
30
+ <block type="rule" id="R-MERMAID" level="mandatory" desc="All diagrams must use Mermaid syntax">
31
+ <field name="text">MANDATORY: All diagrams (domain model, dependency graph, implementation phases) MUST use Mermaid syntax.</field>
32
+ <field name="text">ASCII art diagrams are FORBIDDEN. Use graph TB, graph TD, graph LR as appropriate.</field>
33
+ <field name="text">Reference workspace-template/docs/rules/mermaid-rule.md for compatibility guidelines.</field>
34
+ </block>
35
+
30
36
  <!-- ============================================================
31
37
  Main Processing Sequence
32
38
  ============================================================ -->
@@ -161,8 +167,15 @@
161
167
  </branch>
162
168
  </block>
163
169
 
170
+ <!-- Read module design template -->
171
+ <block type="task" id="B10-TPL" action="read-file" desc="Read module design template">
172
+ <field name="path">${skill_path}/templates/MODULE-DESIGN-TEMPLATE.md</field>
173
+ <field name="output" var="template_content"/>
174
+ </block>
175
+
164
176
  <!-- Step 4: Generate .module-design.md -->
165
177
  <block type="task" id="B11" action="generate" desc="Generate module design document">
178
+ <field name="template" value="${template_content}"/>
166
179
  <field name="output_path" value="${iteration_path}/01.product-requirement/.module-design.md"/>
167
180
  <field name="sections">
168
181
  - ISA-95 Analysis Summary (if complex)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-product-manager-orchestration
3
3
  version: 2.0.0
4
- description: Product Manager 核心编排技能(纯路由层 v2.0),负责工作流恢复路由和各 Phase Skill dispatch-to-worker 调度。所有业务逻辑由独立的 Phase Skill 执行。
4
+ description: Product Manager core orchestration skill (pure routing layer v2.0), responsible for workflow resume routing and dispatch-to-worker scheduling for each Phase Skill. All business logic is executed by independent Phase Skills.
5
5
  tools: Read, Write, Glob, Grep, Bash, Agent
6
6
  ---
7
7
 
@@ -34,32 +34,32 @@ tools: Read, Write, Glob, Grep, Bash, Agent
34
34
 
35
35
  # Product Manager Orchestration (v2.0)
36
36
 
37
- 纯路由层编排技能,负责:
37
+ Pure routing layer orchestration skill, responsible for:
38
38
 
39
- 1. **Workflow Initialization** - Phase 0 初始化并返回恢复目标
40
- 2. **Resume Routing** - 根据 `resume_target` 跳转到正确的 Phase
41
- 3. **Phase Dispatch** - 每个 Phase 只有一个 `dispatch-to-worker` 调用
42
- 4. **User Confirmation Gates** - Phase 3 Phase 4a 的强制性用户确认门禁
39
+ 1. **Workflow Initialization** - Phase 0 initialization and returning resume target
40
+ 2. **Resume Routing** - Jump to the correct Phase based on `resume_target`
41
+ 3. **Phase Dispatch** - Each Phase has only one `dispatch-to-worker` call
42
+ 4. **User Confirmation Gates** - Mandatory user confirmation gates for Phase 3 and Phase 4a
43
43
 
44
44
  ## Architecture: Pure Routing Layer
45
45
 
46
- Skill 是**纯路由层**,所有业务逻辑由独立的 Phase Skill 执行:
46
+ This Skill is a **pure routing layer**, all business logic is executed by independent Phase Skills:
47
47
 
48
48
  | Phase | Block ID | Skill | Purpose |
49
49
  |-------|----------|-------|---------|
50
- | Phase 0 | P0 | `speccrew-pm-phase0-init` | 工作流初始化、迭代目录创建/定位、恢复状态检测 |
51
- | Phase 1 | P1 | `speccrew-pm-phase1-knowledge-check` | 知识库状态检测、模块匹配、知识初始化 |
52
- | Phase 2 | P2 | `speccrew-pm-phase2-complexity-assess` | 复杂度评估、简单/复杂路径决策 |
53
- | Phase 3 | P3 | `speccrew-pm-requirement-clarify` | 需求澄清、问答收集 |
54
- | Phase 4 Simple | P4-SIMPLE | `speccrew-pm-requirement-simple` | 简单需求:单 PRD 生成 |
55
- | Phase 4a | P4A | `speccrew-pm-requirement-model` | 复杂需求:ISA-95 建模 |
56
- | Phase 4b | P4B | `speccrew-pm-requirement-analysis` | 复杂需求:Master PRD 生成 |
57
- | Phase 5 | P5 | `speccrew-pm-phase5-subprd-dispatch` | Sub-PRD Worker 分发 |
58
- | Phase 6 | P6 | `speccrew-pm-phase6-verify-confirm` | 验证清单、用户审核、最终确认 |
50
+ | Phase 0 | P0 | `speccrew-pm-phase0-init` | Workflow initialization, iteration directory creation/locating, resume state detection |
51
+ | Phase 1 | P1 | `speccrew-pm-phase1-knowledge-check` | Knowledge base status detection, module matching, knowledge initialization |
52
+ | Phase 2 | P2 | `speccrew-pm-phase2-complexity-assess` | Complexity assessment, simple/complex path decision |
53
+ | Phase 3 | P3 | `speccrew-pm-requirement-clarify` | Requirement clarification, Q&A collection |
54
+ | Phase 4 Simple | P4-SIMPLE | `speccrew-pm-requirement-simple` | Simple requirements: single PRD generation |
55
+ | Phase 4a | P4A | `speccrew-pm-requirement-model` | Complex requirements: ISA-95 modeling |
56
+ | Phase 4b | P4B | `speccrew-pm-requirement-analysis` | Complex requirements: Master PRD generation |
57
+ | Phase 5 | P5 | `speccrew-pm-phase5-subprd-dispatch` | Sub-PRD Worker dispatch |
58
+ | Phase 6 | P6 | `speccrew-pm-phase6-verify-confirm` | Verification checklist, user review, final confirmation |
59
59
 
60
60
  ## User Confirmation Gates (MANDATORY)
61
61
 
62
- Phase 3 Phase 4a 之后有**强制性用户确认门禁**:
62
+ There are **mandatory user confirmation gates** after Phase 3 and Phase 4a:
63
63
 
64
64
  ### R-CONFIRM Rule Block
65
65
 
@@ -81,24 +81,24 @@ Phase 3 和 Phase 4a 之后有**强制性用户确认门禁**:
81
81
  ```
82
82
 
83
83
  **Key Points:**
84
- - `action="user-confirm"` — 必须等待用户明确确认
85
- - `skippable="false"` — 不可跳过
86
- - checkpoint 写入**必须**在用户确认后执行
84
+ - `action="user-confirm"` — Must wait for explicit user confirmation
85
+ - `skippable="false"` — Cannot be skipped
86
+ - Checkpoint write **MUST** be executed after user confirmation
87
87
 
88
88
  ## Resume Router
89
89
 
90
- Phase 0 输出 `resume_target` 控制恢复跳转:
90
+ Phase 0 outputs `resume_target` to control resume routing:
91
91
 
92
92
  | resume_target | Target Block | Description |
93
93
  |---------------|--------------|-------------|
94
- | `PHASE_1_KNOWLEDGE_CHECK` | P1 | 从知识库检查开始 |
95
- | `PHASE_3_USER_CONFIRMATION` | P3-CONFIRM | 恢复到 Phase 3 确认门禁 |
96
- | `PHASE_4_PRD_SIMPLE` | P4-SIMPLE | 简单路径 PRD 生成 |
97
- | `PHASE_4A_MODEL` | P4A | 复杂路径建模 |
98
- | `PHASE_4A_CONFIRMATION` | P4A-CONFIRM | 恢复到 Phase 4a 确认门禁 |
99
- | `PHASE_4B_PRD_GENERATION` | P4B | Master PRD 生成 |
100
- | `PHASE_5_SUBPRD_DISPATCH` | P5 | Sub-PRD 分发 |
101
- | `PHASE_6_VERIFICATION` | P6 | 验证确认 |
94
+ | `PHASE_1_KNOWLEDGE_CHECK` | P1 | Start from knowledge base check |
95
+ | `PHASE_3_USER_CONFIRMATION` | P3-CONFIRM | Resume to Phase 3 confirmation gate |
96
+ | `PHASE_4_PRD_SIMPLE` | P4-SIMPLE | Simple path PRD generation |
97
+ | `PHASE_4A_MODEL` | P4A | Complex path modeling |
98
+ | `PHASE_4A_CONFIRMATION` | P4A-CONFIRM | Resume to Phase 4a confirmation gate |
99
+ | `PHASE_4B_PRD_GENERATION` | P4B | Master PRD generation |
100
+ | `PHASE_5_SUBPRD_DISPATCH` | P5 | Sub-PRD dispatch |
101
+ | `PHASE_6_VERIFICATION` | P6 | Verification and confirmation |
102
102
 
103
103
  ## Invocation Method
104
104
 
@@ -114,18 +114,18 @@ Phase 0 输出 `resume_target` 控制恢复跳转:
114
114
 
115
115
  | Parameter | Type | Required | Description |
116
116
  |-----------|------|----------|-------------|
117
- | `user_requirement` | string | Yes | 用户需求描述或需求文档路径 |
118
- | `workspace_root` | string | Yes | speccrew-workspace 根目录路径 |
119
- | `source_path` | string | No | 项目源代码根目录(从 .speccrewrc 读取) |
120
- | `language` | string | No | 用户语言(默认自动检测) |
117
+ | `user_requirement` | string | Yes | User requirement description or requirement document path |
118
+ | `workspace_root` | string | Yes | speccrew-workspace root directory path |
119
+ | `source_path` | string | No | Project source code root directory (read from .speccrewrc) |
120
+ | `language` | string | No | User language (default auto-detect) |
121
121
 
122
122
  ## Output
123
123
 
124
- - `status` - 执行状态 (success / partial / failed)
125
- - `prd_files` - 生成的 PRD 文件列表
126
- - `feature_list` - 功能清单文件路径
127
- - `workflow_stage` - 当前工作流阶段状态
128
- - `next_agent` - 下一步建议的 Agent
124
+ - `status` - Execution status (success / partial / failed)
125
+ - `prd_files` - List of generated PRD files
126
+ - `feature_list` - Feature list file path
127
+ - `workflow_stage` - Current workflow stage status
128
+ - `next_agent` - Recommended next Agent
129
129
 
130
130
  ---
131
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.19",
3
+ "version": "0.7.21",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {