speccrew 0.4.2 → 0.4.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.
|
@@ -673,7 +673,31 @@ Update `.checkpoints.json` → `sub_prd_dispatch.passed = true` (only if all suc
|
|
|
673
673
|
|
|
674
674
|
## Phase 5: Verification & Confirmation
|
|
675
675
|
|
|
676
|
-
|
|
676
|
+
> 🛑 **PHASE 5 STRUCTURE — THREE STRICT STAGES WITH GATES**
|
|
677
|
+
>
|
|
678
|
+
> Phase 5 MUST execute in order with explicit gates between stages:
|
|
679
|
+
> - Phase 5.1 (Verification Checklist) → automatic execution → outputs checklist result
|
|
680
|
+
> - Phase 5.2 (User Review) → **HARD STOP** → MUST wait for explicit user confirmation
|
|
681
|
+
> - Phase 5.3 (Finalize) → **ONLY executes AFTER user confirms** → updates all statuses
|
|
682
|
+
>
|
|
683
|
+
> **CRITICAL GATES:**
|
|
684
|
+
> - Gate 5.1→5.2: Automatic after checklist passes
|
|
685
|
+
> - Gate 5.2→5.3: **REQUIRES EXPLICIT USER CONFIRMATION** — no auto-proceed
|
|
686
|
+
>
|
|
687
|
+
> 🛑 **FORBIDDEN ACTIONS in Phase 5:**
|
|
688
|
+
> - DO NOT update checkpoints (verification_checklist, prd_review) before user confirmation
|
|
689
|
+
> - DO NOT update WORKFLOW-PROGRESS.json to completed before user confirmation
|
|
690
|
+
> - DO NOT change PRD document status from Draft to Confirmed before user confirmation
|
|
691
|
+
> - DO NOT generate completion report before user confirmation
|
|
692
|
+
> - DO NOT suggest next phase (Feature Design) before user confirmation
|
|
693
|
+
> - DO NOT assume user silence means confirmation
|
|
694
|
+
> - DO NOT proceed to Phase 5.3 without explicit "确认" or "OK" from user
|
|
695
|
+
|
|
696
|
+
---
|
|
697
|
+
|
|
698
|
+
### Phase 5.1: Verification Checklist
|
|
699
|
+
|
|
700
|
+
> **This phase can execute automatically. No user interaction required.**
|
|
677
701
|
|
|
678
702
|
**Simple Requirements Checklist:**
|
|
679
703
|
- [ ] Single PRD file exists
|
|
@@ -702,17 +726,36 @@ Randomly select 3 sections from PRD(s) and verify:
|
|
|
702
726
|
- Ask: "Proceed anyway?" or "Regenerate with stricter constraints?"
|
|
703
727
|
- IF regenerate → Return to appropriate Phase (3a/3b/4)
|
|
704
728
|
|
|
705
|
-
**After verification passes,
|
|
706
|
-
```
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
729
|
+
**After verification passes, output checklist result:**
|
|
730
|
+
```
|
|
731
|
+
📊 Verification Checklist Result
|
|
732
|
+
├── File existence: ✅ All files present
|
|
733
|
+
├── Size validation: ✅ All files valid
|
|
734
|
+
├── Feature Breakdown: ✅ All sections present
|
|
735
|
+
└── Content Boundary: ✅ No violations detected
|
|
711
736
|
```
|
|
712
737
|
|
|
738
|
+
> ⚠️ **DO NOT update any checkpoint yet.**
|
|
739
|
+
> Checkpoints (verification_checklist, prd_review) will be updated in Phase 5.3 AFTER user confirmation.
|
|
740
|
+
|
|
713
741
|
---
|
|
714
742
|
|
|
715
|
-
### 5.2 Present
|
|
743
|
+
### Phase 5.2: Present for User Review
|
|
744
|
+
|
|
745
|
+
> 🛑 **HARD STOP — USER CONFIRMATION REQUIRED**
|
|
746
|
+
>
|
|
747
|
+
> This is a CRITICAL gate. You MUST STOP here and wait for explicit user confirmation.
|
|
748
|
+
>
|
|
749
|
+
> **MANDATORY REQUIREMENTS:**
|
|
750
|
+
> 1. Present ALL generated documents to user with file paths and sizes
|
|
751
|
+
> 2. Show verification checklist results
|
|
752
|
+
> 3. Show key statistics (module count, total size, feature counts)
|
|
753
|
+
> 4. Then STOP and ask user for confirmation
|
|
754
|
+
>
|
|
755
|
+
> **MANDATORY: DO NOT proceed to Phase 5.3 until user explicitly confirms.**
|
|
756
|
+
> **MANDATORY: DO NOT update any checkpoint, workflow status, or document status before user confirmation.**
|
|
757
|
+
> **MANDATORY: DO NOT mark prd_review checkpoint as passed before user confirmation.**
|
|
758
|
+
> **MANDATORY: DO NOT assume user silence or inactivity means confirmation.**
|
|
716
759
|
|
|
717
760
|
**5.2.1 List All Generated Documents**
|
|
718
761
|
|
|
@@ -730,6 +773,13 @@ Verification Results:
|
|
|
730
773
|
├── Size validation: ✅ All files valid
|
|
731
774
|
├── Feature Breakdown: ✅ All sections present
|
|
732
775
|
└── Content Boundary: ✅ No violations detected
|
|
776
|
+
|
|
777
|
+
Statistics:
|
|
778
|
+
├── Total Modules: {count}
|
|
779
|
+
├── Total Features: {count}
|
|
780
|
+
└── Total Document Size: {size} KB
|
|
781
|
+
|
|
782
|
+
Document Status: 📝 Draft (pending your confirmation)
|
|
733
783
|
```
|
|
734
784
|
|
|
735
785
|
**5.2.2 Summarize Content**
|
|
@@ -740,14 +790,24 @@ Verification Results:
|
|
|
740
790
|
| Sub-PRD 1 | User Stories, Requirements, Features | {count} |
|
|
741
791
|
| ... | ... | ... |
|
|
742
792
|
|
|
743
|
-
**5.2.3
|
|
793
|
+
**5.2.3 STOP and Request Confirmation**
|
|
744
794
|
|
|
745
|
-
|
|
795
|
+
After presenting the documents above, you MUST stop and ask:
|
|
746
796
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
797
|
+
---
|
|
798
|
+
|
|
799
|
+
> 🛑 **AWAITING USER CONFIRMATION**
|
|
800
|
+
>
|
|
801
|
+
> "请审查以上PRD文档。确认无误后我将更新状态为 Confirmed。是否确认?"
|
|
802
|
+
>
|
|
803
|
+
> 您可以回复:
|
|
804
|
+
> - "确认" 或 "OK" → 进入 Phase 5.3 完成最终状态更新
|
|
805
|
+
> - "需要修改" + 具体内容 → 返回相应阶段重新生成
|
|
806
|
+
> - "取消" → 终止当前工作流
|
|
807
|
+
>
|
|
808
|
+
> **I will NOT proceed until you explicitly confirm.**
|
|
809
|
+
|
|
810
|
+
---
|
|
751
811
|
|
|
752
812
|
**IF user requests changes:**
|
|
753
813
|
1. Identify which document(s) need changes
|
|
@@ -757,17 +817,37 @@ Verification Results:
|
|
|
757
817
|
- Requirement changes → Return to Phase 2 (re-run clarification)
|
|
758
818
|
3. Re-invoke appropriate skill with updated context
|
|
759
819
|
4. Return to Phase 5 after re-generation
|
|
820
|
+
5. **DO NOT update any status**
|
|
760
821
|
|
|
761
|
-
**IF user confirms:**
|
|
822
|
+
**IF user confirms (explicit "确认" or "OK"):**
|
|
762
823
|
- Proceed to Phase 5.3
|
|
763
824
|
|
|
764
825
|
---
|
|
765
826
|
|
|
766
|
-
### 5.3 Finalize
|
|
827
|
+
### Phase 5.3: Finalize
|
|
828
|
+
|
|
829
|
+
> ⚠️ **PREREQUISITE: Phase 5.3 can ONLY execute AFTER user has explicitly confirmed in Phase 5.2.**
|
|
830
|
+
>
|
|
831
|
+
> IF user has NOT confirmed → DO NOT execute any step below.
|
|
832
|
+
> IF you are unsure whether user confirmed → DO NOT execute any step below.
|
|
833
|
+
>
|
|
834
|
+
> **Verification before proceeding:**
|
|
835
|
+
> - Did user explicitly say "确认" or "OK" in Phase 5.2?
|
|
836
|
+
> - If NO → Return to Phase 5.2 and wait for confirmation
|
|
837
|
+
> - If YES → Proceed with the steps below
|
|
767
838
|
|
|
768
839
|
**5.3.1 Update Checkpoints**
|
|
769
840
|
|
|
841
|
+
Now update all checkpoints (user has confirmed):
|
|
842
|
+
|
|
770
843
|
```bash
|
|
844
|
+
# Update verification_checklist checkpoint
|
|
845
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
846
|
+
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
847
|
+
--checkpoint verification_checklist \
|
|
848
|
+
--passed true
|
|
849
|
+
|
|
850
|
+
# Update prd_review checkpoint
|
|
771
851
|
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
772
852
|
--file {iteration_path}/01.product-requirement/.checkpoints.json \
|
|
773
853
|
--checkpoint prd_review \
|
package/package.json
CHANGED
|
@@ -73,10 +73,29 @@ const path = require('path');
|
|
|
73
73
|
// ============================================================================
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* 生成本地时区的 ISO 8601 格式时间戳
|
|
77
|
+
* 例如:2026-04-10T20:38:21.978+08:00
|
|
78
|
+
*/
|
|
79
|
+
function getLocalISOString() {
|
|
80
|
+
const now = new Date();
|
|
81
|
+
const off = -now.getTimezoneOffset();
|
|
82
|
+
const sign = off >= 0 ? '+' : '-';
|
|
83
|
+
const pad2 = n => String(Math.abs(n)).padStart(2, '0');
|
|
84
|
+
const tz = sign + pad2(Math.floor(off / 60)) + ':' + pad2(off % 60);
|
|
85
|
+
return now.getFullYear() + '-' +
|
|
86
|
+
pad2(now.getMonth() + 1) + '-' +
|
|
87
|
+
pad2(now.getDate()) + 'T' +
|
|
88
|
+
pad2(now.getHours()) + ':' +
|
|
89
|
+
pad2(now.getMinutes()) + ':' +
|
|
90
|
+
pad2(now.getSeconds()) + '.' +
|
|
91
|
+
String(now.getMilliseconds()).padStart(3, '0') + tz;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 生成 ISO 8601 格式时间戳(本地时区)
|
|
77
96
|
*/
|
|
78
97
|
function getTimestamp() {
|
|
79
|
-
return
|
|
98
|
+
return getLocalISOString();
|
|
80
99
|
}
|
|
81
100
|
|
|
82
101
|
/**
|