speccrew 0.5.9 → 0.5.10
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 +67 -0
- package/.speccrew/agents/speccrew-product-manager.md +69 -0
- package/.speccrew/agents/speccrew-system-designer.md +77 -0
- package/.speccrew/agents/speccrew-system-developer.md +80 -0
- package/.speccrew/agents/speccrew-task-worker.md +34 -0
- package/.speccrew/agents/speccrew-team-leader.md +84 -0
- package/.speccrew/agents/speccrew-test-manager.md +27 -0
- package/docs/GETTING-STARTED.en.md +97 -22
- package/docs/GETTING-STARTED.md +97 -22
- package/docs/GETTING-STARTED.zh-TW.md +213 -138
- package/lib/commands/init.js +18 -0
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a href="./GETTING-STARTED.ar.md">العربية</a>
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
-
本文檔幫助您快速了解如何使用 SpecCrew 的 Agent
|
|
17
|
+
本文檔幫助您快速了解如何使用 SpecCrew 的 Agent 團隊,按照標準工程流程逐步完成從需求到交付的完整開發。
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ npm install -g speccrew
|
|
|
32
32
|
speccrew init --ide qoder
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
支援的 IDE
|
|
35
|
+
支援的 IDE:`qoder`、`cursor`、`claude`、`codex`
|
|
36
36
|
|
|
37
37
|
### 初始化後的目錄結構
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ speccrew init --ide qoder
|
|
|
46
46
|
│ ├── iterations/ # 當前進行中的迭代
|
|
47
47
|
│ ├── iteration-archives/ # 歸檔的迭代
|
|
48
48
|
│ └── knowledges/ # 知識庫
|
|
49
|
-
│ ├── base/ #
|
|
49
|
+
│ ├── base/ # 基礎資訊(診斷報告、技術債務)
|
|
50
50
|
│ ├── bizs/ # 業務知識庫
|
|
51
51
|
│ └── techs/ # 技術知識庫
|
|
52
52
|
```
|
|
@@ -62,7 +62,82 @@ speccrew init --ide qoder
|
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
65
|
-
## 2.
|
|
65
|
+
## 2. 安裝後5分鐘快速開始
|
|
66
|
+
|
|
67
|
+
執行 `speccrew init` 後,按以下步驟快速進入工作狀態:
|
|
68
|
+
|
|
69
|
+
### 第1步:選擇你的 IDE
|
|
70
|
+
|
|
71
|
+
| IDE | 初始化命令 | 適用場景 |
|
|
72
|
+
|-----|-----------|----------|
|
|
73
|
+
| **Qoder**(推薦) | `speccrew init --ide qoder` | 完整Agent編排、並行Worker |
|
|
74
|
+
| **Cursor** | `speccrew init --ide cursor` | 基於Composer的工作流 |
|
|
75
|
+
| **Claude Code** | `speccrew init --ide claude` | CLI優先開發 |
|
|
76
|
+
| **Codex** | `speccrew init --ide codex` | OpenAI生態集成 |
|
|
77
|
+
|
|
78
|
+
### 第2步:初始化知識庫(推薦)
|
|
79
|
+
|
|
80
|
+
對於已有源碼的專案,建議先初始化知識庫,讓Agent理解你的程式碼庫:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
@speccrew-team-leader 初始化技術知識庫
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
然後:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
@speccrew-team-leader 初始化業務知識庫
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 第3步:開始你的第一個任務
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
@speccrew-product-manager 我有一個新需求:[描述你的功能需求]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
> **提示**:如果不確定該做什麼,直接說 `@speccrew-team-leader 幫我開始` — Team Leader 會自動檢測專案狀態並引導你。
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 3. 快速決策樹
|
|
103
|
+
|
|
104
|
+
不確定該做什麼?找到你的場景:
|
|
105
|
+
|
|
106
|
+
- **我有新的功能需求**
|
|
107
|
+
→ `@speccrew-product-manager 我有一個新需求:[描述你的功能需求]`
|
|
108
|
+
|
|
109
|
+
- **我想掃描現有專案的知識**
|
|
110
|
+
→ `@speccrew-team-leader 初始化技術知識庫`
|
|
111
|
+
→ 然後:`@speccrew-team-leader 初始化業務知識庫`
|
|
112
|
+
|
|
113
|
+
- **我想繼續之前的工作**
|
|
114
|
+
→ `@speccrew-team-leader 當前進度是什麼?`
|
|
115
|
+
|
|
116
|
+
- **我想檢查系統健康狀態**
|
|
117
|
+
→ 在終端運行:`speccrew doctor`
|
|
118
|
+
|
|
119
|
+
- **我不確定該做什麼**
|
|
120
|
+
→ `@speccrew-team-leader 幫我開始`
|
|
121
|
+
→ Team Leader 會自動檢測專案狀態並引導你
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 4. Agent 快速參考
|
|
126
|
+
|
|
127
|
+
| 角色 | Agent | 職責 | 示例指令 |
|
|
128
|
+
|------|-------|------|----------|
|
|
129
|
+
| 團隊負責人 | `@speccrew-team-leader` | 專案導航、知識庫初始化、狀態查看 | "幫我開始" |
|
|
130
|
+
| 產品經理 | `@speccrew-product-manager` | 需求分析、PRD 生成 | "我有一個新需求:..." |
|
|
131
|
+
| 功能設計師 | `@speccrew-feature-designer` | 功能分析、規格設計、API 契約 | "開始迭代X的功能設計" |
|
|
132
|
+
| 系統設計師 | `@speccrew-system-designer` | 架構設計、平台詳細設計 | "開始迭代X的系統設計" |
|
|
133
|
+
| 系統開發者 | `@speccrew-system-developer` | 開發協調、程式碼生成 | "開始迭代X的開發" |
|
|
134
|
+
| 測試經理 | `@speccrew-test-manager` | 測試規劃、用例設計、執行 | "開始迭代X的測試" |
|
|
135
|
+
|
|
136
|
+
> **提示**:你不需要記住所有 Agent。只需與 `@speccrew-team-leader` 對話,它會將你的請求路由到合適的 Agent。
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 5. 工作流程總覽
|
|
66
141
|
|
|
67
142
|
### 完整流程圖
|
|
68
143
|
|
|
@@ -83,29 +158,29 @@ flowchart LR
|
|
|
83
158
|
|
|
84
159
|
### 核心原則
|
|
85
160
|
|
|
86
|
-
1.
|
|
87
|
-
2. **Checkpoint
|
|
88
|
-
3.
|
|
161
|
+
1. **階段依賴**:每階段產出物是下一階段的輸入
|
|
162
|
+
2. **Checkpoint 確認**:每個階段都有確認點,需使用者確認後才能進入下一階段
|
|
163
|
+
3. **知識庫驅動**:知識庫貫穿始終,為各階段提供上下文
|
|
89
164
|
|
|
90
165
|
---
|
|
91
166
|
|
|
92
|
-
##
|
|
167
|
+
## 6. 第零步:知識庫初始化
|
|
93
168
|
|
|
94
|
-
|
|
169
|
+
在開始正式工程流程前,需要先初始化專案知識庫。
|
|
95
170
|
|
|
96
|
-
###
|
|
171
|
+
### 6.1 技術知識庫初始化
|
|
97
172
|
|
|
98
|
-
|
|
173
|
+
**對話範例**:
|
|
99
174
|
```
|
|
100
175
|
@speccrew-team-leader 初始化技術知識庫
|
|
101
176
|
```
|
|
102
177
|
|
|
103
|
-
|
|
104
|
-
1.
|
|
178
|
+
**三階段流程**:
|
|
179
|
+
1. 平台檢測 — 識別專案中的技術平台
|
|
105
180
|
2. 技術文檔生成 — 為每個平台生成技術規約文檔
|
|
106
181
|
3. 索引生成 — 建立知識庫索引
|
|
107
182
|
|
|
108
|
-
|
|
183
|
+
**產出物**:
|
|
109
184
|
```
|
|
110
185
|
speccrew-workspace/knowledges/techs/{platform-id}/
|
|
111
186
|
├── tech-stack.md # 技術棧定義
|
|
@@ -115,20 +190,20 @@ speccrew-workspace/knowledges/techs/{platform-id}/
|
|
|
115
190
|
└── INDEX.md # 索引檔案
|
|
116
191
|
```
|
|
117
192
|
|
|
118
|
-
###
|
|
193
|
+
### 6.2 業務知識庫初始化
|
|
119
194
|
|
|
120
|
-
|
|
195
|
+
**對話範例**:
|
|
121
196
|
```
|
|
122
197
|
@speccrew-team-leader 初始化業務知識庫
|
|
123
198
|
```
|
|
124
199
|
|
|
125
|
-
|
|
200
|
+
**四階段流程**:
|
|
126
201
|
1. 特性清單 — 掃描程式碼識別所有功能特性
|
|
127
202
|
2. 特性分析 — 分析每個特性的業務邏輯
|
|
128
|
-
3. 模組總結 —
|
|
203
|
+
3. 模組總結 — 按模組匯總特性
|
|
129
204
|
4. 系統總結 — 生成系統級業務概覽
|
|
130
205
|
|
|
131
|
-
|
|
206
|
+
**產出物**:
|
|
132
207
|
```
|
|
133
208
|
speccrew-workspace/knowledges/bizs/
|
|
134
209
|
├── {platform-type}/
|
|
@@ -139,55 +214,55 @@ speccrew-workspace/knowledges/bizs/
|
|
|
139
214
|
|
|
140
215
|
---
|
|
141
216
|
|
|
142
|
-
##
|
|
217
|
+
## 7. 逐階段對話指南
|
|
143
218
|
|
|
144
|
-
###
|
|
219
|
+
### 7.1 階段一:需求分析(Product Manager)
|
|
145
220
|
|
|
146
|
-
|
|
221
|
+
**如何啟動**:
|
|
147
222
|
```
|
|
148
|
-
@speccrew-product-manager
|
|
223
|
+
@speccrew-product-manager 我有一個新需求:[描述你的需求]
|
|
149
224
|
```
|
|
150
225
|
|
|
151
|
-
**Agent
|
|
226
|
+
**Agent 工作流程**:
|
|
152
227
|
1. 讀取系統概覽了解現有模組
|
|
153
228
|
2. 分析使用者需求
|
|
154
229
|
3. 生成結構化 PRD 文檔
|
|
155
230
|
|
|
156
|
-
|
|
231
|
+
**產出物**:
|
|
157
232
|
```
|
|
158
233
|
iterations/{序號}-{類型}-{名稱}/01.product-requirement/
|
|
159
234
|
├── [feature-name]-prd.md # 產品需求文檔
|
|
160
|
-
└── [feature-name]-bizs-modeling.md #
|
|
235
|
+
└── [feature-name]-bizs-modeling.md # 業務建模(複雜需求時)
|
|
161
236
|
```
|
|
162
237
|
|
|
163
|
-
|
|
238
|
+
**確認要點**:
|
|
164
239
|
- [ ] 需求描述是否準確反映使用者意圖
|
|
165
240
|
- [ ] 業務規則是否完整
|
|
166
|
-
- [ ]
|
|
241
|
+
- [ ] 與現有系統的集成點是否明確
|
|
167
242
|
- [ ] 驗收標準是否可度量
|
|
168
243
|
|
|
169
244
|
---
|
|
170
245
|
|
|
171
|
-
###
|
|
246
|
+
### 7.2 階段二:功能設計(Feature Designer)
|
|
172
247
|
|
|
173
|
-
|
|
248
|
+
**如何啟動**:
|
|
174
249
|
```
|
|
175
250
|
@speccrew-feature-designer 開始功能設計
|
|
176
251
|
```
|
|
177
252
|
|
|
178
|
-
**Agent
|
|
253
|
+
**Agent 工作流程**:
|
|
179
254
|
1. 自動定位已確認的 PRD 文檔
|
|
180
|
-
2.
|
|
181
|
-
3.
|
|
182
|
-
4. 多 PRD
|
|
255
|
+
2. 加載業務知識庫
|
|
256
|
+
3. 生成功能設計(含 UI 線框圖、交互流、資料定義、API 契約)
|
|
257
|
+
4. 多 PRD 時通過 Task Worker 並行設計
|
|
183
258
|
|
|
184
|
-
|
|
259
|
+
**產出物**:
|
|
185
260
|
```
|
|
186
261
|
iterations/{iter}/02.feature-design/
|
|
187
262
|
└── [feature-name]-feature-spec.md # 功能設計文檔
|
|
188
263
|
```
|
|
189
264
|
|
|
190
|
-
|
|
265
|
+
**確認要點**:
|
|
191
266
|
- [ ] 所有使用者場景是否都被覆蓋
|
|
192
267
|
- [ ] 交互流程是否清晰
|
|
193
268
|
- [ ] 資料欄位定義是否完整
|
|
@@ -195,22 +270,22 @@ iterations/{iter}/02.feature-design/
|
|
|
195
270
|
|
|
196
271
|
---
|
|
197
272
|
|
|
198
|
-
###
|
|
273
|
+
### 7.3 階段三:系統設計(System Designer)
|
|
199
274
|
|
|
200
|
-
|
|
275
|
+
**如何啟動**:
|
|
201
276
|
```
|
|
202
277
|
@speccrew-system-designer 開始系統設計
|
|
203
278
|
```
|
|
204
279
|
|
|
205
|
-
**Agent
|
|
280
|
+
**Agent 工作流程**:
|
|
206
281
|
1. 定位 Feature Spec 和 API Contract
|
|
207
|
-
2.
|
|
208
|
-
3. **Checkpoint A
|
|
282
|
+
2. 加載技術知識庫(各端技術棧、架構、規約)
|
|
283
|
+
3. **Checkpoint A**:框架評估 — 分析技術差距,推薦新框架(如需要),等待使用者確認
|
|
209
284
|
4. 生成 DESIGN-OVERVIEW.md
|
|
210
|
-
5.
|
|
211
|
-
6. **Checkpoint B
|
|
285
|
+
5. 通過 Task Worker 並行分派各端設計(前端/後端/移動端/桌面端)
|
|
286
|
+
6. **Checkpoint B**:聯合確認 — 展示所有平台設計匯總,等待使用者確認
|
|
212
287
|
|
|
213
|
-
|
|
288
|
+
**產出物**:
|
|
214
289
|
```
|
|
215
290
|
iterations/{iter}/03.system-design/
|
|
216
291
|
├── DESIGN-OVERVIEW.md # 設計概覽
|
|
@@ -219,82 +294,82 @@ iterations/{iter}/03.system-design/
|
|
|
219
294
|
│ └── {module}-design.md # 偽程式碼級模組設計
|
|
220
295
|
```
|
|
221
296
|
|
|
222
|
-
|
|
297
|
+
**確認要點**:
|
|
223
298
|
- [ ] 偽程式碼是否使用了實際框架語法
|
|
224
299
|
- [ ] 跨端 API 契約是否一致
|
|
225
300
|
- [ ] 錯誤處理策略是否統一
|
|
226
301
|
|
|
227
302
|
---
|
|
228
303
|
|
|
229
|
-
###
|
|
304
|
+
### 7.4 階段四:開發實現(System Developer)
|
|
230
305
|
|
|
231
|
-
|
|
306
|
+
**如何啟動**:
|
|
232
307
|
```
|
|
233
308
|
@speccrew-system-developer 開始開發
|
|
234
309
|
```
|
|
235
310
|
|
|
236
|
-
**Agent
|
|
311
|
+
**Agent 工作流程**:
|
|
237
312
|
1. 讀取系統設計文檔
|
|
238
|
-
2.
|
|
239
|
-
3. **Checkpoint A
|
|
240
|
-
4.
|
|
241
|
-
5.
|
|
242
|
-
6.
|
|
313
|
+
2. 加載各端技術知識
|
|
314
|
+
3. **Checkpoint A**:環境預檢 — 檢查運行時版本、依賴、服務可用性,失敗時等待使用者解決
|
|
315
|
+
4. 通過 Task Worker 並行分派各端開發
|
|
316
|
+
5. 集成檢查:API 契約對齊、資料一致性
|
|
317
|
+
6. 輸付交付報告
|
|
243
318
|
|
|
244
|
-
|
|
319
|
+
**產出物**:
|
|
245
320
|
```
|
|
246
|
-
#
|
|
321
|
+
# 源程式碼寫入專案實際源碼目錄
|
|
247
322
|
iterations/{iter}/04.development/
|
|
248
323
|
├── {platform-id}/
|
|
249
324
|
│ └── tasks/ # 開發任務記錄
|
|
250
325
|
└── delivery-report.md
|
|
251
326
|
```
|
|
252
327
|
|
|
253
|
-
|
|
328
|
+
**確認要點**:
|
|
254
329
|
- [ ] 環境是否就緒
|
|
255
|
-
- [ ]
|
|
330
|
+
- [ ] 集成問題是否在可接受範圍
|
|
256
331
|
- [ ] 程式碼是否符合開發規約
|
|
257
332
|
|
|
258
333
|
---
|
|
259
334
|
|
|
260
|
-
###
|
|
335
|
+
### 7.5 階段五:系統測試(Test Manager)
|
|
261
336
|
|
|
262
|
-
|
|
337
|
+
**如何啟動**:
|
|
263
338
|
```
|
|
264
339
|
@speccrew-test-manager 開始測試
|
|
265
340
|
```
|
|
266
341
|
|
|
267
|
-
|
|
342
|
+
**三階段測試流程**:
|
|
268
343
|
|
|
269
344
|
| 階段 | 說明 | Checkpoint |
|
|
270
345
|
|------|------|------------|
|
|
271
|
-
|
|
|
272
|
-
| 測試程式碼生成 | 生成可執行的測試程式碼 | B
|
|
273
|
-
| 測試執行與 Bug 報告 |
|
|
346
|
+
| 測試用例設計 | 基於 PRD 和 Feature Spec 生成測試用例 | A:展示用例覆蓋統計和追溯矩陣,等待使用者確認覆蓋足夠 |
|
|
347
|
+
| 測試程式碼生成 | 生成可執行的測試程式碼 | B:展示生成的測試檔案和用例映射,等待使用者確認 |
|
|
348
|
+
| 測試執行與 Bug 報告 | 自動執行測試,生成報告 | 無(自動執行) |
|
|
274
349
|
|
|
275
|
-
|
|
350
|
+
**產出物**:
|
|
276
351
|
```
|
|
277
352
|
iterations/{iter}/05.system-test/
|
|
278
353
|
├── cases/
|
|
279
|
-
│ └── {platform-id}/ #
|
|
354
|
+
│ └── {platform-id}/ # 測試用例文檔
|
|
280
355
|
├── code/
|
|
281
356
|
│ └── {platform-id}/ # 測試程式碼計劃
|
|
282
357
|
├── reports/
|
|
283
358
|
│ └── test-report-{date}.md # 測試報告
|
|
284
359
|
└── bugs/
|
|
285
|
-
└── BUG-{id}-{title}.md # Bug
|
|
360
|
+
└── BUG-{id}-{title}.md # Bug 報告(每個 Bug 一個檔案)
|
|
286
361
|
```
|
|
287
362
|
|
|
288
|
-
|
|
289
|
-
- [ ]
|
|
290
|
-
- [ ]
|
|
363
|
+
**確認要點**:
|
|
364
|
+
- [ ] 用例覆蓋是否完整
|
|
365
|
+
- [ ] 測試程式碼是否可運行
|
|
291
366
|
- [ ] Bug 嚴重程度判定是否準確
|
|
292
367
|
|
|
293
368
|
---
|
|
294
369
|
|
|
295
|
-
###
|
|
370
|
+
### 7.6 階段六:歸檔
|
|
296
371
|
|
|
297
|
-
|
|
372
|
+
迭代完成後自動歸檔:
|
|
298
373
|
|
|
299
374
|
```
|
|
300
375
|
speccrew-workspace/iteration-archives/
|
|
@@ -308,13 +383,13 @@ speccrew-workspace/iteration-archives/
|
|
|
308
383
|
|
|
309
384
|
---
|
|
310
385
|
|
|
311
|
-
##
|
|
386
|
+
## 8. 知識庫說明
|
|
312
387
|
|
|
313
|
-
###
|
|
388
|
+
### 8.1 業務知識庫(bizs)
|
|
314
389
|
|
|
315
|
-
|
|
390
|
+
**作用**:存儲專案的業務功能描述、模組劃分、API 特徵
|
|
316
391
|
|
|
317
|
-
|
|
392
|
+
**目錄結構**:
|
|
318
393
|
```
|
|
319
394
|
knowledges/bizs/
|
|
320
395
|
├── {platform-type}/
|
|
@@ -323,13 +398,13 @@ knowledges/bizs/
|
|
|
323
398
|
└── system-overview.md
|
|
324
399
|
```
|
|
325
400
|
|
|
326
|
-
|
|
401
|
+
**使用場景**:Product Manager、Feature Designer
|
|
327
402
|
|
|
328
|
-
###
|
|
403
|
+
### 8.2 技術知識庫(techs)
|
|
329
404
|
|
|
330
|
-
|
|
405
|
+
**作用**:存儲專案的技術棧、架構約定、開發規約、測試規約
|
|
331
406
|
|
|
332
|
-
|
|
407
|
+
**目錄結構**:
|
|
333
408
|
```
|
|
334
409
|
knowledges/techs/{platform-id}/
|
|
335
410
|
├── tech-stack.md
|
|
@@ -339,54 +414,54 @@ knowledges/techs/{platform-id}/
|
|
|
339
414
|
└── INDEX.md
|
|
340
415
|
```
|
|
341
416
|
|
|
342
|
-
|
|
417
|
+
**使用場景**:System Designer、System Developer、Test Manager
|
|
343
418
|
|
|
344
419
|
---
|
|
345
420
|
|
|
346
|
-
##
|
|
421
|
+
## 9. 流水線進度管理
|
|
347
422
|
|
|
348
|
-
SpecCrew
|
|
423
|
+
SpecCrew 虛擬團隊遵循嚴格的階段門控機制,每個階段必須經過使用者確認後才能推進到下一階段。同時支援斷點續傳 —— 中斷後重新啟動時,自動從上次停止的位置繼續。
|
|
349
424
|
|
|
350
|
-
###
|
|
425
|
+
### 9.1 三層進度檔案
|
|
351
426
|
|
|
352
|
-
工作流自動維護三類 JSON
|
|
427
|
+
工作流自動維護三類 JSON 進度檔案,位於迭代目錄下:
|
|
353
428
|
|
|
354
|
-
|
|
|
429
|
+
| 檔案 | 位置 | 作用 |
|
|
355
430
|
|------|------|------|
|
|
356
431
|
| `WORKFLOW-PROGRESS.json` | `iterations/{iter}/` | 記錄整條流水線各階段狀態 |
|
|
357
|
-
| `.checkpoints.json` | 各階段目錄下 |
|
|
358
|
-
| `DISPATCH-PROGRESS.json` | 各階段目錄下 |
|
|
432
|
+
| `.checkpoints.json` | 各階段目錄下 | 記錄使用者確認點(Checkpoint)通過狀態 |
|
|
433
|
+
| `DISPATCH-PROGRESS.json` | 各階段目錄下 | 記錄並行任務(多平台/多模組)的逐項進度 |
|
|
359
434
|
|
|
360
|
-
###
|
|
435
|
+
### 9.2 階段狀態流轉
|
|
361
436
|
|
|
362
|
-
|
|
437
|
+
每個階段遵循以下狀態流轉:
|
|
363
438
|
|
|
364
439
|
```
|
|
365
440
|
pending → in_progress → completed → confirmed
|
|
366
441
|
```
|
|
367
442
|
|
|
368
|
-
- **pending
|
|
369
|
-
- **in_progress
|
|
370
|
-
- **completed
|
|
371
|
-
- **confirmed
|
|
443
|
+
- **pending**:尚未開始
|
|
444
|
+
- **in_progress**:正在執行中
|
|
445
|
+
- **completed**:Agent 執行完成,等待使用者確認
|
|
446
|
+
- **confirmed**:使用者通過最終 Checkpoint 確認,下一階段可以啟動
|
|
372
447
|
|
|
373
|
-
###
|
|
448
|
+
### 9.3 斷點續傳
|
|
374
449
|
|
|
375
|
-
當重新啟動某個階段的 Agent
|
|
450
|
+
當重新啟動某個階段的 Agent 時:
|
|
376
451
|
|
|
377
|
-
1.
|
|
378
|
-
2. **恢復 Checkpoint
|
|
379
|
-
3.
|
|
452
|
+
1. **自動檢查上游**:驗證前一階段是否已 confirmed,未確認則阻塞並提示
|
|
453
|
+
2. **恢復 Checkpoint**:讀取 `.checkpoints.json`,跳過已通過的確認點,從上次中斷處繼續
|
|
454
|
+
3. **恢復並行任務**:讀取 `DISPATCH-PROGRESS.json`,只重新執行 `pending` 或 `failed` 狀態的任務,跳過已 `completed` 的任務
|
|
380
455
|
|
|
381
|
-
###
|
|
456
|
+
### 9.4 查看當前進度
|
|
382
457
|
|
|
383
|
-
通過 Team Leader Agent
|
|
458
|
+
通過 Team Leader Agent 查看流水線全景狀態:
|
|
384
459
|
|
|
385
460
|
```
|
|
386
461
|
@speccrew-team-leader 查看當前迭代進度
|
|
387
462
|
```
|
|
388
463
|
|
|
389
|
-
Team Leader
|
|
464
|
+
Team Leader 會讀取進度檔案並展示類似以下的狀態概覽:
|
|
390
465
|
|
|
391
466
|
```
|
|
392
467
|
Pipeline Status: i001-user-management
|
|
@@ -397,29 +472,29 @@ Pipeline Status: i001-user-management
|
|
|
397
472
|
05 System Test: ⏳ Pending
|
|
398
473
|
```
|
|
399
474
|
|
|
400
|
-
###
|
|
475
|
+
### 9.5 向下相容
|
|
401
476
|
|
|
402
|
-
|
|
477
|
+
進度檔案機制完全向下相容 —— 如果進度檔案不存在(如舊專案或全新迭代),所有 Agent 將按照原有邏輯正常執行。
|
|
403
478
|
|
|
404
479
|
---
|
|
405
480
|
|
|
406
|
-
##
|
|
481
|
+
## 10. 常見問題(FAQ)
|
|
407
482
|
|
|
408
|
-
### Q1: Agent
|
|
483
|
+
### Q1: Agent 不按預期工作怎麼辦?
|
|
409
484
|
|
|
410
|
-
1.
|
|
485
|
+
1. 運行 `speccrew doctor` 檢查安裝完整性
|
|
411
486
|
2. 確認知識庫已初始化
|
|
412
487
|
3. 確認當前迭代目錄中有上一階段的產出物
|
|
413
488
|
|
|
414
|
-
### Q2:
|
|
489
|
+
### Q2: 如何跳過某個階段?
|
|
415
490
|
|
|
416
|
-
|
|
491
|
+
**不建議跳過**,每階段產出是下階段輸入。
|
|
417
492
|
|
|
418
|
-
|
|
493
|
+
如必須跳過,需手動準備對應階段的輸入文檔,並確保格式符合規範。
|
|
419
494
|
|
|
420
|
-
### Q3:
|
|
495
|
+
### Q3: 如何處理多個需求並行?
|
|
421
496
|
|
|
422
|
-
|
|
497
|
+
每個需求創建獨立迭代目錄:
|
|
423
498
|
```
|
|
424
499
|
iterations/
|
|
425
500
|
├── 001-feature-xxx/
|
|
@@ -427,33 +502,33 @@ iterations/
|
|
|
427
502
|
└── 003-feature-zzz/
|
|
428
503
|
```
|
|
429
504
|
|
|
430
|
-
|
|
505
|
+
各迭代完全隔離,互不影響。
|
|
431
506
|
|
|
432
|
-
### Q4: 如何更新 SpecCrew
|
|
507
|
+
### Q4: 如何更新 SpecCrew 版本?
|
|
433
508
|
|
|
434
|
-
|
|
509
|
+
更新分為兩步:
|
|
435
510
|
|
|
436
511
|
```bash
|
|
437
|
-
#
|
|
512
|
+
# Step 1: 更新全域 CLI 工具
|
|
438
513
|
npm install -g speccrew@latest
|
|
439
514
|
|
|
440
|
-
#
|
|
515
|
+
# Step 2: 在專案目錄中同步 Agents 和 Skills
|
|
441
516
|
cd /path/to/your-project
|
|
442
517
|
speccrew update
|
|
443
518
|
```
|
|
444
519
|
|
|
445
|
-
- `npm install -g speccrew@latest
|
|
446
|
-
- `speccrew update
|
|
447
|
-
- `speccrew update --ide cursor
|
|
520
|
+
- `npm install -g speccrew@latest`:更新 CLI 工具本身(新版本可能包含新的 Agent/Skill 定義、Bug 修復等)
|
|
521
|
+
- `speccrew update`:將專案中的 Agent 和 Skill 定義檔案同步到最新版本
|
|
522
|
+
- `speccrew update --ide cursor`:僅更新指定 IDE 的配置
|
|
448
523
|
|
|
449
|
-
>
|
|
524
|
+
> **注意**:兩步都需要執行。僅執行 `speccrew update` 不會更新 CLI 工具本身;僅執行 `npm install` 不會更新專案中的檔案。
|
|
450
525
|
|
|
451
|
-
### Q5: `speccrew update`
|
|
526
|
+
### Q5: `speccrew update` 提示有新版本但 `npm install -g speccrew@latest` 安裝後仍是舊版本?
|
|
452
527
|
|
|
453
|
-
這通常是 npm
|
|
528
|
+
這通常是 npm 緩存問題。解決方法:
|
|
454
529
|
|
|
455
530
|
```bash
|
|
456
|
-
# 清除 npm
|
|
531
|
+
# 清除 npm 緩存後重新安裝
|
|
457
532
|
npm cache clean --force
|
|
458
533
|
npm install -g speccrew@latest
|
|
459
534
|
|
|
@@ -461,32 +536,32 @@ npm install -g speccrew@latest
|
|
|
461
536
|
npm list -g speccrew
|
|
462
537
|
```
|
|
463
538
|
|
|
464
|
-
|
|
539
|
+
如果仍然不行,嘗試指定具體版本號安裝:
|
|
465
540
|
```bash
|
|
466
541
|
npm install -g speccrew@0.5.6
|
|
467
542
|
```
|
|
468
543
|
|
|
469
|
-
### Q6:
|
|
544
|
+
### Q6: 如何查看歷史迭代?
|
|
470
545
|
|
|
471
|
-
歸檔後在 `speccrew-workspace/iteration-archives/`
|
|
546
|
+
歸檔後在 `speccrew-workspace/iteration-archives/` 中查看,按 `{序號}-{類型}-{名稱}-{日期}/` 格式組織。
|
|
472
547
|
|
|
473
|
-
### Q7:
|
|
548
|
+
### Q7: 知識庫需要定期更新嗎?
|
|
474
549
|
|
|
475
|
-
|
|
550
|
+
以下情況需要重新初始化:
|
|
476
551
|
- 專案結構發生重大變化
|
|
477
552
|
- 技術棧升級或更換
|
|
478
553
|
- 新增/刪除業務模組
|
|
479
554
|
|
|
480
555
|
---
|
|
481
556
|
|
|
482
|
-
##
|
|
557
|
+
## 11. 快速參考
|
|
483
558
|
|
|
484
559
|
### Agent 啟動速查表
|
|
485
560
|
|
|
486
561
|
| 階段 | Agent | 啟動對話 |
|
|
487
562
|
|------|-------|----------|
|
|
488
563
|
| 初始化 | Team Leader | `@speccrew-team-leader 初始化技術知識庫` |
|
|
489
|
-
| 需求分析 | Product Manager | `@speccrew-product-manager
|
|
564
|
+
| 需求分析 | Product Manager | `@speccrew-product-manager 我有一個新需求:[描述]` |
|
|
490
565
|
| 功能設計 | Feature Designer | `@speccrew-feature-designer 開始功能設計` |
|
|
491
566
|
| 系統設計 | System Designer | `@speccrew-system-designer 開始系統設計` |
|
|
492
567
|
| 開發實現 | System Developer | `@speccrew-system-developer 開始開發` |
|
|
@@ -498,9 +573,9 @@ npm install -g speccrew@0.5.6
|
|
|
498
573
|
|------|-----------------|------------|
|
|
499
574
|
| 需求分析 | 1 | 需求準確性、業務規則完整性、驗收標準可度量性 |
|
|
500
575
|
| 功能設計 | 1 | 場景覆蓋、交互清晰度、資料完整性、異常處理 |
|
|
501
|
-
| 系統設計 | 2 | A
|
|
502
|
-
| 開發實現 | 1 | A
|
|
503
|
-
| 系統測試 | 2 | A
|
|
576
|
+
| 系統設計 | 2 | A: 框架評估;B: 偽程式碼語法、跨端一致性、錯誤處理 |
|
|
577
|
+
| 開發實現 | 1 | A: 環境就緒、集成問題、程式碼規約 |
|
|
578
|
+
| 系統測試 | 2 | A: 用例覆蓋;B: 測試程式碼可運行性 |
|
|
504
579
|
|
|
505
580
|
### 產出物路徑速查
|
|
506
581
|
|
|
@@ -509,14 +584,14 @@ npm install -g speccrew@0.5.6
|
|
|
509
584
|
| 需求分析 | `iterations/{iter}/01.product-requirement/` | `[name]-prd.md`, `[name]-bizs-modeling.md` |
|
|
510
585
|
| 功能設計 | `iterations/{iter}/02.feature-design/` | `[name]-feature-spec.md` |
|
|
511
586
|
| 系統設計 | `iterations/{iter}/03.system-design/` | `DESIGN-OVERVIEW.md`, `{platform}/INDEX.md`, `{platform}/{module}-design.md` |
|
|
512
|
-
| 開發實現 | `iterations/{iter}/04.development/` |
|
|
587
|
+
| 開發實現 | `iterations/{iter}/04.development/` | 源程式碼 + `delivery-report.md` |
|
|
513
588
|
| 系統測試 | `iterations/{iter}/05.system-test/` | `cases/`, `code/`, `reports/`, `bugs/` |
|
|
514
589
|
| 歸檔 | `iteration-archives/{iter}-{date}/` | 完整迭代副本 |
|
|
515
590
|
|
|
516
591
|
---
|
|
517
592
|
|
|
518
|
-
##
|
|
593
|
+
## 下一步
|
|
519
594
|
|
|
520
|
-
1.
|
|
521
|
-
2.
|
|
522
|
-
3.
|
|
595
|
+
1. 運行 `speccrew init --ide qoder` 初始化您的專案
|
|
596
|
+
2. 執行第零步:知識庫初始化
|
|
597
|
+
3. 按照工作流程逐階段推進,享受規範驅動的開發體驗!
|