speccrew 0.5.2 → 0.5.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.
|
@@ -59,6 +59,7 @@ Phase 4: API Contract Generation
|
|
|
59
59
|
| Phase 4 | HARD STOP | Joint Confirmation must be confirmed by user before finalizing |
|
|
60
60
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT attempt to generate content manually as fallback |
|
|
61
61
|
| ALL | SCRIPT ENFORCEMENT | All .checkpoints.json and WORKFLOW-PROGRESS.json updates via update-progress.js script. Manual JSON creation FORBIDDEN |
|
|
62
|
+
| ALL | NAME LOCK | After Phase 2 Feature Registry is confirmed, feature_name is immutable. All Skills MUST use the exact parameter value for output filenames. Name translation or substitution is FORBIDDEN |
|
|
62
63
|
|
|
63
64
|
## ABORT CONDITIONS
|
|
64
65
|
|
|
@@ -284,6 +285,15 @@ After reading PRD documents, extract Feature Breakdown from each Sub-PRD:
|
|
|
284
285
|
- Feature Spec worker done → set `feature_spec_status` = `completed`
|
|
285
286
|
- API Contract worker done → set `api_contract_status` = `completed`
|
|
286
287
|
|
|
288
|
+
### 2.5a Feature Name Normalization
|
|
289
|
+
|
|
290
|
+
Before presenting the Feature Registry to user:
|
|
291
|
+
|
|
292
|
+
1. **Extract exact names** from PRD Section 3.4 table — use the name column value verbatim
|
|
293
|
+
2. **Store as-is** in `.checkpoints.json` `feature_name` field — no translation, no slug conversion
|
|
294
|
+
3. **Validate uniqueness**: Ensure no two Features share the same `feature_name`
|
|
295
|
+
4. **Language rule**: `feature_name` MUST preserve the PRD's original language (Chinese names stay Chinese)
|
|
296
|
+
|
|
287
297
|
5. **Present Feature Registry to user for confirmation**:
|
|
288
298
|
|
|
289
299
|
Display the full feature table:
|
|
@@ -328,6 +338,7 @@ When involving related business domains, read `speccrew-workspace/knowledges/biz
|
|
|
328
338
|
> 4. **DO NOT generate Feature Spec documents yourself.** Your role is to DISPATCH workers.
|
|
329
339
|
> 5. **Phase 3a → 3b → 3c is STRICTLY SERIAL.** Each phase must complete before the next begins.
|
|
330
340
|
> 6. **Intermediate artifacts are MANDATORY.** .feature-analysis.md must exist before Phase 3b.
|
|
341
|
+
> 7. **Feature name is LOCKED after Phase 2 confirmation.** All Worker dispatch parameters MUST use the exact `feature_name` from `.checkpoints.json`. DO NOT derive, translate, or modify feature names at any point after the Feature Registry is confirmed.
|
|
331
342
|
|
|
332
343
|
---
|
|
333
344
|
|
|
@@ -355,9 +366,9 @@ If only **1 Feature** in registry:
|
|
|
355
366
|
|
|
356
367
|
If **2+ Features** in registry:
|
|
357
368
|
|
|
358
|
-
1. **Initialize
|
|
369
|
+
1. **Initialize DISPATCH-PROGRESS.json**:
|
|
359
370
|
```bash
|
|
360
|
-
node speccrew-workspace/scripts/update-progress.js init
|
|
371
|
+
node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_analyze --tasks "[{\"id\":\"F-CRM-01\"},{\"id\":\"F-CRM-02\"},{\"id\":\"F-CRM-03\"}]"
|
|
361
372
|
```
|
|
362
373
|
|
|
363
374
|
2. **Dispatch Workers** (batch of 6):
|
|
@@ -366,7 +377,7 @@ If **2+ Features** in registry:
|
|
|
366
377
|
- `context`:
|
|
367
378
|
- `prd_path`: Path to Sub-PRD
|
|
368
379
|
- `feature_id`: Feature ID
|
|
369
|
-
- `feature_name`: Feature name
|
|
380
|
+
- `feature_name`: Feature name — **MUST be the exact value from .checkpoints.json, used verbatim for output filename**
|
|
370
381
|
- `feature_type`: `Page+API` or `API-only`
|
|
371
382
|
- `iteration_id`: Current iteration
|
|
372
383
|
- `frontend_platforms`: Platform list
|
|
@@ -408,9 +419,9 @@ If only **1 Feature** in registry:
|
|
|
408
419
|
|
|
409
420
|
#### Multiple Features (Worker Dispatch)
|
|
410
421
|
|
|
411
|
-
1. **
|
|
422
|
+
1. **Initialize DISPATCH-PROGRESS.json for Design & Generate stage**:
|
|
412
423
|
```bash
|
|
413
|
-
node speccrew-workspace/scripts/update-progress.js
|
|
424
|
+
node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_spec --tasks "[{\"id\":\"F-CRM-01\"},{\"id\":\"F-CRM-02\"},{\"id\":\"F-CRM-03\"}]"
|
|
414
425
|
```
|
|
415
426
|
|
|
416
427
|
2. **Dispatch Workers** (batch of 6):
|
|
@@ -420,7 +431,7 @@ If only **1 Feature** in registry:
|
|
|
420
431
|
- `feature_analysis_path`: Path to `.feature-analysis.md`
|
|
421
432
|
- `prd_path`: Path to Sub-PRD
|
|
422
433
|
- `feature_id`: Feature ID
|
|
423
|
-
- `feature_name`: Feature name
|
|
434
|
+
- `feature_name`: Feature name — **MUST be the exact value from .checkpoints.json, used verbatim for output filename**
|
|
424
435
|
- `feature_type`: `Page+API` or `API-only`
|
|
425
436
|
- `frontend_platforms`: Platform list
|
|
426
437
|
- `output_path`: Path for final spec
|
|
@@ -470,7 +481,7 @@ If only **1 Feature** in registry:
|
|
|
470
481
|
- If user requests modification for specific Feature → Re-dispatch design worker for that Feature only
|
|
471
482
|
- If user confirms → Update `.checkpoints.json`:
|
|
472
483
|
```bash
|
|
473
|
-
node speccrew-workspace/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json --checkpoint feature_spec_review --passed true
|
|
484
|
+
node speccrew-workspace/scripts/update-progress.js write-checkpoint --file speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json --stage 02_feature_design --checkpoint feature_spec_review --passed true
|
|
474
485
|
```
|
|
475
486
|
|
|
476
487
|
---
|
|
@@ -483,7 +494,7 @@ When any worker (analyze/design) reports failure:
|
|
|
483
494
|
|
|
484
495
|
2. **Update status**: Set the failed feature's status in `.checkpoints.json`:
|
|
485
496
|
```bash
|
|
486
|
-
node speccrew-workspace/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --task {feature_id} --status failed --error "[{phase}] {error_message}"
|
|
497
|
+
node speccrew-workspace/scripts/update-progress.js update-task --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --task-id {feature_id} --status failed --error "[{phase}] {error_message}"
|
|
487
498
|
```
|
|
488
499
|
|
|
489
500
|
3. **Continue batch**: Do NOT stop entire batch for single failure. Complete remaining workers.
|
|
@@ -31,6 +31,7 @@ This skill applies ISA-95 Stages 1-3 as an internal thinking framework for analy
|
|
|
31
31
|
1. **FORBIDDEN: Script execution failure** — If `update-progress.js` fails, HARD STOP and report error
|
|
32
32
|
2. **FORBIDDEN: Hand-written `.checkpoints.json`** — ALWAYS use `update-progress.js` script
|
|
33
33
|
3. **FORBIDDEN: Skip Checkpoint A** — User confirmation required before proceeding to design phase (unless `skip_checkpoint=true`)
|
|
34
|
+
4. **FORBIDDEN: Rename features** — Output filename MUST use the exact `feature_name` parameter value. DO NOT translate, abbreviate, paraphrase, or substitute with alternative names found in PRD content. The `feature_name` parameter is the SINGLE SOURCE OF TRUTH for file naming.
|
|
34
35
|
|
|
35
36
|
## Step 1: Read PRD Input
|
|
36
37
|
|
|
@@ -144,6 +145,7 @@ After user confirms (or if skipped):
|
|
|
144
145
|
```bash
|
|
145
146
|
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
146
147
|
--file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
|
|
148
|
+
--stage 02_feature_design \
|
|
147
149
|
--checkpoint function_decomposition \
|
|
148
150
|
--passed true
|
|
149
151
|
```
|
|
@@ -161,6 +163,11 @@ Write analysis results to `.feature-analysis.md`:
|
|
|
161
163
|
| With feature_id | `{prd_parent}/02.feature-design/{feature-id}-{feature-name}.feature-analysis.md` |
|
|
162
164
|
| Legacy mode | `{prd_parent}/02.feature-design/.feature-analysis.md` |
|
|
163
165
|
|
|
166
|
+
**CRITICAL — Filename Lock Rule:**
|
|
167
|
+
- `{feature-name}` in the output path MUST be the exact value of the `feature_name` parameter
|
|
168
|
+
- If PRD uses a different name for the same feature → use `feature_name` parameter for filename, note the discrepancy in the document header
|
|
169
|
+
- Example: parameter `feature_name = "店铺信息管理"` → filename MUST contain "店铺信息管理", NOT "shop-management" or "多店切换"
|
|
170
|
+
|
|
164
171
|
### Output Structure
|
|
165
172
|
|
|
166
173
|
```markdown
|
|
@@ -191,6 +198,12 @@ Write analysis results to `.feature-analysis.md`:
|
|
|
191
198
|
- **Data Changes**: {description}
|
|
192
199
|
- **System Relationship**: [EXISTING]/[MODIFIED]/[NEW] — {explanation}
|
|
193
200
|
|
|
201
|
+
## Name Discrepancy Notice (if applicable)
|
|
202
|
+
- Parameter feature_name: {feature_name}
|
|
203
|
+
- PRD actual feature name: {prd_name}
|
|
204
|
+
- Discrepancy: {description}
|
|
205
|
+
- File naming follows: parameter value (as per Filename Lock Rule)
|
|
206
|
+
|
|
194
207
|
## Decomposition Status
|
|
195
208
|
- Checkpoint A: {passed/pending}
|
|
196
209
|
- Confirmed at: {timestamp or null}
|
|
@@ -39,6 +39,8 @@ ISA-95 Stages 4-6 as internal thinking framework:
|
|
|
39
39
|
|
|
40
40
|
**NOTE:** Design process is internal — no intermediate design-data files are produced.
|
|
41
41
|
|
|
42
|
+
**FORBIDDEN: Rename features** — Output filename MUST use the exact `feature_name` parameter value. DO NOT translate, abbreviate, paraphrase, or substitute with names derived from analysis content. The `feature_name` parameter is the SINGLE SOURCE OF TRUTH for file naming.
|
|
43
|
+
|
|
42
44
|
## Step 0: Precondition Check
|
|
43
45
|
|
|
44
46
|
### Step 0 Input Parameters
|
|
@@ -66,6 +68,15 @@ ISA-95 Stages 4-6 as internal thinking framework:
|
|
|
66
68
|
- `functions[]`: Function breakdown list
|
|
67
69
|
- `platforms[]`: Frontend platforms list
|
|
68
70
|
|
|
71
|
+
### 0.3 Verify Feature Name Consistency
|
|
72
|
+
|
|
73
|
+
1. Read the `Feature Name` field from `.feature-analysis.md` header
|
|
74
|
+
2. Compare with `feature_name` parameter
|
|
75
|
+
3. If different:
|
|
76
|
+
- Log: "⚠️ Name discrepancy: parameter='{feature_name}', analysis='{analysis_name}'"
|
|
77
|
+
- Continue with `feature_name` parameter value for all file naming
|
|
78
|
+
- Use the analysis file's actual content (not its filename) for design work
|
|
79
|
+
|
|
69
80
|
## Step 1: Frontend Design
|
|
70
81
|
|
|
71
82
|
### 1.0 Conditional Execution
|
|
@@ -325,6 +336,7 @@ After user confirms (or if skipped):
|
|
|
325
336
|
```bash
|
|
326
337
|
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
327
338
|
--file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
|
|
339
|
+
--stage 02_feature_design \
|
|
328
340
|
--checkpoint feature_design_review \
|
|
329
341
|
--passed true
|
|
330
342
|
```
|
|
@@ -349,6 +361,11 @@ Log: "✅ Checkpoint B (feature_design_review) passed and recorded"
|
|
|
349
361
|
- Master Spec: `{iteration_path}/02.feature-design/[master-name]-feature-spec.md`
|
|
350
362
|
- Sub Specs: `{iteration_path}/02.feature-design/[sub-name]-feature-spec.md` (one per sub-feature)
|
|
351
363
|
|
|
364
|
+
**CRITICAL — Filename Lock Rule:**
|
|
365
|
+
- `{feature_name}` in the output path MUST be the exact value of the `feature_name` parameter
|
|
366
|
+
- If analysis file uses a different name → use `feature_name` parameter for filename
|
|
367
|
+
- Example: parameter `feature_name = "店铺信息管理"` → filename MUST contain "店铺信息管理", NOT "shop-management" or "多店切换"
|
|
368
|
+
|
|
352
369
|
### 5.2 Copy Template
|
|
353
370
|
|
|
354
371
|
1. Read template: `templates/FEATURE-SPEC-TEMPLATE.md` (relative path from skill directory)
|
|
@@ -414,6 +431,7 @@ Set final checkpoint status:
|
|
|
414
431
|
```bash
|
|
415
432
|
node speccrew-workspace/scripts/update-progress.js write-checkpoint \
|
|
416
433
|
--file speccrew-workspace/iterations/{iteration_id}/02.feature-design/.checkpoints.json \
|
|
434
|
+
--stage 02_feature_design \
|
|
417
435
|
--checkpoint feature_spec_review \
|
|
418
436
|
--passed true
|
|
419
437
|
```
|