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,257 @@
1
+ # Orchestrator (Hybrid Pattern)
2
+
3
+ 协调器负责状态管理、worker 调度、结果汇聚。
4
+
5
+ ## Role
6
+
7
+ ```
8
+ Read state -> Select mode -> Spawn workers -> Wait results -> Merge -> Update state -> Loop/Exit
9
+ ```
10
+
11
+ ## State Management
12
+
13
+ ### Read State
14
+
15
+ ```javascript
16
+ function readState(loopId) {
17
+ const stateFile = `.workflow/.loop/${loopId}.json`
18
+ return fs.existsSync(stateFile)
19
+ ? JSON.parse(Read(stateFile))
20
+ : null
21
+ }
22
+ ```
23
+
24
+ ### Create State
25
+
26
+ ```javascript
27
+ function createState(loopId, taskDescription, mode) {
28
+ const now = new Date().toISOString()
29
+
30
+ return {
31
+ loop_id: loopId,
32
+ title: taskDescription.substring(0, 100),
33
+ description: taskDescription,
34
+ mode: mode,
35
+ status: 'running',
36
+ current_iteration: 0,
37
+ max_iterations: 10,
38
+ created_at: now,
39
+ updated_at: now,
40
+ skill_state: {
41
+ phase: 'init',
42
+ action_index: 0,
43
+ workers_completed: [],
44
+ parallel_results: null
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ## Mode Handlers
51
+
52
+ ### Interactive Mode
53
+
54
+ ```javascript
55
+ async function runInteractiveMode(loopId, state) {
56
+ while (state.status === 'running') {
57
+ // 1. Show menu
58
+ const action = await showMenu(state)
59
+ if (action === 'exit') break
60
+
61
+ // 2. Spawn worker
62
+ const worker = spawn_agent({
63
+ message: buildWorkerPrompt(action, loopId, state)
64
+ })
65
+
66
+ // 3. Wait for result
67
+ const result = wait({ ids: [worker], timeout_ms: 600000 })
68
+
69
+ // 4. Handle timeout
70
+ if (result.timed_out) {
71
+ send_input({ id: worker, message: 'Please converge and output WORKER_RESULT' })
72
+ const retryResult = wait({ ids: [worker], timeout_ms: 300000 })
73
+ if (retryResult.timed_out) {
74
+ console.log('Worker timeout, skipping')
75
+ close_agent({ id: worker })
76
+ continue
77
+ }
78
+ }
79
+
80
+ // 5. Process output
81
+ const output = result.status[worker].completed
82
+ state = processWorkerOutput(loopId, action, output, state)
83
+
84
+ // 6. Cleanup
85
+ close_agent({ id: worker })
86
+
87
+ // 7. Display result
88
+ displayResult(output)
89
+ }
90
+ }
91
+ ```
92
+
93
+ ### Auto Mode
94
+
95
+ ```javascript
96
+ async function runAutoMode(loopId, state) {
97
+ const sequence = ['init', 'develop', 'debug', 'validate', 'complete']
98
+ let idx = state.skill_state?.action_index || 0
99
+
100
+ while (idx < sequence.length && state.status === 'running') {
101
+ const action = sequence[idx]
102
+
103
+ // Spawn and wait
104
+ const worker = spawn_agent({ message: buildWorkerPrompt(action, loopId, state) })
105
+ const result = wait({ ids: [worker], timeout_ms: 600000 })
106
+ const output = result.status[worker].completed
107
+ close_agent({ id: worker })
108
+
109
+ // Parse result
110
+ const workerResult = parseWorkerResult(output)
111
+ state = processWorkerOutput(loopId, action, output, state)
112
+
113
+ // Determine next
114
+ if (workerResult.loop_back_to) {
115
+ idx = sequence.indexOf(workerResult.loop_back_to)
116
+ } else if (workerResult.status === 'failed') {
117
+ break
118
+ } else {
119
+ idx++
120
+ }
121
+
122
+ // Update action index
123
+ state.skill_state.action_index = idx
124
+ saveState(loopId, state)
125
+ }
126
+ }
127
+ ```
128
+
129
+ ### Parallel Mode
130
+
131
+ ```javascript
132
+ async function runParallelMode(loopId, state) {
133
+ // Spawn all workers
134
+ const workers = {
135
+ develop: spawn_agent({ message: buildWorkerPrompt('develop', loopId, state) }),
136
+ debug: spawn_agent({ message: buildWorkerPrompt('debug', loopId, state) }),
137
+ validate: spawn_agent({ message: buildWorkerPrompt('validate', loopId, state) })
138
+ }
139
+
140
+ // Batch wait
141
+ const results = wait({
142
+ ids: Object.values(workers),
143
+ timeout_ms: 900000
144
+ })
145
+
146
+ // Collect outputs
147
+ const outputs = {}
148
+ for (const [role, id] of Object.entries(workers)) {
149
+ if (results.status[id].completed) {
150
+ outputs[role] = results.status[id].completed
151
+ }
152
+ close_agent({ id })
153
+ }
154
+
155
+ // Merge analysis
156
+ state.skill_state.parallel_results = outputs
157
+ saveState(loopId, state)
158
+
159
+ // Coordinator analyzes merged results
160
+ return analyzeAndDecide(outputs)
161
+ }
162
+ ```
163
+
164
+ ## Worker Prompt Template
165
+
166
+ ```javascript
167
+ function buildWorkerPrompt(action, loopId, state) {
168
+ const roleFiles = {
169
+ init: '~/.codex/agents/ccw-loop-b-init.md',
170
+ develop: '~/.codex/agents/ccw-loop-b-develop.md',
171
+ debug: '~/.codex/agents/ccw-loop-b-debug.md',
172
+ validate: '~/.codex/agents/ccw-loop-b-validate.md',
173
+ complete: '~/.codex/agents/ccw-loop-b-complete.md'
174
+ }
175
+
176
+ return `
177
+ ## TASK ASSIGNMENT
178
+
179
+ ### MANDATORY FIRST STEPS
180
+ 1. **Read role definition**: ${roleFiles[action]}
181
+ 2. Read: .workflow/project-tech.json
182
+ 3. Read: .workflow/project-guidelines.json
183
+
184
+ ---
185
+
186
+ ## CONTEXT
187
+ - Loop ID: ${loopId}
188
+ - Action: ${action}
189
+ - State: ${JSON.stringify(state, null, 2)}
190
+
191
+ ## TASK
192
+ ${state.description}
193
+
194
+ ## OUTPUT FORMAT
195
+ \`\`\`
196
+ WORKER_RESULT:
197
+ - action: ${action}
198
+ - status: success | failed | needs_input
199
+ - summary: <brief>
200
+ - files_changed: []
201
+ - next_suggestion: <action>
202
+ - loop_back_to: <action or null>
203
+
204
+ DETAILED_OUTPUT:
205
+ <action-specific output>
206
+ \`\`\`
207
+ `
208
+ }
209
+ ```
210
+
211
+ ## Result Processing
212
+
213
+ ```javascript
214
+ function parseWorkerResult(output) {
215
+ const result = {
216
+ action: 'unknown',
217
+ status: 'unknown',
218
+ summary: '',
219
+ files_changed: [],
220
+ next_suggestion: null,
221
+ loop_back_to: null
222
+ }
223
+
224
+ const match = output.match(/WORKER_RESULT:\s*([\s\S]*?)(?:DETAILED_OUTPUT:|$)/)
225
+ if (match) {
226
+ const lines = match[1].split('\n')
227
+ for (const line of lines) {
228
+ const m = line.match(/^-\s*(\w+):\s*(.+)$/)
229
+ if (m) {
230
+ const [, key, value] = m
231
+ if (key === 'files_changed') {
232
+ try { result.files_changed = JSON.parse(value) } catch {}
233
+ } else {
234
+ result[key] = value.trim()
235
+ }
236
+ }
237
+ }
238
+ }
239
+
240
+ return result
241
+ }
242
+ ```
243
+
244
+ ## Termination Conditions
245
+
246
+ 1. User exits (interactive)
247
+ 2. Sequence complete (auto)
248
+ 3. Worker failed with no recovery
249
+ 4. Max iterations reached
250
+ 5. API paused/stopped
251
+
252
+ ## Best Practices
253
+
254
+ 1. **Worker 生命周期**: spawn → wait → close,不保留 worker
255
+ 2. **结果持久化**: Worker 输出写入 `.workflow/.loop/{loopId}.workers/`
256
+ 3. **状态同步**: 每次 worker 完成后更新 state
257
+ 4. **超时处理**: send_input 请求收敛,再超时则跳过
@@ -0,0 +1,181 @@
1
+ # State Schema (CCW Loop-B)
2
+
3
+ ## Master State Structure
4
+
5
+ ```json
6
+ {
7
+ "loop_id": "loop-b-20260122-abc123",
8
+ "title": "Implement user authentication",
9
+ "description": "Full task description here",
10
+ "mode": "interactive | auto | parallel",
11
+ "status": "running | paused | completed | failed",
12
+ "current_iteration": 3,
13
+ "max_iterations": 10,
14
+ "created_at": "2026-01-22T10:00:00.000Z",
15
+ "updated_at": "2026-01-22T10:30:00.000Z",
16
+
17
+ "skill_state": {
18
+ "phase": "develop | debug | validate | complete",
19
+ "action_index": 2,
20
+ "workers_completed": ["init", "develop"],
21
+ "parallel_results": null,
22
+ "pending_tasks": [],
23
+ "completed_tasks": [],
24
+ "findings": []
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Field Descriptions
30
+
31
+ ### Core Fields (API Compatible)
32
+
33
+ | Field | Type | Description |
34
+ |-------|------|-------------|
35
+ | `loop_id` | string | Unique identifier |
36
+ | `title` | string | Short title (max 100 chars) |
37
+ | `description` | string | Full task description |
38
+ | `mode` | enum | Execution mode |
39
+ | `status` | enum | Current status |
40
+ | `current_iteration` | number | Iteration counter |
41
+ | `max_iterations` | number | Safety limit |
42
+ | `created_at` | ISO string | Creation timestamp |
43
+ | `updated_at` | ISO string | Last update timestamp |
44
+
45
+ ### Skill State Fields
46
+
47
+ | Field | Type | Description |
48
+ |-------|------|-------------|
49
+ | `phase` | enum | Current execution phase |
50
+ | `action_index` | number | Position in action sequence (auto mode) |
51
+ | `workers_completed` | array | List of completed worker actions |
52
+ | `parallel_results` | object | Merged results from parallel mode |
53
+ | `pending_tasks` | array | Tasks waiting to be executed |
54
+ | `completed_tasks` | array | Tasks already done |
55
+ | `findings` | array | Discoveries during execution |
56
+
57
+ ## Worker Output Structure
58
+
59
+ Each worker writes to `.workflow/.loop/{loopId}.workers/{action}.output.json`:
60
+
61
+ ```json
62
+ {
63
+ "action": "develop",
64
+ "status": "success",
65
+ "summary": "Implemented 3 functions",
66
+ "files_changed": ["src/auth.ts", "src/utils.ts"],
67
+ "next_suggestion": "validate",
68
+ "loop_back_to": null,
69
+ "timestamp": "2026-01-22T10:15:00.000Z",
70
+ "detailed_output": {
71
+ "tasks_completed": [
72
+ { "id": "T1", "description": "Create auth module" }
73
+ ],
74
+ "metrics": {
75
+ "lines_added": 150,
76
+ "lines_removed": 20
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## Progress File Structure
83
+
84
+ Human-readable progress in `.workflow/.loop/{loopId}.progress/{action}.md`:
85
+
86
+ ```markdown
87
+ # Develop Progress
88
+
89
+ ## Session: loop-b-20260122-abc123
90
+
91
+ ### Iteration 1 (2026-01-22 10:15)
92
+
93
+ **Task**: Implement auth module
94
+
95
+ **Changes**:
96
+ - Created `src/auth.ts` with login/logout functions
97
+ - Added JWT token handling in `src/utils.ts`
98
+
99
+ **Status**: Success
100
+
101
+ ---
102
+
103
+ ### Iteration 2 (2026-01-22 10:30)
104
+
105
+ ...
106
+ ```
107
+
108
+ ## Status Transitions
109
+
110
+ ```
111
+ +--------+
112
+ | init |
113
+ +--------+
114
+ |
115
+ v
116
+ +------> +---------+
117
+ | | develop |
118
+ | +---------+
119
+ | |
120
+ | +--------+--------+
121
+ | | |
122
+ | v v
123
+ | +-------+ +---------+
124
+ | | debug |<------| validate|
125
+ | +-------+ +---------+
126
+ | | |
127
+ | +--------+--------+
128
+ | |
129
+ | v
130
+ | [needs fix?]
131
+ | yes | | no
132
+ | v v
133
+ +------------+ +----------+
134
+ | complete |
135
+ +----------+
136
+ ```
137
+
138
+ ## Parallel Results Schema
139
+
140
+ When `mode === 'parallel'`:
141
+
142
+ ```json
143
+ {
144
+ "parallel_results": {
145
+ "develop": {
146
+ "status": "success",
147
+ "summary": "...",
148
+ "suggestions": []
149
+ },
150
+ "debug": {
151
+ "status": "success",
152
+ "issues_found": [],
153
+ "suggestions": []
154
+ },
155
+ "validate": {
156
+ "status": "success",
157
+ "test_results": {},
158
+ "coverage": {}
159
+ },
160
+ "merged_at": "2026-01-22T10:45:00.000Z"
161
+ }
162
+ }
163
+ ```
164
+
165
+ ## Directory Structure
166
+
167
+ ```
168
+ .workflow/.loop/
169
+ +-- loop-b-20260122-abc123.json # Master state
170
+ +-- loop-b-20260122-abc123.workers/
171
+ | +-- init.output.json
172
+ | +-- develop.output.json
173
+ | +-- debug.output.json
174
+ | +-- validate.output.json
175
+ | +-- complete.output.json
176
+ +-- loop-b-20260122-abc123.progress/
177
+ +-- develop.md
178
+ +-- debug.md
179
+ +-- validate.md
180
+ +-- summary.md
181
+ ```