speccrew 0.3.0 → 0.3.1
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.
|
@@ -92,8 +92,89 @@ If WORKFLOW-PROGRESS.json does not exist (legacy iterations or new workspace):
|
|
|
92
92
|
|
|
93
93
|
# Workflow
|
|
94
94
|
|
|
95
|
+
## Phase 0.5: IDE Detection
|
|
96
|
+
|
|
97
|
+
Detect current IDE environment and determine skill loading strategy:
|
|
98
|
+
|
|
99
|
+
1. **Detect IDE**: Check environment variables or context to identify current IDE (Claude Code, Cursor, Qoder, etc.)
|
|
100
|
+
2. **Set skill_path**: Based on IDE detection result, set the appropriate skill search path
|
|
101
|
+
3. **Proceed to Requirement Assessment**
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Phase 1: Pre-Skill Requirement Assessment
|
|
106
|
+
|
|
107
|
+
Before invoking the requirement analysis skill, assess the user input for completeness.
|
|
108
|
+
|
|
109
|
+
### Sufficiency Check
|
|
110
|
+
|
|
111
|
+
Evaluate user input against these criteria:
|
|
112
|
+
|
|
113
|
+
| Criterion | Description | Assessment |
|
|
114
|
+
|-----------|-------------|------------|
|
|
115
|
+
| Business Problem Clarity | Is the core business problem clearly understood? | ✅/❌ |
|
|
116
|
+
| Target Users & Scenarios | Are target users and core use cases identified? | ✅/❌ |
|
|
117
|
+
| Scope Boundaries | Are inclusion/exclusion boundaries defined? | ✅/❌ |
|
|
118
|
+
| System Relationship | Is the relationship with existing system understood? | ✅/❌ |
|
|
119
|
+
|
|
120
|
+
### Clarification Protocol
|
|
121
|
+
|
|
122
|
+
**IF ANY criterion NOT met**:
|
|
123
|
+
- Execute progressive clarification (2-3 questions per round, minimum 2 rounds)
|
|
124
|
+
- Questions should be specific and actionable
|
|
125
|
+
- Document all clarification Q&A in progress tracking
|
|
126
|
+
- Re-evaluate after each round
|
|
127
|
+
|
|
128
|
+
**IF ALL criteria met** (user provided complete requirement document):
|
|
129
|
+
- **STILL execute at least 1 confirmation round**:
|
|
130
|
+
1. Confirm understanding is correct
|
|
131
|
+
2. Confirm scope boundaries (what's in/out)
|
|
132
|
+
3. Confirm priorities and constraints
|
|
133
|
+
- This ensures alignment even with comprehensive input
|
|
134
|
+
|
|
135
|
+
### Complexity Pre-Assessment
|
|
136
|
+
|
|
137
|
+
Before invoking skill, perform rough complexity assessment:
|
|
138
|
+
|
|
139
|
+
- **Simple**: Single module, clear scope, minimal system integration
|
|
140
|
+
- **Moderate**: 1-2 modules, some integration required
|
|
141
|
+
- **Complex**: 2+ modules, significant integration, multi-stakeholder
|
|
142
|
+
|
|
143
|
+
If requirement clearly involves **2+ modules**:
|
|
144
|
+
- Flag this as `expected_complexity: complex`
|
|
145
|
+
- Inform Skill that this is a complex requirement requiring thorough analysis
|
|
146
|
+
|
|
147
|
+
### Pre-Skill Output
|
|
148
|
+
|
|
149
|
+
After completing assessment, prepare the following to pass to Skill:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
clarification_status: true|false
|
|
153
|
+
clarification_rounds: <number>
|
|
154
|
+
clarification_summary: <brief summary of key clarifications>
|
|
155
|
+
expected_complexity: simple|moderate|complex
|
|
156
|
+
complexity_notes: <if complex, note affected modules>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
⚠️ **MANDATORY CLARIFICATION RULE**:
|
|
162
|
+
- **NEVER skip requirement clarification entirely**
|
|
163
|
+
- **Even with complete requirement documents, perform at least 1 confirmation round**
|
|
164
|
+
- **Document all clarification in progress tracking**
|
|
165
|
+
- **If user rushes to skip, explain risks and still confirm critical points**
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Phase 2: Invoke Skill
|
|
170
|
+
|
|
95
171
|
Invoke Skill: Find `speccrew-pm-requirement-analysis/SKILL.md` in the skills directory
|
|
96
172
|
|
|
173
|
+
Pass the following context to the Skill:
|
|
174
|
+
- User's original requirement input
|
|
175
|
+
- Pre-skill assessment results (clarification_status, expected_complexity, etc.)
|
|
176
|
+
- Clarification Q&A records (if any)
|
|
177
|
+
|
|
97
178
|
# Deliverables
|
|
98
179
|
|
|
99
180
|
| Deliverable | Path | Notes |
|
|
@@ -103,13 +184,22 @@ Invoke Skill: Find `speccrew-pm-requirement-analysis/SKILL.md` in the skills dir
|
|
|
103
184
|
|
|
104
185
|
# Constraints
|
|
105
186
|
|
|
187
|
+
⚠️ **MANDATORY CLARIFICATION RULE**:
|
|
188
|
+
- **NEVER skip requirement clarification entirely**
|
|
189
|
+
- **Even with complete requirement documents, perform at least 1 confirmation round**
|
|
190
|
+
- **Document all clarification in progress tracking**
|
|
191
|
+
- **If user rushes to skip, explain risks and still confirm critical points**
|
|
192
|
+
|
|
106
193
|
**Must do:**
|
|
107
194
|
- Read business module list to confirm boundaries between requirements and existing features
|
|
108
195
|
- Use templates from `speccrew-pm-requirement-analysis/templates/`
|
|
109
196
|
- Explicitly prompt user for confirmation after PRD completion, only transition to speccrew-planner after confirmation
|
|
197
|
+
- Execute Pre-Skill Requirement Assessment before invoking the Skill
|
|
198
|
+
- Pass clarification context and complexity assessment to the Skill
|
|
110
199
|
|
|
111
200
|
**Must not do:**
|
|
112
201
|
- Do not make technical solution decisions (that's speccrew-planner's responsibility)
|
|
113
202
|
- Do not skip manual confirmation to directly start the next stage
|
|
114
203
|
- Do not assume business rules on your own; clarify unclear requirements with the user
|
|
204
|
+
- Do not skip the clarification process, even when user provides detailed documents
|
|
115
205
|
|
|
@@ -23,7 +23,17 @@ tools: Read, Write, Glob, Grep
|
|
|
23
23
|
|
|
24
24
|
3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections. Skipping copy and writing content directly is FORBIDDEN.
|
|
25
25
|
|
|
26
|
-
## Step 1: Requirements Clarification (
|
|
26
|
+
## Step 1: Requirements Clarification (MANDATORY)
|
|
27
|
+
|
|
28
|
+
⚠️ **MANDATORY: This step CANNOT be skipped.**
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
IF user provided a complete requirement document:
|
|
32
|
+
→ Perform at least 1 confirmation round (verify understanding, scope, priorities)
|
|
33
|
+
→ Generate clarification summary
|
|
34
|
+
IF user provided incomplete input:
|
|
35
|
+
→ Perform full progressive clarification (Round 1 → Round 2 → optional Round 3)
|
|
36
|
+
```
|
|
27
37
|
|
|
28
38
|
Use progressive questioning to clarify requirements. Do NOT ask all questions at once.
|
|
29
39
|
|
|
@@ -66,7 +76,53 @@ Sufficient to proceed when ALL of:
|
|
|
66
76
|
- [ ] Relationship to existing system is understood
|
|
67
77
|
|
|
68
78
|
If ANY is unclear → ask follow-up questions targeting the gap
|
|
69
|
-
If ALL are clear → proceed to Step
|
|
79
|
+
If ALL are clear → proceed to Step 1 Output
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 1 Output: Generate Clarification Summary
|
|
83
|
+
|
|
84
|
+
After Sufficiency Check passes, generate a clarification summary file:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Path: speccrew-workspace/iterations/{iteration}/01.product-requirement/.clarification-summary.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Content template:**
|
|
91
|
+
```markdown
|
|
92
|
+
# Clarification Summary
|
|
93
|
+
|
|
94
|
+
## Input Type
|
|
95
|
+
- [ ] Complete requirement document provided
|
|
96
|
+
- [ ] Incomplete input (progressive clarification performed)
|
|
97
|
+
|
|
98
|
+
## Clarification Rounds
|
|
99
|
+
- Round 1 (Core Understanding): [Summary of Q&A]
|
|
100
|
+
- Round 2 (Scope & Boundaries): [Summary of Q&A]
|
|
101
|
+
- Round 3 (Detail & Acceptance): [If applicable, Summary of Q&A]
|
|
102
|
+
|
|
103
|
+
## Sufficiency Check Status
|
|
104
|
+
- [x] Business problem is clearly understood
|
|
105
|
+
- [x] Target users and core scenarios identified
|
|
106
|
+
- [x] Scope boundaries (in/out) are defined
|
|
107
|
+
- [x] Relationship to existing system is understood
|
|
108
|
+
|
|
109
|
+
## Key Decisions
|
|
110
|
+
- [Record any key decisions made during clarification]
|
|
111
|
+
|
|
112
|
+
## Proceed Gate
|
|
113
|
+
✅ All checks passed. Ready for Step 2.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Proceed Gate to Step 2
|
|
117
|
+
|
|
118
|
+
**Before proceeding to Step 2, verify BOTH conditions:**
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
□ All Sufficiency Check items marked as ✅
|
|
122
|
+
□ .clarification-summary.md file exists and is complete
|
|
123
|
+
|
|
124
|
+
IF both conditions met → Proceed to Step 2
|
|
125
|
+
IF any condition fails → STOP and complete the missing items
|
|
70
126
|
```
|
|
71
127
|
|
|
72
128
|
**Principles:**
|
|
@@ -274,6 +330,16 @@ If there are gaps or unclear points, ask the user to confirm before proceeding.
|
|
|
274
330
|
|
|
275
331
|
Before writing, determine the PRD structure based on requirement complexity:
|
|
276
332
|
|
|
333
|
+
### Structure Decision (MANDATORY IF/THEN)
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
IF modules_count >= 2 OR cross_module_dependencies exist:
|
|
337
|
+
→ MANDATORY: Use Master-Sub Structure
|
|
338
|
+
→ Record: sub_prd_count = len(module_list)
|
|
339
|
+
ELSE:
|
|
340
|
+
→ Use Single PRD Structure
|
|
341
|
+
```
|
|
342
|
+
|
|
277
343
|
### Simple Requirements (Single Document)
|
|
278
344
|
- Single feature with clear boundaries
|
|
279
345
|
- Minimal dependencies on existing modules
|
|
@@ -420,47 +486,135 @@ If the iteration directory does not exist, refer to the `000-sample` directory s
|
|
|
420
486
|
|
|
421
487
|
## Step 12: Write Files Using Template-Fill Workflow
|
|
422
488
|
|
|
423
|
-
|
|
489
|
+
⚠️ **CRITICAL: For Master-Sub structure, you MUST generate ALL Sub-PRD files.**
|
|
490
|
+
- **DO NOT put all module content into the Master PRD.**
|
|
491
|
+
- **Each Sub-PRD is a SEPARATE file containing ONLY that module's requirements.**
|
|
492
|
+
|
|
493
|
+
---
|
|
424
494
|
|
|
425
|
-
|
|
495
|
+
### Step 12a: Generate Master PRD
|
|
426
496
|
|
|
427
|
-
|
|
428
|
-
2. **Replace top-level placeholders** (feature name, iteration, date)
|
|
429
|
-
3. **Create the document** using `create_file` at the path determined in Step 11
|
|
430
|
-
4. **Verify**: Document has complete section structure
|
|
497
|
+
**For BOTH Single and Master-Sub structures:**
|
|
431
498
|
|
|
432
|
-
|
|
499
|
+
1. **Copy template to document path:**
|
|
500
|
+
- Read `templates/PRD-TEMPLATE.md` (already loaded in Step 7)
|
|
501
|
+
- Replace top-level placeholders (feature name, iteration, date)
|
|
502
|
+
- Create document using `create_file` at: `{iteration}/01.product-requirement/{feature-name}-prd.md`
|
|
433
503
|
|
|
434
|
-
Fill
|
|
504
|
+
2. **Fill Master-only content using `search_replace`:**
|
|
505
|
+
- Section 1: Overall background, goals, success metrics
|
|
506
|
+
- Section 2: System architecture overview (Mermaid graph TB)
|
|
507
|
+
- Section 3: Module list with scope boundaries (from Step 6.1)
|
|
508
|
+
- Section 4: Cross-module dependency matrix (from Step 6.2)
|
|
509
|
+
- Section 5: Implementation phases and ordering (from Step 6.3)
|
|
510
|
+
- Section 6: Shared entities and data contracts
|
|
511
|
+
- Section 7: Global non-functional requirements
|
|
512
|
+
|
|
513
|
+
3. **DO NOT include module-specific content in Master:**
|
|
514
|
+
- No module-specific user stories
|
|
515
|
+
- No module-specific functional requirements
|
|
516
|
+
- No module-specific Feature Breakdown tables
|
|
435
517
|
|
|
436
518
|
> ⚠️ **CRITICAL CONSTRAINTS:**
|
|
437
519
|
> - **FORBIDDEN: `create_file` to rewrite the entire document**
|
|
438
520
|
> - **MUST use `search_replace` to fill each section individually**
|
|
439
521
|
> - **All section titles MUST be preserved**
|
|
440
522
|
|
|
441
|
-
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
### Step 12b: Generate Sub-PRDs (LOOP - MANDATORY for Master-Sub)
|
|
526
|
+
|
|
527
|
+
**IF Step 8 determined Master-Sub structure, execute this loop:**
|
|
528
|
+
|
|
529
|
+
```
|
|
530
|
+
FOR each module in module_list from Step 6.1:
|
|
531
|
+
|
|
532
|
+
12b.1: Copy template to sub_prd_path
|
|
533
|
+
sub_prd_name = "{feature-name}-sub-{module-key}.md"
|
|
534
|
+
sub_prd_path = "{iteration}/01.product-requirement/{sub_prd_name}"
|
|
535
|
+
|
|
536
|
+
Action:
|
|
537
|
+
1. Read templates/PRD-TEMPLATE.md
|
|
538
|
+
2. Replace top-level placeholders
|
|
539
|
+
3. Create document using create_file at sub_prd_path
|
|
540
|
+
|
|
541
|
+
12b.2: Fill module-specific content using search_replace:
|
|
542
|
+
- Section 1: Module-specific background and context
|
|
543
|
+
- Section 2: Module-specific user stories
|
|
544
|
+
- Section 3: Module-specific functional requirements
|
|
545
|
+
- Section 3.4: Module-specific Feature Breakdown (REQUIRED)
|
|
546
|
+
- Section 5: Module-specific acceptance criteria
|
|
547
|
+
- Add: Interface Contracts (from Master dependency matrix)
|
|
548
|
+
|
|
549
|
+
12b.3: Verify file exists and is non-empty
|
|
550
|
+
- Read sub_prd_path to confirm file was created
|
|
551
|
+
- Verify file size > 1KB (not empty placeholder)
|
|
552
|
+
|
|
553
|
+
NEXT module
|
|
554
|
+
|
|
555
|
+
⚠️ STOP condition: All modules in module_list have been processed.
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
**Example loop execution:**
|
|
559
|
+
```
|
|
560
|
+
Iteration 1: Process module "inventory"
|
|
561
|
+
→ Create: inventory-management-sub-inventory.md
|
|
562
|
+
→ Fill: inventory-specific content
|
|
563
|
+
→ Verify: file exists and has content
|
|
564
|
+
|
|
565
|
+
Iteration 2: Process module "order"
|
|
566
|
+
→ Create: inventory-management-sub-order.md
|
|
567
|
+
→ Fill: order-specific content
|
|
568
|
+
→ Verify: file exists and has content
|
|
569
|
+
|
|
570
|
+
... continue until all modules processed
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
### Step 12c: Verification Checklist (MANDATORY)
|
|
576
|
+
|
|
577
|
+
**After all PRD files are generated, verify:**
|
|
578
|
+
|
|
579
|
+
```
|
|
580
|
+
□ Master PRD exists at {iteration}/01.product-requirement/{feature-name}-prd.md
|
|
581
|
+
□ Master PRD file size > 2KB (not empty placeholder)
|
|
582
|
+
|
|
583
|
+
[For Master-Sub structure ONLY:]
|
|
584
|
+
□ All {sub_prd_count} Sub-PRD files exist
|
|
585
|
+
□ Each Sub-PRD file size > 3KB (not empty placeholder)
|
|
586
|
+
□ Master PRD Section index links match actual Sub-PRD files
|
|
587
|
+
□ No broken file references
|
|
588
|
+
□ Each Sub-PRD contains module-specific Feature Breakdown
|
|
589
|
+
|
|
590
|
+
IF any check fails → STOP and report error, fix before proceeding
|
|
591
|
+
IF all checks pass → Proceed to Step 12d
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
---
|
|
442
595
|
|
|
443
|
-
###
|
|
596
|
+
### Step 12d: Request Confirmation
|
|
444
597
|
|
|
445
|
-
After
|
|
598
|
+
After verification passes, show summary and request user confirmation:
|
|
446
599
|
|
|
447
|
-
|
|
600
|
+
**Simple PRD Output:**
|
|
448
601
|
```
|
|
449
602
|
PRD generated: speccrew-workspace/iterations/XXX-{type}-{name}/01.product-requirement/[feature-name]-prd.md
|
|
450
603
|
```
|
|
451
604
|
|
|
452
|
-
|
|
605
|
+
**Complex PRD Output (with modeling):**
|
|
453
606
|
```
|
|
454
607
|
Business Modeling generated: speccrew-workspace/iterations/XXX-{type}-{name}/01.product-requirement/[feature-name]-bizs-modeling.md
|
|
455
608
|
PRD generated: speccrew-workspace/iterations/XXX-{type}-{name}/01.product-requirement/[feature-name]-prd.md
|
|
456
609
|
```
|
|
457
610
|
|
|
458
|
-
|
|
611
|
+
**Master-Sub PRD Output:**
|
|
459
612
|
```
|
|
460
613
|
Master PRD generated: speccrew-workspace/iterations/XXX-{type}-{name}/01.product-requirement/[feature-name]-prd.md
|
|
461
|
-
Sub-PRDs generated:
|
|
614
|
+
Sub-PRDs generated ({sub_prd_count} files):
|
|
462
615
|
- [feature-name]-sub-[module1].md
|
|
463
616
|
- [feature-name]-sub-[module2].md
|
|
617
|
+
- ...
|
|
464
618
|
```
|
|
465
619
|
|
|
466
620
|
Please confirm the following key points:
|