claude-code-workflow 6.3.28 → 6.3.29
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/issue/execute.md +133 -18
- package/.claude/commands/workflow/debug.md +6 -0
- package/.claude/commands/workflow/execute.md +4 -0
- package/.claude/commands/workflow/lite-execute.md +4 -0
- package/.claude/commands/workflow/lite-lite-lite.md +179 -544
- package/.claude/commands/workflow/review-fix.md +4 -0
- package/.claude/commands/workflow/test-cycle-execute.md +4 -0
- package/.codex/prompts/issue-execute.md +72 -12
- package/README.md +3 -0
- package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner.js +56 -3
- package/ccw/dist/core/lite-scanner.js.map +1 -1
- package/ccw/dist/tools/memory-update-queue.d.ts.map +1 -1
- package/ccw/dist/tools/memory-update-queue.js +5 -11
- package/ccw/dist/tools/memory-update-queue.js.map +1 -1
- package/ccw/src/core/lite-scanner.ts +58 -3
- package/ccw/src/templates/dashboard-css/03-tasks.css +5 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +630 -1
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +30 -21
- package/ccw/src/templates/dashboard-js/i18n.js +100 -0
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +1138 -334
- package/ccw/src/tools/memory-update-queue.js +5 -11
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute
|
|
3
3
|
description: Execute queue with DAG-based parallel orchestration (one commit per solution)
|
|
4
|
-
argument-hint: "
|
|
4
|
+
argument-hint: "--queue <queue-id> [--worktree [<existing-path>]]"
|
|
5
5
|
allowed-tools: TodoWrite(*), Bash(*), Read(*), AskUserQuestion(*)
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -19,14 +19,57 @@ Minimal orchestrator that dispatches **solution IDs** to executors. Each executo
|
|
|
19
19
|
- **Executor handles all tasks within a solution sequentially**
|
|
20
20
|
- **Single worktree for entire queue**: One worktree isolates ALL queue execution from main workspace
|
|
21
21
|
|
|
22
|
+
## Queue ID Requirement (MANDATORY)
|
|
23
|
+
|
|
24
|
+
**Queue ID is REQUIRED.** You MUST specify which queue to execute via `--queue <queue-id>`.
|
|
25
|
+
|
|
26
|
+
### If Queue ID Not Provided
|
|
27
|
+
|
|
28
|
+
When `--queue` parameter is missing, you MUST:
|
|
29
|
+
|
|
30
|
+
1. **List available queues** by running:
|
|
31
|
+
```javascript
|
|
32
|
+
const result = Bash('ccw issue queue list --brief --json');
|
|
33
|
+
const index = JSON.parse(result);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. **Display available queues** to user:
|
|
37
|
+
```
|
|
38
|
+
Available Queues:
|
|
39
|
+
ID Status Progress Issues
|
|
40
|
+
-----------------------------------------------------------
|
|
41
|
+
→ QUE-20251215-001 active 3/10 ISS-001, ISS-002
|
|
42
|
+
QUE-20251210-002 active 0/5 ISS-003
|
|
43
|
+
QUE-20251205-003 completed 8/8 ISS-004
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. **Stop and ask user** to specify which queue to execute:
|
|
47
|
+
```javascript
|
|
48
|
+
AskUserQuestion({
|
|
49
|
+
questions: [{
|
|
50
|
+
question: "Which queue would you like to execute?",
|
|
51
|
+
header: "Queue",
|
|
52
|
+
multiSelect: false,
|
|
53
|
+
options: index.queues
|
|
54
|
+
.filter(q => q.status === 'active')
|
|
55
|
+
.map(q => ({
|
|
56
|
+
label: q.id,
|
|
57
|
+
description: `${q.status}, ${q.completed_solutions || 0}/${q.total_solutions || 0} completed, Issues: ${q.issue_ids.join(', ')}`
|
|
58
|
+
}))
|
|
59
|
+
}]
|
|
60
|
+
})
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
4. **After user selection**, continue execution with the selected queue ID.
|
|
64
|
+
|
|
65
|
+
**DO NOT auto-select queues.** Explicit user confirmation is required to prevent accidental execution of wrong queue.
|
|
66
|
+
|
|
22
67
|
## Usage
|
|
23
68
|
|
|
24
69
|
```bash
|
|
25
|
-
/issue:execute
|
|
26
|
-
/issue:execute --queue QUE-xxx
|
|
27
|
-
/issue:execute --
|
|
28
|
-
/issue:execute --worktree --queue QUE-xxx
|
|
29
|
-
/issue:execute --worktree /path/to/existing/worktree # Resume in existing worktree
|
|
70
|
+
/issue:execute --queue QUE-xxx # Execute specific queue (REQUIRED)
|
|
71
|
+
/issue:execute --queue QUE-xxx --worktree # Execute in isolated worktree
|
|
72
|
+
/issue:execute --queue QUE-xxx --worktree /path/to/existing/worktree # Resume
|
|
30
73
|
```
|
|
31
74
|
|
|
32
75
|
**Parallelism**: Determined automatically by task dependency DAG (no manual control)
|
|
@@ -44,13 +87,18 @@ Minimal orchestrator that dispatches **solution IDs** to executors. Each executo
|
|
|
44
87
|
## Execution Flow
|
|
45
88
|
|
|
46
89
|
```
|
|
47
|
-
Phase 0
|
|
90
|
+
Phase 0: Validate Queue ID (REQUIRED)
|
|
91
|
+
├─ If --queue provided → use specified queue
|
|
92
|
+
├─ If --queue missing → list queues, prompt user to select
|
|
93
|
+
└─ Store QUEUE_ID for all subsequent commands
|
|
94
|
+
|
|
95
|
+
Phase 0.5 (if --worktree): Setup Queue Worktree
|
|
48
96
|
├─ Create ONE worktree for entire queue: .ccw/worktrees/queue-<timestamp>
|
|
49
97
|
├─ All subsequent execution happens in this worktree
|
|
50
98
|
└─ Main workspace remains clean and untouched
|
|
51
99
|
|
|
52
100
|
Phase 1: Get DAG & User Selection
|
|
53
|
-
├─ ccw issue queue dag
|
|
101
|
+
├─ ccw issue queue dag --queue ${QUEUE_ID} → { parallel_batches: [["S-1","S-2"], ["S-3"]] }
|
|
54
102
|
└─ AskUserQuestion → executor type (codex|gemini|agent), dry-run mode, worktree mode
|
|
55
103
|
|
|
56
104
|
Phase 2: Dispatch Parallel Batch (DAG-driven)
|
|
@@ -75,11 +123,65 @@ Phase 4 (if --worktree): Worktree Completion
|
|
|
75
123
|
|
|
76
124
|
## Implementation
|
|
77
125
|
|
|
126
|
+
### Phase 0: Validate Queue ID
|
|
127
|
+
|
|
128
|
+
```javascript
|
|
129
|
+
// Check if --queue was provided
|
|
130
|
+
let QUEUE_ID = args.queue;
|
|
131
|
+
|
|
132
|
+
if (!QUEUE_ID) {
|
|
133
|
+
// List available queues
|
|
134
|
+
const listResult = Bash('ccw issue queue list --brief --json').trim();
|
|
135
|
+
const index = JSON.parse(listResult);
|
|
136
|
+
|
|
137
|
+
if (index.queues.length === 0) {
|
|
138
|
+
console.log('No queues found. Use /issue:queue to create one first.');
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Filter active queues only
|
|
143
|
+
const activeQueues = index.queues.filter(q => q.status === 'active');
|
|
144
|
+
|
|
145
|
+
if (activeQueues.length === 0) {
|
|
146
|
+
console.log('No active queues found.');
|
|
147
|
+
console.log('Available queues:', index.queues.map(q => `${q.id} (${q.status})`).join(', '));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Display and prompt user
|
|
152
|
+
console.log('\nAvailable Queues:');
|
|
153
|
+
console.log('ID'.padEnd(22) + 'Status'.padEnd(12) + 'Progress'.padEnd(12) + 'Issues');
|
|
154
|
+
console.log('-'.repeat(70));
|
|
155
|
+
for (const q of index.queues) {
|
|
156
|
+
const marker = q.id === index.active_queue_id ? '→ ' : ' ';
|
|
157
|
+
console.log(marker + q.id.padEnd(20) + q.status.padEnd(12) +
|
|
158
|
+
`${q.completed_solutions || 0}/${q.total_solutions || 0}`.padEnd(12) +
|
|
159
|
+
q.issue_ids.join(', '));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const answer = AskUserQuestion({
|
|
163
|
+
questions: [{
|
|
164
|
+
question: "Which queue would you like to execute?",
|
|
165
|
+
header: "Queue",
|
|
166
|
+
multiSelect: false,
|
|
167
|
+
options: activeQueues.map(q => ({
|
|
168
|
+
label: q.id,
|
|
169
|
+
description: `${q.completed_solutions || 0}/${q.total_solutions || 0} completed, Issues: ${q.issue_ids.join(', ')}`
|
|
170
|
+
}))
|
|
171
|
+
}]
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
QUEUE_ID = answer['Queue'];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
console.log(`\n## Executing Queue: ${QUEUE_ID}\n`);
|
|
178
|
+
```
|
|
179
|
+
|
|
78
180
|
### Phase 1: Get DAG & User Selection
|
|
79
181
|
|
|
80
182
|
```javascript
|
|
81
|
-
// Get dependency graph and parallel batches
|
|
82
|
-
const dagJson = Bash(`ccw issue queue dag`).trim();
|
|
183
|
+
// Get dependency graph and parallel batches (QUEUE_ID required)
|
|
184
|
+
const dagJson = Bash(`ccw issue queue dag --queue ${QUEUE_ID}`).trim();
|
|
83
185
|
const dag = JSON.parse(dagJson);
|
|
84
186
|
|
|
85
187
|
if (dag.error || dag.ready_count === 0) {
|
|
@@ -298,8 +400,8 @@ ccw issue done ${solutionId} --fail --reason '{"task_id": "TX", "error_type": "t
|
|
|
298
400
|
### Phase 3: Check Next Batch
|
|
299
401
|
|
|
300
402
|
```javascript
|
|
301
|
-
// Refresh DAG after batch completes
|
|
302
|
-
const refreshedDag = JSON.parse(Bash(`ccw issue queue dag`).trim());
|
|
403
|
+
// Refresh DAG after batch completes (use same QUEUE_ID)
|
|
404
|
+
const refreshedDag = JSON.parse(Bash(`ccw issue queue dag --queue ${QUEUE_ID}`).trim());
|
|
303
405
|
|
|
304
406
|
console.log(`
|
|
305
407
|
## Batch Complete
|
|
@@ -309,9 +411,9 @@ console.log(`
|
|
|
309
411
|
`);
|
|
310
412
|
|
|
311
413
|
if (refreshedDag.ready_count > 0) {
|
|
312
|
-
console.log(
|
|
414
|
+
console.log(`Run \`/issue:execute --queue ${QUEUE_ID}\` again for next batch.`);
|
|
313
415
|
// Note: If resuming, pass existing worktree path:
|
|
314
|
-
// /issue:execute --worktree <worktreePath>
|
|
416
|
+
// /issue:execute --queue ${QUEUE_ID} --worktree <worktreePath>
|
|
315
417
|
}
|
|
316
418
|
```
|
|
317
419
|
|
|
@@ -367,10 +469,12 @@ if (useWorktree && refreshedDag.ready_count === 0 && refreshedDag.completed_coun
|
|
|
367
469
|
┌─────────────────────────────────────────────────────────────────┐
|
|
368
470
|
│ Orchestrator │
|
|
369
471
|
├─────────────────────────────────────────────────────────────────┤
|
|
370
|
-
│ 0.
|
|
472
|
+
│ 0. Validate QUEUE_ID (required, or prompt user to select) │
|
|
473
|
+
│ │
|
|
474
|
+
│ 0.5 (if --worktree) Create ONE worktree for entire queue │
|
|
371
475
|
│ → .ccw/worktrees/queue-exec-<queue-id> │
|
|
372
476
|
│ │
|
|
373
|
-
│ 1. ccw issue queue dag
|
|
477
|
+
│ 1. ccw issue queue dag --queue ${QUEUE_ID} │
|
|
374
478
|
│ → { parallel_batches: [["S-1","S-2"], ["S-3"]] } │
|
|
375
479
|
│ │
|
|
376
480
|
│ 2. Dispatch batch 1 (parallel, SAME worktree): │
|
|
@@ -405,8 +509,19 @@ if (useWorktree && refreshedDag.ready_count === 0 && refreshedDag.completed_coun
|
|
|
405
509
|
|
|
406
510
|
## CLI Endpoint Contract
|
|
407
511
|
|
|
408
|
-
### `ccw issue queue
|
|
409
|
-
Returns
|
|
512
|
+
### `ccw issue queue list --brief --json`
|
|
513
|
+
Returns queue index for selection (used when --queue not provided):
|
|
514
|
+
```json
|
|
515
|
+
{
|
|
516
|
+
"active_queue_id": "QUE-20251215-001",
|
|
517
|
+
"queues": [
|
|
518
|
+
{ "id": "QUE-20251215-001", "status": "active", "issue_ids": ["ISS-001"], "total_solutions": 5, "completed_solutions": 2 }
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### `ccw issue queue dag --queue <queue-id>`
|
|
524
|
+
Returns dependency graph with parallel batches (solution-level, **--queue required**):
|
|
410
525
|
```json
|
|
411
526
|
{
|
|
412
527
|
"queue_id": "QUE-...",
|
|
@@ -311,6 +311,12 @@ Output:
|
|
|
311
311
|
└─ .workflow/.debug/DBG-{slug}-{date}/debug.log
|
|
312
312
|
```
|
|
313
313
|
|
|
314
|
+
## Post-Completion Expansion
|
|
315
|
+
|
|
316
|
+
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
314
320
|
## Error Handling
|
|
315
321
|
|
|
316
322
|
| Situation | Action |
|
|
@@ -275,6 +275,10 @@ AskUserQuestion({
|
|
|
275
275
|
- **"Enter Review"**: Execute `/workflow:review`
|
|
276
276
|
- **"Complete Session"**: Execute `/workflow:session:complete`
|
|
277
277
|
|
|
278
|
+
### Post-Completion Expansion
|
|
279
|
+
|
|
280
|
+
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`
|
|
281
|
+
|
|
278
282
|
## Execution Strategy (IMPL_PLAN-Driven)
|
|
279
283
|
|
|
280
284
|
### Strategy Priority
|
|
@@ -664,6 +664,10 @@ Collected after each execution call completes:
|
|
|
664
664
|
|
|
665
665
|
Appended to `previousExecutionResults` array for context continuity in multi-execution scenarios.
|
|
666
666
|
|
|
667
|
+
## Post-Completion Expansion
|
|
668
|
+
|
|
669
|
+
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`
|
|
670
|
+
|
|
667
671
|
**Fixed ID Pattern**: `${sessionId}-${groupId}` enables predictable lookup without auto-generated timestamps.
|
|
668
672
|
|
|
669
673
|
**Resume Usage**: If `status` is "partial" or "failed", use `fixedCliId` to resume:
|