Skip to content

Commit 19fb4d8

Browse files
author
catlog22
committed
fix: add -y auto mode bypass for all ccw-coordinator referenced skills
Harmonize orchestrator files (ccw.md, ccw-coordinator.md) with cross-file consistency fixes, and add missing -y/--yes non-interactive bypass gates to 7 skills that declared auto mode support but had blocking AskUserQuestion calls: team-planex, issue:discover, issue:plan, issue:queue, issue:execute, workflow:debug-with-file, issue:from-brainstorm.
1 parent 65763c7 commit 19fb4d8

9 files changed

Lines changed: 427 additions & 852 deletions

File tree

.claude/commands/ccw-coordinator.md

Lines changed: 214 additions & 596 deletions
Large diffs are not rendered by default.

.claude/commands/ccw.md

Lines changed: 109 additions & 224 deletions
Large diffs are not rendered by default.

.claude/commands/issue/discover.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,17 @@ await updateDiscoveryState(outputDir, {
252252
const hasHighPriority = issues.some(i => i.priority === 'critical' || i.priority === 'high');
253253
const hasMediumFindings = prioritizedFindings.some(f => f.priority === 'medium');
254254

255+
// Auto mode: auto-select recommended action
256+
if (autoYes) {
257+
if (hasHighPriority) {
258+
await appendJsonl('.workflow/issues/issues.jsonl', issues);
259+
console.log(`Exported ${issues.length} issues. Run /issue:plan to continue.`);
260+
} else {
261+
console.log('Discovery complete. No significant issues found.');
262+
}
263+
return;
264+
}
265+
255266
await AskUserQuestion({
256267
questions: [{
257268
question: `Discovery complete: ${issues.length} issues generated, ${prioritizedFindings.length} total findings. What would you like to do next?`,

.claude/commands/issue/execute.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ if (!QUEUE_ID) {
152152
return;
153153
}
154154

155+
// Auto mode: auto-select if exactly one active queue
156+
if (autoYes && activeQueues.length === 1) {
157+
QUEUE_ID = activeQueues[0].id;
158+
console.log(`Auto-selected queue: ${QUEUE_ID}`);
159+
} else {
160+
155161
// Display and prompt user
156162
console.log('\nAvailable Queues:');
157163
console.log('ID'.padEnd(22) + 'Status'.padEnd(12) + 'Progress'.padEnd(12) + 'Issues');
@@ -176,6 +182,7 @@ if (!QUEUE_ID) {
176182
});
177183

178184
QUEUE_ID = answer['Queue'];
185+
} // end else (multi-queue prompt)
179186
}
180187

181188
console.log(`\n## Executing Queue: ${QUEUE_ID}\n`);
@@ -203,6 +210,13 @@ console.log(`
203210
- Parallel in batch 1: ${dag.parallel_batches[0]?.length || 0}
204211
`);
205212
213+
// Auto mode: use recommended defaults (Codex + Execute + Worktree)
214+
if (autoYes) {
215+
var executor = 'codex';
216+
var isDryRun = false;
217+
var useWorktree = true;
218+
} else {
219+
206220
// Interactive selection via AskUserQuestion
207221
const answer = AskUserQuestion({
208222
questions: [
@@ -237,9 +251,10 @@ const answer = AskUserQuestion({
237251
]
238252
});
239253
240-
const executor = answer['Executor'].toLowerCase().split(' ')[0]; // codex|gemini|agent
241-
const isDryRun = answer['Mode'].includes('Dry-run');
242-
const useWorktree = answer['Worktree'].includes('Yes');
254+
var executor = answer['Executor'].toLowerCase().split(' ')[0]; // codex|gemini|agent
255+
var isDryRun = answer['Mode'].includes('Dry-run');
256+
var useWorktree = answer['Worktree'].includes('Yes');
257+
} // end else (interactive selection)
243258
244259
// Dry run mode
245260
if (isDryRun) {
@@ -451,27 +466,33 @@ if (refreshedDag.ready_count > 0) {
451466
if (useWorktree && refreshedDag.ready_count === 0 && refreshedDag.completed_count === refreshedDag.total) {
452467
console.log('\n## All Solutions Completed - Worktree Cleanup');
453468
454-
const answer = AskUserQuestion({
455-
questions: [{
456-
question: `Queue complete. What to do with worktree branch "${worktreeBranch}"?`,
457-
header: 'Merge',
458-
multiSelect: false,
459-
options: [
460-
{ label: 'Create PR (Recommended)', description: 'Push branch and create pull request' },
461-
{ label: 'Merge to main', description: 'Merge all commits and cleanup worktree' },
462-
{ label: 'Keep branch', description: 'Cleanup worktree, keep branch for manual handling' }
463-
]
464-
}]
465-
});
469+
// Auto mode: Create PR (recommended)
470+
if (autoYes) {
471+
var mergeAction = 'Create PR';
472+
} else {
473+
const answer = AskUserQuestion({
474+
questions: [{
475+
question: `Queue complete. What to do with worktree branch "${worktreeBranch}"?`,
476+
header: 'Merge',
477+
multiSelect: false,
478+
options: [
479+
{ label: 'Create PR (Recommended)', description: 'Push branch and create pull request' },
480+
{ label: 'Merge to main', description: 'Merge all commits and cleanup worktree' },
481+
{ label: 'Keep branch', description: 'Cleanup worktree, keep branch for manual handling' }
482+
]
483+
}]
484+
});
485+
var mergeAction = answer['Merge'];
486+
}
466487
467488
const repoRoot = Bash('git rev-parse --show-toplevel').trim();
468489
469-
if (answer['Merge'].includes('Create PR')) {
490+
if (mergeAction.includes('Create PR')) {
470491
Bash(`git -C "${worktreePath}" push -u origin "${worktreeBranch}"`);
471492
Bash(`gh pr create --title "Queue ${dag.queue_id}" --body "Issue queue execution - all solutions completed" --head "${worktreeBranch}"`);
472493
Bash(`git worktree remove "${worktreePath}"`);
473494
console.log(`PR created for branch: ${worktreeBranch}`);
474-
} else if (answer['Merge'].includes('Merge to main')) {
495+
} else if (mergeAction.includes('Merge to main')) {
475496
// Check main is clean
476497
const mainDirty = Bash('git status --porcelain').trim();
477498
if (mainDirty) {

.claude/commands/issue/from-brainstorm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ Phase 6: Bind Solution
154154
├─ Update issue status to 'planned'
155155
└─ Returns: SOL-{issue-id}-{uid}
156156
157-
Phase 7: Next Steps
158-
└─ Offer: Form queue | Convert another idea | View details | Done
157+
Phase 7: Next Steps (skip in auto mode)
158+
└─ Auto mode: complete directly | Interactive: Form queue | Convert another | Done
159159
```
160160

161161
## Context Enrichment Logic

.claude/commands/issue/plan.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ for (let i = 0; i < agentTasks.length; i += MAX_PARALLEL) {
263263
for (const pending of pendingSelections) {
264264
if (pending.solutions.length === 0) continue;
265265
266+
// Auto mode: auto-bind first (highest-ranked) solution
267+
if (autoYes) {
268+
const solId = pending.solutions[0].id;
269+
Bash(`ccw issue bind ${pending.issue_id} ${solId}`);
270+
console.log(`${pending.issue_id}: ${solId} bound (auto)`);
271+
continue;
272+
}
273+
266274
const options = pending.solutions.slice(0, 4).map(sol => ({
267275
label: `${sol.id} (${sol.task_count} tasks)`,
268276
description: sol.description || sol.approach || 'No description'

.claude/commands/issue/queue.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,17 @@ const allClarifications = results.flatMap((r, i) =>
273273
```javascript
274274
if (allClarifications.length > 0) {
275275
for (const clarification of allClarifications) {
276+
// Auto mode: use recommended resolution (first option)
277+
if (autoYes) {
278+
const autoAnswer = clarification.options[0]?.label || 'skip';
279+
Task(
280+
subagent_type="issue-queue-agent",
281+
resume=clarification.agent_id,
282+
prompt=`Conflict ${clarification.conflict_id} resolved: ${autoAnswer}`
283+
);
284+
continue;
285+
}
286+
276287
// Present to user via AskUserQuestion
277288
const answer = AskUserQuestion({
278289
questions: [{
@@ -345,6 +356,14 @@ ccw issue queue list --brief
345356
346357
**AskUserQuestion:**
347358
```javascript
359+
// Auto mode: merge into existing queue
360+
if (autoYes) {
361+
Bash(`ccw issue queue merge ${newQueueId} --queue ${activeQueueId}`);
362+
Bash(`ccw issue queue delete ${newQueueId}`);
363+
console.log(`Auto-merged new queue into ${activeQueueId}`);
364+
return;
365+
}
366+
348367
AskUserQuestion({
349368
questions: [{
350369
question: "Active queue exists. How would you like to proceed?",

.claude/commands/workflow/debug-with-file.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,14 @@ Why is config value None during update?
632632

633633
**Auto-sync**: 执行 `/workflow:session:sync -y "{summary}"` 更新 specs/*.md + project-tech。
634634

635+
```javascript
636+
// Auto mode: skip expansion question, complete session directly
637+
if (autoYes) {
638+
console.log('Debug session complete. Auto mode: skipping expansion.');
639+
return;
640+
}
641+
```
642+
635643
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`
636644

637645
---

.claude/skills/team-planex/SKILL.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -228,19 +228,24 @@ Beat Cycle (Coordinator Spawn-and-Stop)
228228

229229
When the pipeline completes (all tasks done, coordinator Phase 5):
230230

231-
```
232-
AskUserQuestion({
233-
questions: [{
234-
question: "Team pipeline complete. What would you like to do?",
235-
header: "Completion",
236-
multiSelect: false,
237-
options: [
238-
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up tasks and team resources" },
239-
{ label: "Keep Active", description: "Keep session active for follow-up work or inspection" },
240-
{ label: "Export Results", description: "Export deliverables to a specified location, then clean" }
241-
]
242-
}]
243-
})
231+
```javascript
232+
if (autoYes) {
233+
// Auto mode: Archive & Clean without prompting
234+
completionAction = "Archive & Clean";
235+
} else {
236+
AskUserQuestion({
237+
questions: [{
238+
question: "Team pipeline complete. What would you like to do?",
239+
header: "Completion",
240+
multiSelect: false,
241+
options: [
242+
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up tasks and team resources" },
243+
{ label: "Keep Active", description: "Keep session active for follow-up work or inspection" },
244+
{ label: "Export Results", description: "Export deliverables to a specified location, then clean" }
245+
]
246+
}]
247+
})
248+
}
244249
```
245250

246251
| Choice | Action |

0 commit comments

Comments
 (0)