speccrew 0.5.0 → 0.5.2
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 +36 -82
- package/.speccrew/agents/speccrew-system-designer.md +380 -38
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +232 -103
- package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +238 -0
- package/package.json +2 -3
- package/.speccrew/skills/speccrew-fd-feature-generate/SKILL.md +0 -243
|
@@ -26,22 +26,18 @@ Phase 2: Knowledge Loading
|
|
|
26
26
|
└── Read PRDs → Discover platforms → Extract Features
|
|
27
27
|
└── Write .checkpoints.json → HARD STOP (user confirms Feature Registry)
|
|
28
28
|
↓
|
|
29
|
-
Phase 3: Feature Design —
|
|
29
|
+
Phase 3: Feature Design — Two-Stage Pipeline
|
|
30
30
|
└── 3a: Analyze (fd-feature-analyze)
|
|
31
31
|
│ └── 1 Feature? → Direct skill invocation
|
|
32
32
|
│ └── 2+ Features? → Batch dispatch workers (6/batch)
|
|
33
33
|
│ └── Output: .feature-analysis.md per Feature
|
|
34
|
-
└── 3b: Design (fd-feature-design)
|
|
35
|
-
│ └── 1 Feature? → Direct skill invocation
|
|
36
|
-
│ └── 2+ Features? → Batch dispatch workers (6/batch)
|
|
37
|
-
│ └── Output:
|
|
34
|
+
└── 3b: Design & Generate (fd-feature-design)
|
|
35
|
+
│ └── 1 Feature? → Direct skill invocation (with Checkpoint B)
|
|
36
|
+
│ └── 2+ Features? → Batch dispatch workers (6/batch, skip_checkpoint=true)
|
|
37
|
+
│ └── Output: {feature-id}-{feature-name}-feature-spec.md per Feature
|
|
38
38
|
└── 3c: Confirm (HARD STOP for multi-Feature)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
└── 3d: Generate (fd-feature-generate)
|
|
42
|
-
└── 1 Feature? → Direct skill invocation (with Checkpoint B)
|
|
43
|
-
└── 2+ Features? → Batch dispatch workers (skip_checkpoint=true)
|
|
44
|
-
└── Output: {feature-id}-{feature-name}-feature-spec.md
|
|
39
|
+
└── 1 Feature? → Checkpoint B handled inside design skill
|
|
40
|
+
└── 2+ Features? → Agent presents batch summary → HARD STOP
|
|
45
41
|
↓
|
|
46
42
|
Phase 4: API Contract Generation
|
|
47
43
|
└── Dispatch API Contract workers (same batch pattern)
|
|
@@ -57,9 +53,8 @@ Phase 4: API Contract Generation
|
|
|
57
53
|
| Phase 0 | STAGE GATE | PRD must be confirmed before starting. If not → STOP |
|
|
58
54
|
| Phase 2 | HARD STOP | Feature Registry must be confirmed by user before Phase 3 |
|
|
59
55
|
| Phase 3a | SKILL-ONLY | Analyze workers MUST use speccrew-fd-feature-analyze skill. Agent MUST NOT perform function decomposition itself |
|
|
60
|
-
| Phase 3b | SKILL-ONLY | Design workers MUST use speccrew-fd-feature-design skill. Agent MUST NOT design features itself |
|
|
61
|
-
| Phase 3c | HARD STOP (multi) | For 2+ Features: Agent MUST present batch summary and wait for user confirmation
|
|
62
|
-
| Phase 3d | SKILL-ONLY | Generate workers MUST use speccrew-fd-feature-generate skill. Agent MUST NOT write Feature Spec documents itself |
|
|
56
|
+
| Phase 3b | SKILL-ONLY | Design & Generate workers MUST use speccrew-fd-feature-design skill. Agent MUST NOT design features or write Feature Spec documents itself |
|
|
57
|
+
| Phase 3c | HARD STOP (multi) | For 2+ Features: Agent MUST present batch summary and wait for user confirmation after Feature Specs are generated |
|
|
63
58
|
| Phase 4 | SKILL-ONLY | API Contract workers MUST use speccrew-fd-api-contract skill |
|
|
64
59
|
| Phase 4 | HARD STOP | Joint Confirmation must be confirmed by user before finalizing |
|
|
65
60
|
| ALL | ABORT ON FAILURE | If any skill invocation fails → STOP and report. Do NOT attempt to generate content manually as fallback |
|
|
@@ -71,7 +66,7 @@ Phase 4: API Contract Generation
|
|
|
71
66
|
|
|
72
67
|
1. **Skill Invocation Failure**: Any skill call returns error → STOP. Do NOT generate content manually.
|
|
73
68
|
2. **Script Execution Failure**: `node ... update-progress.js` fails → STOP. Do NOT manually create/edit JSON files.
|
|
74
|
-
3. **Missing Intermediate Artifacts**: `.feature-analysis.md` missing before Phase 3b
|
|
69
|
+
3. **Missing Intermediate Artifacts**: `.feature-analysis.md` missing before Phase 3b → STOP.
|
|
75
70
|
4. **User Rejection**: User rejects Feature Registry, batch design summary, or Joint Confirmation → STOP, ask for specific revision requirements.
|
|
76
71
|
5. **Worker Batch Failure**: If >50% workers in a batch fail → STOP entire batch, report to user.
|
|
77
72
|
|
|
@@ -324,15 +319,15 @@ When involving related business domains, read `speccrew-workspace/knowledges/biz
|
|
|
324
319
|
- Technical architecture documents (handled by speccrew-system-designer)
|
|
325
320
|
- Code conventions (handled by speccrew-system-designer/speccrew-dev)
|
|
326
321
|
|
|
327
|
-
## Phase 3: Feature Design —
|
|
322
|
+
## Phase 3: Feature Design — Two-Stage Pipeline
|
|
328
323
|
|
|
329
324
|
> ⚠️ **MANDATORY RULES FOR PHASE 3:**
|
|
330
325
|
> 1. **DO NOT ask user which strategy to use** — the strategy is determined by Phase 2 extraction results.
|
|
331
326
|
> 2. **DO NOT invoke skills directly** when there are multiple Features. You MUST dispatch `speccrew-task-worker` agents.
|
|
332
327
|
> 3. **Dispatch granularity is PER FEATURE, not per module.** Each Feature gets its own worker per phase.
|
|
333
328
|
> 4. **DO NOT generate Feature Spec documents yourself.** Your role is to DISPATCH workers.
|
|
334
|
-
> 5. **Phase 3a → 3b → 3c
|
|
335
|
-
> 6. **Intermediate artifacts are MANDATORY.** .feature-analysis.md must exist before Phase 3b.
|
|
329
|
+
> 5. **Phase 3a → 3b → 3c is STRICTLY SERIAL.** Each phase must complete before the next begins.
|
|
330
|
+
> 6. **Intermediate artifacts are MANDATORY.** .feature-analysis.md must exist before Phase 3b.
|
|
336
331
|
|
|
337
332
|
---
|
|
338
333
|
|
|
@@ -388,9 +383,9 @@ If **2+ Features** in registry:
|
|
|
388
383
|
|
|
389
384
|
---
|
|
390
385
|
|
|
391
|
-
### Phase 3b: Design — Feature
|
|
386
|
+
### Phase 3b: Design & Generate — Feature Spec Production
|
|
392
387
|
|
|
393
|
-
**Purpose**: Transform function decomposition into complete
|
|
388
|
+
**Purpose**: Transform function decomposition into complete Feature Spec documents in a single pass (design + document generation).
|
|
394
389
|
|
|
395
390
|
**Prerequisite**: All Phase 3a outputs exist (`.feature-analysis.md` for each Feature)
|
|
396
391
|
|
|
@@ -398,6 +393,8 @@ If **2+ Features** in registry:
|
|
|
398
393
|
|
|
399
394
|
#### Single Feature (Direct Invocation)
|
|
400
395
|
|
|
396
|
+
If only **1 Feature** in registry:
|
|
397
|
+
|
|
401
398
|
- Skill path: `speccrew-fd-feature-design/SKILL.md`
|
|
402
399
|
- Parameters:
|
|
403
400
|
- `feature_analysis_path`: Path to `.feature-analysis.md` from Phase 3a
|
|
@@ -406,12 +403,14 @@ If **2+ Features** in registry:
|
|
|
406
403
|
- `feature_name`: Feature name
|
|
407
404
|
- `feature_type`: `Page+API` or `API-only`
|
|
408
405
|
- `frontend_platforms`: Platform list
|
|
406
|
+
- `output_path`: `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
|
|
407
|
+
- Checkpoint B handled inside skill (user confirmation before writing)
|
|
409
408
|
|
|
410
409
|
#### Multiple Features (Worker Dispatch)
|
|
411
410
|
|
|
412
411
|
1. **Update DISPATCH-PROGRESS.json**:
|
|
413
412
|
```bash
|
|
414
|
-
node speccrew-workspace/scripts/update-progress.js update-stage --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage
|
|
413
|
+
node speccrew-workspace/scripts/update-progress.js update-stage --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_spec
|
|
415
414
|
```
|
|
416
415
|
|
|
417
416
|
2. **Dispatch Workers** (batch of 6):
|
|
@@ -424,22 +423,27 @@ If **2+ Features** in registry:
|
|
|
424
423
|
- `feature_name`: Feature name
|
|
425
424
|
- `feature_type`: `Page+API` or `API-only`
|
|
426
425
|
- `frontend_platforms`: Platform list
|
|
426
|
+
- `output_path`: Path for final spec
|
|
427
|
+
- `skip_checkpoint`: `true` (batch mode — Checkpoint B deferred to Phase 3c)
|
|
428
|
+
|
|
429
|
+
3. **Wait for batch completion**, update progress per worker
|
|
427
430
|
|
|
428
|
-
|
|
431
|
+
4. **Update `.checkpoints.json`** for each completed Feature:
|
|
432
|
+
- Set `feature_spec_status` = `completed`
|
|
429
433
|
|
|
430
|
-
**Output**: One
|
|
434
|
+
**Output**: One `{feature-id}-{feature-name}-feature-spec.md` per Feature
|
|
431
435
|
|
|
432
436
|
---
|
|
433
437
|
|
|
434
|
-
### Phase 3c: Confirm — Batch
|
|
438
|
+
### Phase 3c: Confirm — Batch Spec Review (Multi-Feature Only)
|
|
435
439
|
|
|
436
440
|
**Condition**: Execute ONLY when 2+ Features exist
|
|
437
441
|
|
|
438
|
-
**Purpose**: Present batch
|
|
442
|
+
**Purpose**: Present batch Feature Spec summary and obtain user confirmation before proceeding to API Contract generation.
|
|
439
443
|
|
|
440
|
-
1. **Read all
|
|
444
|
+
1. **Read all `feature-spec.md` files** generated in Phase 3b
|
|
441
445
|
|
|
442
|
-
2. **Build Batch
|
|
446
|
+
2. **Build Batch Spec Summary**:
|
|
443
447
|
|
|
444
448
|
| Feature ID | Feature Name | Functions | Frontend Components | APIs | Data Entities |
|
|
445
449
|
|------------|--------------|-----------|---------------------|------|---------------|
|
|
@@ -449,7 +453,7 @@ If **2+ Features** in registry:
|
|
|
449
453
|
|
|
450
454
|
3. **Present to User**:
|
|
451
455
|
```
|
|
452
|
-
📋 Batch
|
|
456
|
+
📋 Batch Feature Spec Summary
|
|
453
457
|
|
|
454
458
|
Total Features: {N}
|
|
455
459
|
├── Functions Designed: {total}
|
|
@@ -459,73 +463,23 @@ If **2+ Features** in registry:
|
|
|
459
463
|
|
|
460
464
|
[Summary table above]
|
|
461
465
|
|
|
462
|
-
⚠️ HARD STOP — Please review all
|
|
466
|
+
⚠️ HARD STOP — Please review all Feature Specs before proceeding to API Contract generation.
|
|
463
467
|
```
|
|
464
468
|
|
|
465
469
|
4. **HARD STOP**: Wait for user confirmation
|
|
466
470
|
- If user requests modification for specific Feature → Re-dispatch design worker for that Feature only
|
|
467
|
-
- If user confirms → Update `.checkpoints.json
|
|
471
|
+
- If user confirms → Update `.checkpoints.json`:
|
|
468
472
|
```bash
|
|
469
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
|
|
470
474
|
```
|
|
471
475
|
|
|
472
476
|
---
|
|
473
477
|
|
|
474
|
-
### Phase 3d: Generate — Document Assembly
|
|
475
|
-
|
|
476
|
-
**Purpose**: Assemble final Feature Spec documents from design data.
|
|
477
|
-
|
|
478
|
-
**Prerequisite**:
|
|
479
|
-
- Single Feature: Phase 3b complete
|
|
480
|
-
- Multi-Feature: Phase 3c confirmation passed
|
|
481
|
-
|
|
482
|
-
**Skill**: `speccrew-fd-feature-generate/SKILL.md`
|
|
483
|
-
|
|
484
|
-
#### Single Feature (Direct Invocation)
|
|
485
|
-
|
|
486
|
-
- Skill path: `speccrew-fd-feature-generate/SKILL.md`
|
|
487
|
-
- Parameters:
|
|
488
|
-
- `feature_analysis_path`: Path to `.feature-analysis.md`
|
|
489
|
-
- `feature_design_data_path`: Path to `.feature-design-data.md`
|
|
490
|
-
- `feature_id`: Feature ID
|
|
491
|
-
- `feature_name`: Feature name
|
|
492
|
-
- `feature_type`: `Page+API` or `API-only`
|
|
493
|
-
- `output_path`: `speccrew-workspace/iterations/{iteration}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
|
|
494
|
-
- Checkpoint B handled inside skill (user confirmation before writing)
|
|
495
|
-
|
|
496
|
-
#### Multiple Features (Worker Dispatch)
|
|
497
|
-
|
|
498
|
-
1. **Update DISPATCH-PROGRESS.json**:
|
|
499
|
-
```bash
|
|
500
|
-
node speccrew-workspace/scripts/update-progress.js update-stage --file speccrew-workspace/iterations/{iteration}/02.feature-design/DISPATCH-PROGRESS.json --stage 02_feature_design_generate
|
|
501
|
-
```
|
|
502
|
-
|
|
503
|
-
2. **Dispatch Workers** (batch of 6):
|
|
504
|
-
- Each worker receives:
|
|
505
|
-
- `skill_path`: `speccrew-fd-feature-generate/SKILL.md`
|
|
506
|
-
- `context`:
|
|
507
|
-
- `feature_analysis_path`: Path to `.feature-analysis.md`
|
|
508
|
-
- `feature_design_data_path`: Path to `.feature-design-data.md`
|
|
509
|
-
- `feature_id`: Feature ID
|
|
510
|
-
- `feature_name`: Feature name
|
|
511
|
-
- `feature_type`: `Page+API` or `API-only`
|
|
512
|
-
- `output_path`: Path for final spec
|
|
513
|
-
- `skip_checkpoint`: `true` (Checkpoint B already done in Phase 3c)
|
|
514
|
-
|
|
515
|
-
3. **Wait for batch completion**
|
|
516
|
-
|
|
517
|
-
4. **Update `.checkpoints.json`** for each completed Feature:
|
|
518
|
-
- Set `feature_spec_status` = `completed`
|
|
519
|
-
|
|
520
|
-
**Output**: One `{feature-id}-{feature-name}-feature-spec.md` per Feature
|
|
521
|
-
|
|
522
|
-
---
|
|
523
|
-
|
|
524
478
|
### Phase 3 Error Handling
|
|
525
479
|
|
|
526
|
-
When any worker (analyze/design
|
|
480
|
+
When any worker (analyze/design) reports failure:
|
|
527
481
|
|
|
528
|
-
1. **Identify Phase**: Record which phase failed (3a/3b
|
|
482
|
+
1. **Identify Phase**: Record which phase failed (3a/3b) and which skill
|
|
529
483
|
|
|
530
484
|
2. **Update status**: Set the failed feature's status in `.checkpoints.json`:
|
|
531
485
|
```bash
|