speccrew 0.3.2 → 0.3.3

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.
@@ -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 Request User Confirmation
262
+ ### 4.2 Present Documents for User Review
263
263
 
264
- Execute Skill's Step 12e to present summary and request user review.
264
+ Execute Skill's Step 12e to present document summary and ask user to review.
265
265
 
266
- ### 4.3 Finalize PRD Stage (After User Confirmation)
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 write progress files (update WORKFLOW-PROGRESS.json, set `01_prd.status` = `confirmed`)
271
- 2. Update all PRD document status lines from `📝 Draft` to `✅ Confirmed` with confirmation date using `search_replace`
272
- 3. Output completion message:
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
- 4. **END** — Do not proceed further. Do not invoke or suggest transitioning to the next stage agent.
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
- - Section 1 (Background & Goals): System-wide background and goals
533
- - Section 2 (User Stories): **HIGH-LEVEL system user stories ONLY** (e.g., "As a store manager, I want a CRM system to manage customer relationships"). DO NOT include module-specific user stories.
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 all modules
536
- - 3.2 Business Process Flow: Cross-module process flow overview
537
- - 3.3 Feature List: Module-level feature summary table (NOT detailed features)
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 criteria only
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: Request Confirmation
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
- Confirm:
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
- After user confirms, proceed to Step 13 to write progress files and finalize PRD stage.
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
- ## Step 13: Write Progress Files
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
- After user confirms the PRD, write progress tracking files:
666
+ ### 13a Update Workflow Progress
643
667
 
644
- ### 13a Write Checkpoint File
668
+ Use the `update-progress.js` script to update workflow status with real timestamps:
645
669
 
646
- Write or update the checkpoint file at:
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": "<current-ISO-timestamp>",
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
- ### 13b Update Workflow Progress
666
-
667
- Read and update the WORKFLOW-PROGRESS.json file:
712
+ ### 13c Update PRD Document Status
668
713
 
669
- 1. **Read**: `speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json`
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
- **Example updated stage entry**:
678
- ```json
679
- {
680
- "01_prd": {
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
- ### 13c Handle Missing Progress File
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {