From 499367864154eaece21dc20bd9d8bf8fce97f7ad Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sun, 15 Feb 2026 17:59:38 -0600 Subject: [PATCH] fix(auto): persist auto-advance to config and bypass checkpoints - Write workflow.auto_advance to config.json so auto-mode survives context compaction (re-read from disk on every workflow init) - Auto-approve human-verify and auto-select first option for decision checkpoints in both executor and orchestrator - Pass --auto flag from plan-phase to execute-phase spawn - Clear auto_advance on milestone complete (Route B) - Document auto-mode checkpoint behavior in golden rules Co-Authored-By: Claude Opus 4.6 --- agents/gsd-executor.md | 18 ++++++++++++++++++ get-shit-done/references/checkpoints.md | 1 + get-shit-done/workflows/discuss-phase.md | 5 +++++ get-shit-done/workflows/execute-phase.md | 14 +++++++++++++- get-shit-done/workflows/new-project.md | 9 ++++++++- get-shit-done/workflows/plan-phase.md | 2 +- get-shit-done/workflows/transition.md | 5 +++++ 7 files changed, 51 insertions(+), 3 deletions(-) diff --git a/agents/gsd-executor.md b/agents/gsd-executor.md index 39f34c860..dcaf4c54e 100644 --- a/agents/gsd-executor.md +++ b/agents/gsd-executor.md @@ -168,6 +168,16 @@ Track auto-fix attempts per task. After 3 auto-fix attempts on a single task: **In Summary:** Document auth gates as normal flow, not deviations. + +Check if auto mode is active at executor start: + +```bash +AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false") +``` + +Store the result for checkpoint handling below. + + **CRITICAL: Automation before verification** @@ -181,6 +191,14 @@ For full automation-first patterns, server lifecycle, CLI handling: --- +**Auto-mode checkpoint behavior** (when `AUTO_CFG` is `"true"`): + +- **checkpoint:human-verify** → Auto-approve. Log `⚡ Auto-approved: [what-built]`. Continue to next task. +- **checkpoint:decision** → Auto-select first option (planners front-load the recommended choice). Log `⚡ Auto-selected: [option name]`. Continue to next task. +- **checkpoint:human-action** → STOP normally. Auth gates cannot be automated — return structured checkpoint message using checkpoint_return_format. + +**Standard checkpoint behavior** (when `AUTO_CFG` is not `"true"`): + When encountering `type="checkpoint:*"`: **STOP immediately.** Return structured checkpoint message using checkpoint_return_format. **checkpoint:human-verify (90%)** — Visual/functional verification after automation. diff --git a/get-shit-done/references/checkpoints.md b/get-shit-done/references/checkpoints.md index f1e64093c..04db7ade2 100644 --- a/get-shit-done/references/checkpoints.md +++ b/get-shit-done/references/checkpoints.md @@ -8,6 +8,7 @@ Plans execute autonomously. Checkpoints formalize interaction points where human 2. **Claude sets up the verification environment** - Start dev servers, seed databases, configure env vars 3. **User only does what requires human judgment** - Visual checks, UX evaluation, "does this feel right?" 4. **Secrets come from user, automation comes from Claude** - Ask for API keys, then Claude uses them via CLI +5. **Auto-mode bypasses verification/decision checkpoints** — When `workflow.auto_advance` is true in config: human-verify auto-approves, decision auto-selects first option, human-action still stops (auth gates cannot be automated) diff --git a/get-shit-done/workflows/discuss-phase.md b/get-shit-done/workflows/discuss-phase.md index ab8f00211..26399509f 100644 --- a/get-shit-done/workflows/discuss-phase.md +++ b/get-shit-done/workflows/discuss-phase.md @@ -436,6 +436,11 @@ Check for auto-advance trigger: AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false") ``` +**If `--auto` flag present AND `AUTO_CFG` is not true:** Persist auto-advance to config (handles direct `--auto` usage without new-project): +```bash +node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-set workflow.auto_advance true +``` + **If `--auto` flag present OR `AUTO_CFG` is true:** Display banner: diff --git a/get-shit-done/workflows/execute-phase.md b/get-shit-done/workflows/execute-phase.md index 274b25d3e..1c0560f77 100644 --- a/get-shit-done/workflows/execute-phase.md +++ b/get-shit-done/workflows/execute-phase.md @@ -174,7 +174,19 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true` Plans with `autonomous: false` require user interaction. -**Flow:** +**Auto-mode checkpoint handling:** + +Read auto-advance config: +```bash +AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false") +``` + +When executor returns a checkpoint AND `AUTO_CFG` is `"true"`: +- **human-verify** → Auto-spawn continuation agent with `{user_response}` = `"approved"`. Log `⚡ Auto-approved checkpoint`. +- **decision** → Auto-spawn continuation agent with `{user_response}` = first option from checkpoint details. Log `⚡ Auto-selected: [option]`. +- **human-action** → Present to user (existing behavior below). Auth gates cannot be automated. + +**Standard flow (not auto-mode, or human-action type):** 1. Spawn agent for checkpoint plan 2. Agent runs until checkpoint task or auth gate → returns structured state diff --git a/get-shit-done/workflows/new-project.md b/get-shit-done/workflows/new-project.md index 29b25a52e..5ace0589f 100644 --- a/get-shit-done/workflows/new-project.md +++ b/get-shit-done/workflows/new-project.md @@ -176,7 +176,8 @@ Create `.planning/config.json` with mode set to "yolo": "workflow": { "research": true|false, "plan_check": true|false, - "verifier": true|false + "verifier": true|false, + "auto_advance": true } } ``` @@ -190,6 +191,12 @@ mkdir -p .planning node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "chore: add project config" --files .planning/config.json ``` +**Persist auto-advance to config (survives context compaction):** + +```bash +node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-set workflow.auto_advance true +``` + Proceed to Step 4 (skip Steps 3 and 5). ## 3. Deep Questioning diff --git a/get-shit-done/workflows/plan-phase.md b/get-shit-done/workflows/plan-phase.md index 3c8605562..f7d24304a 100644 --- a/get-shit-done/workflows/plan-phase.md +++ b/get-shit-done/workflows/plan-phase.md @@ -365,7 +365,7 @@ Plans ready. Spawning execute-phase... Spawn execute-phase as Task: ``` Task( - prompt="Run /gsd:execute-phase ${PHASE}", + prompt="Run /gsd:execute-phase ${PHASE} --auto", subagent_type="general-purpose", description="Execute Phase ${PHASE}" ) diff --git a/get-shit-done/workflows/transition.md b/get-shit-done/workflows/transition.md index ee23503ed..c0e4bb431 100644 --- a/get-shit-done/workflows/transition.md +++ b/get-shit-done/workflows/transition.md @@ -451,6 +451,11 @@ Exit skill and invoke SlashCommand("/gsd:discuss-phase [X+1] --auto") **Route B: Milestone complete (all phases done)** +**Clear auto-advance** — milestone boundary is the natural stopping point: +```bash +node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-set workflow.auto_advance false +``` + ```