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

@@ -319,7 +319,59 @@ Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
## 13. Present Final Status
Route to `<offer_next>`.
Route to `<offer_next>` OR `auto_advance` depending on flags/config.
## 14. Auto-Advance Check
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 EXECUTE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Plans ready. Spawning execute-phase...
```
Spawn execute-phase as Task:
```
Task(
prompt="Run /gsd:execute-phase ${PHASE}",
subagent_type="general-purpose",
description="Execute Phase ${PHASE}"
)
```
**Handle execute-phase return:**
- **PHASE COMPLETE** → Display final summary:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► PHASE ${PHASE} COMPLETE ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Auto-advance pipeline finished.
Next: /gsd:discuss-phase ${NEXT_PHASE} --auto
```
- **GAPS FOUND / VERIFICATION FAILED** → Display result, stop chain:
```
Auto-advance stopped: Execution needs review.
Review the output above and continue manually:
/gsd:execute-phase ${PHASE}
```
**If neither `--auto` nor config enabled:**
Route to `<offer_next>` (existing behavior).
</process>