diff --git a/commands/gsd/discuss-phase.md b/commands/gsd/discuss-phase.md index 61751434d..270aeba34 100644 --- a/commands/gsd/discuss-phase.md +++ b/commands/gsd/discuss-phase.md @@ -1,7 +1,7 @@ --- name: gsd:discuss-phase description: Gather phase context through adaptive questioning before planning -argument-hint: "" +argument-hint: " [--auto]" allowed-tools: - Read - Write @@ -9,6 +9,7 @@ allowed-tools: - Glob - Grep - AskUserQuestion + - Task --- diff --git a/commands/gsd/plan-phase.md b/commands/gsd/plan-phase.md index ddbff9db4..ce456a679 100644 --- a/commands/gsd/plan-phase.md +++ b/commands/gsd/plan-phase.md @@ -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 diff --git a/get-shit-done/templates/config.json b/get-shit-done/templates/config.json index 744c2f8cd..c2b689e3e 100644 --- a/get-shit-done/templates/config.json +++ b/get-shit-done/templates/config.json @@ -4,7 +4,8 @@ "workflow": { "research": true, "plan_check": true, - "verifier": true + "verifier": true, + "auto_advance": false }, "planning": { "commit_docs": true, diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index fef611862..e9b5f1010 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -410,6 +410,49 @@ node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(state): record phase ``` + +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). + + diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index 6d021f99b..2bedfc20d 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -319,7 +319,59 @@ Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon ## 13. Present Final Status -Route to ``. +Route to `` 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 `` (existing behavior). diff --git a/get-shit-done/workflows/settings.md b/get-shit-done/workflows/settings.md index 8966fecf0..2758cb589 100644 --- a/get-shit-done/workflows/settings.md +++ b/get-shit-done/workflows/settings.md @@ -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: - [ ] 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