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:
@@ -10,25 +10,25 @@ See: .planning/PROJECT.md (updated 2026-01-19)
|
||||
## Current Position
|
||||
|
||||
Phase: 2 of 3 (Context Injection)
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: 2026-01-20 — Phase 1 verified and complete
|
||||
Plan: 1 of 2 complete
|
||||
Status: In progress
|
||||
Last activity: 2026-01-20 — Completed 02-01-PLAN.md (Convention Detection Engine)
|
||||
|
||||
Progress: [███░░░░░░░] 33%
|
||||
Progress: [████░░░░░░] 43%
|
||||
|
||||
## Performance Metrics
|
||||
|
||||
**Velocity:**
|
||||
- Total plans completed: 2
|
||||
- Average duration: 3.5 min
|
||||
- Total execution time: 7 min
|
||||
- Total plans completed: 3
|
||||
- Average duration: 3.0 min
|
||||
- Total execution time: 9 min
|
||||
|
||||
**By Phase:**
|
||||
|
||||
| Phase | Plans | Total | Avg/Plan |
|
||||
|-------|-------|-------|----------|
|
||||
| 1. Foundation & Learning | 2/2 | 7 min | 3.5 min |
|
||||
| 2. Context Injection | 0/2 | - | - |
|
||||
| 2. Context Injection | 1/2 | 2 min | 2.0 min |
|
||||
| 3. Brownfield & Integration | 0/3 | - | - |
|
||||
|
||||
*Updated after each plan completion*
|
||||
@@ -45,6 +45,10 @@ Progress: [███░░░░░░░] 33%
|
||||
| Use heredoc for stdin testing | 01-02 | Pipe chaining has timing issues with async stdin |
|
||||
| Extract 'default' as export name | 01-02 | Both 'default' and identifier recorded for default exports |
|
||||
| Read file from disk for Edit tool | 01-02 | Edit only provides old_string/new_string, not full content |
|
||||
| Regenerate conventions every index update | 02-01 | Detection is fast, avoids staleness issues |
|
||||
| Skip 'default' in case detection | 02-01 | Keyword, not naming convention indicator |
|
||||
| Single lowercase words as camelCase | 02-01 | Follows camelCase rules (e.g., 'main', 'app') |
|
||||
| Use lookup tables for purposes | 02-01 | More maintainable than regex patterns |
|
||||
|
||||
### Pending Todos
|
||||
|
||||
@@ -57,5 +61,5 @@ Progress: [███░░░░░░░] 33%
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2026-01-20
|
||||
Stopped at: Phase 1 verified and complete, ready for Phase 2
|
||||
Stopped at: Completed 02-01-PLAN.md, ready for 02-02-PLAN.md
|
||||
Resume file: None
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
122
commands/gsd/settings.md
Normal 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>
|
||||
@@ -1,6 +1,11 @@
|
||||
{
|
||||
"mode": "interactive",
|
||||
"depth": "standard",
|
||||
"workflow": {
|
||||
"research": true,
|
||||
"plan_check": true,
|
||||
"verifier": true
|
||||
},
|
||||
"planning": {
|
||||
"commit_docs": true,
|
||||
"search_gitignored": false
|
||||
|
||||
Reference in New Issue
Block a user