claude-code-workflow 6.3.37 → 6.3.39

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