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.
- package/.claude/commands/workflow/lite-execute.md +2 -0
- package/.codex/agents/action-planning-agent.md +885 -0
- package/.codex/agents/ccw-loop-b-complete.md +227 -0
- package/.codex/agents/ccw-loop-b-debug.md +172 -0
- package/.codex/agents/ccw-loop-b-develop.md +147 -0
- package/.codex/agents/ccw-loop-b-init.md +82 -0
- package/.codex/agents/ccw-loop-b-validate.md +204 -0
- package/.codex/agents/ccw-loop-executor.md +260 -0
- package/.codex/agents/cli-discuss-agent.md +391 -0
- package/.codex/agents/cli-execution-agent.md +333 -0
- package/.codex/agents/cli-explore-agent.md +186 -0
- package/.codex/agents/cli-lite-planning-agent.md +736 -0
- package/.codex/agents/cli-planning-agent.md +562 -0
- package/.codex/agents/code-developer.md +408 -0
- package/.codex/agents/conceptual-planning-agent.md +321 -0
- package/.codex/agents/context-search-agent.md +585 -0
- package/.codex/agents/debug-explore-agent.md +436 -0
- package/.codex/agents/doc-generator.md +334 -0
- package/.codex/agents/issue-plan-agent.md +417 -0
- package/.codex/agents/issue-queue-agent.md +311 -0
- package/.codex/agents/memory-bridge.md +96 -0
- package/.codex/agents/test-context-search-agent.md +402 -0
- package/.codex/agents/test-fix-agent.md +359 -0
- package/.codex/agents/ui-design-agent.md +595 -0
- package/.codex/agents/universal-executor.md +135 -0
- package/.codex/prompts/clean.md +409 -0
- package/.codex/prompts/issue-discover-by-prompt.md +364 -0
- package/.codex/prompts/issue-discover.md +261 -0
- package/.codex/prompts/issue-execute.md +10 -0
- package/.codex/prompts/issue-new.md +285 -0
- package/.codex/prompts/issue-plan.md +161 -63
- package/.codex/prompts/issue-queue.md +298 -288
- package/.codex/prompts/lite-execute.md +627 -133
- package/.codex/prompts/lite-fix.md +670 -0
- package/.codex/prompts/lite-plan-a.md +337 -0
- package/.codex/prompts/lite-plan-b.md +485 -0
- package/.codex/prompts/{lite-plan.md → lite-plan-c.md} +601 -469
- package/.codex/skills/ccw-loop/README.md +171 -0
- package/.codex/skills/ccw-loop/SKILL.md +349 -0
- package/.codex/skills/ccw-loop/phases/actions/action-complete.md +269 -0
- package/.codex/skills/ccw-loop/phases/actions/action-debug.md +286 -0
- package/.codex/skills/ccw-loop/phases/actions/action-develop.md +183 -0
- package/.codex/skills/ccw-loop/phases/actions/action-init.md +164 -0
- package/.codex/skills/ccw-loop/phases/actions/action-menu.md +205 -0
- package/.codex/skills/ccw-loop/phases/actions/action-validate.md +250 -0
- package/.codex/skills/ccw-loop/phases/orchestrator.md +416 -0
- package/.codex/skills/ccw-loop/phases/state-schema.md +388 -0
- package/.codex/skills/ccw-loop/specs/action-catalog.md +182 -0
- package/.codex/skills/ccw-loop-b/README.md +301 -0
- package/.codex/skills/ccw-loop-b/SKILL.md +322 -0
- package/.codex/skills/ccw-loop-b/phases/orchestrator.md +257 -0
- package/.codex/skills/ccw-loop-b/phases/state-schema.md +181 -0
- package/.codex/skills/ccw-loop-b/specs/action-catalog.md +383 -0
- package/.codex/skills/parallel-dev-cycle/README.md +382 -0
- package/.codex/skills/parallel-dev-cycle/SKILL.md +512 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/code-developer.md +242 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/exploration-planner.md +285 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/requirements-analyst.md +285 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/validation-archivist.md +381 -0
- package/.codex/skills/parallel-dev-cycle/phases/orchestrator.md +696 -0
- package/.codex/skills/parallel-dev-cycle/phases/state-schema.md +436 -0
- package/.codex/skills/parallel-dev-cycle/specs/communication-optimization.md +423 -0
- package/.codex/skills/parallel-dev-cycle/specs/coordination-protocol.md +391 -0
- package/.codex/skills/parallel-dev-cycle/specs/versioning-strategy.md +330 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +4 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +39 -8
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +3 -0
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +107 -0
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/commands/upgrade.js +1 -1
- package/ccw/dist/commands/upgrade.js.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.js +3 -2
- package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.d.ts.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.js +2 -5
- package/ccw/dist/core/memory-embedder-bridge.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +7 -6
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js +2 -2
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js.map +1 -1
- package/ccw/dist/core/routes/graph-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/graph-routes.js +17 -2
- package/ccw/dist/core/routes/graph-routes.js.map +1 -1
- package/ccw/dist/core/routes/issue-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/issue-routes.js +280 -33
- package/ccw/dist/core/routes/issue-routes.js.map +1 -1
- package/ccw/dist/core/routes/loop-v2-routes.d.ts +9 -0
- package/ccw/dist/core/routes/loop-v2-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/loop-v2-routes.js +56 -4
- package/ccw/dist/core/routes/loop-v2-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +3 -2
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +5 -3
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +4 -3
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/cli-config-manager.d.ts +1 -0
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +2 -1
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/codex-lens-lsp.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens-lsp.js +2 -5
- package/ccw/dist/tools/codex-lens-lsp.js.map +1 -1
- package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens.js +22 -32
- package/ccw/dist/tools/codex-lens.js.map +1 -1
- package/ccw/dist/tools/litellm-client.d.ts +6 -0
- package/ccw/dist/tools/litellm-client.d.ts.map +1 -1
- package/ccw/dist/tools/litellm-client.js +15 -2
- package/ccw/dist/tools/litellm-client.js.map +1 -1
- package/ccw/dist/tools/loop-task-manager.d.ts +13 -2
- package/ccw/dist/tools/loop-task-manager.d.ts.map +1 -1
- package/ccw/dist/tools/loop-task-manager.js.map +1 -1
- package/ccw/dist/tools/native-session-discovery.d.ts.map +1 -1
- package/ccw/dist/tools/native-session-discovery.js +35 -7
- package/ccw/dist/tools/native-session-discovery.js.map +1 -1
- package/ccw/dist/utils/codexlens-path.d.ts +36 -0
- package/ccw/dist/utils/codexlens-path.d.ts.map +1 -0
- package/ccw/dist/utils/codexlens-path.js +56 -0
- package/ccw/dist/utils/codexlens-path.js.map +1 -0
- package/ccw/dist/utils/uv-manager.d.ts.map +1 -1
- package/ccw/dist/utils/uv-manager.js +3 -2
- package/ccw/dist/utils/uv-manager.js.map +1 -1
- package/ccw/src/cli.ts +4 -0
- package/ccw/src/commands/install.ts +51 -8
- package/ccw/src/commands/issue.ts +119 -0
- package/ccw/src/commands/upgrade.ts +1 -1
- package/ccw/src/config/litellm-api-config-manager.ts +3 -2
- package/ccw/src/core/memory-embedder-bridge.ts +2 -6
- package/ccw/src/core/routes/cli-routes.ts +1 -1
- package/ccw/src/core/routes/codexlens/config-handlers.ts +7 -6
- package/ccw/src/core/routes/codexlens/semantic-handlers.ts +2 -2
- package/ccw/src/core/routes/graph-routes.ts +18 -2
- package/ccw/src/core/routes/issue-routes.ts +308 -33
- package/ccw/src/core/routes/loop-v2-routes.ts +64 -6
- package/ccw/src/core/routes/system-routes.ts +3 -2
- package/ccw/src/core/server.ts +6 -3
- package/ccw/src/templates/dashboard-css/02-session.css +2 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +103 -1
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +32 -0
- package/ccw/src/templates/dashboard-js/components/cli-history.js +48 -48
- package/ccw/src/templates/dashboard-js/components/navigation.js +6 -0
- package/ccw/src/templates/dashboard-js/components/notifications.js +6 -0
- package/ccw/src/templates/dashboard-js/components/version-check.js +38 -0
- package/ccw/src/templates/dashboard-js/i18n.js +126 -0
- package/ccw/src/templates/dashboard-js/state.js +2 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +1 -1
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +183 -1
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +55 -11
- package/ccw/src/templates/dashboard-js/views/loop-monitor.js +112 -11
- package/ccw/src/templates/dashboard.html +48 -2
- package/ccw/src/tools/claude-cli-tools.ts +4 -3
- package/ccw/src/tools/cli-config-manager.ts +3 -1
- package/ccw/src/tools/codex-lens-lsp.ts +2 -5
- package/ccw/src/tools/codex-lens.ts +27 -38
- package/ccw/src/tools/litellm-client.ts +16 -2
- package/ccw/src/tools/loop-task-manager.ts +13 -2
- package/ccw/src/tools/native-session-discovery.ts +38 -7
- package/ccw/src/utils/codexlens-path.ts +60 -0
- package/ccw/src/utils/uv-manager.ts +3 -2
- package/package.json +1 -1
|
@@ -1,288 +1,298 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Form execution queue from bound solutions
|
|
3
|
-
argument-hint: "[--issue <id>] [--append <id>]"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Issue Queue (Codex Version)
|
|
7
|
-
|
|
8
|
-
## Goal
|
|
9
|
-
|
|
10
|
-
Create an ordered execution queue from all bound solutions.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
- `--
|
|
32
|
-
|
|
33
|
-
**
|
|
34
|
-
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
**
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
**
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
1
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
- [ ]
|
|
273
|
-
- [ ] Queue
|
|
274
|
-
- [ ]
|
|
275
|
-
- [ ]
|
|
276
|
-
- [ ]
|
|
277
|
-
- [ ] Issue statuses updated to `queued`
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Form execution queue from bound solutions using subagent for conflict analysis and ordering
|
|
3
|
+
argument-hint: "[--queues <n>] [--issue <id>] [--append <id>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Issue Queue (Codex Version)
|
|
7
|
+
|
|
8
|
+
## Goal
|
|
9
|
+
|
|
10
|
+
Create an ordered execution queue from all bound solutions. Uses **subagent pattern** to analyze inter-solution file conflicts, calculate semantic priorities, and assign parallel/sequential execution groups.
|
|
11
|
+
|
|
12
|
+
**Design Principle**: Queue items are **solutions**, not individual tasks. Each executor receives a complete solution with all its tasks.
|
|
13
|
+
|
|
14
|
+
## Core Guidelines
|
|
15
|
+
|
|
16
|
+
**⚠️ Data Access Principle**: Issues and queue files can grow very large. To avoid context overflow:
|
|
17
|
+
|
|
18
|
+
| Operation | Correct | Incorrect |
|
|
19
|
+
|-----------|---------|-----------|
|
|
20
|
+
| List issues (brief) | `ccw issue list --status planned --brief` | Read issues.jsonl |
|
|
21
|
+
| List queue (brief) | `ccw issue queue --brief` | Read queues/*.json |
|
|
22
|
+
| Read issue details | `ccw issue status <id> --json` | Read issues.jsonl |
|
|
23
|
+
| Get next item | `ccw issue next --json` | Read queues/*.json |
|
|
24
|
+
| Sync from queue | `ccw issue update --from-queue` | Direct file edit |
|
|
25
|
+
|
|
26
|
+
**ALWAYS** use CLI commands for CRUD operations. **NEVER** read entire `issues.jsonl` or `queues/*.json` directly.
|
|
27
|
+
|
|
28
|
+
## Inputs
|
|
29
|
+
|
|
30
|
+
- **All planned**: Default behavior → queue all issues with `planned` status and bound solutions
|
|
31
|
+
- **Multiple queues**: `--queues <n>` → create N parallel queues
|
|
32
|
+
- **Specific issue**: `--issue <id>` → queue only that issue's solution
|
|
33
|
+
- **Append mode**: `--append <id>` → append issue to active queue (don't create new)
|
|
34
|
+
|
|
35
|
+
## Output Requirements
|
|
36
|
+
|
|
37
|
+
**Generate Files (EXACTLY 2):**
|
|
38
|
+
1. `.workflow/issues/queues/{queue-id}.json` - Full queue with solutions, conflicts, groups
|
|
39
|
+
2. `.workflow/issues/queues/index.json` - Update with new queue entry
|
|
40
|
+
|
|
41
|
+
**Return Summary:**
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"queue_id": "QUE-YYYYMMDD-HHMMSS",
|
|
45
|
+
"total_solutions": 3,
|
|
46
|
+
"total_tasks": 12,
|
|
47
|
+
"execution_groups": [{ "id": "P1", "type": "parallel", "count": 2 }],
|
|
48
|
+
"conflicts_resolved": 1,
|
|
49
|
+
"issues_queued": ["ISS-xxx", "ISS-yyy"]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Workflow
|
|
54
|
+
|
|
55
|
+
### Step 1: Generate Queue ID and Load Solutions
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Generate queue ID
|
|
59
|
+
QUEUE_ID="QUE-$(date -u +%Y%m%d-%H%M%S)"
|
|
60
|
+
|
|
61
|
+
# Load planned issues with bound solutions
|
|
62
|
+
ccw issue list --status planned --json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For each issue, extract:
|
|
66
|
+
- `id`, `bound_solution_id`, `priority`
|
|
67
|
+
- Read solution from `.workflow/issues/solutions/{issue-id}.jsonl`
|
|
68
|
+
- Collect `files_touched` from all tasks' `modification_points.file`
|
|
69
|
+
|
|
70
|
+
Build solution list:
|
|
71
|
+
```json
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
"issue_id": "ISS-xxx",
|
|
75
|
+
"solution_id": "SOL-xxx",
|
|
76
|
+
"task_count": 3,
|
|
77
|
+
"files_touched": ["src/auth.ts", "src/utils.ts"],
|
|
78
|
+
"priority": "medium"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 2: Spawn Queue Agent for Conflict Analysis
|
|
84
|
+
|
|
85
|
+
Spawn subagent to analyze conflicts and order solutions:
|
|
86
|
+
|
|
87
|
+
```javascript
|
|
88
|
+
const agentId = spawn_agent({
|
|
89
|
+
message: `
|
|
90
|
+
## TASK ASSIGNMENT
|
|
91
|
+
|
|
92
|
+
### MANDATORY FIRST STEPS (Agent Execute)
|
|
93
|
+
1. **Read role definition**: ~/.codex/agents/issue-queue-agent.md (MUST read first)
|
|
94
|
+
2. Read: .workflow/project-tech.json
|
|
95
|
+
3. Read: .workflow/project-guidelines.json
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
Goal: Order ${solutions.length} solutions into execution queue with conflict resolution
|
|
100
|
+
|
|
101
|
+
Scope:
|
|
102
|
+
- CAN DO: Analyze file conflicts, calculate priorities, assign groups
|
|
103
|
+
- CANNOT DO: Execute solutions, modify code
|
|
104
|
+
- Queue ID: ${QUEUE_ID}
|
|
105
|
+
|
|
106
|
+
Context:
|
|
107
|
+
- Solutions: ${JSON.stringify(solutions, null, 2)}
|
|
108
|
+
- Project Root: ${process.cwd()}
|
|
109
|
+
|
|
110
|
+
Deliverables:
|
|
111
|
+
1. Write queue JSON to: .workflow/issues/queues/${QUEUE_ID}.json
|
|
112
|
+
2. Update index: .workflow/issues/queues/index.json
|
|
113
|
+
3. Return summary JSON
|
|
114
|
+
|
|
115
|
+
Quality bar:
|
|
116
|
+
- No circular dependencies in DAG
|
|
117
|
+
- Parallel groups have NO file overlaps
|
|
118
|
+
- Semantic priority calculated (0.0-1.0)
|
|
119
|
+
- All conflicts resolved with rationale
|
|
120
|
+
`
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// Wait for agent completion
|
|
124
|
+
const result = wait({ ids: [agentId], timeout_ms: 600000 })
|
|
125
|
+
|
|
126
|
+
// Parse result
|
|
127
|
+
const summary = JSON.parse(result.status[agentId].completed)
|
|
128
|
+
|
|
129
|
+
// Check for clarifications
|
|
130
|
+
if (summary.clarifications?.length > 0) {
|
|
131
|
+
// Handle high-severity conflicts requiring user input
|
|
132
|
+
for (const clarification of summary.clarifications) {
|
|
133
|
+
console.log(`Conflict: ${clarification.question}`)
|
|
134
|
+
console.log(`Options: ${clarification.options.join(', ')}`)
|
|
135
|
+
// Get user input and send back
|
|
136
|
+
send_input({
|
|
137
|
+
id: agentId,
|
|
138
|
+
message: `Conflict ${clarification.conflict_id} resolved: ${userChoice}`
|
|
139
|
+
})
|
|
140
|
+
wait({ ids: [agentId], timeout_ms: 300000 })
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Close agent
|
|
145
|
+
close_agent({ id: agentId })
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Step 3: Multi-Queue Support (if --queues > 1)
|
|
149
|
+
|
|
150
|
+
When creating multiple parallel queues:
|
|
151
|
+
|
|
152
|
+
1. **Partition solutions** to minimize cross-queue file conflicts
|
|
153
|
+
2. **Spawn N agents in parallel** (one per queue)
|
|
154
|
+
3. **Wait for all agents** with batch wait
|
|
155
|
+
|
|
156
|
+
```javascript
|
|
157
|
+
// Partition solutions by file overlap
|
|
158
|
+
const partitions = partitionSolutions(solutions, numQueues)
|
|
159
|
+
|
|
160
|
+
// Spawn agents in parallel
|
|
161
|
+
const agentIds = partitions.map((partition, i) =>
|
|
162
|
+
spawn_agent({
|
|
163
|
+
message: buildQueuePrompt(partition, `${QUEUE_ID}-${i+1}`, i+1, numQueues)
|
|
164
|
+
})
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
// Batch wait for all agents
|
|
168
|
+
const results = wait({ ids: agentIds, timeout_ms: 600000 })
|
|
169
|
+
|
|
170
|
+
// Collect clarifications from all agents
|
|
171
|
+
const allClarifications = agentIds.flatMap((id, i) =>
|
|
172
|
+
(results.status[id].clarifications || []).map(c => ({ ...c, queue_id: `${QUEUE_ID}-${i+1}`, agent_id: id }))
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
// Handle clarifications, then close all agents
|
|
176
|
+
agentIds.forEach(id => close_agent({ id }))
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Step 4: Update Issue Statuses
|
|
180
|
+
|
|
181
|
+
**MUST use CLI command:**
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Batch update from queue (recommended)
|
|
185
|
+
ccw issue update --from-queue ${QUEUE_ID}
|
|
186
|
+
|
|
187
|
+
# Or individual update
|
|
188
|
+
ccw issue update <issue-id> --status queued
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Step 5: Active Queue Check
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
ccw issue queue list --brief
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Decision:**
|
|
198
|
+
- If no active queue: `ccw issue queue switch ${QUEUE_ID}`
|
|
199
|
+
- If active queue exists: Present options to user
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
Active queue exists. Choose action:
|
|
203
|
+
1. Merge into existing queue
|
|
204
|
+
2. Use new queue (keep existing in history)
|
|
205
|
+
3. Cancel (delete new queue)
|
|
206
|
+
|
|
207
|
+
Select (1-3):
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Step 6: Output Summary
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
## Queue Formed: ${QUEUE_ID}
|
|
214
|
+
|
|
215
|
+
**Solutions**: 5
|
|
216
|
+
**Tasks**: 18
|
|
217
|
+
**Execution Groups**: 3
|
|
218
|
+
|
|
219
|
+
### Execution Order
|
|
220
|
+
| # | Item | Issue | Tasks | Group | Files |
|
|
221
|
+
|---|------|-------|-------|-------|-------|
|
|
222
|
+
| 1 | S-1 | ISS-001 | 3 | P1 | src/auth.ts |
|
|
223
|
+
| 2 | S-2 | ISS-002 | 2 | P1 | src/api.ts |
|
|
224
|
+
| 3 | S-3 | ISS-003 | 4 | S2 | src/auth.ts |
|
|
225
|
+
|
|
226
|
+
### Conflicts Resolved
|
|
227
|
+
- src/auth.ts: S-1 → S-3 (sequential, S-1 creates module)
|
|
228
|
+
|
|
229
|
+
**Next Step**: `/issue:execute --queue ${QUEUE_ID}`
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Subagent Role Reference
|
|
233
|
+
|
|
234
|
+
Queue agent uses role file at: `~/.codex/agents/issue-queue-agent.md`
|
|
235
|
+
|
|
236
|
+
Role capabilities:
|
|
237
|
+
- File conflict detection (5 types)
|
|
238
|
+
- Dependency DAG construction
|
|
239
|
+
- Semantic priority calculation
|
|
240
|
+
- Execution group assignment
|
|
241
|
+
|
|
242
|
+
## Queue File Schema
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"id": "QUE-20251228-120000",
|
|
247
|
+
"status": "active",
|
|
248
|
+
"issue_ids": ["ISS-001", "ISS-002"],
|
|
249
|
+
"solutions": [
|
|
250
|
+
{
|
|
251
|
+
"item_id": "S-1",
|
|
252
|
+
"issue_id": "ISS-001",
|
|
253
|
+
"solution_id": "SOL-ISS-001-1",
|
|
254
|
+
"status": "pending",
|
|
255
|
+
"execution_order": 1,
|
|
256
|
+
"execution_group": "P1",
|
|
257
|
+
"depends_on": [],
|
|
258
|
+
"semantic_priority": 0.8,
|
|
259
|
+
"files_touched": ["src/auth.ts"],
|
|
260
|
+
"task_count": 3
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"conflicts": [...],
|
|
264
|
+
"execution_groups": [...]
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Quality Checklist
|
|
269
|
+
|
|
270
|
+
Before completing, verify:
|
|
271
|
+
|
|
272
|
+
- [ ] Exactly 2 files generated: queue JSON + index update
|
|
273
|
+
- [ ] Queue has valid DAG (no circular dependencies)
|
|
274
|
+
- [ ] All file conflicts resolved with rationale
|
|
275
|
+
- [ ] Semantic priority calculated for each solution (0.0-1.0)
|
|
276
|
+
- [ ] Execution groups assigned (P* for parallel, S* for sequential)
|
|
277
|
+
- [ ] Issue statuses updated to `queued`
|
|
278
|
+
- [ ] All subagents closed after completion
|
|
279
|
+
|
|
280
|
+
## Error Handling
|
|
281
|
+
|
|
282
|
+
| Situation | Action |
|
|
283
|
+
|-----------|--------|
|
|
284
|
+
| No planned issues | Return empty queue summary |
|
|
285
|
+
| Circular dependency detected | Abort, report cycle details |
|
|
286
|
+
| Missing solution file | Skip issue, log warning |
|
|
287
|
+
| Agent timeout | Retry with increased timeout |
|
|
288
|
+
| Clarification rejected | Abort queue formation |
|
|
289
|
+
|
|
290
|
+
## Start Execution
|
|
291
|
+
|
|
292
|
+
Begin by listing planned issues:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
ccw issue list --status planned --json
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Then extract solution data and spawn queue agent.
|