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:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: gsd:discuss-phase
|
||||
description: Gather phase context through adaptive questioning before planning
|
||||
argument-hint: "<phase>"
|
||||
argument-hint: "<phase> [--auto]"
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
@@ -9,6 +9,7 @@ allowed-tools:
|
||||
- Glob
|
||||
- Grep
|
||||
- AskUserQuestion
|
||||
- Task
|
||||
---
|
||||
|
||||
<objective>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: gsd:plan-phase
|
||||
description: Create detailed execution plan for a phase (PLAN.md) with verification loop
|
||||
argument-hint: "[phase] [--research] [--skip-research] [--gaps] [--skip-verify]"
|
||||
argument-hint: "[phase] [--auto] [--research] [--skip-research] [--gaps] [--skip-verify]"
|
||||
agent: gsd-planner
|
||||
allowed-tools:
|
||||
- Read
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"workflow": {
|
||||
"research": true,
|
||||
"plan_check": true,
|
||||
"verifier": true
|
||||
"verifier": true,
|
||||
"auto_advance": false
|
||||
},
|
||||
"planning": {
|
||||
"commit_docs": true,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -74,6 +74,15 @@ AskUserQuestion([
|
||||
{ label: "No", description: "Skip post-execution verification" }
|
||||
]
|
||||
},
|
||||
{
|
||||
question: "Auto-advance pipeline? (discuss → plan → execute automatically)",
|
||||
header: "Auto",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "No (Recommended)", description: "Manual /clear + paste between stages" },
|
||||
{ label: "Yes", description: "Chain stages via Task() subagents (same isolation)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
question: "Git branching strategy?",
|
||||
header: "Branching",
|
||||
@@ -98,7 +107,8 @@ Merge new settings into existing config.json:
|
||||
"workflow": {
|
||||
"research": true/false,
|
||||
"plan_check": true/false,
|
||||
"verifier": true/false
|
||||
"verifier": true/false,
|
||||
"auto_advance": true/false
|
||||
},
|
||||
"git": {
|
||||
"branching_strategy": "none" | "phase" | "milestone"
|
||||
@@ -123,6 +133,7 @@ Display:
|
||||
| Plan Researcher | {On/Off} |
|
||||
| Plan Checker | {On/Off} |
|
||||
| Execution Verifier | {On/Off} |
|
||||
| Auto-Advance | {On/Off} |
|
||||
| Git Branching | {None/Per Phase/Per Milestone} |
|
||||
|
||||
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
||||
@@ -139,7 +150,7 @@ Quick commands:
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Current config read
|
||||
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
|
||||
- [ ] User presented with 6 settings (profile + 4 workflow toggles + git branching)
|
||||
- [ ] Config updated with model_profile, workflow, and git sections
|
||||
- [ ] Changes confirmed to user
|
||||
</success_criteria>
|
||||
|
||||
Reference in New Issue
Block a user