speccrew 0.5.4 → 0.5.6
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.
- package/.speccrew/agents/speccrew-feature-designer.md +9 -2
- package/.speccrew/agents/speccrew-product-manager.md +2 -2
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +15 -1
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +2 -2
- package/package.json +1 -1
- package/workspace-template/scripts/update-progress.js +9 -14
|
@@ -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
|
|
@@ -36,6 +36,7 @@ ISA-95 Stages 4-6 as internal thinking framework:
|
|
|
36
36
|
|
|
37
37
|
**MANDATORY:**
|
|
38
38
|
- Template-first workflow — Step 5 (copy template) MUST precede Step 6 (fill content)
|
|
39
|
+
- **Mermaid for all diagrams** — ALL interaction flows, processing logic flows, and cross-function sequences MUST use Mermaid syntax (`sequenceDiagram`, `flowchart TD`). Plain text ASCII flowcharts are FORBIDDEN for these sections. Reference: `speccrew-workspace/docs/rules/mermaid-rule.md`.
|
|
39
40
|
|
|
40
41
|
**NOTE:** Design process is internal — no intermediate design-data files are produced.
|
|
41
42
|
|
|
@@ -170,6 +171,8 @@ Create ASCII wireframes showing layout, UI elements, navigation.
|
|
|
170
171
|
|
|
171
172
|
Document: `User Action → Frontend Response → Backend API Call`
|
|
172
173
|
|
|
174
|
+
**Output format: Mermaid `sequenceDiagram`** — Generate interaction flows as Mermaid sequence diagrams showing: User → Frontend → Backend API → Data Store. DO NOT use ASCII text charts.
|
|
175
|
+
|
|
173
176
|
> **ISA-95 Stage 4 Thinking — Information Flows**
|
|
174
177
|
> - Cross-module flows: Map data flows between feature and other modules
|
|
175
178
|
> - Sequence coverage: Complete chain user→frontend→backend→database→external
|
|
@@ -199,6 +202,8 @@ Document: `User Action → Frontend Response → Backend API Call`
|
|
|
199
202
|
| Data Operations | What data to read/write |
|
|
200
203
|
| Response | What data to return |
|
|
201
204
|
|
|
205
|
+
**Output format: Mermaid `flowchart TD`** — Generate processing logic as Mermaid flowcharts showing: business validation → data operation → response. DO NOT use ASCII text charts.
|
|
206
|
+
|
|
202
207
|
### 2.3 Data Access Scheme
|
|
203
208
|
|
|
204
209
|
| Operation | Data Target | Type |
|
|
@@ -396,6 +401,13 @@ Log: "✅ Checkpoint B (feature_design_review) passed and recorded"
|
|
|
396
401
|
| 5. API Contract Summary | Aggregated from Step 2.1 API List |
|
|
397
402
|
| 6. Notes | Contextual notes from analysis |
|
|
398
403
|
|
|
404
|
+
**CRITICAL — Diagram Format Rule:**
|
|
405
|
+
- "交互流程" / "Interaction Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
406
|
+
- "核心业务逻辑" / "Processing Logic" sections → MUST use Mermaid `flowchart TD`
|
|
407
|
+
- "跨函数流程" / "Cross-Function Flow" sections → MUST use Mermaid `sequenceDiagram`
|
|
408
|
+
- Plain text / ASCII flowcharts are FORBIDDEN in these sections
|
|
409
|
+
- Reference: `speccrew-workspace/docs/rules/mermaid-rule.md` for syntax compliance
|
|
410
|
+
|
|
399
411
|
### Filling Rules
|
|
400
412
|
|
|
401
413
|
- Use `search_replace` for each section individually
|
|
@@ -471,7 +483,9 @@ Log: "✅ Feature Spec generation completed. Checkpoint feature_spec_review pass
|
|
|
471
483
|
- [ ] Output path determined
|
|
472
484
|
- [ ] Template copied using `create_file`
|
|
473
485
|
- [ ] All sections filled using `search_replace`
|
|
474
|
-
- [ ] Mermaid
|
|
486
|
+
- [ ] **[CRITICAL]** Interaction Flow uses Mermaid sequenceDiagram (NOT ASCII)
|
|
487
|
+
- [ ] **[CRITICAL]** Processing Logic uses Mermaid flowchart TD (NOT ASCII)
|
|
488
|
+
- [ ] All Mermaid diagrams follow mermaid-rule.md compliance rules
|
|
475
489
|
- [ ] `.checkpoints.json` updated via script
|
|
476
490
|
- [ ] No technology decisions included
|
|
477
491
|
- [ ] No intermediate design-data artifact created
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
|
|
196
196
|
#### 2.1.2 Interaction Flow
|
|
197
197
|
|
|
198
|
-
<!-- AI-NOTE: Use Mermaid sequenceDiagram to show the flow: User → Frontend → Backend API → Data Store. NO style definitions allowed. NO HTML tags. -->
|
|
198
|
+
<!-- AI-NOTE: Use Mermaid sequenceDiagram to show the flow: User → Frontend → Backend API → Data Store. NO style definitions allowed. NO HTML tags. CRITICAL: This section MUST contain mermaid syntax. Plain text or ASCII flowcharts are FORBIDDEN. -->
|
|
199
199
|
|
|
200
200
|
```mermaid
|
|
201
201
|
sequenceDiagram
|
|
@@ -250,7 +250,7 @@ sequenceDiagram
|
|
|
250
250
|
|
|
251
251
|
**Processing Logic:**
|
|
252
252
|
|
|
253
|
-
<!-- AI-NOTE: Use Mermaid flowchart TD to show the processing logic for each core interface. Show: business validation → data operation → response. NO style definitions allowed. -->
|
|
253
|
+
<!-- AI-NOTE: Use Mermaid flowchart TD to show the processing logic for each core interface. Show: business validation → data operation → response. NO style definitions allowed. CRITICAL: This section MUST contain mermaid syntax. Plain text or ASCII flowcharts are FORBIDDEN. -->
|
|
254
254
|
|
|
255
255
|
```mermaid
|
|
256
256
|
flowchart TD
|
package/package.json
CHANGED
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
752
|
+
stage.started_at = now;
|
|
758
753
|
}
|
|
759
754
|
} else if (args.status === 'completed') {
|
|
760
|
-
stage.completed_at =
|
|
755
|
+
stage.completed_at = now;
|
|
761
756
|
} else if (args.status === 'confirmed') {
|
|
762
|
-
stage.confirmed_at =
|
|
757
|
+
stage.confirmed_at = now;
|
|
763
758
|
}
|
|
764
759
|
|
|
765
760
|
// 更新输出
|