speccrew 0.2.7 → 0.3.1
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 +220 -27
- package/.speccrew/agents/speccrew-product-manager.md +90 -0
- package/.speccrew/agents/speccrew-system-designer.md +237 -31
- package/.speccrew/agents/speccrew-system-developer.md +44 -10
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +15 -1
- package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +36 -7
- package/.speccrew/skills/speccrew-dev-review/SKILL.md +16 -7
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +150 -35
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +140 -18
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +4 -1
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +29 -15
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +51 -6
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +18 -20
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +7 -10
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +19 -23
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +151 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +23 -63
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +32 -68
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +6 -2
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +203 -17
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +16 -1
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +33 -6
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +25 -5
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +17 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +20 -3
- package/.speccrew/skills/speccrew-test-execute/SKILL.md +8 -0
- package/package.json +1 -1
|
@@ -102,14 +102,59 @@ Use Glob to find relevant documents in the current iteration:
|
|
|
102
102
|
- Feature Spec pattern: `speccrew-workspace/iterations/{current}/02.feature-design/*-feature-spec.md`
|
|
103
103
|
- API Contract pattern: `speccrew-workspace/iterations/{current}/02.feature-design/*-api-contract.md`
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
**文件命名格式说明**:
|
|
106
|
+
- **新格式**(细粒度 Feature): 文件名以 Feature ID 开头,格式为 `{feature-id}-{feature-name}-feature-spec.md`
|
|
107
|
+
- 示例: `F-CRM-01-customer-list-feature-spec.md`
|
|
108
|
+
- Feature ID 格式: `F-{MODULE}-{NN}`(如 `F-CRM-01`)
|
|
109
|
+
- **旧格式**(向后兼容): 文件名以模块名开头,格式为 `{module-name}-feature-spec.md`
|
|
110
|
+
- 示例: `crm-feature-spec.md`
|
|
111
|
+
- 无 Feature ID 前缀
|
|
112
|
+
|
|
113
|
+
**格式检测**: 文件名以 `F-` 开头 → 新格式;否则 → 旧格式
|
|
114
|
+
|
|
115
|
+
### 1.2 Parse Feature Registry
|
|
116
|
+
|
|
117
|
+
从发现的文件中提取 Feature 信息并建立 Registry:
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
// Feature Registry 结构
|
|
121
|
+
{
|
|
122
|
+
"F-CRM-01": {
|
|
123
|
+
"feature_id": "F-CRM-01",
|
|
124
|
+
"feature_name": "customer-list",
|
|
125
|
+
"feature_spec_path": ".../02.feature-design/F-CRM-01-customer-list-feature-spec.md",
|
|
126
|
+
"api_contract_path": ".../02.feature-design/F-CRM-01-customer-list-api-contract.md"
|
|
127
|
+
},
|
|
128
|
+
"crm": { // 旧格式,使用模块名作为标识
|
|
129
|
+
"feature_id": null,
|
|
130
|
+
"feature_name": "crm",
|
|
131
|
+
"feature_spec_path": ".../02.feature-design/crm-feature-spec.md",
|
|
132
|
+
"api_contract_path": ".../02.feature-design/crm-api-contract.md"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**解析逻辑**:
|
|
138
|
+
1. 从文件名提取 Feature ID(如果存在):
|
|
139
|
+
- 正则: `^(F-[A-Z]+-\d+)-(.+)-feature-spec\.md$`
|
|
140
|
+
- Group 1: Feature ID(如 `F-CRM-01`)
|
|
141
|
+
- Group 2: Feature Name(如 `customer-list`)
|
|
142
|
+
2. 旧格式(无 Feature ID):
|
|
143
|
+
- 使用模块名作为 feature_name
|
|
144
|
+
- feature_id 设为 null
|
|
145
|
+
3. 匹配 Feature Spec 和 API Contract(通过文件名前缀)
|
|
146
|
+
|
|
147
|
+
### 1.3 Check Existing System Design Documents
|
|
106
148
|
|
|
107
149
|
Check if system design documents already exist:
|
|
108
150
|
- Check path: `speccrew-workspace/iterations/{current}/03.system-design/`
|
|
109
151
|
|
|
110
|
-
### 1.
|
|
152
|
+
### 1.4 Present Design Scope to User
|
|
111
153
|
|
|
112
|
-
Present the identified documents and design scope to user for confirmation before proceeding
|
|
154
|
+
Present the identified documents and design scope to user for confirmation before proceeding:
|
|
155
|
+
- 列出所有发现的 Feature(新格式显示 Feature ID)
|
|
156
|
+
- 显示每个 Feature 对应的 Platform 数量
|
|
157
|
+
- 显示预计生成的 Worker 任务数(Feature 数量 × Platform 数量)
|
|
113
158
|
|
|
114
159
|
## Phase 2: Knowledge Loading
|
|
115
160
|
|
|
@@ -164,12 +209,21 @@ Create the top-level overview at:
|
|
|
164
209
|
### Template Structure
|
|
165
210
|
|
|
166
211
|
```markdown
|
|
167
|
-
# System Design Overview - {
|
|
212
|
+
# System Design Overview - {Iteration Name}
|
|
168
213
|
|
|
169
214
|
## 1. Design Scope
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
215
|
+
- **Iteration**: {iteration_number}-{iteration_type}-{iteration_name}
|
|
216
|
+
- **Platforms**: {list from techs-manifest}
|
|
217
|
+
- **Features**: {count} features discovered
|
|
218
|
+
|
|
219
|
+
### 1.1 Feature List
|
|
220
|
+
| Feature ID | Feature Name | Feature Spec | API Contract |
|
|
221
|
+
|------------|--------------|--------------|--------------|
|
|
222
|
+
| F-CRM-01 | customer-list | [link] | [link] |
|
|
223
|
+
| F-CRM-02 | customer-detail | [link] | [link] |
|
|
224
|
+
| ... | ... | ... | ... |
|
|
225
|
+
|
|
226
|
+
> **旧格式兼容**: 如果文件使用旧格式(无 Feature ID),Feature ID 列显示为 `-`,使用模块名作为 Feature Name
|
|
173
227
|
|
|
174
228
|
## 2. Technology Decisions
|
|
175
229
|
- Framework evaluation results (from Phase 3)
|
|
@@ -177,16 +231,41 @@ Create the top-level overview at:
|
|
|
177
231
|
- Version constraints
|
|
178
232
|
|
|
179
233
|
## 3. Platform Design Index
|
|
180
|
-
| Platform | Platform ID | Skill | Design Directory | Status |
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
234
|
+
| Feature ID | Feature Name | Platform | Platform ID | Skill | Design Directory | Status |
|
|
235
|
+
|------------|--------------|----------|-------------|-------|------------------|--------|
|
|
236
|
+
| F-CRM-01 | customer-list | Web Frontend | web-vue | speccrew-sd-frontend | web-vue/F-CRM-01-customer-list-design.md | pending |
|
|
237
|
+
| F-CRM-01 | customer-list | Backend | backend-spring | speccrew-sd-backend | backend-spring/F-CRM-01-customer-list-design.md | pending |
|
|
238
|
+
| F-CRM-02 | customer-detail | Web Frontend | web-vue | speccrew-sd-frontend | web-vue/F-CRM-02-customer-detail-design.md | pending |
|
|
239
|
+
| ... | ... | ... | ... | ... | ... | ... |
|
|
240
|
+
|
|
241
|
+
> **说明**:
|
|
242
|
+
> - 新格式:Design Directory 包含 `{feature-id}-{feature-name}`(如 `F-CRM-01-customer-list-design.md`)
|
|
243
|
+
> - 旧格式:Design Directory 使用 `{module}-design.md`
|
|
244
|
+
|
|
245
|
+
## 4. Feature Summary (Optional)
|
|
246
|
+
|
|
247
|
+
当 Feature 数量较多(>5)时,添加此小节提供汇总视图:
|
|
248
|
+
|
|
249
|
+
### 4.1 Feature by Module
|
|
250
|
+
| Module | Feature Count | Feature IDs |
|
|
251
|
+
|--------|---------------|-------------|
|
|
252
|
+
| CRM | 3 | F-CRM-01, F-CRM-02, F-CRM-03 |
|
|
253
|
+
| ORDER | 2 | F-ORDER-01, F-ORDER-02 |
|
|
254
|
+
|
|
255
|
+
### 4.2 Feature Type Distribution
|
|
256
|
+
| Type | Count | Features |
|
|
257
|
+
|------|-------|----------|
|
|
258
|
+
| List/Query | 2 | F-CRM-01, F-ORDER-01 |
|
|
259
|
+
| Detail/View | 2 | F-CRM-02, F-ORDER-02 |
|
|
260
|
+
| Create/Update | 1 | F-CRM-03 |
|
|
261
|
+
|
|
262
|
+
## 5. Cross-Platform Concerns
|
|
184
263
|
- Shared data structures
|
|
185
264
|
- Cross-platform API contracts
|
|
186
265
|
- Authentication/authorization strategy
|
|
187
266
|
- Error handling conventions
|
|
188
267
|
|
|
189
|
-
##
|
|
268
|
+
## 6. Design Constraints
|
|
190
269
|
- API Contract is READ-ONLY — do not modify
|
|
191
270
|
- All pseudo-code must use actual framework syntax from techs knowledge
|
|
192
271
|
- Each module design document maps 1:1 to a Feature Spec function
|
|
@@ -210,10 +289,15 @@ Before dispatching, create or update dispatch tracking:
|
|
|
210
289
|
|
|
211
290
|
1. **Initialize dispatch progress file with task list**:
|
|
212
291
|
```bash
|
|
213
|
-
node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --stage 03_system_design --tasks '[{"id":"sd-{platform_id}-{
|
|
292
|
+
node speccrew-workspace/scripts/update-progress.js init --file speccrew-workspace/iterations/{current}/03.system-design/DISPATCH-PROGRESS.json --stage 03_system_design --tasks '[{"id":"sd-{platform_id}-{feature_id}","platform":"{platform_id}","feature_id":"{feature_id}","feature_name":"{feature_name}","skill":"speccrew-sd-{type}","status":"pending"}]'
|
|
214
293
|
```
|
|
215
294
|
Or use `--tasks-file` to load from a JSON file.
|
|
216
295
|
|
|
296
|
+
**Task ID 格式更新**:
|
|
297
|
+
- 旧格式: `sd-{platform}-{feature}`(如 `sd-web-vue-customer-list`)
|
|
298
|
+
- **新格式**: `sd-{platform}-{feature-id}`(如 `sd-web-vue-F-CRM-01`)
|
|
299
|
+
- 旧格式兼容: 如果无 Feature ID,使用 feature_name(如 `sd-web-vue-crm`)
|
|
300
|
+
|
|
217
301
|
2. **Check existing progress** (from Step 0.3) — skip `completed` tasks
|
|
218
302
|
3. **Update status** to `in_progress` for tasks being dispatched:
|
|
219
303
|
```bash
|
|
@@ -232,10 +316,12 @@ When there is only one Feature Spec and one platform:
|
|
|
232
316
|
2. Call skill directly with parameters:
|
|
233
317
|
- Skill path: determined by platform type mapping (see 5.1)
|
|
234
318
|
- Pass context:
|
|
235
|
-
- `task_id`: Task identifier for progress tracking
|
|
319
|
+
- `task_id`: Task identifier for progress tracking(格式: `sd-{platform_id}-{feature_id}` 或 `sd-{platform_id}-{feature_name}`)
|
|
320
|
+
- `feature_id`: Feature ID(新格式如 `F-CRM-01`,旧格式为 null)
|
|
321
|
+
- `feature_name`: Feature Name(如 `customer-list` 或 `crm`)
|
|
236
322
|
- `platform_id`: Platform identifier from techs-manifest
|
|
237
|
-
- `feature_spec_path`: Path to Feature Spec document
|
|
238
|
-
- `api_contract_path`: Path to API Contract document
|
|
323
|
+
- `feature_spec_path`: Path to Feature Spec document(从 Feature Registry 获取的实际路径)
|
|
324
|
+
- `api_contract_path`: Path to API Contract document(从 Feature Registry 获取的实际路径)
|
|
239
325
|
- `techs_paths`: Relevant techs knowledge paths
|
|
240
326
|
- `framework_decisions`: Framework decisions from Phase 3
|
|
241
327
|
|
|
@@ -265,10 +351,12 @@ When multiple Feature Specs and/or multiple platforms exist, create a matrix of
|
|
|
265
351
|
Each worker receives:
|
|
266
352
|
- `skill_path`: {ide_skills_dir}/{skill_name}/SKILL.md (per-platform design skill based on platform type, see 5.1)
|
|
267
353
|
- `context`:
|
|
268
|
-
- `task_id`: Unique task identifier
|
|
354
|
+
- `task_id`: Unique task identifier(格式: `sd-{platform_id}-{feature_id}`,如 `sd-web-vue-F-CRM-01`)
|
|
355
|
+
- `feature_id`: Feature ID(新格式如 `F-CRM-01`,旧格式为 null)
|
|
356
|
+
- `feature_name`: Feature Name(如 `customer-list`)
|
|
269
357
|
- `platform_id`: Platform identifier from techs-manifest
|
|
270
|
-
- `feature_spec_path`: Path to ONE Feature Spec document (not all)
|
|
271
|
-
- `api_contract_path`: API Contract document path
|
|
358
|
+
- `feature_spec_path`: Path to ONE Feature Spec document (not all, 从 Feature Registry 获取)
|
|
359
|
+
- `api_contract_path`: API Contract document path (从 Feature Registry 获取)
|
|
272
360
|
- `techs_knowledge_paths`: Techs knowledge paths for this platform
|
|
273
361
|
- `framework_decisions`: Framework decisions from Phase 3
|
|
274
362
|
- `output_base_path`: Path to `03.system-design/` directory
|
|
@@ -279,12 +367,12 @@ node speccrew-workspace/scripts/update-progress.js update-task --file speccrew-w
|
|
|
279
367
|
```
|
|
280
368
|
|
|
281
369
|
**Parallel execution example** (2 features × 3 platforms = 6 workers):
|
|
282
|
-
- Worker 1: speccrew-sd-frontend for
|
|
283
|
-
- Worker 2: speccrew-sd-backend for
|
|
284
|
-
- Worker 3: speccrew-sd-mobile for
|
|
285
|
-
- Worker 4: speccrew-sd-frontend for
|
|
286
|
-
- Worker 5: speccrew-sd-backend for
|
|
287
|
-
- Worker 6: speccrew-sd-mobile for
|
|
370
|
+
- Worker 1: speccrew-sd-frontend for F-CRM-01 (customer-list) on web-vue → 03.system-design/web-vue/F-CRM-01-customer-list-design.md
|
|
371
|
+
- Worker 2: speccrew-sd-backend for F-CRM-01 (customer-list) on backend-spring → 03.system-design/backend-spring/F-CRM-01-customer-list-design.md
|
|
372
|
+
- Worker 3: speccrew-sd-mobile for F-CRM-01 (customer-list) on mobile-uniapp → 03.system-design/mobile-uniapp/F-CRM-01-customer-list-design.md
|
|
373
|
+
- Worker 4: speccrew-sd-frontend for F-CRM-02 (customer-detail) on web-vue → 03.system-design/web-vue/F-CRM-02-customer-detail-design.md
|
|
374
|
+
- Worker 5: speccrew-sd-backend for F-CRM-02 (customer-detail) on backend-spring → 03.system-design/backend-spring/F-CRM-02-customer-detail-design.md
|
|
375
|
+
- Worker 6: speccrew-sd-mobile for F-CRM-02 (customer-detail) on mobile-uniapp → 03.system-design/mobile-uniapp/F-CRM-02-customer-detail-design.md
|
|
288
376
|
|
|
289
377
|
All workers execute simultaneously to maximize efficiency.
|
|
290
378
|
|
|
@@ -307,12 +395,59 @@ Wait for all workers to complete before proceeding to Phase 6.
|
|
|
307
395
|
|
|
308
396
|
After all platform designs are complete:
|
|
309
397
|
|
|
310
|
-
1. Present summary
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
398
|
+
1. **Present summary by Feature ID**:
|
|
399
|
+
```
|
|
400
|
+
Feature F-CRM-01 (customer-list):
|
|
401
|
+
├── web-vue/F-CRM-01-customer-list-design.md [SUCCESS]
|
|
402
|
+
├── backend-spring/F-CRM-01-customer-list-design.md [SUCCESS]
|
|
403
|
+
└── mobile-uniapp/F-CRM-01-customer-list-design.md [FAILED]
|
|
404
|
+
|
|
405
|
+
Feature F-CRM-02 (customer-detail):
|
|
406
|
+
├── web-vue/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
407
|
+
├── backend-spring/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
408
|
+
└── mobile-uniapp/F-CRM-02-customer-detail-design.md [SUCCESS]
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
2. **Summary statistics**:
|
|
412
|
+
- Total Features: {count}
|
|
413
|
+
- Total Platforms: {count}
|
|
414
|
+
- Total Tasks: {count}
|
|
415
|
+
- Completed: {count}
|
|
416
|
+
- Failed: {count}
|
|
417
|
+
|
|
418
|
+
3. **List all design documents with paths**
|
|
419
|
+
4. **Highlight cross-platform integration points**
|
|
420
|
+
5. **Request user confirmation**
|
|
421
|
+
|
|
422
|
+
### 6.1 DISPATCH-PROGRESS.json Task Entry Format
|
|
423
|
+
|
|
424
|
+
每个 task entry 包含以下字段:
|
|
425
|
+
```json
|
|
426
|
+
{
|
|
427
|
+
"id": "sd-web-vue-F-CRM-01",
|
|
428
|
+
"platform": "web-vue",
|
|
429
|
+
"feature_id": "F-CRM-01",
|
|
430
|
+
"feature_name": "customer-list",
|
|
431
|
+
"skill": "speccrew-sd-frontend",
|
|
432
|
+
"status": "completed",
|
|
433
|
+
"output": "03.system-design/web-vue/F-CRM-01-customer-list-design.md"
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
旧格式兼容(无 Feature ID):
|
|
438
|
+
```json
|
|
439
|
+
{
|
|
440
|
+
"id": "sd-web-vue-crm",
|
|
441
|
+
"platform": "web-vue",
|
|
442
|
+
"feature_id": null,
|
|
443
|
+
"feature_name": "crm",
|
|
444
|
+
"skill": "speccrew-sd-frontend",
|
|
445
|
+
"status": "completed",
|
|
446
|
+
"output": "03.system-design/web-vue/crm-design.md"
|
|
447
|
+
}
|
|
448
|
+
```
|
|
314
449
|
|
|
315
|
-
### 6.
|
|
450
|
+
### 6.2 Update Checkpoints on Confirmation
|
|
316
451
|
|
|
317
452
|
After user confirms:
|
|
318
453
|
|
|
@@ -336,7 +471,76 @@ After user confirms:
|
|
|
336
471
|
|-------------|------|----------|
|
|
337
472
|
| Design Overview | `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/DESIGN-OVERVIEW.md` | Inline (see Phase 4) |
|
|
338
473
|
| Platform Index | `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/INDEX.md` | `speccrew-sd-frontend/templates/INDEX-TEMPLATE.md`, `speccrew-sd-backend/templates/INDEX-TEMPLATE.md`, `speccrew-sd-mobile/templates/INDEX-TEMPLATE.md`, or `speccrew-sd-desktop/templates/INDEX-TEMPLATE.md` |
|
|
339
|
-
| Module Design | `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{
|
|
474
|
+
| Module Design | `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md` | `speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md`, `speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md`, `speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md`, or `speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md` |
|
|
475
|
+
|
|
476
|
+
**输出文件命名规则**:
|
|
477
|
+
|
|
478
|
+
1. **新格式**(有 Feature ID):
|
|
479
|
+
- 格式: `{feature-id}-{feature-name}-design.md`
|
|
480
|
+
- 示例: `F-CRM-01-customer-list-design.md`
|
|
481
|
+
- 路径: `03.system-design/web-vue/F-CRM-01-customer-list-design.md`
|
|
482
|
+
|
|
483
|
+
2. **旧格式兼容**(无 Feature ID):
|
|
484
|
+
- 格式: `{module}-design.md`
|
|
485
|
+
- 示例: `crm-design.md`
|
|
486
|
+
- 路径: `03.system-design/web-vue/crm-design.md`
|
|
487
|
+
|
|
488
|
+
**向后兼容逻辑**:
|
|
489
|
+
- 如果 `feature_id` 存在 → 使用 `{feature-id}-{feature-name}-design.md`
|
|
490
|
+
- 如果 `feature_id` 为 null(旧格式)→ 使用 `{module}-design.md`
|
|
491
|
+
|
|
492
|
+
# Backward Compatibility
|
|
493
|
+
|
|
494
|
+
本 Agent 支持新旧两种 Feature Spec 文件格式:
|
|
495
|
+
|
|
496
|
+
## 新格式(细粒度 Feature)
|
|
497
|
+
|
|
498
|
+
**文件名格式**:
|
|
499
|
+
- Feature Spec: `{feature-id}-{feature-name}-feature-spec.md`
|
|
500
|
+
- API Contract: `{feature-id}-{feature-name}-api-contract.md`
|
|
501
|
+
|
|
502
|
+
**示例**:
|
|
503
|
+
- `F-CRM-01-customer-list-feature-spec.md`
|
|
504
|
+
- `F-CRM-01-customer-list-api-contract.md`
|
|
505
|
+
|
|
506
|
+
**特征**:
|
|
507
|
+
- 文件名以 `F-` 开头
|
|
508
|
+
- 包含 Feature ID(如 `F-CRM-01`)
|
|
509
|
+
- Feature ID 格式: `F-{MODULE}-{NN}`
|
|
510
|
+
|
|
511
|
+
## 旧格式(模块级 Feature)
|
|
512
|
+
|
|
513
|
+
**文件名格式**:
|
|
514
|
+
- Feature Spec: `{module-name}-feature-spec.md`
|
|
515
|
+
- API Contract: `{module-name}-api-contract.md`
|
|
516
|
+
|
|
517
|
+
**示例**:
|
|
518
|
+
- `crm-feature-spec.md`
|
|
519
|
+
- `crm-api-contract.md`
|
|
520
|
+
|
|
521
|
+
**特征**:
|
|
522
|
+
- 文件名不以 `F-` 开头
|
|
523
|
+
- 无 Feature ID
|
|
524
|
+
- 使用模块名作为标识
|
|
525
|
+
|
|
526
|
+
## 格式检测逻辑
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
文件名以 "F-" 开头 且匹配正则 ^F-[A-Z]+-\d+-
|
|
530
|
+
→ 新格式,提取 Feature ID
|
|
531
|
+
否则
|
|
532
|
+
→ 旧格式,使用模块名
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
## 向后兼容处理
|
|
536
|
+
|
|
537
|
+
| 场景 | 处理方式 |
|
|
538
|
+
|------|----------|
|
|
539
|
+
| Feature ID | 新格式: 提取 `F-{MODULE}-{NN}`;旧格式: null |
|
|
540
|
+
| Feature Name | 新格式: 从文件名提取;旧格式: 模块名 |
|
|
541
|
+
| Task ID | 新格式: `sd-{platform}-{feature-id}`;旧格式: `sd-{platform}-{feature_name}` |
|
|
542
|
+
| 输出文件名 | 新格式: `{feature-id}-{feature-name}-design.md`;旧格式: `{module}-design.md` |
|
|
543
|
+
| DESIGN-OVERVIEW | Feature ID 列显示 `-` 或实际 ID |
|
|
340
544
|
|
|
341
545
|
# Constraints
|
|
342
546
|
|
|
@@ -347,6 +551,8 @@ After user confirms:
|
|
|
347
551
|
- Ensure each module design maps to a Feature Spec function
|
|
348
552
|
- Generate DESIGN-OVERVIEW.md before dispatching platform skills
|
|
349
553
|
- Verify API Contract exists and reference it (read-only)
|
|
554
|
+
- Parse Feature ID from filename when using new format
|
|
555
|
+
- Maintain backward compatibility with old format
|
|
350
556
|
|
|
351
557
|
**Must not do:**
|
|
352
558
|
- Write actual source code (only pseudo-code in design docs)
|
|
@@ -131,6 +131,14 @@ For each platform_id identified:
|
|
|
131
131
|
- Read `03.system-design/{platform_id}/INDEX.md` to get module design list
|
|
132
132
|
- Identify all module design documents to implement
|
|
133
133
|
|
|
134
|
+
**Design Document Naming Convention** (supports both formats):
|
|
135
|
+
- Legacy format: `{module}-design.md` (e.g., `crm-design.md`)
|
|
136
|
+
- New format: `{feature-id}-{feature-name}-design.md` (e.g., `F-CRM-01-customer-list-design.md`)
|
|
137
|
+
|
|
138
|
+
**Feature ID Extraction**:
|
|
139
|
+
- From new format: extract `{feature-id}` from filename (e.g., `F-CRM-01` from `F-CRM-01-customer-list-design.md`)
|
|
140
|
+
- From legacy format: use `{module}` as feature_id (e.g., `crm` from `crm-design.md`)
|
|
141
|
+
|
|
134
142
|
## Step 2: Load Techs Knowledge
|
|
135
143
|
|
|
136
144
|
Load development-focused techs knowledge following the Developer section of agent-knowledge-map:
|
|
@@ -225,14 +233,17 @@ Before dispatching tasks, create or read dispatch progress file:
|
|
|
225
233
|
```json
|
|
226
234
|
[
|
|
227
235
|
{
|
|
228
|
-
"id": "dev-{platform_id}-{
|
|
236
|
+
"id": "dev-{platform_id}-{feature-id}",
|
|
229
237
|
"platform": "{platform_id}",
|
|
230
238
|
"module": "{module_name}",
|
|
239
|
+
"feature_id": "{feature_id}",
|
|
231
240
|
"skill": "{skill_name}",
|
|
232
241
|
"status": "pending"
|
|
233
242
|
}
|
|
234
243
|
]
|
|
235
244
|
```
|
|
245
|
+
|
|
246
|
+
Note: `feature_id` is extracted from design doc filename. For new format `{feature-id}-{feature-name}-design.md`, use `{feature-id}`. For legacy format `{module}-design.md`, use `{module}` as feature_id.
|
|
236
247
|
|
|
237
248
|
3. **Alternatively, pass tasks JSON directly**:
|
|
238
249
|
```bash
|
|
@@ -277,10 +288,29 @@ task_list = []
|
|
|
277
288
|
for each platform_id:
|
|
278
289
|
read INDEX.md → get module design file list
|
|
279
290
|
for each module_design_doc:
|
|
291
|
+
// Extract feature_id from design doc filename
|
|
292
|
+
// New format: {feature-id}-{feature-name}-design.md → extract {feature-id}
|
|
293
|
+
// Legacy format: {module}-design.md → use {module} as feature_id
|
|
294
|
+
filename = module_design_doc.filename // e.g., "F-CRM-01-customer-list-design.md" or "crm-design.md"
|
|
295
|
+
base_name = filename.replace("-design.md", "") // e.g., "F-CRM-01-customer-list" or "crm"
|
|
296
|
+
|
|
297
|
+
// Detect format: if base_name contains pattern like "F-XXX-NN", extract feature_id
|
|
298
|
+
if base_name matches pattern "^([A-Z]-[A-Z]+-\d+)" (e.g., "F-CRM-01"):
|
|
299
|
+
feature_id = matched group 1 // e.g., "F-CRM-01"
|
|
300
|
+
module_name = base_name // full name for reference
|
|
301
|
+
else:
|
|
302
|
+
feature_id = base_name // e.g., "crm"
|
|
303
|
+
module_name = base_name
|
|
304
|
+
|
|
305
|
+
task_id = "dev-{platform_id}-{feature_id}"
|
|
306
|
+
|
|
280
307
|
task_list.append({
|
|
281
|
-
|
|
308
|
+
id: task_id, // e.g., "dev-backend-spring-F-CRM-01" or "dev-backend-spring-crm"
|
|
309
|
+
platform: platform_id,
|
|
310
|
+
module: module_name,
|
|
311
|
+
feature_id: feature_id,
|
|
282
312
|
skill_name: determined by platform prefix (see 4.1),
|
|
283
|
-
module_design_path: 03.system-design/{platform_id}/{
|
|
313
|
+
module_design_path: 03.system-design/{platform_id}/{filename},
|
|
284
314
|
techs_knowledge_paths: relevant techs knowledge for this platform,
|
|
285
315
|
api_contract_path: API Contract path,
|
|
286
316
|
iteration_path: current iteration directory
|
|
@@ -288,14 +318,17 @@ for each platform_id:
|
|
|
288
318
|
```
|
|
289
319
|
|
|
290
320
|
**Example** (3 platforms × ~11 modules each = ~33 tasks):
|
|
291
|
-
- Task 1: `speccrew-dev-backend` for `backend-spring/
|
|
292
|
-
- Task 2: `speccrew-dev-backend` for `backend-spring/member-design.md`
|
|
321
|
+
- Task 1: `speccrew-dev-backend` for `backend-spring/F-CRM-01-customer-list-design.md` → task_id: `dev-backend-spring-F-CRM-01`
|
|
322
|
+
- Task 2: `speccrew-dev-backend` for `backend-spring/F-MEM-02-member-profile-design.md` → task_id: `dev-backend-spring-F-MEM-02`
|
|
293
323
|
- ...
|
|
294
|
-
- Task 12: `speccrew-dev-frontend` for `web-vue/
|
|
324
|
+
- Task 12: `speccrew-dev-frontend` for `web-vue/F-CRM-01-customer-list-design.md` → task_id: `dev-web-vue-F-CRM-01`
|
|
295
325
|
- ...
|
|
296
|
-
- Task 23: `speccrew-dev-mobile` for `mobile-uniapp/
|
|
326
|
+
- Task 23: `speccrew-dev-mobile` for `mobile-uniapp/F-CRM-01-customer-list-design.md` → task_id: `dev-mobile-uniapp-F-CRM-01`
|
|
297
327
|
- ...
|
|
298
328
|
|
|
329
|
+
**Legacy format example**:
|
|
330
|
+
- Task 1: `speccrew-dev-backend` for `backend-spring/crm-design.md` → task_id: `dev-backend-spring-crm`
|
|
331
|
+
|
|
299
332
|
### 4.2a Checkpoint: Task List Review
|
|
300
333
|
|
|
301
334
|
**Present task list to user for confirmation**:
|
|
@@ -319,12 +352,12 @@ for each platform_id:
|
|
|
319
352
|
>
|
|
320
353
|
> **REQUIRED ACTION**: Dispatch `speccrew-task-worker` agents via Agent tool. Each worker independently calls the appropriate dev skill.
|
|
321
354
|
|
|
322
|
-
**Max concurrent workers:
|
|
355
|
+
**Max concurrent workers: 6**
|
|
323
356
|
|
|
324
357
|
Process `task_list` using a queue-based concurrency limit model. Each task runs in an independent `speccrew-task-worker` agent:
|
|
325
358
|
|
|
326
359
|
```
|
|
327
|
-
MAX_CONCURRENT =
|
|
360
|
+
MAX_CONCURRENT = 6
|
|
328
361
|
pending = [...task_list] // Only pending/failed tasks from DISPATCH-PROGRESS.json
|
|
329
362
|
running = {}
|
|
330
363
|
completed = []
|
|
@@ -343,6 +376,7 @@ while pending is not empty or running is not empty:
|
|
|
343
376
|
- skill_path: {ide_skills_dir}/{task.skill_name}/SKILL.md
|
|
344
377
|
- context:
|
|
345
378
|
- platform_id: {task.platform_id}
|
|
379
|
+
- feature_id: {task.feature_id} // Extracted from design doc filename
|
|
346
380
|
- iteration_path: {task.iteration_path}
|
|
347
381
|
- design_doc_path: {task.module_design_path}
|
|
348
382
|
- api_contract_path: {task.api_contract_path}
|
|
@@ -377,7 +411,7 @@ while pending is not empty or running is not empty:
|
|
|
377
411
|
**Dispatch rules:**
|
|
378
412
|
- Each worker handles **one module** on **one platform** (not all modules)
|
|
379
413
|
- Pass complete context including `design_doc_path`, `skill_name`, platform info, and `task_id`
|
|
380
|
-
- Up to
|
|
414
|
+
- Up to 6 workers execute simultaneously (concurrency limit)
|
|
381
415
|
- Update DISPATCH-PROGRESS.json **before** dispatch (status → "in_progress")
|
|
382
416
|
- After dev worker completes, mark as "in_review" (NOT "completed") and queue for review
|
|
383
417
|
- Track all dispatched tasks: in_review / failed / pending counts
|
|
@@ -10,6 +10,16 @@ tools: Bash, Edit, Write, Glob, Grep, Read
|
|
|
10
10
|
- User asks "Start backend development", "Implement backend code"
|
|
11
11
|
- System Developer Agent receives task to implement backend for a specific platform
|
|
12
12
|
|
|
13
|
+
# Input Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Required | Type | Description |
|
|
16
|
+
|-----------|----------|------|-------------|
|
|
17
|
+
| `design_doc_path` | Yes | string | Path to a single module design document (passed by upstream system-developer agent) |
|
|
18
|
+
| `platform_id` | Yes | string | Platform identifier (e.g., backend-spring, backend-nodejs) |
|
|
19
|
+
| `task_id` | Yes | string | Task identifier from dispatch context |
|
|
20
|
+
| `iteration_id` | No | string | Current iteration identifier for progress messages |
|
|
21
|
+
| `output_dir` | No | string | Output directory for task record (default: auto-derived from iteration path) |
|
|
22
|
+
|
|
13
23
|
# Workflow
|
|
14
24
|
|
|
15
25
|
## Absolute Constraints
|
|
@@ -249,7 +259,9 @@ If the skill fails at any step:
|
|
|
249
259
|
| **Deviation Recording** | ALL deviations from design must be documented |
|
|
250
260
|
| **Tech Debt Tracking** | Suboptimal solutions written to tech-debt/ directory |
|
|
251
261
|
|
|
252
|
-
#
|
|
262
|
+
# Reference Guides
|
|
263
|
+
|
|
264
|
+
## Mermaid Diagram Requirements
|
|
253
265
|
|
|
254
266
|
When generating Mermaid diagrams, follow compatibility guidelines:
|
|
255
267
|
|
|
@@ -261,6 +273,8 @@ When generating Mermaid diagrams, follow compatibility guidelines:
|
|
|
261
273
|
- No special characters in node text
|
|
262
274
|
- Use standard `graph TB/LR` or `flowchart TD/LR` or `erDiagram` syntax only
|
|
263
275
|
|
|
276
|
+
---
|
|
277
|
+
|
|
264
278
|
# Checklist
|
|
265
279
|
|
|
266
280
|
- [ ] All design documents and techs knowledge loaded before implementation
|
|
@@ -82,8 +82,27 @@ Fill each section with task checklist and design metadata extracted from input d
|
|
|
82
82
|
|
|
83
83
|
### 3.2 Desktop-Specific Task Types
|
|
84
84
|
|
|
85
|
+
**Conditional Task Selection:**
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
IF task involves backend logic in main process THEN
|
|
89
|
+
→ Create Main Process Module task
|
|
90
|
+
IF task involves UI components in renderer THEN
|
|
91
|
+
→ Create Renderer Page/Component task
|
|
92
|
+
IF task involves process communication THEN
|
|
93
|
+
→ Create IPC Channel Handler task + Preload Script task
|
|
94
|
+
IF task involves native APIs THEN
|
|
95
|
+
→ Create Native Integration task
|
|
96
|
+
IF task involves menus or shortcuts THEN
|
|
97
|
+
→ Create Menu/Shortcut task
|
|
98
|
+
IF task involves auto-update THEN
|
|
99
|
+
→ Create Auto-Update task
|
|
100
|
+
IF task involves security configuration THEN
|
|
101
|
+
→ Create Security Hardening task
|
|
102
|
+
```
|
|
103
|
+
|
|
85
104
|
| Task Type | Description | Example |
|
|
86
|
-
|
|
105
|
+
|-----------|-------------|---------||
|
|
87
106
|
| Main Process Module | Backend logic running in main process | Window manager, IPC handlers, native integrations |
|
|
88
107
|
| Renderer Page/Component | UI components in renderer process | React/Vue components, pages, layouts |
|
|
89
108
|
| IPC Channel Handler | Communication bridge between processes | `ipcMain.handle`, `#[tauri::command]` |
|
|
@@ -176,12 +195,7 @@ npx tsc --noEmit
|
|
|
176
195
|
|
|
177
196
|
### 5.4 Security Audit
|
|
178
197
|
|
|
179
|
-
|
|
180
|
-
|-------|--------|
|
|
181
|
-
| Context Isolation | Verify `contextIsolation: true` in window config |
|
|
182
|
-
| nodeIntegration | Verify `nodeIntegration: false` |
|
|
183
|
-
| Preload Script | Verify all IPC goes through preload |
|
|
184
|
-
| CSP | Check Content Security Policy headers |
|
|
198
|
+
Perform security checks according to Security Audit Reference (see Reference Guides section).
|
|
185
199
|
|
|
186
200
|
### 5.5 Unit Tests
|
|
187
201
|
|
|
@@ -296,6 +310,21 @@ If the skill fails at any step:
|
|
|
296
310
|
3. Native integrations working as expected
|
|
297
311
|
4. No security concerns introduced
|
|
298
312
|
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
# Reference Guides
|
|
316
|
+
|
|
317
|
+
## Security Audit Checklist
|
|
318
|
+
|
|
319
|
+
| Check | Method |
|
|
320
|
+
|-------|--------|
|
|
321
|
+
| Context Isolation | Verify `contextIsolation: true` in window config |
|
|
322
|
+
| nodeIntegration | Verify `nodeIntegration: false` |
|
|
323
|
+
| Preload Script | Verify all IPC goes through preload |
|
|
324
|
+
| CSP | Check Content Security Policy headers |
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
299
328
|
# Key Rules
|
|
300
329
|
|
|
301
330
|
| Rule | Description |
|
|
@@ -21,7 +21,7 @@ tools: Read, Grep, Glob
|
|
|
21
21
|
| `platform_id` | Yes | Platform identifier (backend-spring/web-vue/mobile-uniapp/desktop-tauri) |
|
|
22
22
|
| `api_contract_path` | No | Path to API contract file for endpoint validation |
|
|
23
23
|
| `task_id` | Yes | Task identifier from dispatch context |
|
|
24
|
-
| `previous_review_path` | No | Path to previous review report for incremental review
|
|
24
|
+
| `previous_review_path` | No | Path to previous review report for incremental review |
|
|
25
25
|
|
|
26
26
|
# Workflow
|
|
27
27
|
|
|
@@ -276,13 +276,22 @@ Compare Service implementation against design document:
|
|
|
276
276
|
|
|
277
277
|
### 6.1 Determine Review Result
|
|
278
278
|
|
|
279
|
-
Based on findings, determine overall result:
|
|
279
|
+
Based on findings, determine overall result using quantitative thresholds:
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
281
|
+
```
|
|
282
|
+
IF completeness_pct == 100% AND error_count == 0 THEN
|
|
283
|
+
→ Result = PASS
|
|
284
|
+
IF completeness_pct >= 70% AND completeness_pct < 100% THEN
|
|
285
|
+
→ Result = PARTIAL
|
|
286
|
+
IF completeness_pct < 70% OR has_critical_blockers == true THEN
|
|
287
|
+
→ Result = FAIL
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
| Result | Threshold Criteria |
|
|
291
|
+
|--------|-------------------|
|
|
292
|
+
| **PASS** | 100% files created, 0 ERROR-level issues |
|
|
293
|
+
| **PARTIAL** | 70-99% files created, or has non-critical ERROR issues |
|
|
294
|
+
| **FAIL** | <70% files created, or critical blockers present |
|
|
286
295
|
|
|
287
296
|
### 6.2 Write Review Report
|
|
288
297
|
|