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
|
name: gsd:discuss-phase
|
||||||
description: Gather phase context through adaptive questioning before planning
|
description: Gather phase context through adaptive questioning before planning
|
||||||
argument-hint: "<phase>"
|
argument-hint: "<phase> [--auto]"
|
||||||
allowed-tools:
|
allowed-tools:
|
||||||
- Read
|
- Read
|
||||||
- Write
|
- Write
|
||||||
@@ -9,6 +9,7 @@ allowed-tools:
|
|||||||
- Glob
|
- Glob
|
||||||
- Grep
|
- Grep
|
||||||
- AskUserQuestion
|
- AskUserQuestion
|
||||||
|
- Task
|
||||||
---
|
---
|
||||||
|
|
||||||
<objective>
|
<objective>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: gsd:plan-phase
|
name: gsd:plan-phase
|
||||||
description: Create detailed execution plan for a phase (PLAN.md) with verification loop
|
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
|
agent: gsd-planner
|
||||||
allowed-tools:
|
allowed-tools:
|
||||||
- Read
|
- Read
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"workflow": {
|
"workflow": {
|
||||||
"research": true,
|
"research": true,
|
||||||
"plan_check": true,
|
"plan_check": true,
|
||||||
"verifier": true
|
"verifier": true,
|
||||||
|
"auto_advance": false
|
||||||
},
|
},
|
||||||
"planning": {
|
"planning": {
|
||||||
"commit_docs": true,
|
"commit_docs": true,
|
||||||
|
|||||||
@@ -410,6 +410,49 @@ node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(state): record phase
|
|||||||
```
|
```
|
||||||
</step>
|
</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>
|
</process>
|
||||||
|
|
||||||
<success_criteria>
|
<success_criteria>
|
||||||
|
|||||||
@@ -319,7 +319,59 @@ Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|||||||
|
|
||||||
## 13. Present Final Status
|
## 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>
|
</process>
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,15 @@ AskUserQuestion([
|
|||||||
{ label: "No", description: "Skip post-execution verification" }
|
{ 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?",
|
question: "Git branching strategy?",
|
||||||
header: "Branching",
|
header: "Branching",
|
||||||
@@ -98,7 +107,8 @@ Merge new settings into existing config.json:
|
|||||||
"workflow": {
|
"workflow": {
|
||||||
"research": true/false,
|
"research": true/false,
|
||||||
"plan_check": true/false,
|
"plan_check": true/false,
|
||||||
"verifier": true/false
|
"verifier": true/false,
|
||||||
|
"auto_advance": true/false
|
||||||
},
|
},
|
||||||
"git": {
|
"git": {
|
||||||
"branching_strategy": "none" | "phase" | "milestone"
|
"branching_strategy": "none" | "phase" | "milestone"
|
||||||
@@ -123,6 +133,7 @@ Display:
|
|||||||
| Plan Researcher | {On/Off} |
|
| Plan Researcher | {On/Off} |
|
||||||
| Plan Checker | {On/Off} |
|
| Plan Checker | {On/Off} |
|
||||||
| Execution Verifier | {On/Off} |
|
| Execution Verifier | {On/Off} |
|
||||||
|
| Auto-Advance | {On/Off} |
|
||||||
| Git Branching | {None/Per Phase/Per Milestone} |
|
| Git Branching | {None/Per Phase/Per Milestone} |
|
||||||
|
|
||||||
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
||||||
@@ -139,7 +150,7 @@ Quick commands:
|
|||||||
|
|
||||||
<success_criteria>
|
<success_criteria>
|
||||||
- [ ] Current config read
|
- [ ] 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
|
- [ ] Config updated with model_profile, workflow, and git sections
|
||||||
- [ ] Changes confirmed to user
|
- [ ] Changes confirmed to user
|
||||||
</success_criteria>
|
</success_criteria>
|
||||||
|
|||||||
Reference in New Issue
Block a user