speccrew 0.3.2 → 0.3.4
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.
|
@@ -172,15 +172,98 @@ After reading PRD documents, extract Feature Breakdown from each Sub-PRD:
|
|
|
172
172
|
- `Type`: Either `Page+API` or `API-only`
|
|
173
173
|
- `Dependencies`: List of prerequisite Feature IDs (if any)
|
|
174
174
|
|
|
175
|
-
3. **Build Feature Registry**: Consolidate all features across Sub-PRDs into a unified list
|
|
175
|
+
3. **Build Feature Registry**: Consolidate all features across Sub-PRDs into a unified list.
|
|
176
|
+
|
|
177
|
+
4. **Write Feature Registry to `.checkpoints.json`**:
|
|
178
|
+
|
|
179
|
+
Write or update the checkpoint file at:
|
|
180
|
+
```
|
|
181
|
+
speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Structure — each feature has individual status fields for full checklist tracking:
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"stage": "02_feature_design",
|
|
188
|
+
"checkpoints": {
|
|
189
|
+
"function_decomposition": {
|
|
190
|
+
"passed": false,
|
|
191
|
+
"confirmed_at": null,
|
|
192
|
+
"description": "Feature Registry extraction and confirmation",
|
|
193
|
+
"total_features": 42,
|
|
194
|
+
"total_modules": 13,
|
|
195
|
+
"features": [
|
|
196
|
+
{
|
|
197
|
+
"feature_id": "F-SYS-01",
|
|
198
|
+
"feature_name": "Account Login",
|
|
199
|
+
"type": "Page+API",
|
|
200
|
+
"module": "M1-System",
|
|
201
|
+
"source_prd": "crm-system-sub-system.md",
|
|
202
|
+
"dependencies": [],
|
|
203
|
+
"feature_spec_status": "pending",
|
|
204
|
+
"api_contract_status": "pending"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"feature_id": "F-MEMBER-01",
|
|
208
|
+
"feature_name": "Customer Info Management",
|
|
209
|
+
"type": "Page+API",
|
|
210
|
+
"module": "M2-Member",
|
|
211
|
+
"source_prd": "crm-system-sub-member.md",
|
|
212
|
+
"dependencies": ["F-SYS-01"],
|
|
213
|
+
"feature_spec_status": "pending",
|
|
214
|
+
"api_contract_status": "pending"
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
"feature_spec_review": {
|
|
219
|
+
"passed": false,
|
|
220
|
+
"confirmed_at": null
|
|
221
|
+
},
|
|
222
|
+
"api_contract_joint": {
|
|
223
|
+
"passed": false,
|
|
224
|
+
"confirmed_at": null
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Feature status values:**
|
|
231
|
+
- `pending`: Not started
|
|
232
|
+
- `in_progress`: Worker dispatched
|
|
233
|
+
- `completed`: Worker finished successfully
|
|
234
|
+
- `failed`: Worker failed (needs retry)
|
|
235
|
+
- `confirmed`: User confirmed the output
|
|
236
|
+
|
|
237
|
+
**After each worker completes**, update the corresponding feature's status:
|
|
238
|
+
- Feature Spec worker done → set `feature_spec_status` = `completed`
|
|
239
|
+
- API Contract worker done → set `api_contract_status` = `completed`
|
|
240
|
+
|
|
241
|
+
5. **Present Feature Registry to user for confirmation**:
|
|
242
|
+
|
|
243
|
+
Display the full feature table:
|
|
244
|
+
|
|
245
|
+
| # | Feature ID | Feature Name | Type | Module | Dependencies |
|
|
246
|
+
|---|-----------|-------------|------|--------|--------------|
|
|
247
|
+
| 1 | F-SYS-01 | Account Login | Page+API | M1-System | - |
|
|
248
|
+
| 2 | F-MEMBER-01 | Customer Info | Page+API | M2-Member | F-SYS-01 |
|
|
249
|
+
| ... | ... | ... | ... | ... | ... |
|
|
250
|
+
|
|
251
|
+
⚠️ **HARD STOP — WAIT FOR USER CONFIRMATION**
|
|
252
|
+
|
|
176
253
|
```
|
|
177
|
-
Feature Registry
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
254
|
+
DO NOT dispatch Feature Spec workers until user explicitly confirms the Feature Registry.
|
|
255
|
+
Ask user:
|
|
256
|
+
- Is the feature decomposition granularity appropriate?
|
|
257
|
+
- Are Feature IDs, Types, and dependencies correct?
|
|
258
|
+
- Any features to add, remove, or merge?
|
|
259
|
+
|
|
260
|
+
IF user requests changes → update .checkpoints.json, then re-present.
|
|
261
|
+
ONLY after user confirms → update function_decomposition.passed = true,
|
|
262
|
+
set confirmed_at via: node -e "console.log(new Date().toISOString())"
|
|
263
|
+
Then proceed to Phase 3.
|
|
181
264
|
```
|
|
182
265
|
|
|
183
|
-
|
|
266
|
+
6. **Backward Compatibility Check**:
|
|
184
267
|
- If **Feature Breakdown exists**: Proceed with Feature-granular dispatch (new behavior)
|
|
185
268
|
- If **Feature Breakdown missing**: Fall back to Sub-PRD-granular dispatch (legacy behavior)
|
|
186
269
|
- Log the dispatch mode: "📋 Dispatch mode: Feature-granular" or "📋 Dispatch mode: Module-granular (legacy)"
|
|
@@ -259,22 +259,31 @@ Return to the Skill's Step 12d for verification:
|
|
|
259
259
|
- Verify Master PRD Sub-PRD Index matches actual files
|
|
260
260
|
- Verify each Sub-PRD contains Feature Breakdown (Section 3.4)
|
|
261
261
|
|
|
262
|
-
### 4.2
|
|
262
|
+
### 4.2 Present Documents for User Review
|
|
263
263
|
|
|
264
|
-
Execute Skill's Step 12e to present summary and
|
|
264
|
+
Execute Skill's Step 12e to present document summary and ask user to review.
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
⚠️ **HARD STOP — WAIT FOR USER CONFIRMATION**
|
|
267
|
+
- DO NOT update any status files yet
|
|
268
|
+
- DO NOT mark documents as confirmed
|
|
269
|
+
- DO NOT suggest proceeding to the next stage
|
|
270
|
+
- Wait for user to explicitly confirm (e.g., "确认", "OK", "没问题")
|
|
271
|
+
- IF user requests changes → make the changes, then re-present for review
|
|
272
|
+
|
|
273
|
+
### 4.3 Finalize PRD Stage (ONLY after user explicitly confirms)
|
|
267
274
|
|
|
268
275
|
After user confirms the PRD documents are correct:
|
|
269
276
|
|
|
270
|
-
1. Execute Skill's Step 13 to
|
|
271
|
-
|
|
272
|
-
|
|
277
|
+
1. Execute Skill's Step 13 to finalize:
|
|
278
|
+
- Use `update-progress.js` script to update WORKFLOW-PROGRESS.json with **real timestamps** (NOT LLM-generated)
|
|
279
|
+
- Write checkpoint file with **real timestamps** (use `node -e "console.log(new Date().toISOString())"` if script unavailable)
|
|
280
|
+
- Update all PRD document status lines from `📝 Draft` to `✅ Confirmed`
|
|
281
|
+
2. Output completion message:
|
|
273
282
|
```
|
|
274
283
|
✅ PRD documents have been confirmed. PRD stage is complete.
|
|
275
284
|
When you are ready to proceed with Feature Design, please start a new conversation and invoke the Feature Designer Agent.
|
|
276
285
|
```
|
|
277
|
-
|
|
286
|
+
3. **END** — Do not proceed further. Do not invoke or suggest transitioning to the next stage agent.
|
|
278
287
|
|
|
279
288
|
# Deliverables
|
|
280
289
|
|
|
@@ -529,16 +529,27 @@ Total files: 1 (Master) + N (Sub-PRDs) = N+1 files.
|
|
|
529
529
|
- Section 7 (Assumptions & Dependencies)
|
|
530
530
|
|
|
531
531
|
**For Master-Sub Structure** — fill ONLY system-level overview content:
|
|
532
|
-
|
|
533
|
-
|
|
532
|
+
|
|
533
|
+
> ⚠️ **Master PRD = System Overview ONLY. All module-specific details go into Sub-PRDs.**
|
|
534
|
+
> The Master PRD should read like an "executive summary" — a reader should understand
|
|
535
|
+
> WHAT the system does and HOW modules relate, but NOT the detailed features of each module.
|
|
536
|
+
|
|
537
|
+
- Section 1 (Background & Goals): System-wide background and goals (keep concise, 2-3 paragraphs max)
|
|
538
|
+
- Section 2 (User Stories):
|
|
539
|
+
- 2.1 Target Users: List all user roles with brief descriptions
|
|
540
|
+
- 2.2 User Scenarios: **Maximum 3-5 HIGH-LEVEL system stories.** Each story describes a MODULE-LEVEL capability, NOT individual features.
|
|
541
|
+
- ✅ Good: "As a store manager, I want a CRM system to manage customer relationships across all stores"
|
|
542
|
+
- ❌ Bad: "As a beautician, I want to upload before/after photos" (this is module-specific, belongs in Sub-PRD)
|
|
534
543
|
- Section 3 (Functional Requirements):
|
|
535
|
-
- 3.1 Use Case Diagram: System-level use case diagram showing
|
|
536
|
-
- 3.2 Business Process Flow:
|
|
537
|
-
- 3.3 Feature List:
|
|
544
|
+
- 3.1 Use Case Diagram: System-level use case diagram showing modules as use case groups (NOT individual features)
|
|
545
|
+
- 3.2 Business Process Flow: ONE cross-module end-to-end process flow (the main business flow only)
|
|
546
|
+
- 3.3 Feature List: **ONE row per MODULE** (NOT per feature). Columns: Module, Priority, Scope Summary, Key Capabilities (brief). Maximum N rows for N modules.
|
|
547
|
+
- ✅ Good: `| M2-会员管理 | P0 | 顾客信息CRUD、自定义字段、公共池 |`
|
|
548
|
+
- ❌ Bad: Listing 24 individual features across all modules
|
|
538
549
|
- 3.4 Feature Breakdown: Write "See individual Sub-PRDs for module-specific Feature Breakdown"
|
|
539
550
|
- 3.5 Feature Details: Write "See individual Sub-PRDs for module-specific Feature Details"
|
|
540
|
-
- Section 4 (Non-functional Requirements): System-wide NFRs only
|
|
541
|
-
- Section 5 (Acceptance Criteria): System-wide acceptance
|
|
551
|
+
- Section 4 (Non-functional Requirements): System-wide NFRs only (performance, security, compatibility — 1 line each)
|
|
552
|
+
- Section 5 (Acceptance Criteria): **System-wide milestones only** (e.g., "All Phase 1 modules deployed"). NOT module-specific acceptance items.
|
|
542
553
|
- Section 6 (Boundary Description): System-wide scope boundaries
|
|
543
554
|
- Section 7 (Assumptions & Dependencies): System-wide dependencies
|
|
544
555
|
- **APPEND after Section 7** using `search_replace` on the PRD Status line:
|
|
@@ -607,9 +618,9 @@ IF any check fails → Report error and fix before proceeding.
|
|
|
607
618
|
|
|
608
619
|
---
|
|
609
620
|
|
|
610
|
-
### Step 12e:
|
|
621
|
+
### Step 12e: Present Documents for User Review
|
|
611
622
|
|
|
612
|
-
Present summary to user:
|
|
623
|
+
Present the generated document summary to user:
|
|
613
624
|
|
|
614
625
|
**Single PRD:**
|
|
615
626
|
```
|
|
@@ -628,68 +639,86 @@ Sub-PRDs ({sub_prd_count} files):
|
|
|
628
639
|
Total files generated: {sub_prd_count + 1}
|
|
629
640
|
```
|
|
630
641
|
|
|
631
|
-
|
|
642
|
+
Ask user to review the documents and check:
|
|
632
643
|
1. Feature boundary accurate?
|
|
633
644
|
2. Acceptance criteria quantifiable?
|
|
634
645
|
3. Not In Scope complete?
|
|
635
646
|
4. [Master-Sub] Module decomposition appropriate?
|
|
636
647
|
5. [Existing features] EXISTING/MODIFIED/NEW markers accurate?
|
|
637
648
|
|
|
638
|
-
|
|
649
|
+
⚠️ **HARD STOP — WAIT FOR USER CONFIRMATION**
|
|
650
|
+
|
|
651
|
+
```
|
|
652
|
+
DO NOT proceed to Step 13 until user explicitly confirms.
|
|
653
|
+
DO NOT update any status files or mark documents as confirmed.
|
|
654
|
+
DO NOT suggest moving to the next stage.
|
|
655
|
+
|
|
656
|
+
Wait for user to respond with confirmation (e.g., "确认", "OK", "没问题").
|
|
657
|
+
IF user requests changes → make the changes, then re-present for review.
|
|
658
|
+
ONLY after user explicitly confirms → proceed to Step 13.
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
## Step 13: Finalize PRD Stage (ONLY after user explicitly confirms)
|
|
639
662
|
|
|
640
|
-
|
|
663
|
+
⚠️ **PREREQUISITE: User has explicitly confirmed the PRD documents in Step 12e.**
|
|
664
|
+
IF user has NOT confirmed yet → DO NOT execute this step. Return to Step 12e and wait.
|
|
641
665
|
|
|
642
|
-
|
|
666
|
+
### 13a Update Workflow Progress
|
|
643
667
|
|
|
644
|
-
|
|
668
|
+
Use the `update-progress.js` script to update workflow status with real timestamps:
|
|
645
669
|
|
|
646
|
-
|
|
670
|
+
```bash
|
|
671
|
+
node speccrew-workspace/scripts/update-progress.js update-workflow \
|
|
672
|
+
--file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
|
|
673
|
+
--stage 01_prd --status confirmed \
|
|
674
|
+
--output "01.product-requirement/{feature-name}-prd.md,01.product-requirement/{feature-name}-sub-{module1}.md,..."
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
> The script automatically generates real ISO timestamps for `completed_at` and `confirmed_at`.
|
|
678
|
+
> **DO NOT manually construct timestamps** — LLM-generated timestamps are always incorrect.
|
|
679
|
+
|
|
680
|
+
IF the script is not available or fails, use the following shell command to get the real timestamp:
|
|
681
|
+
```bash
|
|
682
|
+
node -e "console.log(new Date().toISOString())"
|
|
683
|
+
```
|
|
684
|
+
Then use the output to fill in the JSON fields manually.
|
|
685
|
+
|
|
686
|
+
### 13b Write Checkpoint File
|
|
687
|
+
|
|
688
|
+
1. First, get the real current timestamp:
|
|
689
|
+
```bash
|
|
690
|
+
node -e "console.log(new Date().toISOString())"
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
2. Write or update the checkpoint file using the REAL timestamp from the command above:
|
|
647
694
|
```
|
|
648
695
|
speccrew-workspace/iterations/{iteration}/01.product-requirement/.checkpoints.json
|
|
649
696
|
```
|
|
650
697
|
|
|
651
|
-
Content:
|
|
698
|
+
Content (use the REAL timestamp from the command output):
|
|
652
699
|
```json
|
|
653
700
|
{
|
|
654
701
|
"stage": "01_prd",
|
|
655
702
|
"checkpoints": {
|
|
656
703
|
"prd_review": {
|
|
657
704
|
"passed": true,
|
|
658
|
-
"confirmed_at": "
|
|
705
|
+
"confirmed_at": "{REAL_TIMESTAMP_FROM_COMMAND}",
|
|
659
706
|
"description": "PRD review and confirmation"
|
|
660
707
|
}
|
|
661
708
|
}
|
|
662
709
|
}
|
|
663
710
|
```
|
|
664
711
|
|
|
665
|
-
###
|
|
666
|
-
|
|
667
|
-
Read and update the WORKFLOW-PROGRESS.json file:
|
|
712
|
+
### 13c Update PRD Document Status
|
|
668
713
|
|
|
669
|
-
|
|
670
|
-
2. **Update the following fields**:
|
|
671
|
-
- `current_stage` = "01_prd" (keep current stage — the next agent will update this when it starts)
|
|
672
|
-
- `01_prd.status` = "confirmed"
|
|
673
|
-
- `01_prd.completed_at` = `<current-ISO-timestamp>`
|
|
674
|
-
- `01_prd.confirmed_at` = `<current-ISO-timestamp>`
|
|
675
|
-
- `01_prd.outputs` = `["01.product-requirement/{feature-name}-prd.md"]`
|
|
714
|
+
Update the PRD document status line from Draft to Confirmed:
|
|
676
715
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
"status": "confirmed",
|
|
682
|
-
"started_at": "2026-04-08T10:00:00Z",
|
|
683
|
-
"completed_at": "2026-04-08T11:30:00Z",
|
|
684
|
-
"confirmed_at": "2026-04-08T11:35:00Z",
|
|
685
|
-
"outputs": [
|
|
686
|
-
"01.product-requirement/user-management-prd.md"
|
|
687
|
-
]
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
```
|
|
716
|
+
Use `search_replace` on the Master PRD (and all Sub-PRDs if Master-Sub structure):
|
|
717
|
+
- Replace `📝 Draft` with `✅ Confirmed`
|
|
718
|
+
- Replace `[Date]` with the real date from the timestamp command
|
|
719
|
+
- Replace `[Name]` with `User`
|
|
691
720
|
|
|
692
|
-
###
|
|
721
|
+
### 13d Handle Missing Progress File
|
|
693
722
|
|
|
694
723
|
If WORKFLOW-PROGRESS.json does not exist (backward compatibility):
|
|
695
724
|
- Create the file with initial structure
|
|
@@ -698,6 +727,17 @@ If WORKFLOW-PROGRESS.json does not exist (backward compatibility):
|
|
|
698
727
|
|
|
699
728
|
**Status Flow**: `pending` → `in_progress` → `completed` → `confirmed`
|
|
700
729
|
|
|
730
|
+
### 13e Output Completion Message
|
|
731
|
+
|
|
732
|
+
After all status files are updated:
|
|
733
|
+
|
|
734
|
+
```
|
|
735
|
+
✅ PRD documents have been confirmed. PRD stage is complete.
|
|
736
|
+
When you are ready to proceed with Feature Design, please start a new conversation and invoke the Feature Designer Agent.
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
**END** — Do not proceed further.
|
|
740
|
+
|
|
701
741
|
---
|
|
702
742
|
|
|
703
743
|
# Knowledge Loading Strategy
|