speccrew 0.3.13 → 0.4.0
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 +381 -131
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +203 -883
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +29 -14
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +272 -0
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +342 -0
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +52 -90
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +32 -7
- package/package.json +1 -1
- package/workspace-template/docs/rules/mermaid-rule.md +13 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# PRD - [Feature Name]
|
|
2
2
|
|
|
3
|
+
> ⚠️ **CRITICAL: PM Stage Content Boundary**
|
|
4
|
+
>
|
|
5
|
+
> **DO NOT INCLUDE in this PRD:**
|
|
6
|
+
> - Database table structures, ER diagrams, SQL queries
|
|
7
|
+
> - API endpoint definitions, HTTP methods, request/response JSON schemas
|
|
8
|
+
> - Design class diagrams, component diagrams, deployment diagrams
|
|
9
|
+
> - Code snippets, pseudocode, implementation logic
|
|
10
|
+
> - Technical terminology (e.g., UUID, JWT, REST, JSON, Microservice)
|
|
11
|
+
> - Technical metrics (e.g., "code files", "CPU usage", "latency < 100ms")
|
|
12
|
+
>
|
|
13
|
+
> **These belong to:** Feature Designer (interaction design, API contracts) or System Designer (technical architecture).
|
|
14
|
+
> **Required:** Use BUSINESS LANGUAGE only. Describe WHAT needs to happen, not HOW the system implements it.
|
|
15
|
+
|
|
3
16
|
## 1. Background & Goals
|
|
4
17
|
|
|
5
18
|
### 1.1 Background
|
|
@@ -114,13 +127,15 @@ graph TB
|
|
|
114
127
|
|
|
115
128
|
**Process Description:**
|
|
116
129
|
|
|
117
|
-
| Stage | Description | Input | Output | Responsible Role |
|
|
118
|
-
|
|
130
|
+
| Stage | Description | Input (business terms) | Output (business terms) | Responsible Role |
|
|
131
|
+
|-------|-------------|------------------------|-------------------------|------------------|
|
|
119
132
|
| Stage 1 | [Description] | [Input data] | [Output data] | [Role] |
|
|
120
133
|
| Stage 2 | [Description] | [Input data] | [Output data] | [Role] |
|
|
121
134
|
| Stage 3 | [Description] | [Input data] | [Output data] | [Role] |
|
|
122
135
|
| Stage 4 | [Description] | [Input data] | [Output data] | [Role] |
|
|
123
136
|
|
|
137
|
+
*Note: Describe data in BUSINESS TERMS only (e.g., "customer info", "order status"). DO NOT use database column names, JSON fields, or SQL types.*
|
|
138
|
+
|
|
124
139
|
### 3.3 Feature List
|
|
125
140
|
|
|
126
141
|
| Feature | Priority | Description | Acceptance Criteria |
|
|
@@ -158,12 +173,12 @@ graph TB
|
|
|
158
173
|
3. [Step 3]
|
|
159
174
|
|
|
160
175
|
**Boundary Conditions:**
|
|
161
|
-
| Condition Type | Scenario Description |
|
|
162
|
-
|
|
163
|
-
| Edge Cases | [e.g., empty
|
|
164
|
-
| Concurrency/Race | [e.g., duplicate submission, concurrent operations] | [Handling method] |
|
|
165
|
-
| Permission Boundary | [e.g., unauthorized access, not logged in] | [Handling method] |
|
|
166
|
-
| Dependency Failure | [e.g., third-party service unavailable] | [Handling method] |
|
|
176
|
+
| Condition Type | Scenario Description | Business Handling Rule |
|
|
177
|
+
|----------------|---------------------|------------------------|
|
|
178
|
+
| Edge Cases | [e.g., customer name empty] | [e.g., "Show error message to user", NOT "throw Exception"] |
|
|
179
|
+
| Concurrency/Race | [e.g., duplicate submission, concurrent operations] | [Handling method in business language] |
|
|
180
|
+
| Permission Boundary | [e.g., unauthorized access, not logged in] | [Handling method in business language] |
|
|
181
|
+
| Dependency Failure | [e.g., third-party service unavailable] | [Handling method in business language] |
|
|
167
182
|
|
|
168
183
|
**Exception Scenarios:**
|
|
169
184
|
- [Exception 1]: [Handling method]
|
|
@@ -197,12 +212,12 @@ graph LR
|
|
|
197
212
|
|
|
198
213
|
**Operation Steps Detail:**
|
|
199
214
|
|
|
200
|
-
| Step | Action | Expected Outcome | Exception Handling |
|
|
201
|
-
|
|
202
|
-
| 1 | [User action] | [Expected result] | [
|
|
203
|
-
| 2 | [User action] | [Expected result] | [
|
|
204
|
-
| 3 | [User action] | [Expected result] | [
|
|
205
|
-
| 4 | [User action] | [Expected result] | [
|
|
215
|
+
| Step | Action | Expected Outcome | Business Exception Handling |
|
|
216
|
+
|------|--------|------------------|-----------------------------|
|
|
217
|
+
| 1 | [User action] | [Expected result] | [Business handling rule, e.g., "Show friendly error message"] |
|
|
218
|
+
| 2 | [User action] | [Expected result] | [Business handling rule] |
|
|
219
|
+
| 3 | [User action] | [Expected result] | [Business handling rule] |
|
|
220
|
+
| 4 | [User action] | [Expected result] | [Business handling rule] |
|
|
206
221
|
|
|
207
222
|
## 4. Non-functional Requirements
|
|
208
223
|
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-pm-requirement-clarify
|
|
3
|
+
description: SpecCrew PM Requirement Clarification Skill. Dual-mode support (simple/complex). Produces .clarification-summary.md as interface contract for downstream PRD generation. First step in PRD workflow.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Overview
|
|
8
|
+
|
|
9
|
+
Requirement clarification with dual-mode support. Produces `.clarification-summary.md` as the interface contract.
|
|
10
|
+
|
|
11
|
+
## Trigger Scenarios
|
|
12
|
+
|
|
13
|
+
- User provides initial requirement description
|
|
14
|
+
- PM Agent needs to clarify before PRD generation
|
|
15
|
+
- Requirement complexity assessment needed
|
|
16
|
+
|
|
17
|
+
## Input Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Required | Description |
|
|
20
|
+
|-----------|------|----------|-------------|
|
|
21
|
+
| `requirement_file` | string | Yes | Path to requirement document |
|
|
22
|
+
| `iteration_path` | string | Yes | Path to iteration directory |
|
|
23
|
+
| `complexity_hint` | enum | No | `simple` or `complex`. Auto-detect if not provided |
|
|
24
|
+
|
|
25
|
+
## Methodology Foundation
|
|
26
|
+
|
|
27
|
+
Applies ISA-95 Stage 1 (Domain Description) for clarification:
|
|
28
|
+
- Define domain boundary, participants, glossary
|
|
29
|
+
- Results flow into `.clarification-summary.md` only
|
|
30
|
+
|
|
31
|
+
## PM Stage Content Boundary
|
|
32
|
+
|
|
33
|
+
> **DO NOT include:** API definitions, DB structures, code snippets, technical terminology. These belong to Feature Designer or System Designer.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# Workflow
|
|
38
|
+
|
|
39
|
+
## Absolute Constraints
|
|
40
|
+
|
|
41
|
+
> **Violation = task failure**
|
|
42
|
+
|
|
43
|
+
1. **FORBIDDEN:** `create_file` for documents — use `search_replace` on templates
|
|
44
|
+
2. **FORBIDDEN:** Full-file rewrite — use targeted `search_replace`
|
|
45
|
+
3. **MANDATORY:** Template-first workflow
|
|
46
|
+
|
|
47
|
+
## Step 1: Load Requirement Document
|
|
48
|
+
|
|
49
|
+
**Actions:**
|
|
50
|
+
1. Read `requirement_file`
|
|
51
|
+
2. Extract: business problem, target users, functional scope, constraints
|
|
52
|
+
|
|
53
|
+
## Step 2: Load System Knowledge (IF EXISTS)
|
|
54
|
+
|
|
55
|
+
**Actions:**
|
|
56
|
+
1. Read `knowledges/bizs/system-overview.md` if exists
|
|
57
|
+
2. Read related `{module}/{module}-overview.md` files if exist
|
|
58
|
+
|
|
59
|
+
> ⚠️ Knowledge files are OPTIONAL. Proceed without them if absent.
|
|
60
|
+
|
|
61
|
+
## Step 3: Determine Complexity Mode
|
|
62
|
+
|
|
63
|
+
**Auto-detect criteria:**
|
|
64
|
+
|
|
65
|
+
| Criteria | Simple | Complex |
|
|
66
|
+
|----------|--------|---------|
|
|
67
|
+
| Modules | 1 | 2+ or new domain |
|
|
68
|
+
| Features | 1-5 | 6+ |
|
|
69
|
+
| Integration points | 0-1 | 2+ |
|
|
70
|
+
|
|
71
|
+
**Logic:** `complex` if modules >= 2 OR features >= 6 OR new_domain
|
|
72
|
+
|
|
73
|
+
## Step 4: Execute Clarification (Dual Mode)
|
|
74
|
+
|
|
75
|
+
### 4.1 Simple Mode
|
|
76
|
+
|
|
77
|
+
- 1-3 key questions, chat-based
|
|
78
|
+
- Topics: What to change, what the change is, business reason, acceptance criteria
|
|
79
|
+
|
|
80
|
+
> ⚠️ **Switch to file-based if 4+ questions needed**
|
|
81
|
+
|
|
82
|
+
### 4.2 Complex Mode (File-Based)
|
|
83
|
+
|
|
84
|
+
> ⚠️ **All rounds use file-based interaction, NOT chat-based.**
|
|
85
|
+
|
|
86
|
+
**Round 1: Core Understanding**
|
|
87
|
+
|
|
88
|
+
Create `.clarification-questions-round-1.md`:
|
|
89
|
+
```markdown
|
|
90
|
+
# Requirements Clarification - Round 1
|
|
91
|
+
|
|
92
|
+
> Fill answers after each "**Answer:**" marker, then notify me.
|
|
93
|
+
|
|
94
|
+
## 1. Business Background & Goals
|
|
95
|
+
Based on the document, the system aims to solve: [points]
|
|
96
|
+
|
|
97
|
+
**Questions:**
|
|
98
|
+
- Is this understanding correct?
|
|
99
|
+
- What is the primary business goal?
|
|
100
|
+
|
|
101
|
+
**Answer:** <!-- Fill here -->
|
|
102
|
+
|
|
103
|
+
## 2. Target Users & Scenarios
|
|
104
|
+
Roles identified: [list]
|
|
105
|
+
|
|
106
|
+
**Questions:**
|
|
107
|
+
- Additional roles not mentioned?
|
|
108
|
+
- Primary use cases for each role?
|
|
109
|
+
|
|
110
|
+
**Answer:** <!-- Fill here -->
|
|
111
|
+
|
|
112
|
+
## 3. System Scope & Boundaries
|
|
113
|
+
Scope includes: [modules]
|
|
114
|
+
|
|
115
|
+
**Questions:**
|
|
116
|
+
- All modules required for Phase 1?
|
|
117
|
+
- What is explicitly out of scope?
|
|
118
|
+
|
|
119
|
+
**Answer:** <!-- Fill here -->
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Notify user:
|
|
123
|
+
```
|
|
124
|
+
📝 Round 1 questions written to:
|
|
125
|
+
`01.product-requirement/.clarification-questions-round-1.md`
|
|
126
|
+
|
|
127
|
+
Please fill answers after each "**Answer:**" marker, save, and notify me.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**HARD STOP** — Wait for user confirmation, then read file.
|
|
131
|
+
|
|
132
|
+
**Round 2: Scope & Boundaries (if needed)**
|
|
133
|
+
|
|
134
|
+
Create `.clarification-questions-round-2.md` with:
|
|
135
|
+
- Out-of-Scope Items confirmation
|
|
136
|
+
- Integration Boundaries (external systems)
|
|
137
|
+
- Business Rules & Constraints
|
|
138
|
+
|
|
139
|
+
**Round 3: Detail & Acceptance (if still needed)**
|
|
140
|
+
|
|
141
|
+
Same pattern with focused follow-up questions.
|
|
142
|
+
|
|
143
|
+
## Step 5: Sufficiency Check
|
|
144
|
+
|
|
145
|
+
> ⚠️ **ALL 4 checks must pass before proceeding.**
|
|
146
|
+
|
|
147
|
+
| # | Check Item | Pass Criteria |
|
|
148
|
+
|---|------------|---------------|
|
|
149
|
+
| 1 | Scope boundaries are clear | Explicit in/out scope defined |
|
|
150
|
+
| 2 | Key business rules are documented | At least 1 rule identified |
|
|
151
|
+
| 3 | Priority/phasing decisions are made | Phase 1 scope is clear |
|
|
152
|
+
| 4 | Integration boundaries are identified | Integration points listed or "none" confirmed |
|
|
153
|
+
|
|
154
|
+
**Logic:** If all 4 pass → Step 6. Else if round < 3 → next round. Else → proceed with gaps noted.
|
|
155
|
+
|
|
156
|
+
## Step 6: Generate .clarification-summary.md
|
|
157
|
+
|
|
158
|
+
**Output:** `{iteration_path}/01.product-requirement/.clarification-summary.md`
|
|
159
|
+
|
|
160
|
+
**Format:**
|
|
161
|
+
```markdown
|
|
162
|
+
# Clarification Summary
|
|
163
|
+
|
|
164
|
+
## Complexity
|
|
165
|
+
- Level: [simple | complex]
|
|
166
|
+
- Rationale: [reason]
|
|
167
|
+
|
|
168
|
+
## Key Decisions
|
|
169
|
+
| # | Decision | Rationale | Source |
|
|
170
|
+
|---|----------|-----------|--------|
|
|
171
|
+
| 1 | [text] | [reason] | Round X |
|
|
172
|
+
|
|
173
|
+
## Clarification Q&A
|
|
174
|
+
|
|
175
|
+
### Round 1
|
|
176
|
+
| # | Question | Answer | Impact |
|
|
177
|
+
|---|----------|--------|--------|
|
|
178
|
+
| 1 | [Q] | [A] | [Impact] |
|
|
179
|
+
|
|
180
|
+
### Round 2 (if applicable)
|
|
181
|
+
[Same format]
|
|
182
|
+
|
|
183
|
+
### Round 3 (if applicable)
|
|
184
|
+
[Same format]
|
|
185
|
+
|
|
186
|
+
## Sufficiency Checks
|
|
187
|
+
- [x] Scope boundaries are clear
|
|
188
|
+
- [x] Key business rules are documented
|
|
189
|
+
- [x] Priority/phasing decisions are made
|
|
190
|
+
- [x] Integration boundaries are identified
|
|
191
|
+
|
|
192
|
+
## Notes
|
|
193
|
+
[Additional remarks or gaps]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Step 7: Initialize .checkpoints.json
|
|
197
|
+
|
|
198
|
+
> ⚠️ **MANDATORY: Use `update-progress.js` script for all JSON files.**
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
202
|
+
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
203
|
+
--checkpoint requirement_clarification \
|
|
204
|
+
--passed true
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Generated structure:**
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"stage": "01_prd",
|
|
211
|
+
"checkpoints": {
|
|
212
|
+
"requirement_clarification": {
|
|
213
|
+
"passed": true,
|
|
214
|
+
"confirmed_at": "2026-04-10T12:00:00.000Z",
|
|
215
|
+
"description": "Requirement clarification completed",
|
|
216
|
+
"clarification_file": ".clarification-summary.md",
|
|
217
|
+
"complexity": "simple|complex",
|
|
218
|
+
"sufficiency_checks": {
|
|
219
|
+
"scope_boundaries": true,
|
|
220
|
+
"business_rules": true,
|
|
221
|
+
"priority_phasing": true,
|
|
222
|
+
"integration_boundaries": true
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Step 8: Output Completion
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
✅ Requirement Clarification Complete
|
|
233
|
+
|
|
234
|
+
Complexity Level: [simple | complex]
|
|
235
|
+
Clarification File: {path}/.clarification-summary.md
|
|
236
|
+
Checkpoint File: {path}/.checkpoints.json
|
|
237
|
+
|
|
238
|
+
Key Decisions:
|
|
239
|
+
- [Decision 1]
|
|
240
|
+
- [Decision 2]
|
|
241
|
+
|
|
242
|
+
Sufficiency Checks: 4/4 ✅
|
|
243
|
+
|
|
244
|
+
Next: Proceed to PRD generation.
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
# Output Checklist
|
|
250
|
+
|
|
251
|
+
- [ ] Requirement document loaded
|
|
252
|
+
- [ ] System knowledge loaded (if exists)
|
|
253
|
+
- [ ] Complexity mode determined
|
|
254
|
+
- [ ] Clarification conducted (appropriate mode)
|
|
255
|
+
- [ ] All 4 Sufficiency Checks passed
|
|
256
|
+
- [ ] `.clarification-summary.md` created
|
|
257
|
+
- [ ] `.checkpoints.json` initialized via script
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
# Constraints
|
|
262
|
+
|
|
263
|
+
**Must do:**
|
|
264
|
+
- Always perform at least 1 clarification round
|
|
265
|
+
- Use file-based for complex mode or 4+ questions
|
|
266
|
+
- Pass all 4 Sufficiency Checks
|
|
267
|
+
- Use `update-progress.js` for JSON files
|
|
268
|
+
|
|
269
|
+
**Must not do:**
|
|
270
|
+
- Skip clarification based on urgency
|
|
271
|
+
- Use chat for complex requirements
|
|
272
|
+
- Manually write JSON files
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-pm-requirement-model
|
|
3
|
+
description: SpecCrew PM Requirement Modeling Skill. Applies ISA-95 Stages 1-3 for business domain analysis, WBS decomposition, and module ordering. Produces .module-design.md as interface contract for downstream PRD generation. Second step in PRD workflow.
|
|
4
|
+
tools: Read, Write, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Overview
|
|
8
|
+
|
|
9
|
+
ISA-95 business modeling and module decomposition. Produces `.module-design.md` as the interface contract for PRD generation.
|
|
10
|
+
|
|
11
|
+
## Trigger Scenarios
|
|
12
|
+
|
|
13
|
+
- Clarification completed (`.clarification-summary.md` exists)
|
|
14
|
+
- Complex requirements requiring ISA-95 analysis
|
|
15
|
+
- Multi-module system requiring decomposition
|
|
16
|
+
|
|
17
|
+
## Input Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Required | Description |
|
|
20
|
+
|-----------|------|----------|-------------|
|
|
21
|
+
| `iteration_path` | string | Yes | Path to iteration directory |
|
|
22
|
+
| `clarification_file` | string | No | Path to clarification summary (default: `{iteration_path}/01.product-requirement/.clarification-summary.md`) |
|
|
23
|
+
|
|
24
|
+
## Methodology Foundation
|
|
25
|
+
|
|
26
|
+
Applies ISA-95 Stages 1-3 as structured analysis framework:
|
|
27
|
+
|
|
28
|
+
| Stage | Purpose | Output |
|
|
29
|
+
|-------|---------|--------|
|
|
30
|
+
| Stage 1: Domain Description | Boundary, actors, glossary | Domain model |
|
|
31
|
+
| Stage 2: Functions in Domain | WBS decomposition | Function map |
|
|
32
|
+
| Stage 3: Functions of Interest | MoSCoW prioritization | MVP scope |
|
|
33
|
+
|
|
34
|
+
## PM Stage Content Boundary
|
|
35
|
+
|
|
36
|
+
> **DO NOT include:** API definitions, DB structures, code snippets, technical terminology. These belong to Feature Designer or System Designer.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
# Workflow
|
|
41
|
+
|
|
42
|
+
## Absolute Constraints
|
|
43
|
+
|
|
44
|
+
> **Violation = task failure**
|
|
45
|
+
|
|
46
|
+
1. **FORBIDDEN:** `create_file` for documents — use `search_replace` on templates
|
|
47
|
+
2. **FORBIDDEN:** Full-file rewrite — use targeted `search_replace`
|
|
48
|
+
3. **MANDATORY:** Template-first workflow
|
|
49
|
+
|
|
50
|
+
## Step 1: Verify Prerequisites
|
|
51
|
+
|
|
52
|
+
**MANDATORY:** `.clarification-summary.md` MUST exist in the iteration directory.
|
|
53
|
+
|
|
54
|
+
**IF missing → ABORT immediately:**
|
|
55
|
+
```
|
|
56
|
+
❌ ERROR: .clarification-summary.md not found.
|
|
57
|
+
Path: {iteration_path}/01.product-requirement/.clarification-summary.md
|
|
58
|
+
|
|
59
|
+
This skill requires completed clarification. Please run speccrew-pm-requirement-clarify first.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Actions:**
|
|
63
|
+
1. Read `.clarification-summary.md`
|
|
64
|
+
2. Extract: complexity level, key decisions, clarified scope, business rules
|
|
65
|
+
3. IF complexity == "simple" → Skip to Step 4 (minimal module design)
|
|
66
|
+
|
|
67
|
+
## Step 2: ISA-95 Business Modeling (Complex Requirements)
|
|
68
|
+
|
|
69
|
+
> ⚠️ **This is a THINKING PROCESS with user checkpoints.**
|
|
70
|
+
|
|
71
|
+
### 2.1 Stage 1 - Domain Description
|
|
72
|
+
|
|
73
|
+
**Actions:**
|
|
74
|
+
- Define domain boundary (in-scope, out-of-scope)
|
|
75
|
+
- Identify external participants (users, systems, agents)
|
|
76
|
+
- Create domain glossary (business terms only)
|
|
77
|
+
|
|
78
|
+
**Output format:**
|
|
79
|
+
```markdown
|
|
80
|
+
### Domain Description
|
|
81
|
+
- **System Boundary**: [what's included/excluded]
|
|
82
|
+
- **Actors**: [user roles, external systems]
|
|
83
|
+
- **Domain Glossary**: [term: definition]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Checkpoint A:** Present to user for confirmation.
|
|
87
|
+
```
|
|
88
|
+
📝 Domain Description Complete
|
|
89
|
+
|
|
90
|
+
System Boundary: [summary]
|
|
91
|
+
Actors: [list]
|
|
92
|
+
|
|
93
|
+
Does this match your understanding? Reply "确认" to proceed or provide corrections.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**HARD STOP** — Wait for user confirmation before proceeding.
|
|
97
|
+
|
|
98
|
+
### 2.2 Stage 2 - Functions in Domain (WBS)
|
|
99
|
+
|
|
100
|
+
**Actions:**
|
|
101
|
+
- Create WBS decomposition (2-3 levels)
|
|
102
|
+
- Map functions to business capabilities
|
|
103
|
+
- Identify module boundaries
|
|
104
|
+
|
|
105
|
+
**Output format:**
|
|
106
|
+
```markdown
|
|
107
|
+
### Domain Functions (WBS)
|
|
108
|
+
- Function 1
|
|
109
|
+
- Sub-function 1.1
|
|
110
|
+
- Sub-function 1.2
|
|
111
|
+
- Function 2
|
|
112
|
+
- Sub-function 2.1
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 2.3 Stage 3 - Functions of Interest (MoSCoW)
|
|
116
|
+
|
|
117
|
+
**Actions:**
|
|
118
|
+
- Apply MoSCoW prioritization
|
|
119
|
+
- Identify core vs non-core functions
|
|
120
|
+
- Define MVP scope
|
|
121
|
+
|
|
122
|
+
**Output format:**
|
|
123
|
+
```markdown
|
|
124
|
+
### Focus Functions (MoSCoW)
|
|
125
|
+
| Priority | Function | Rationale |
|
|
126
|
+
|----------|----------|-----------|
|
|
127
|
+
| Must | [function] | [why core] |
|
|
128
|
+
| Should | [function] | [why important] |
|
|
129
|
+
| Could | [function] | [why deferred] |
|
|
130
|
+
| Won't | [function] | [why excluded] |
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Checkpoint B:** Present MVP scope for confirmation.
|
|
134
|
+
```
|
|
135
|
+
📝 MVP Scope Defined
|
|
136
|
+
|
|
137
|
+
Must-have (Phase 1): [list]
|
|
138
|
+
Should-have (Phase 2): [list]
|
|
139
|
+
|
|
140
|
+
Is this prioritization correct? Reply "确认" to proceed.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**HARD STOP** — Wait for user confirmation.
|
|
144
|
+
|
|
145
|
+
**Checkpoint C:** Present complete analysis summary.
|
|
146
|
+
```
|
|
147
|
+
📝 ISA-95 Analysis Complete
|
|
148
|
+
|
|
149
|
+
[Summary of all 3 stages]
|
|
150
|
+
|
|
151
|
+
Ready to proceed with module decomposition? Reply "确认".
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**HARD STOP** — Wait for final confirmation before Step 3.
|
|
155
|
+
|
|
156
|
+
## Step 3: Module Decomposition & Ordering
|
|
157
|
+
|
|
158
|
+
### 3.1 Define Module List
|
|
159
|
+
|
|
160
|
+
**Actions:**
|
|
161
|
+
- Map WBS functions to modules
|
|
162
|
+
- Define scope for each module
|
|
163
|
+
- Identify key entities per module
|
|
164
|
+
|
|
165
|
+
**Output format:**
|
|
166
|
+
```markdown
|
|
167
|
+
## Module List
|
|
168
|
+
| Module | Key | Scope | Key Entities | Owner Domain |
|
|
169
|
+
|--------|-----|-------|-------------|--------------|
|
|
170
|
+
| [Name] | [key] | [scope] | [entities] | [domain] |
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 3.2 Cross-Module Dependency Matrix
|
|
174
|
+
|
|
175
|
+
**Actions:**
|
|
176
|
+
- Identify data flows between modules
|
|
177
|
+
- Document dependency types (Data/API/Event)
|
|
178
|
+
- Note shared entities
|
|
179
|
+
|
|
180
|
+
**Output format:**
|
|
181
|
+
```markdown
|
|
182
|
+
## Dependency Matrix
|
|
183
|
+
| Source Module | Target Module | Type | Description |
|
|
184
|
+
|--------------|---------------|------|-------------|
|
|
185
|
+
| [A] | [B] | Data | [shared entity] |
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 3.3 Implementation Phases
|
|
189
|
+
|
|
190
|
+
**Actions:**
|
|
191
|
+
- Sort modules by dependency (least dependent first)
|
|
192
|
+
- Group into phases (typically 3)
|
|
193
|
+
- Validate no circular dependencies
|
|
194
|
+
|
|
195
|
+
**Output format:**
|
|
196
|
+
```markdown
|
|
197
|
+
## Implementation Phases
|
|
198
|
+
- **Phase 1** (Foundation): [modules with no upstream deps]
|
|
199
|
+
- **Phase 2** (Core): [modules depending on Phase 1]
|
|
200
|
+
- **Phase 3** (Extension): [remaining modules]
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**User Confirmation:**
|
|
204
|
+
```
|
|
205
|
+
📝 Module Decomposition Complete
|
|
206
|
+
|
|
207
|
+
[Module list table]
|
|
208
|
+
[Dependency matrix]
|
|
209
|
+
[Implementation phases]
|
|
210
|
+
|
|
211
|
+
Please review. Reply "确认" to finalize or request changes.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**HARD STOP** — Wait for user confirmation.
|
|
215
|
+
|
|
216
|
+
## Step 4: Generate .module-design.md
|
|
217
|
+
|
|
218
|
+
**Output:** `{iteration_path}/01.product-requirement/.module-design.md`
|
|
219
|
+
|
|
220
|
+
**Complete format:**
|
|
221
|
+
```markdown
|
|
222
|
+
# Module Design
|
|
223
|
+
|
|
224
|
+
## ISA-95 Analysis Summary
|
|
225
|
+
|
|
226
|
+
### Domain Description
|
|
227
|
+
- **System Boundary**: [description]
|
|
228
|
+
- **Actors**: [list]
|
|
229
|
+
- **Domain Glossary**: [terms]
|
|
230
|
+
|
|
231
|
+
### Domain Functions (WBS)
|
|
232
|
+
[WBS structure]
|
|
233
|
+
|
|
234
|
+
### Focus Functions (MoSCoW)
|
|
235
|
+
| Priority | Function | Rationale |
|
|
236
|
+
|----------|----------|-----------|
|
|
237
|
+
| Must | [fn] | [rationale] |
|
|
238
|
+
| Should | [fn] | [rationale] |
|
|
239
|
+
| Could | [fn] | [rationale] |
|
|
240
|
+
|
|
241
|
+
## Module List
|
|
242
|
+
| Module | Key | Scope | Key Entities | Owner Domain | Phase |
|
|
243
|
+
|--------|-----|-------|-------------|--------------|-------|
|
|
244
|
+
| [name] | [key] | [scope] | [entities] | [domain] | [1/2/3] |
|
|
245
|
+
|
|
246
|
+
## Dependency Matrix
|
|
247
|
+
| Source | Target | Type | Description |
|
|
248
|
+
|--------|--------|------|-------------|
|
|
249
|
+
| [A] | [B] | [type] | [desc] |
|
|
250
|
+
|
|
251
|
+
## Implementation Phases
|
|
252
|
+
- **Phase 1**: [foundation modules]
|
|
253
|
+
- **Phase 2**: [dependent modules]
|
|
254
|
+
- **Phase 3**: [independent modules]
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**For simple requirements:** Include minimal sections (Domain Description + Module List with 1 module).
|
|
258
|
+
|
|
259
|
+
## Step 5: Update .checkpoints.json
|
|
260
|
+
|
|
261
|
+
> ⚠️ **MANDATORY: Use `update-progress.js` script for all JSON files.**
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
265
|
+
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
266
|
+
--checkpoint requirement_modeling \
|
|
267
|
+
--passed true
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Generated structure:**
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"stage": "01_prd",
|
|
274
|
+
"checkpoints": {
|
|
275
|
+
"requirement_clarification": { ... },
|
|
276
|
+
"requirement_modeling": {
|
|
277
|
+
"passed": true,
|
|
278
|
+
"confirmed_at": "2026-04-10T12:00:00.000Z",
|
|
279
|
+
"description": "ISA-95 modeling and module decomposition completed",
|
|
280
|
+
"module_design_file": ".module-design.md",
|
|
281
|
+
"isa95_stages": {
|
|
282
|
+
"domain_description": true,
|
|
283
|
+
"functions_in_domain": true,
|
|
284
|
+
"functions_of_interest": true
|
|
285
|
+
},
|
|
286
|
+
"module_count": 3,
|
|
287
|
+
"implementation_phases": 3
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Step 6: Output Completion
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
✅ Requirement Modeling Complete
|
|
297
|
+
|
|
298
|
+
Module Design File: {path}/.module-design.md
|
|
299
|
+
Checkpoint File: {path}/.checkpoints.json
|
|
300
|
+
|
|
301
|
+
Summary:
|
|
302
|
+
- Complexity: [simple | complex]
|
|
303
|
+
- Modules: [count]
|
|
304
|
+
- Phases: [count]
|
|
305
|
+
- Dependencies: [count]
|
|
306
|
+
|
|
307
|
+
Next: Proceed to PRD generation.
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
# Output Checklist
|
|
313
|
+
|
|
314
|
+
- [ ] `.clarification-summary.md` verified (prerequisite)
|
|
315
|
+
- [ ] ISA-95 Stage 1 complete (Domain Description)
|
|
316
|
+
- [ ] Checkpoint A passed (domain boundary confirmed)
|
|
317
|
+
- [ ] ISA-95 Stage 2 complete (Functions in Domain)
|
|
318
|
+
- [ ] ISA-95 Stage 3 complete (Functions of Interest)
|
|
319
|
+
- [ ] Checkpoint B passed (MVP scope confirmed)
|
|
320
|
+
- [ ] Checkpoint C passed (complete analysis confirmed)
|
|
321
|
+
- [ ] Module list defined
|
|
322
|
+
- [ ] Dependency matrix created
|
|
323
|
+
- [ ] Implementation phases determined
|
|
324
|
+
- [ ] Module decomposition confirmed with user
|
|
325
|
+
- [ ] `.module-design.md` created
|
|
326
|
+
- [ ] `.checkpoints.json` updated via script
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
# Constraints
|
|
331
|
+
|
|
332
|
+
**Must do:**
|
|
333
|
+
- Verify `.clarification-summary.md` exists before starting
|
|
334
|
+
- Use 3 checkpoints (A/B/C) for progressive user confirmation
|
|
335
|
+
- Define clear module boundaries with minimal coupling
|
|
336
|
+
- Use `update-progress.js` for JSON files
|
|
337
|
+
|
|
338
|
+
**Must not do:**
|
|
339
|
+
- Skip user checkpoints in complex mode
|
|
340
|
+
- Include technical implementation details
|
|
341
|
+
- Create circular module dependencies
|
|
342
|
+
- Manually write JSON files
|