fix: make --auto flag skip interactive discussion questions (closes #1025) (#1050)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
TÂCHES
2026-03-14 21:23:56 -06:00
committed by GitHub
parent 1c49fdb48a
commit 823bb2a99a
2 changed files with 26 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
---
name: gsd:discuss-phase
description: Gather phase context through adaptive questioning before planning
description: Gather phase context through adaptive questioning before planning. Use --auto to skip interactive questions (Claude picks recommended defaults).
argument-hint: "<phase> [--auto]"
allowed-tools:
- Read

View File

@@ -135,6 +135,13 @@ Use /gsd:progress to see available phases.
Exit workflow.
**If `phase_found` is true:** Continue to check_existing.
**Auto mode** — If `--auto` is present in ARGUMENTS:
- In `check_existing`: auto-select "Skip" (if context exists) or continue without prompting (if no context/plans)
- In `present_gray_areas`: auto-select ALL gray areas without asking the user
- In `discuss_areas`: for each discussion question, choose the recommended option (first option, or the one marked "recommended") without using AskUserQuestion
- Log each auto-selected choice inline so the user can review decisions in the context file
- After discussion completes, auto-advance to plan-phase (existing behavior)
</step>
<step name="check_existing">
@@ -145,7 +152,10 @@ ls ${phase_dir}/*-CONTEXT.md 2>/dev/null
```
**If exists:**
Use AskUserQuestion:
**If `--auto`:** Auto-select "Update it" — load existing context and continue to analyze_phase. Log: `[auto] Context exists — updating with auto-selected decisions.`
**Otherwise:** Use AskUserQuestion:
- header: "Context"
- question: "Phase [X] already has context. What do you want to do?"
- options:
@@ -161,7 +171,9 @@ If "Skip": Exit workflow
Check `has_plans` and `plan_count` from init. **If `has_plans` is true:**
Use AskUserQuestion:
**If `--auto`:** Auto-select "Continue and replan after". Log: `[auto] Plans exist — continuing with context capture, will replan after.`
**Otherwise:** Use AskUserQuestion:
- header: "Plans exist"
- question: "Phase [X] already has {plan_count} plan(s) created without user context. Your decisions here won't affect existing plans unless you replan."
- options:
@@ -330,7 +342,9 @@ We'll clarify HOW to implement this.
- [Decision from Phase M that applies here]
```
**Then use AskUserQuestion (multiSelect: true):**
**If `--auto`:** Auto-select ALL gray areas. Log: `[auto] Selected all gray areas: [list area names].` Skip the AskUserQuestion below and continue directly to discuss_areas with all areas selected.
**Otherwise, use AskUserQuestion (multiSelect: true):**
- header: "Discuss"
- question: "Which areas do you want to discuss for [phase name]?"
- options: Generate 3-4 phase-specific gray areas, each with:
@@ -402,6 +416,14 @@ For each selected area, conduct a focused discussion loop.
Each answer (or answer set, in batch mode) should reveal the next question or next batch.
**Auto mode (`--auto`):** For each area, Claude selects the recommended option (first option, or the one explicitly marked "recommended") for every question without using AskUserQuestion. Log each auto-selected choice:
```
[auto] [Area] — Q: "[question text]" → Selected: "[chosen option]" (recommended default)
```
After all areas are auto-resolved, skip the "Explore more gray areas" prompt and proceed directly to write_context.
**Interactive mode (no `--auto`):**
**For each area:**
1. **Announce the area:**