feat(settings): add /gsd:settings command for workflow toggles

Adds interactive settings command to toggle workflow agents:
- Plan Researcher (workflow.research)
- Plan Checker (workflow.plan_check)
- Execution Verifier (workflow.verifier)

Updates plan-phase.md and execute-phase.md to check config before
spawning these agents. Flags still override config per-invocation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-19 23:42:48 -06:00
parent d77141e985
commit cffb3f24cd
5 changed files with 155 additions and 9 deletions

View File

@@ -79,6 +79,11 @@ Phase: $ARGUMENTS
**If clean:** Continue to verification.
7. **Verify phase goal**
Check config: `WORKFLOW_VERIFIER=$(cat .planning/config.json 2>/dev/null | grep -o '"verifier"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
**If `workflow.verifier` is `false`:** Skip to step 8 (treat as passed).
**Otherwise:**
- Spawn `gsd-verifier` subagent with phase directory and goal
- Verifier checks must_haves against actual codebase (not SUMMARY claims)
- Creates VERIFICATION.md with detailed report

View File

@@ -107,6 +107,14 @@ fi
**If `--skip-research` flag:** Skip to step 6.
**Check config for research setting:**
```bash
WORKFLOW_RESEARCH=$(cat .planning/config.json 2>/dev/null | grep -o '"research"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
```
**If `workflow.research` is `false` AND `--research` flag NOT set:** Skip to step 6.
**Otherwise:**
Check for existing research:
@@ -301,6 +309,8 @@ Parse planner output:
**`## PLANNING COMPLETE`:**
- Display: `Planner created {N} plan(s). Files on disk.`
- If `--skip-verify`: Skip to step 13
- Check config: `WORKFLOW_PLAN_CHECK=$(cat .planning/config.json 2>/dev/null | grep -o '"plan_check"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
- If `workflow.plan_check` is `false`: Skip to step 13
- Otherwise: Proceed to step 10
**`## CHECKPOINT REACHED`:**

122
commands/gsd/settings.md Normal file
View File

@@ -0,0 +1,122 @@
---
name: gsd:settings
description: Configure GSD workflow toggles (research, plan checker, verifier)
allowed-tools:
- Read
- Write
- AskUserQuestion
---
<objective>
Allow users to toggle workflow agents on/off via interactive settings.
Updates `.planning/config.json` with workflow preferences that control whether research, plan checking, and verification agents are spawned.
</objective>
<process>
## 1. Validate Environment
```bash
ls .planning/config.json 2>/dev/null
```
**If not found:** Error - run `/gsd:new-project` first.
## 2. Read Current Config
```bash
cat .planning/config.json
```
Parse current values (default to `true` if not present):
- `workflow.research` — spawn researcher during plan-phase
- `workflow.plan_check` — spawn plan checker during plan-phase
- `workflow.verifier` — spawn verifier during execute-phase
## 3. Present Settings
Use AskUserQuestion with current values shown:
```
AskUserQuestion([
{
question: "Spawn Plan Researcher? (researches domain before planning)",
header: "Research",
multiSelect: false,
options: [
{ label: "Yes", description: "Research phase goals before planning" },
{ label: "No", description: "Skip research, plan directly" }
]
},
{
question: "Spawn Plan Checker? (verifies plans before execution)",
header: "Plan Check",
multiSelect: false,
options: [
{ label: "Yes", description: "Verify plans meet phase goals" },
{ label: "No", description: "Skip plan verification" }
]
},
{
question: "Spawn Execution Verifier? (verifies phase completion)",
header: "Verifier",
multiSelect: false,
options: [
{ label: "Yes", description: "Verify must-haves after execution" },
{ label: "No", description: "Skip post-execution verification" }
]
}
])
```
**Pre-select based on current config values.**
## 4. Update Config
Merge new workflow settings into existing config.json:
```json
{
...existing_config,
"workflow": {
"research": true/false,
"plan_check": true/false,
"verifier": true/false
}
}
```
Write updated config to `.planning/config.json`.
## 5. Confirm Changes
Display:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GSD ► SETTINGS UPDATED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
| Setting | Value |
|----------------------|-------|
| Plan Researcher | {On/Off} |
| Plan Checker | {On/Off} |
| Execution Verifier | {On/Off} |
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
Override per-invocation with flags:
- /gsd:plan-phase --research (force research)
- /gsd:plan-phase --skip-research (skip research)
- /gsd:plan-phase --skip-verify (skip plan check)
```
</process>
<success_criteria>
- [ ] Current config read
- [ ] User presented with 3 toggle questions
- [ ] Config updated with workflow section
- [ ] Changes confirmed to user
</success_criteria>