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 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
</authentication_gates>
|
||||
|
||||
<auto_mode_detection>
|
||||
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.
|
||||
</auto_mode_detection>
|
||||
|
||||
<checkpoint_protocol>
|
||||
|
||||
**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.
|
||||
|
||||
@@ -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)
|
||||
</overview>
|
||||
|
||||
<checkpoint_types>
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -174,7 +174,19 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
||||
<step name="checkpoint_handling">
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
<if mode="yolo">
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user