speccrew 0.3.3 → 0.3.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.
|
@@ -172,15 +172,98 @@ After reading PRD documents, extract Feature Breakdown from each Sub-PRD:
|
|
|
172
172
|
- `Type`: Either `Page+API` or `API-only`
|
|
173
173
|
- `Dependencies`: List of prerequisite Feature IDs (if any)
|
|
174
174
|
|
|
175
|
-
3. **Build Feature Registry**: Consolidate all features across Sub-PRDs into a unified list
|
|
175
|
+
3. **Build Feature Registry**: Consolidate all features across Sub-PRDs into a unified list.
|
|
176
|
+
|
|
177
|
+
4. **Write Feature Registry to `.checkpoints.json`**:
|
|
178
|
+
|
|
179
|
+
Write or update the checkpoint file at:
|
|
176
180
|
```
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
speccrew-workspace/iterations/{iteration}/02.feature-design/.checkpoints.json
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Structure — each feature has individual status fields for full checklist tracking:
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"stage": "02_feature_design",
|
|
188
|
+
"checkpoints": {
|
|
189
|
+
"function_decomposition": {
|
|
190
|
+
"passed": false,
|
|
191
|
+
"confirmed_at": null,
|
|
192
|
+
"description": "Feature Registry extraction and confirmation",
|
|
193
|
+
"total_features": 42,
|
|
194
|
+
"total_modules": 13,
|
|
195
|
+
"features": [
|
|
196
|
+
{
|
|
197
|
+
"feature_id": "F-SYS-01",
|
|
198
|
+
"feature_name": "Account Login",
|
|
199
|
+
"type": "Page+API",
|
|
200
|
+
"module": "M1-System",
|
|
201
|
+
"source_prd": "crm-system-sub-system.md",
|
|
202
|
+
"dependencies": [],
|
|
203
|
+
"feature_spec_status": "pending",
|
|
204
|
+
"api_contract_status": "pending"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"feature_id": "F-MEMBER-01",
|
|
208
|
+
"feature_name": "Customer Info Management",
|
|
209
|
+
"type": "Page+API",
|
|
210
|
+
"module": "M2-Member",
|
|
211
|
+
"source_prd": "crm-system-sub-member.md",
|
|
212
|
+
"dependencies": ["F-SYS-01"],
|
|
213
|
+
"feature_spec_status": "pending",
|
|
214
|
+
"api_contract_status": "pending"
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
"feature_spec_review": {
|
|
219
|
+
"passed": false,
|
|
220
|
+
"confirmed_at": null
|
|
221
|
+
},
|
|
222
|
+
"api_contract_joint": {
|
|
223
|
+
"passed": false,
|
|
224
|
+
"confirmed_at": null
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
181
228
|
```
|
|
182
229
|
|
|
183
|
-
|
|
230
|
+
**Feature status values:**
|
|
231
|
+
- `pending`: Not started
|
|
232
|
+
- `in_progress`: Worker dispatched
|
|
233
|
+
- `completed`: Worker finished successfully
|
|
234
|
+
- `failed`: Worker failed (needs retry)
|
|
235
|
+
- `confirmed`: User confirmed the output
|
|
236
|
+
|
|
237
|
+
**After each worker completes**, update the corresponding feature's status:
|
|
238
|
+
- Feature Spec worker done → set `feature_spec_status` = `completed`
|
|
239
|
+
- API Contract worker done → set `api_contract_status` = `completed`
|
|
240
|
+
|
|
241
|
+
5. **Present Feature Registry to user for confirmation**:
|
|
242
|
+
|
|
243
|
+
Display the full feature table:
|
|
244
|
+
|
|
245
|
+
| # | Feature ID | Feature Name | Type | Module | Dependencies |
|
|
246
|
+
|---|-----------|-------------|------|--------|--------------|
|
|
247
|
+
| 1 | F-SYS-01 | Account Login | Page+API | M1-System | - |
|
|
248
|
+
| 2 | F-MEMBER-01 | Customer Info | Page+API | M2-Member | F-SYS-01 |
|
|
249
|
+
| ... | ... | ... | ... | ... | ... |
|
|
250
|
+
|
|
251
|
+
⚠️ **HARD STOP — WAIT FOR USER CONFIRMATION**
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
DO NOT dispatch Feature Spec workers until user explicitly confirms the Feature Registry.
|
|
255
|
+
Ask user:
|
|
256
|
+
- Is the feature decomposition granularity appropriate?
|
|
257
|
+
- Are Feature IDs, Types, and dependencies correct?
|
|
258
|
+
- Any features to add, remove, or merge?
|
|
259
|
+
|
|
260
|
+
IF user requests changes → update .checkpoints.json, then re-present.
|
|
261
|
+
ONLY after user confirms → update function_decomposition.passed = true,
|
|
262
|
+
set confirmed_at via: node -e "console.log(new Date().toISOString())"
|
|
263
|
+
Then proceed to Phase 3.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
6. **Backward Compatibility Check**:
|
|
184
267
|
- If **Feature Breakdown exists**: Proceed with Feature-granular dispatch (new behavior)
|
|
185
268
|
- If **Feature Breakdown missing**: Fall back to Sub-PRD-granular dispatch (legacy behavior)
|
|
186
269
|
- Log the dispatch mode: "📋 Dispatch mode: Feature-granular" or "📋 Dispatch mode: Module-granular (legacy)"
|
|
@@ -203,9 +286,13 @@ When involving related business domains, read `speccrew-workspace/knowledges/biz
|
|
|
203
286
|
- Technical architecture documents (handled by speccrew-system-designer)
|
|
204
287
|
- Code conventions (handled by speccrew-system-designer/speccrew-dev)
|
|
205
288
|
|
|
206
|
-
## Phase 3: Design
|
|
289
|
+
## Phase 3: Design — Worker Dispatch
|
|
207
290
|
|
|
208
|
-
|
|
291
|
+
> ⚠️ **MANDATORY RULES FOR PHASE 3:**
|
|
292
|
+
> 1. **DO NOT ask user which strategy to use** — the strategy is determined by Phase 2 extraction results, not user choice.
|
|
293
|
+
> 2. **DO NOT invoke the Feature Design skill directly** when there are multiple Features. You MUST dispatch `speccrew-task-worker` agents.
|
|
294
|
+
> 3. **Dispatch granularity is PER FEATURE, not per module.** Each Feature gets its own worker and its own output file.
|
|
295
|
+
> 4. **DO NOT generate Feature Spec documents yourself.** Your role is to DISPATCH workers, not to write specs.
|
|
209
296
|
|
|
210
297
|
### 3.1 Dispatch Mode Decision
|
|
211
298
|
|
|
@@ -213,13 +300,13 @@ Based on Phase 2 Feature Breakdown extraction:
|
|
|
213
300
|
|
|
214
301
|
| Condition | Dispatch Mode | Behavior |
|
|
215
302
|
|-----------|---------------|----------|
|
|
216
|
-
| Feature Breakdown found with
|
|
217
|
-
| Feature Breakdown found with
|
|
218
|
-
| No Feature Breakdown (legacy PRD) | Module-granular | Each Sub-PRD gets one worker (backward compatible) |
|
|
303
|
+
| Feature Breakdown found with 2+ Features | Feature-granular (worker dispatch) | Each Feature gets its own worker |
|
|
304
|
+
| Feature Breakdown found with 1 Feature | Direct skill invocation | Invoke skill directly (only case where this is allowed) |
|
|
305
|
+
| No Feature Breakdown (legacy PRD) | Module-granular (worker dispatch) | Each Sub-PRD gets one worker (backward compatible) |
|
|
219
306
|
|
|
220
307
|
### 3.2 Feature-Granular Dispatch (New Behavior)
|
|
221
308
|
|
|
222
|
-
When Feature Breakdown is present
|
|
309
|
+
When Feature Breakdown is present and has 2+ Features:
|
|
223
310
|
|
|
224
311
|
#### Single Feature (Direct Skill Invocation)
|
|
225
312
|
If the entire iteration has only **one Feature** in the registry:
|
|
@@ -235,9 +322,11 @@ Invoke Skill directly with parameters:
|
|
|
235
322
|
- `frontend_platforms`: List of frontend platforms from techs-manifest
|
|
236
323
|
|
|
237
324
|
#### Multiple Features (Parallel Worker Dispatch)
|
|
238
|
-
If the iteration has **
|
|
325
|
+
If the iteration has **2+ Features** in the registry:
|
|
326
|
+
|
|
327
|
+
⚠️ **YOU MUST dispatch `speccrew-task-worker` agents. DO NOT invoke the skill yourself.**
|
|
239
328
|
|
|
240
|
-
Invoke `speccrew-task-worker` agents in parallel, one per Feature:
|
|
329
|
+
Invoke `speccrew-task-worker` agents in parallel, **one worker per Feature** (NOT per module):
|
|
241
330
|
- Each worker receives:
|
|
242
331
|
- `skill_path`: `speccrew-fd-feature-design/SKILL.md`
|
|
243
332
|
- `context`:
|
|
@@ -256,6 +345,26 @@ Invoke `speccrew-task-worker` agents in parallel, one per Feature:
|
|
|
256
345
|
- Worker 2: Feature F-CRM-02 → Feature Spec for Customer Detail
|
|
257
346
|
- Worker N: Feature F-CRM-0N → Feature Spec for Feature N
|
|
258
347
|
|
|
348
|
+
- **Batch dispatch for large feature counts**:
|
|
349
|
+
When total features > 6, dispatch in batches to avoid overload:
|
|
350
|
+
```
|
|
351
|
+
Batch 1: Dispatch up to 6 workers (Features 1-6)
|
|
352
|
+
Wait for all workers in Batch 1 to complete
|
|
353
|
+
Update .checkpoints.json feature_spec_status for completed features
|
|
354
|
+
|
|
355
|
+
Batch 2: Dispatch next 6 workers (Features 7-12)
|
|
356
|
+
Wait for all workers in Batch 2 to complete
|
|
357
|
+
Update .checkpoints.json feature_spec_status for completed features
|
|
358
|
+
|
|
359
|
+
... continue until all features are processed
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Between batches**: Report progress to user:
|
|
363
|
+
```
|
|
364
|
+
📊 Batch 1 complete: 6/44 Feature Specs generated
|
|
365
|
+
Starting Batch 2...
|
|
366
|
+
```
|
|
367
|
+
|
|
259
368
|
- **Dependency handling**: Features with dependencies should note them, but all workers can execute simultaneously (each Feature Spec references its dependencies)
|
|
260
369
|
|
|
261
370
|
- **Output file naming convention**:
|