claude-code-workflow 6.3.7 → 6.3.8

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.
@@ -84,15 +84,15 @@ Phase 4: Completion
84
84
  const queueJson = Bash(`ccw issue status --json 2>/dev/null || echo '{}'`);
85
85
  const queue = JSON.parse(queueJson);
86
86
 
87
- if (!queue.id || queue.queue?.length === 0) {
87
+ if (!queue.id || queue.tasks?.length === 0) {
88
88
  console.log('No active queue found. Run /issue:queue first.');
89
89
  return;
90
90
  }
91
91
 
92
92
  // Count by status
93
- const pending = queue.queue.filter(q => q.status === 'pending');
94
- const executing = queue.queue.filter(q => q.status === 'executing');
95
- const completed = queue.queue.filter(q => q.status === 'completed');
93
+ const pending = queue.tasks.filter(q => q.status === 'pending');
94
+ const executing = queue.tasks.filter(q => q.status === 'executing');
95
+ const completed = queue.tasks.filter(q => q.status === 'completed');
96
96
 
97
97
  console.log(`
98
98
  ## Execution Queue Status
@@ -100,7 +100,7 @@ console.log(`
100
100
  - Pending: ${pending.length}
101
101
  - Executing: ${executing.length}
102
102
  - Completed: ${completed.length}
103
- - Total: ${queue.queue.length}
103
+ - Total: ${queue.tasks.length}
104
104
  `);
105
105
 
106
106
  if (pending.length === 0 && executing.length === 0) {
@@ -115,10 +115,10 @@ if (pending.length === 0 && executing.length === 0) {
115
115
  // Find ready tasks (dependencies satisfied)
116
116
  function getReadyTasks() {
117
117
  const completedIds = new Set(
118
- queue.queue.filter(q => q.status === 'completed').map(q => q.queue_id)
118
+ queue.tasks.filter(q => q.status === 'completed').map(q => q.item_id)
119
119
  );
120
120
 
121
- return queue.queue.filter(item => {
121
+ return queue.tasks.filter(item => {
122
122
  if (item.status !== 'pending') return false;
123
123
  return item.depends_on.every(depId => completedIds.has(depId));
124
124
  });
@@ -143,9 +143,9 @@ readyTasks.sort((a, b) => a.execution_order - b.execution_order);
143
143
  // Initialize TodoWrite
144
144
  TodoWrite({
145
145
  todos: readyTasks.slice(0, parallelLimit).map(t => ({
146
- content: `[${t.queue_id}] ${t.issue_id}:${t.task_id}`,
146
+ content: `[${t.item_id}] ${t.issue_id}:${t.task_id}`,
147
147
  status: 'pending',
148
- activeForm: `Executing ${t.queue_id}`
148
+ activeForm: `Executing ${t.item_id}`
149
149
  }))
150
150
  });
151
151
  ```
@@ -209,7 +209,7 @@ This returns JSON with full lifecycle definition:
209
209
  ### Step 3: Report Completion
210
210
  When ALL phases complete successfully:
211
211
  \`\`\`bash
212
- ccw issue complete <queue_id> --result '{
212
+ ccw issue complete <item_id> --result '{
213
213
  "files_modified": ["path1", "path2"],
214
214
  "tests_passed": true,
215
215
  "regression_passed": true,
@@ -222,7 +222,7 @@ ccw issue complete <queue_id> --result '{
222
222
 
223
223
  If any phase fails and cannot be fixed:
224
224
  \`\`\`bash
225
- ccw issue fail <queue_id> --reason "Phase X failed: <details>"
225
+ ccw issue fail <item_id> --reason "Phase X failed: <details>"
226
226
  \`\`\`
227
227
 
228
228
  ### Rules
@@ -241,12 +241,12 @@ Begin by running: ccw issue next
241
241
 
242
242
  if (executor === 'codex') {
243
243
  Bash(
244
- `ccw cli -p "${escapePrompt(codexPrompt)}" --tool codex --mode write --id exec-${queueItem.queue_id}`,
244
+ `ccw cli -p "${escapePrompt(codexPrompt)}" --tool codex --mode write --id exec-${queueItem.item_id}`,
245
245
  timeout=3600000 // 1 hour timeout
246
246
  );
247
247
  } else if (executor === 'gemini') {
248
248
  Bash(
249
- `ccw cli -p "${escapePrompt(codexPrompt)}" --tool gemini --mode write --id exec-${queueItem.queue_id}`,
249
+ `ccw cli -p "${escapePrompt(codexPrompt)}" --tool gemini --mode write --id exec-${queueItem.item_id}`,
250
250
  timeout=1800000 // 30 min timeout
251
251
  );
252
252
  } else {
@@ -254,7 +254,7 @@ Begin by running: ccw issue next
254
254
  Task(
255
255
  subagent_type="code-developer",
256
256
  run_in_background=false,
257
- description=`Execute ${queueItem.queue_id}`,
257
+ description=`Execute ${queueItem.item_id}`,
258
258
  prompt=codexPrompt
259
259
  );
260
260
  }
@@ -267,23 +267,23 @@ for (let i = 0; i < readyTasks.length; i += parallelLimit) {
267
267
  const batch = readyTasks.slice(i, i + parallelLimit);
268
268
 
269
269
  console.log(`\n### Executing Batch ${Math.floor(i / parallelLimit) + 1}`);
270
- console.log(batch.map(t => `- ${t.queue_id}: ${t.issue_id}:${t.task_id}`).join('\n'));
270
+ console.log(batch.map(t => `- ${t.item_id}: ${t.issue_id}:${t.task_id}`).join('\n'));
271
271
 
272
272
  if (parallelLimit === 1) {
273
273
  // Sequential execution
274
274
  for (const task of batch) {
275
- updateTodo(task.queue_id, 'in_progress');
275
+ updateTodo(task.item_id, 'in_progress');
276
276
  await executeTask(task);
277
- updateTodo(task.queue_id, 'completed');
277
+ updateTodo(task.item_id, 'completed');
278
278
  }
279
279
  } else {
280
280
  // Parallel execution - launch all at once
281
281
  const executions = batch.map(task => {
282
- updateTodo(task.queue_id, 'in_progress');
282
+ updateTodo(task.item_id, 'in_progress');
283
283
  return executeTask(task);
284
284
  });
285
285
  await Promise.all(executions);
286
- batch.forEach(task => updateTodo(task.queue_id, 'completed'));
286
+ batch.forEach(task => updateTodo(task.item_id, 'completed'));
287
287
  }
288
288
 
289
289
  // Refresh ready tasks after batch
@@ -300,7 +300,7 @@ When codex calls `ccw issue next`, it receives:
300
300
 
301
301
  ```json
302
302
  {
303
- "queue_id": "Q-001",
303
+ "item_id": "T-1",
304
304
  "issue_id": "GH-123",
305
305
  "solution_id": "SOL-001",
306
306
  "task": {
@@ -358,11 +358,11 @@ console.log(`
358
358
  **Pending**: ${summary.pending_count}
359
359
 
360
360
  ### Task Results
361
- ${(finalQueue.queue || []).map(q => {
361
+ ${(finalQueue.tasks || []).map(q => {
362
362
  const icon = q.status === 'completed' ? '✓' :
363
363
  q.status === 'failed' ? '✗' :
364
364
  q.status === 'executing' ? '⟳' : '○';
365
- return `${icon} ${q.queue_id} [${q.issue_id}:${q.task_id}] - ${q.status}`;
365
+ return `${icon} ${q.item_id} [${q.issue_id}:${q.task_id}] - ${q.status}`;
366
366
  }).join('\n')}
367
367
  `);
368
368
 
@@ -385,7 +385,7 @@ if (flags.dryRun) {
385
385
  ## Dry Run - Would Execute
386
386
 
387
387
  ${readyTasks.map((t, i) => `
388
- ${i + 1}. ${t.queue_id}
388
+ ${i + 1}. ${t.item_id}
389
389
  Issue: ${t.issue_id}
390
390
  Task: ${t.task_id}
391
391
  Executor: ${t.assigned_executor}
@@ -406,7 +406,32 @@ No changes made. Remove --dry-run to execute.
406
406
  | No ready tasks | Check dependencies, show blocked tasks |
407
407
  | Codex timeout | Mark as failed, allow retry |
408
408
  | ccw issue next empty | All tasks done or blocked |
409
- | Task execution failure | Marked via ccw issue fail |
409
+ | Task execution failure | Marked via ccw issue fail, use `ccw issue retry` to reset |
410
+
411
+ ## Troubleshooting
412
+
413
+ ### Interrupted Tasks
414
+
415
+ If execution was interrupted (crashed/stopped), `ccw issue next` will automatically resume:
416
+
417
+ ```bash
418
+ # Automatically returns the executing task for resumption
419
+ ccw issue next
420
+ ```
421
+
422
+ Tasks in `executing` status are prioritized and returned first, no manual reset needed.
423
+
424
+ ### Failed Tasks
425
+
426
+ If a task failed and you want to retry:
427
+
428
+ ```bash
429
+ # Reset all failed tasks to pending
430
+ ccw issue retry
431
+
432
+ # Reset failed tasks for specific issue
433
+ ccw issue retry <issue-id>
434
+ ```
410
435
 
411
436
  ## Endpoint Contract
412
437
 
@@ -415,16 +440,20 @@ No changes made. Remove --dry-run to execute.
415
440
  - Marks task as 'executing'
416
441
  - Returns `{ status: 'empty' }` when no tasks
417
442
 
418
- ### `ccw issue complete <queue-id>`
443
+ ### `ccw issue complete <item-id>`
419
444
  - Marks task as 'completed'
420
445
  - Updates queue.json
421
446
  - Checks if issue is fully complete
422
447
 
423
- ### `ccw issue fail <queue-id>`
448
+ ### `ccw issue fail <item-id>`
424
449
  - Marks task as 'failed'
425
450
  - Records failure reason
426
451
  - Allows retry via /issue:execute
427
452
 
453
+ ### `ccw issue retry [issue-id]`
454
+ - Resets failed tasks to 'pending'
455
+ - Allows re-execution via `ccw issue next`
456
+
428
457
  ## Related Commands
429
458
 
430
459
  - `/issue:plan` - Plan issues with solutions