claude-code-workflow 6.3.42 → 6.3.43

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.
@@ -1,513 +0,0 @@
1
- ---
2
- name: Parallel Dev Cycle
3
- description: Multi-agent parallel development cycle with requirement analysis, exploration planning, code development, and validation. Supports continuous iteration with markdown progress documentation.
4
- argument-hint: TASK="<task description>" [--cycle-id=<id>] [--auto] [--parallel=<count>]
5
- ---
6
-
7
- # Parallel Dev Cycle - Multi-Agent Development Workflow
8
-
9
- Multi-agent parallel development cycle using Codex subagent pattern with four specialized workers:
10
- 1. **Requirements Analysis & Extension** (RA) - 需求分析及扩展
11
- 2. **Exploration & Planning** (EP) - 探索规划
12
- 3. **Code Development** (CD) - 代码开发
13
- 4. **Validation & Archival Summary** (VAS) - 验证及归档总结
14
-
15
- 每个 agent **仅维护一个主文档文件**,支持版本化、自动归档、完整历史追溯。
16
-
17
- ## Arguments
18
-
19
- | Arg | Required | Description |
20
- |-----|----------|-------------|
21
- | TASK | No | Task description (for new cycle, mutually exclusive with --cycle-id) |
22
- | --cycle-id | No | Existing cycle ID to continue (from API or previous session) |
23
- | --auto | No | Auto-cycle mode (run all phases sequentially) |
24
- | --parallel | No | Number of parallel agents (default: 4, max: 4) |
25
-
26
- ## Architecture Overview
27
-
28
- ```
29
- ┌─────────────────────────────────────────────────────────────┐
30
- │ User Input (Task) │
31
- └────────────────────────────┬────────────────────────────────┘
32
-
33
- v
34
- ┌──────────────────────┐
35
- │ Orchestrator Agent │ (Coordinator)
36
- │ (spawned once) │
37
- └──────────────────────┘
38
-
39
- ┌────────────────────┼────────────────────┐
40
- │ │ │
41
- v v v
42
- ┌────────┐ ┌────────┐ ┌────────┐
43
- │ RA │ │ EP │ │ CD │
44
- │Agent │ │Agent │ │Agent │
45
- └────────┘ └────────┘ └────────┘
46
- │ │ │
47
- └────────────────────┼────────────────────┘
48
-
49
- v
50
- ┌────────┐
51
- │ VAS │
52
- │ Agent │
53
- └────────┘
54
-
55
- v
56
- ┌──────────────────────┐
57
- │ Summary Report │
58
- │ & Markdown Docs │
59
- └──────────────────────┘
60
- ```
61
-
62
- ## Key Design Principles
63
-
64
- 1. **Single File Per Agent**: 每个 agent 仅维护一个主文件(精简清晰)
65
- 2. **Version-Based Overwrite**: 每个版本完全重写主文件
66
- 3. **Automatic Archival**: 旧版本自动归档到 `history/` 目录
67
- 4. **Complete Audit Trail**: Changes.log (NDJSON) 保留所有变更历史
68
- 5. **Parallel Execution**: 四个 agent 同时工作,无需等待
69
- 6. **File References**: 使用简短文件路径而非内容传递
70
-
71
- ## Session Structure
72
-
73
- ```
74
- .workflow/.cycle/
75
- +-- {cycleId}.json # Master state file
76
- +-- {cycleId}.progress/
77
- +-- ra/
78
- | +-- requirements.md # v1.2.0 (当前,完全重写)
79
- | +-- changes.log # NDJSON 完整历史(append-only)
80
- | └-- history/
81
- | +-- requirements-v1.0.0.md # 归档快照
82
- | +-- requirements-v1.1.0.md # 归档快照
83
- +-- ep/
84
- | +-- plan.md # v1.2.0 (当前)
85
- | +-- changes.log # NDJSON 完整历史
86
- | └-- history/
87
- | +-- plan-v1.0.0.md
88
- | +-- plan-v1.1.0.md
89
- +-- cd/
90
- | +-- implementation.md # v1.2.0 (当前)
91
- | +-- changes.log # NDJSON 完整历史
92
- | └-- history/
93
- | +-- implementation-v1.0.0.md
94
- | +-- implementation-v1.1.0.md
95
- +-- vas/
96
- | +-- summary.md # v1.2.0 (当前)
97
- | +-- changes.log # NDJSON 完整历史
98
- | └-- history/
99
- | +-- summary-v1.0.0.md
100
- | +-- summary-v1.1.0.md
101
- └-- coordination/
102
- +-- timeline.md # 执行时间线
103
- +-- decisions.log # 决策日志
104
- ```
105
-
106
- ## State Management
107
-
108
- ### Unified Cycle State
109
-
110
- ```json
111
- {
112
- "cycle_id": "cycle-v1-20260122-abc123",
113
- "title": "Task title",
114
- "status": "running",
115
- "current_iteration": 2,
116
- "current_phase": "cd",
117
-
118
- "agents": {
119
- "ra": {
120
- "status": "completed",
121
- "version": "1.2.0",
122
- "output_file": ".workflow/.cycle/cycle-v1-xxx.progress/ra/requirements.md",
123
- "summary": { "requirements": 10, "edge_cases": 5 }
124
- },
125
- "ep": {
126
- "status": "completed",
127
- "version": "1.2.0",
128
- "output_file": ".workflow/.cycle/cycle-v1-xxx.progress/ep/plan.md",
129
- "summary": { "tasks": 8, "critical_path": 4 }
130
- },
131
- "cd": {
132
- "status": "running",
133
- "version": "1.1.0",
134
- "output_file": ".workflow/.cycle/cycle-v1-xxx.progress/cd/implementation.md",
135
- "summary": { "completed_tasks": 3, "files_modified": 5 }
136
- },
137
- "vas": {
138
- "status": "idle",
139
- "version": "0.0.0",
140
- "output_file": null
141
- }
142
- }
143
- }
144
- ```
145
-
146
- ## Agent Output Format
147
-
148
- ### RA: requirements.md (单文件完整输出)
149
-
150
- ```markdown
151
- # Requirements Specification - v1.2.0
152
-
153
- ## Document Status
154
- | Field | Value |
155
- |-------|-------|
156
- | **Version** | 1.2.0 |
157
- | **Previous Version** | 1.1.0 (Added Google OAuth) |
158
- | **This Version** | Added MFA support, GitHub provider |
159
- | **Iteration** | 3 |
160
- | **Updated** | 2026-01-23T10:00:00+08:00 |
161
-
162
- ---
163
-
164
- ## Functional Requirements
165
- - FR-001: OAuth authentication via Google/GitHub (v1.0.0, enhanced v1.1.0-1.2.0)
166
- - FR-002: Multi-provider support (v1.1.0)
167
- - FR-003: MFA/TOTP support (NEW v1.2.0)
168
-
169
- ## Non-Functional Requirements
170
- - NFR-001: Response time < 500ms
171
- - NFR-002: Support 1000 concurrent users
172
-
173
- ## Edge Cases
174
- - EC-001: OAuth timeout → Fallback retry
175
- - EC-002: Invalid TOTP → Max 3 attempts (NEW v1.2.0)
176
-
177
- ## Success Criteria
178
- - [ ] All FRs implemented
179
- - [ ] NFRs validated
180
- - [ ] Coverage > 80%
181
-
182
- ---
183
-
184
- ## History Summary
185
- | Version | Date | Summary |
186
- |---------|------|---------|
187
- | 1.0.0 | 2026-01-22 | Initial OAuth |
188
- | 1.1.0 | 2026-01-22 | + Google OAuth |
189
- | 1.2.0 | 2026-01-23 | + GitHub, + MFA (current) |
190
-
191
- For detailed history, see `history/` and `changes.log`
192
- ```
193
-
194
- ### EP: plan.md (单文件完整输出)
195
-
196
- ```markdown
197
- # Implementation Plan - v1.2.0
198
-
199
- ## Plan Status
200
- | Field | Value |
201
- |-------|-------|
202
- | **Version** | 1.2.0 |
203
- | **Previous** | 1.1.0 (Added GitHub integration) |
204
- | **This Version** | Added MFA tasks (current) |
205
- | **Total Tasks** | 10 |
206
- | **Estimated Hours** | 20 |
207
-
208
- ---
209
-
210
- ## Architecture Highlights
211
- - OAuth: passport-oauth2 library
212
- - Providers: Google, GitHub
213
- - Providers: Store in User.oauth_id, oauth_provider
214
- - MFA: TOTP-based (NEW v1.2.0)
215
-
216
- ---
217
-
218
- ## Implementation Tasks
219
- ### Phase 1: Foundation (TASK-001-003)
220
- - TASK-001: Setup OAuth config (1h, small)
221
- - TASK-002: Update User model (2h, medium)
222
- - TASK-003: Google OAuth strategy (4h, large)
223
-
224
- ### Phase 2: Multi-Provider (TASK-004-005)
225
- - TASK-004: GitHub OAuth strategy (3h, medium) [NEW v1.2.0]
226
- - TASK-005: Provider selection UI (2h, medium)
227
-
228
- ### Phase 3: MFA (TASK-006-008) [NEW v1.2.0]
229
- - TASK-006: TOTP setup endpoint (3h, medium)
230
- - TASK-007: TOTP verification (2h, medium)
231
- - TASK-008: Recovery codes (1h, small)
232
-
233
- ### Phase 4: Testing & Docs (TASK-009-010)
234
- - TASK-009: Integration tests (4h, large)
235
- - TASK-010: Documentation (2h, medium)
236
-
237
- ---
238
-
239
- ## Critical Path
240
- 1. TASK-001 → TASK-002 → TASK-003 → TASK-005
241
- 2. TASK-006 → TASK-007 → TASK-008 → TASK-009
242
-
243
- ---
244
-
245
- ## Integration Points
246
- - Location: src/middleware/auth.ts
247
- - Database: User table oauth_* columns
248
- - Frontend: login.tsx OAuth buttons
249
-
250
- ---
251
-
252
- ## History Summary
253
- | Version | Date | Summary |
254
- |---------|------|---------|
255
- | 1.0.0 | 2026-01-22 | Basic OAuth plan |
256
- | 1.1.0 | 2026-01-22 | + GitHub task |
257
- | 1.2.0 | 2026-01-23 | + MFA tasks (current) |
258
- ```
259
-
260
- ### CD: implementation.md (单文件完整输出)
261
-
262
- ```markdown
263
- # Implementation Progress - v1.1.0
264
-
265
- ## Progress Status
266
- | Field | Value |
267
- |-------|-------|
268
- | **Version** | 1.1.0 |
269
- | **Previous** | 1.0.0 (Initial OAuth) |
270
- | **This Version** | GitHub OAuth support (current) |
271
- | **Iteration** | 2 |
272
- | **Updated** | 2026-01-23T09:30:00+08:00 |
273
-
274
- ---
275
-
276
- ## Completed Tasks
277
- - ✓ TASK-001: Setup OAuth config (1h)
278
- - ✓ TASK-002: Update User model (2h)
279
- - ✓ TASK-003: Google OAuth strategy (4h)
280
- - ✓ TASK-004: GitHub OAuth strategy (3h) [NEW v1.1.0]
281
-
282
- ## In Progress
283
- - 🔄 TASK-005: Provider selection UI (50% complete)
284
-
285
- ## Next Tasks
286
- - ☐ TASK-006: TOTP setup (v1.2.0)
287
- - ☐ Tests & documentation
288
-
289
- ---
290
-
291
- ## Files Modified
292
- | File | Action | Description |
293
- |------|--------|-------------|
294
- | src/config/oauth.ts | create | OAuth config (45 lines) |
295
- | src/strategies/oauth-google.ts | create | Google strategy (120 lines) |
296
- | src/strategies/oauth-github.ts | create | GitHub strategy (100 lines) [NEW v1.1.0] |
297
- | src/models/User.ts | modify | +oauth_id, oauth_provider (8 lines) |
298
- | src/routes/auth.ts | modify | +/auth/google, /auth/github (+75 lines) |
299
-
300
- ---
301
-
302
- ## Key Decisions Made
303
- 1. **OAuth Library**: passport-oauth2 (mature, well-maintained)
304
- 2. **Token Storage**: Database (for refresh tokens)
305
- 3. **Provider Selection**: Buttons on login page
306
-
307
- ---
308
-
309
- ## Issues & Blockers
310
- ### Current
311
- - None
312
-
313
- ### Resolved (v1.0.0 → v1.1.0)
314
- - ✓ OAuth callback URL validation (fixed)
315
- - ✓ CORS issues (headers updated)
316
-
317
- ---
318
-
319
- ## Testing Status
320
- | Test Type | v1.0.0 | v1.1.0 |
321
- |-----------|--------|--------|
322
- | Unit | 20/20 ✓ | 25/25 ✓ |
323
- | Integration | 8/10 ⚠ | 12/14 ⚠ |
324
- | E2E | 3/5 ⚠ | 5/8 ⚠ |
325
-
326
- ---
327
-
328
- ## History Summary
329
- | Version | Date | Summary |
330
- |---------|------|---------|
331
- | 1.0.0 | 2026-01-22 | Google OAuth implementation |
332
- | 1.1.0 | 2026-01-23 | + GitHub OAuth (current) |
333
- ```
334
-
335
- ### VAS: summary.md (单文件完整输出)
336
-
337
- ```markdown
338
- # Validation & Summary Report - v1.0.0
339
-
340
- ## Validation Status
341
- | Metric | Value | Target | Status |
342
- |--------|-------|--------|--------|
343
- | **Test Pass Rate** | 92% | 90% | ✓ |
344
- | **Code Coverage** | 87% | 80% | ✓ |
345
- | **Requirements Met** | 3/3 | 100% | ✓ |
346
- | **Critical Issues** | 0 | 0 | ✓ |
347
- | **Production Ready** | YES | - | ✓ |
348
-
349
- ---
350
-
351
- ## Test Execution Results
352
- - **Total Tests**: 50
353
- - **Passed**: 46 (92%)
354
- - **Failed**: 4 (8%)
355
- - **Duration**: 2m 34s
356
-
357
- ### Failures
358
- 1. **oauth-refresh**: Expected token refresh, got error
359
- - Severity: Medium
360
- - Recommendation: Handle expired refresh tokens (v1.1.0 task)
361
-
362
- 2. **concurrent-login**: Race condition in session writes
363
- - Severity: High
364
- - Recommendation: Add mutex for session writes (v1.1.0 task)
365
-
366
- 3. **github-provider**: Timeout on provider response
367
- - Severity: Medium
368
- - Recommendation: Add retry logic with backoff
369
-
370
- 4. **totp-edge-case**: Invalid TOTP timing window
371
- - Severity: Low
372
- - Recommendation: Expand timing window by ±30s
373
-
374
- ---
375
-
376
- ## Code Coverage Analysis
377
- - **Overall**: 87% (target: 80%) ✓
378
- - **OAuth Module**: 95%
379
- - **Routes**: 82%
380
- - **User Model**: 78%
381
-
382
- ### Gaps
383
- - Error recovery paths (15% uncovered)
384
- - Concurrent request handling (20% uncovered)
385
-
386
- ---
387
-
388
- ## Requirements Verification
389
- - ✓ FR-001: OAuth authentication (100% implemented)
390
- - ✓ FR-002: Multi-provider support (Google: 100%, GitHub: 95%)
391
- - ⚠ FR-003: MFA support (0% - planned v1.2.0)
392
-
393
- - ✓ NFR-001: Response time < 500ms (avg 245ms)
394
- - ✓ NFR-002: Handle 100 concurrent (sustained 120)
395
-
396
- ---
397
-
398
- ## Known Issues Summary
399
- 1. **MEDIUM**: OAuth refresh token edge case
400
- - Impact: Users may need re-auth
401
- - Status: Will fix in v1.1.0
402
-
403
- 2. **MEDIUM**: GitHub provider timeout
404
- - Impact: Occasional login failures
405
- - Status: Will fix in v1.1.0
406
-
407
- ---
408
-
409
- ## Deliverables Checklist
410
- - ✓ Code implementation complete
411
- - ✓ Unit tests written (20/20)
412
- - ✓ Integration tests written (12/14)
413
- - ✓ Documentation updated
414
- - ✓ Security review: PASSED
415
- - ✓ Performance benchmarks: MET
416
-
417
- ---
418
-
419
- ## Recommendations
420
- 1. **For v1.1.0**: Fix refresh token and concurrent login issues
421
- 2. **For v1.2.0**: Implement MFA/TOTP support
422
- 3. **For v1.3.0**: Add provider error recovery
423
- 4. **General**: Increase timeout tolerances
424
-
425
- ---
426
-
427
- ## Sign-Off
428
- - **Status**: ✓ APPROVED FOR PRODUCTION
429
- - **Validating Agent**: VAS-v1.0.0
430
- - **Timestamp**: 2026-01-22T12:00:00+08:00
431
- - **By**: Validation & Archival Specialist
432
-
433
- ---
434
-
435
- ## History Summary
436
- | Version | Date | Summary |
437
- |---------|------|---------|
438
- | 1.0.0 | 2026-01-22 | Initial validation report (current) |
439
- ```
440
-
441
- ## Versioning Workflow
442
-
443
- ### 初始版本 (v1.0.0)
444
-
445
- ```bash
446
- /parallel-dev-cycle TASK="Implement OAuth login"
447
- ```
448
-
449
- 生成:
450
- ```
451
- requirements.md (v1.0.0)
452
- plan.md (v1.0.0)
453
- implementation.md (v1.0.0) - 如适用
454
- summary.md (v1.0.0) - 如适用
455
- ```
456
-
457
- ### 迭代版本 (v1.1.0, v1.2.0)
458
-
459
- ```bash
460
- /parallel-dev-cycle --cycle-id=cycle-v1-xxx --extend="Add GitHub support"
461
- ```
462
-
463
- **自动处理**:
464
- 1. 读取当前 `requirements.md (v1.0.0)`
465
- 2. 自动归档到 `history/requirements-v1.0.0.md`
466
- 3. 重新创建 `requirements.md (v1.1.0)` - 完全覆盖
467
- 4. 追加变更到 `changes.log` (NDJSON)
468
-
469
- ## Changes.log Format (NDJSON)
470
-
471
- 保留永久审计日志(append-only,永不删除):
472
-
473
- ```jsonl
474
- {"timestamp":"2026-01-22T10:00:00+08:00","version":"1.0.0","agent":"ra","action":"create","change":"Initial requirements","iteration":1}
475
- {"timestamp":"2026-01-22T11:00:00+08:00","version":"1.1.0","agent":"ra","action":"update","change":"Added Google OAuth requirement","iteration":2}
476
- {"timestamp":"2026-01-22T11:30:00+08:00","version":"1.0.0","agent":"ep","action":"create","change":"Initial implementation plan","iteration":1}
477
- {"timestamp":"2026-01-22T12:00:00+08:00","version":"1.1.0","agent":"ep","action":"update","change":"Added GitHub OAuth tasks","iteration":2}
478
- {"timestamp":"2026-01-22T13:00:00+08:00","version":"1.0.0","agent":"cd","action":"create","change":"Started OAuth implementation","iteration":1}
479
- ```
480
-
481
- ## Usage
482
-
483
- ```bash
484
- # 启动新循环
485
- /parallel-dev-cycle TASK="Implement real-time notifications"
486
-
487
- # 继续循环
488
- /parallel-dev-cycle --cycle-id=cycle-v1-20260122-abc123
489
-
490
- # 带扩展需求的迭代
491
- /parallel-dev-cycle --cycle-id=cycle-v1-20260122-abc123 --extend="Also add email notifications"
492
-
493
- # 自动模式
494
- /parallel-dev-cycle --auto TASK="Add OAuth authentication"
495
- ```
496
-
497
- ## Key Benefits
498
-
499
- ✅ **简洁**: 每个 agent 只维护 1 个文件 + changes.log
500
- ✅ **高效**: 版本重写无需复杂版本标记
501
- ✅ **可查**: 完整历史在 `history/` 和 `changes.log`
502
- ✅ **快速**: Agent 读取当前版本快速(不需解析历史)
503
- ✅ **审计**: NDJSON changes.log 完整追溯每个变更
504
-
505
- ## Reference Documents
506
-
507
- | Document | Purpose |
508
- |----------|---------|
509
- | [phases/orchestrator.md](phases/orchestrator.md) | 协调器逻辑 |
510
- | [phases/state-schema.md](phases/state-schema.md) | 状态结构 |
511
- | [phases/agents/](phases/agents/) | 四个 agent 角色 |
512
- | [specs/coordination-protocol.md](specs/coordination-protocol.md) | 通信协议 |
513
- | [specs/versioning-strategy.md](specs/versioning-strategy.md) | 版本管理 |