speccrew 0.5.4 → 0.5.5

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.
@@ -71,6 +71,14 @@ Phase 4: API Contract Generation
71
71
  4. **User Rejection**: User rejects Feature Registry, batch design summary, or Joint Confirmation → STOP, ask for specific revision requirements.
72
72
  5. **Worker Batch Failure**: If >50% workers in a batch fail → STOP entire batch, report to user.
73
73
 
74
+ ## TIMESTAMP INTEGRITY
75
+
76
+ > **All timestamps in progress files (.checkpoints.json, DISPATCH-PROGRESS.json, WORKFLOW-PROGRESS.json) are generated exclusively by `update-progress.js` script.**
77
+
78
+ 1. **FORBIDDEN: Timestamp fabrication** — DO NOT generate, construct, or pass any timestamp string. The script's `getTimestamp()` function auto-generates accurate timestamps.
79
+ 2. **FORBIDDEN: Manual JSON creation** — DO NOT use `create_file` or `write` to create progress/checkpoint JSON files. ALWAYS use the appropriate `update-progress.js` command.
80
+ 3. **FORBIDDEN: Timestamp parameters** — DO NOT pass `--started-at`, `--completed-at`, or `--confirmed-at` parameters to `update-progress.js` commands. These parameters are deprecated.
81
+
74
82
  # Workflow
75
83
 
76
84
  ## Phase 0: Workflow Progress Management
@@ -314,8 +322,7 @@ Before presenting the Feature Registry to user:
314
322
  - Any features to add, remove, or merge?
315
323
 
316
324
  IF user requests changes → update .checkpoints.json, then re-present.
317
- ONLY after user confirms → update function_decomposition.passed = true,
318
- set confirmed_at via: node -e "console.log(new Date().toISOString())"
325
+ ONLY after user confirms → update function_decomposition.passed = true.
319
326
  Then proceed to Phase 3.
320
327
  ```
321
328
 
@@ -859,8 +859,7 @@ node speccrew-workspace/scripts/update-progress.js write-checkpoint \
859
859
  ```bash
860
860
  node speccrew-workspace/scripts/update-progress.js update-workflow \
861
861
  --file speccrew-workspace/iterations/{iteration}/WORKFLOW-PROGRESS.json \
862
- --stage 01_prd --status completed \
863
- --completed-at $(node -e "console.log(new Date().toISOString())")
862
+ --stage 01_prd --status completed
864
863
  ```
865
864
 
866
865
  **5.3.3 Update PRD Status**
@@ -944,6 +943,7 @@ Phase 0 → Phase 1 → Phase 2 → Phase 3 → Phase 4 (if complex) → Phase 5
944
943
  - For complex requirements (3+ modules), dispatch Sub-PRD generation to parallel workers using `speccrew-pm-sub-prd-generate/SKILL.md`
945
944
 
946
945
  ### Must not do
946
+ - **FORBIDDEN: Timestamp fabrication** — DO NOT generate or pass timestamp strings. All timestamps are auto-generated by `update-progress.js` script.
947
947
  - Do not make technical solution decisions (that's speccrew-planner's responsibility)
948
948
  - Do not skip manual confirmation to directly start the next stage
949
949
  - Do not assume business rules on your own; clarify unclear requirements with the user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {
@@ -34,8 +34,6 @@
34
34
  * --output <text> 任务输出(completed 时使用)
35
35
  * --error <text> 错误信息(failed 时使用)
36
36
  * --error-category <cat> 错误类别(failed 时使用)
37
- * --started-at <iso> 覆盖 started_at 时间戳
38
- * --completed-at <iso> 覆盖 completed_at 时间戳
39
37
  *
40
38
  * 4. update-counts - 强制重算计数
41
39
  * node update-progress.js update-counts --file <path>
@@ -56,9 +54,6 @@
56
54
  * --stage <name> 阶段名称(必需)
57
55
  * --status <status> 状态:pending/in_progress/completed/confirmed(必需)
58
56
  * --output <text> 输出信息(可选)
59
- * --started-at <iso> 覆盖 started_at 时间戳
60
- * --completed-at <iso> 覆盖 completed_at 时间戳
61
- * --confirmed-at <iso> 覆盖 confirmed_at 时间戳
62
57
  *
63
58
  * 输出格式:
64
59
  * 成功:{"success": true, "message": "...", "data": {...}}
@@ -555,24 +550,24 @@ function cmdUpdateTask(args) {
555
550
  task.status = args.status;
556
551
  task.updated_at = now;
557
552
 
558
- // 根据状态自动设置时间戳
553
+ // 根据状态自动设置时间戳(始终使用脚本生成的真实时间,不接受外部参数)
559
554
  if (args.status === 'in_progress') {
560
- task.started_at = args.startedAt || now;
555
+ task.started_at = now;
561
556
  } else if (args.status === 'partial') {
562
557
  // partial 状态:部分完成,可能已有 started_at,可选设置 completed_at
563
558
  if (!task.started_at) {
564
- task.started_at = args.startedAt || now;
559
+ task.started_at = now;
565
560
  }
566
561
  if (args.output) {
567
562
  task.output = args.output;
568
563
  }
569
564
  } else if (args.status === 'completed') {
570
- task.completed_at = args.completedAt || now;
565
+ task.completed_at = now;
571
566
  if (args.output) {
572
567
  task.output = args.output;
573
568
  }
574
569
  } else if (args.status === 'failed') {
575
- task.completed_at = args.completedAt || now;
570
+ task.completed_at = now;
576
571
  if (args.error) {
577
572
  task.error = args.error;
578
573
  }
@@ -750,16 +745,16 @@ function cmdUpdateWorkflow(args) {
750
745
  // 更新状态
751
746
  stage.status = args.status;
752
747
 
753
- // 根据状态自动设置时间戳
748
+ // 根据状态自动设置时间戳(始终使用脚本生成的真实时间,不接受外部参数)
754
749
  if (args.status === 'in_progress') {
755
750
  // 如 started_at 已有值则不覆盖
756
751
  if (!stage.started_at) {
757
- stage.started_at = args.startedAt || now;
752
+ stage.started_at = now;
758
753
  }
759
754
  } else if (args.status === 'completed') {
760
- stage.completed_at = args.completedAt || now;
755
+ stage.completed_at = now;
761
756
  } else if (args.status === 'confirmed') {
762
- stage.confirmed_at = args.confirmedAt || now;
757
+ stage.confirmed_at = now;
763
758
  }
764
759
 
765
760
  // 更新输出