feat(workflow): add auto-advance pipeline (--auto flag + workflow.auto_advance config)

Add opt-in mechanism to chain discuss → plan → execute automatically
via Task() subagents, eliminating manual /clear + paste overhead.

- Add `--auto` flag to discuss-phase and plan-phase commands
- Add `workflow.auto_advance` config toggle (default: false)
- Add auto_advance step to discuss-phase workflow (spawns plan-phase)
- Add step 14 to plan-phase workflow (spawns execute-phase)
- Add auto_advance toggle to /gsd:settings

Chain stops gracefully on INCONCLUSIVE, CHECKPOINT, or verification
failures. No work lost — artifacts persist at each step.

Closes #541

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-15 09:54:05 -06:00
parent 4fb04287d0
commit ed1768404c
6 changed files with 114 additions and 6 deletions

View File

@@ -410,6 +410,49 @@ node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(state): record phase
```
</step>
<step name="auto_advance">
Check for auto-advance trigger:
1. Parse `--auto` flag from $ARGUMENTS
2. Read `workflow.auto_advance` from config:
```bash
AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.js config get workflow.auto_advance 2>/dev/null || echo "false")
```
**If `--auto` flag present OR `AUTO_CFG` is true:**
Display banner:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► AUTO-ADVANCING TO PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Context captured. Spawning plan-phase...
```
Spawn plan-phase as Task:
```
Task(
prompt="Run /gsd:plan-phase ${PHASE} --auto",
subagent_type="general-purpose",
description="Plan Phase ${PHASE}"
)
```
**Handle plan-phase return:**
- **PLANNING COMPLETE** → Plan-phase handles chaining to execute-phase (via its own auto_advance step)
- **PLANNING INCONCLUSIVE / CHECKPOINT** → Display result, stop chain:
```
Auto-advance stopped: Planning needs input.
Review the output above and continue manually:
/gsd:plan-phase ${PHASE}
```
**If neither `--auto` nor config enabled:**
Route to `confirm_creation` step (existing behavior — show manual next steps).
</step>
</process>
<success_criteria>