refactor: extract settings, add-todo, pause-work, set-profile to thin orchestrators
Completes Phase 1 thin orchestrator extraction. Token savings: ~8,500 chars across 4 commands Ported from: get-shit-done-v2@95b6214
This commit is contained in:
@@ -6,188 +6,37 @@ allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Bash
|
||||
- Glob
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Capture an idea, task, or issue that surfaces during a GSD session as a structured todo for later work.
|
||||
|
||||
Enables "thought → capture → continue" flow without losing context or derailing current work.
|
||||
Routes to the add-todo workflow which handles:
|
||||
- Directory structure creation
|
||||
- Content extraction from arguments or conversation
|
||||
- Area inference from file paths
|
||||
- Duplicate detection and resolution
|
||||
- Todo file creation with frontmatter
|
||||
- STATE.md updates
|
||||
- Git commits
|
||||
</objective>
|
||||
|
||||
<context>
|
||||
<execution_context>
|
||||
@.planning/STATE.md
|
||||
</context>
|
||||
@~/.claude/get-shit-done/workflows/add-todo.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
**Follow the add-todo workflow** from `@~/.claude/get-shit-done/workflows/add-todo.md`.
|
||||
|
||||
<step name="ensure_directory">
|
||||
```bash
|
||||
mkdir -p .planning/todos/pending .planning/todos/done
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="check_existing_areas">
|
||||
```bash
|
||||
ls .planning/todos/pending/*.md 2>/dev/null | xargs -I {} grep "^area:" {} 2>/dev/null | cut -d' ' -f2 | sort -u
|
||||
```
|
||||
|
||||
Note existing areas for consistency in infer_area step.
|
||||
</step>
|
||||
|
||||
<step name="extract_content">
|
||||
**With arguments:** Use as the title/focus.
|
||||
- `/gsd:add-todo Add auth token refresh` → title = "Add auth token refresh"
|
||||
|
||||
**Without arguments:** Analyze recent conversation to extract:
|
||||
- The specific problem, idea, or task discussed
|
||||
- Relevant file paths mentioned
|
||||
- Technical details (error messages, line numbers, constraints)
|
||||
|
||||
Formulate:
|
||||
- `title`: 3-10 word descriptive title (action verb preferred)
|
||||
- `problem`: What's wrong or why this is needed
|
||||
- `solution`: Approach hints or "TBD" if just an idea
|
||||
- `files`: Relevant paths with line numbers from conversation
|
||||
</step>
|
||||
|
||||
<step name="infer_area">
|
||||
Infer area from file paths:
|
||||
|
||||
| Path pattern | Area |
|
||||
|--------------|------|
|
||||
| `src/api/*`, `api/*` | `api` |
|
||||
| `src/components/*`, `src/ui/*` | `ui` |
|
||||
| `src/auth/*`, `auth/*` | `auth` |
|
||||
| `src/db/*`, `database/*` | `database` |
|
||||
| `tests/*`, `__tests__/*` | `testing` |
|
||||
| `docs/*` | `docs` |
|
||||
| `.planning/*` | `planning` |
|
||||
| `scripts/*`, `bin/*` | `tooling` |
|
||||
| No files or unclear | `general` |
|
||||
|
||||
Use existing area from step 2 if similar match exists.
|
||||
</step>
|
||||
|
||||
<step name="check_duplicates">
|
||||
```bash
|
||||
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
|
||||
```
|
||||
|
||||
If potential duplicate found:
|
||||
1. Read the existing todo
|
||||
2. Compare scope
|
||||
|
||||
If overlapping, use AskUserQuestion:
|
||||
- header: "Duplicate?"
|
||||
- question: "Similar todo exists: [title]. What would you like to do?"
|
||||
- options:
|
||||
- "Skip" — keep existing todo
|
||||
- "Replace" — update existing with new context
|
||||
- "Add anyway" — create as separate todo
|
||||
</step>
|
||||
|
||||
<step name="create_file">
|
||||
```bash
|
||||
timestamp=$(date "+%Y-%m-%dT%H:%M")
|
||||
date_prefix=$(date "+%Y-%m-%d")
|
||||
```
|
||||
|
||||
Generate slug from title (lowercase, hyphens, no special chars in FILENAME only).
|
||||
|
||||
Write to `.planning/todos/pending/${date_prefix}-${slug}.md`:
|
||||
|
||||
```markdown
|
||||
---
|
||||
created: [timestamp]
|
||||
title: [title]
|
||||
area: [area]
|
||||
files:
|
||||
- [file:lines]
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
[problem description - enough context for future Claude to understand weeks later]
|
||||
|
||||
## Solution
|
||||
|
||||
[approach hints or "TBD"]
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
If `.planning/STATE.md` exists:
|
||||
|
||||
1. Count todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
|
||||
2. Update "### Pending Todos" under "## Accumulated Context"
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
Commit the todo and any updated state:
|
||||
|
||||
**Check planning config:**
|
||||
|
||||
```bash
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Todo saved (not committed - commit_docs: false)"
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
||||
|
||||
```bash
|
||||
git add .planning/todos/pending/[filename]
|
||||
[ -f .planning/STATE.md ] && git add .planning/STATE.md
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: capture todo - [title]
|
||||
|
||||
Area: [area]
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Committed: docs: capture todo - [title]"
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
```
|
||||
Todo saved: .planning/todos/pending/[filename]
|
||||
|
||||
[title]
|
||||
Area: [area]
|
||||
Files: [count] referenced
|
||||
|
||||
---
|
||||
|
||||
Would you like to:
|
||||
|
||||
1. Continue with current work
|
||||
2. Add another todo
|
||||
3. View all todos (/gsd:check-todos)
|
||||
```
|
||||
</step>
|
||||
|
||||
The workflow handles all logic including:
|
||||
1. Directory ensuring
|
||||
2. Existing area checking
|
||||
3. Content extraction (arguments or conversation)
|
||||
4. Area inference
|
||||
5. Duplicate checking
|
||||
6. File creation with slug generation
|
||||
7. STATE.md updates
|
||||
8. Git commits
|
||||
</process>
|
||||
|
||||
<output>
|
||||
- `.planning/todos/pending/[date]-[slug].md`
|
||||
- Updated `.planning/STATE.md` (if exists)
|
||||
</output>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't create todos for work in current plan (that's deviation rule territory)
|
||||
- Don't create elaborate solution sections — captures ideas, not plans
|
||||
- Don't block on missing information — "TBD" is fine
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Directory structure exists
|
||||
- [ ] Todo file created with valid frontmatter
|
||||
- [ ] Problem section has enough context for future Claude
|
||||
- [ ] No duplicates (checked and resolved)
|
||||
- [ ] Area consistent with existing todos
|
||||
- [ ] STATE.md updated if exists
|
||||
- [ ] Todo and state committed to git
|
||||
</success_criteria>
|
||||
|
||||
@@ -10,125 +10,26 @@ allowed-tools:
|
||||
<objective>
|
||||
Create `.continue-here.md` handoff file to preserve complete work state across sessions.
|
||||
|
||||
Enables seamless resumption in fresh session with full context restoration.
|
||||
Routes to the pause-work workflow which handles:
|
||||
- Current phase detection from recent files
|
||||
- Complete state gathering (position, completed work, remaining work, decisions, blockers)
|
||||
- Handoff file creation with all context sections
|
||||
- Git commit as WIP
|
||||
- Resume instructions
|
||||
</objective>
|
||||
|
||||
<context>
|
||||
<execution_context>
|
||||
@.planning/STATE.md
|
||||
</context>
|
||||
@~/.claude/get-shit-done/workflows/pause-work.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
**Follow the pause-work workflow** from `@~/.claude/get-shit-done/workflows/pause-work.md`.
|
||||
|
||||
<step name="detect">
|
||||
Find current phase directory from most recently modified files.
|
||||
</step>
|
||||
|
||||
<step name="gather">
|
||||
**Collect complete state for handoff:**
|
||||
|
||||
1. **Current position**: Which phase, which plan, which task
|
||||
2. **Work completed**: What got done this session
|
||||
3. **Work remaining**: What's left in current plan/phase
|
||||
4. **Decisions made**: Key decisions and rationale
|
||||
5. **Blockers/issues**: Anything stuck
|
||||
6. **Mental context**: The approach, next steps, "vibe"
|
||||
7. **Files modified**: What's changed but not committed
|
||||
|
||||
Ask user for clarifications if needed.
|
||||
</step>
|
||||
|
||||
<step name="write">
|
||||
**Write handoff to `.planning/phases/XX-name/.continue-here.md`:**
|
||||
|
||||
```markdown
|
||||
---
|
||||
phase: XX-name
|
||||
task: 3
|
||||
total_tasks: 7
|
||||
status: in_progress
|
||||
last_updated: [timestamp]
|
||||
---
|
||||
|
||||
<current_state>
|
||||
[Where exactly are we? Immediate context]
|
||||
</current_state>
|
||||
|
||||
<completed_work>
|
||||
|
||||
- Task 1: [name] - Done
|
||||
- Task 2: [name] - Done
|
||||
- Task 3: [name] - In progress, [what's done]
|
||||
</completed_work>
|
||||
|
||||
<remaining_work>
|
||||
|
||||
- Task 3: [what's left]
|
||||
- Task 4: Not started
|
||||
- Task 5: Not started
|
||||
</remaining_work>
|
||||
|
||||
<decisions_made>
|
||||
|
||||
- Decided to use [X] because [reason]
|
||||
- Chose [approach] over [alternative] because [reason]
|
||||
</decisions_made>
|
||||
|
||||
<blockers>
|
||||
- [Blocker 1]: [status/workaround]
|
||||
</blockers>
|
||||
|
||||
<context>
|
||||
[Mental state, what were you thinking, the plan]
|
||||
</context>
|
||||
|
||||
<next_action>
|
||||
Start with: [specific first action when resuming]
|
||||
</next_action>
|
||||
```
|
||||
|
||||
Be specific enough for a fresh Claude to understand immediately.
|
||||
</step>
|
||||
|
||||
<step name="commit">
|
||||
**Check planning config:**
|
||||
|
||||
```bash
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
||||
|
||||
```bash
|
||||
git add .planning/phases/*/.continue-here.md
|
||||
git commit -m "wip: [phase-name] paused at task [X]/[Y]"
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
```
|
||||
✓ Handoff created: .planning/phases/[XX-name]/.continue-here.md
|
||||
|
||||
Current state:
|
||||
|
||||
- Phase: [XX-name]
|
||||
- Task: [X] of [Y]
|
||||
- Status: [in_progress/blocked]
|
||||
- Committed as WIP
|
||||
|
||||
To resume: /gsd:resume-work
|
||||
|
||||
```
|
||||
</step>
|
||||
|
||||
The workflow handles all logic including:
|
||||
1. Phase directory detection
|
||||
2. State gathering with user clarifications
|
||||
3. Handoff file writing with timestamp
|
||||
4. Git commit
|
||||
5. Confirmation with resume instructions
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] .continue-here.md created in correct phase directory
|
||||
- [ ] All sections filled with specific content
|
||||
- [ ] Committed as WIP
|
||||
- [ ] User knows location and how to resume
|
||||
</success_criteria>
|
||||
```
|
||||
|
||||
@@ -1,116 +1,34 @@
|
||||
---
|
||||
name: set-profile
|
||||
name: gsd:set-profile
|
||||
description: Switch model profile for GSD agents (quality/balanced/budget)
|
||||
arguments:
|
||||
- name: profile
|
||||
description: "Profile name: quality, balanced, or budget"
|
||||
required: true
|
||||
argument-hint: <profile>
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Bash
|
||||
---
|
||||
|
||||
<objective>
|
||||
Switch the model profile used by GSD agents. This controls which Claude model each agent uses, balancing quality vs token spend.
|
||||
Switch the model profile used by GSD agents. Controls which Claude model each agent uses, balancing quality vs token spend.
|
||||
|
||||
Routes to the set-profile workflow which handles:
|
||||
- Argument validation (quality/balanced/budget)
|
||||
- Config file creation if missing
|
||||
- Profile update in config.json
|
||||
- Confirmation with model table display
|
||||
</objective>
|
||||
|
||||
<profiles>
|
||||
| Profile | Description |
|
||||
|---------|-------------|
|
||||
| **quality** | Opus everywhere except read-only verification |
|
||||
| **balanced** | Opus for planning, Sonnet for execution/verification (default) |
|
||||
| **budget** | Sonnet for writing, Haiku for research/verification |
|
||||
</profiles>
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/set-profile.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
**Follow the set-profile workflow** from `@~/.claude/get-shit-done/workflows/set-profile.md`.
|
||||
|
||||
## 1. Validate argument
|
||||
|
||||
```
|
||||
if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
|
||||
Error: Invalid profile "$ARGUMENTS.profile"
|
||||
Valid profiles: quality, balanced, budget
|
||||
STOP
|
||||
```
|
||||
|
||||
## 2. Ensure config exists
|
||||
|
||||
```bash
|
||||
ls .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
If `.planning/config.json` missing, create it with defaults:
|
||||
```bash
|
||||
mkdir -p .planning
|
||||
```
|
||||
```json
|
||||
{
|
||||
"model_profile": "balanced",
|
||||
"workflow": {
|
||||
"research": true,
|
||||
"plan_check": true,
|
||||
"verifier": true
|
||||
}
|
||||
}
|
||||
```
|
||||
Write this to `.planning/config.json`, then continue.
|
||||
|
||||
## 3. Update config.json
|
||||
|
||||
Read current config:
|
||||
```bash
|
||||
cat .planning/config.json
|
||||
```
|
||||
|
||||
Update `model_profile` field:
|
||||
```json
|
||||
{
|
||||
"model_profile": "$ARGUMENTS.profile"
|
||||
}
|
||||
```
|
||||
|
||||
Write updated config back to `.planning/config.json`.
|
||||
|
||||
## 4. Confirm
|
||||
|
||||
```
|
||||
✓ Model profile set to: $ARGUMENTS.profile
|
||||
|
||||
Agents will now use:
|
||||
[Show table from model-profiles.md for selected profile]
|
||||
|
||||
Next spawned agents will use the new profile.
|
||||
```
|
||||
|
||||
The workflow handles all logic including:
|
||||
1. Profile argument validation
|
||||
2. Config file ensuring
|
||||
3. Config reading and updating
|
||||
4. Model table generation from MODEL_PROFILES
|
||||
5. Confirmation display
|
||||
</process>
|
||||
|
||||
<examples>
|
||||
|
||||
**Switch to budget mode:**
|
||||
```
|
||||
/gsd:set-profile budget
|
||||
|
||||
✓ Model profile set to: budget
|
||||
|
||||
Agents will now use:
|
||||
| Agent | Model |
|
||||
|-------|-------|
|
||||
| gsd-planner | sonnet |
|
||||
| gsd-executor | sonnet |
|
||||
| gsd-verifier | haiku |
|
||||
| ... | ... |
|
||||
```
|
||||
|
||||
**Switch to quality mode:**
|
||||
```
|
||||
/gsd:set-profile quality
|
||||
|
||||
✓ Model profile set to: quality
|
||||
|
||||
Agents will now use:
|
||||
| Agent | Model |
|
||||
|-------|-------|
|
||||
| gsd-planner | opus |
|
||||
| gsd-executor | opus |
|
||||
| gsd-verifier | sonnet |
|
||||
| ... | ... |
|
||||
```
|
||||
|
||||
</examples>
|
||||
|
||||
@@ -4,162 +4,33 @@ description: Configure GSD workflow toggles and model profile
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Bash
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Allow users to toggle workflow agents on/off and select model profile via interactive settings.
|
||||
Interactive configuration of GSD workflow agents and model profile via multi-question prompt.
|
||||
|
||||
Updates `.planning/config.json` with workflow preferences and model profile selection.
|
||||
Routes to the settings workflow which handles:
|
||||
- Config existence ensuring
|
||||
- Current settings reading and parsing
|
||||
- Interactive 5-question prompt (model, research, plan_check, verifier, branching)
|
||||
- Config merging and writing
|
||||
- Confirmation display with quick command references
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/settings.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
**Follow the settings workflow** from `@~/.claude/get-shit-done/workflows/settings.md`.
|
||||
|
||||
## 1. Ensure config exists
|
||||
|
||||
```bash
|
||||
ls .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
If `.planning/config.json` missing, create it with defaults:
|
||||
```bash
|
||||
mkdir -p .planning
|
||||
```
|
||||
```json
|
||||
{
|
||||
"model_profile": "balanced",
|
||||
"workflow": {
|
||||
"research": true,
|
||||
"plan_check": true,
|
||||
"verifier": true
|
||||
}
|
||||
}
|
||||
```
|
||||
Write this to `.planning/config.json`, then continue.
|
||||
|
||||
## 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
|
||||
- `model_profile` — which model each agent uses (default: `balanced`)
|
||||
- `git.branching_strategy` — branching approach (default: `"none"`)
|
||||
|
||||
## 3. Present Settings
|
||||
|
||||
Use AskUserQuestion with current values shown:
|
||||
|
||||
```
|
||||
AskUserQuestion([
|
||||
{
|
||||
question: "Which model profile for agents?",
|
||||
header: "Model",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Quality", description: "Opus everywhere except verification (highest cost)" },
|
||||
{ label: "Balanced (Recommended)", description: "Opus for planning, Sonnet for execution/verification" },
|
||||
{ label: "Budget", description: "Sonnet for writing, Haiku for research/verification (lowest cost)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
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" }
|
||||
]
|
||||
},
|
||||
{
|
||||
question: "Git branching strategy?",
|
||||
header: "Branching",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "None (Recommended)", description: "Commit directly to current branch" },
|
||||
{ label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
|
||||
{ label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
|
||||
]
|
||||
}
|
||||
])
|
||||
```
|
||||
|
||||
**Pre-select based on current config values.**
|
||||
|
||||
## 4. Update Config
|
||||
|
||||
Merge new settings into existing config.json:
|
||||
|
||||
```json
|
||||
{
|
||||
...existing_config,
|
||||
"model_profile": "quality" | "balanced" | "budget",
|
||||
"workflow": {
|
||||
"research": true/false,
|
||||
"plan_check": true/false,
|
||||
"verifier": true/false
|
||||
},
|
||||
"git": {
|
||||
"branching_strategy": "none" | "phase" | "milestone"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Write updated config to `.planning/config.json`.
|
||||
|
||||
## 5. Confirm Changes
|
||||
|
||||
Display:
|
||||
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► SETTINGS UPDATED
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
| Setting | Value |
|
||||
|----------------------|-------|
|
||||
| Model Profile | {quality/balanced/budget} |
|
||||
| Plan Researcher | {On/Off} |
|
||||
| Plan Checker | {On/Off} |
|
||||
| Execution Verifier | {On/Off} |
|
||||
| Git Branching | {None/Per Phase/Per Milestone} |
|
||||
|
||||
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
||||
|
||||
Quick commands:
|
||||
- /gsd:set-profile <profile> — switch model profile
|
||||
- /gsd:plan-phase --research — force research
|
||||
- /gsd:plan-phase --skip-research — skip research
|
||||
- /gsd:plan-phase --skip-verify — skip plan check
|
||||
```
|
||||
|
||||
The workflow handles all logic including:
|
||||
1. Config file creation with defaults if missing
|
||||
2. Current config reading
|
||||
3. Interactive settings presentation with pre-selection
|
||||
4. Answer parsing and config merging
|
||||
5. File writing
|
||||
6. Confirmation display
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Current config read
|
||||
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
|
||||
- [ ] Config updated with model_profile, workflow, and git sections
|
||||
- [ ] Changes confirmed to user
|
||||
</success_criteria>
|
||||
|
||||
153
get-shit-done/workflows/add-todo.md
Normal file
153
get-shit-done/workflows/add-todo.md
Normal file
@@ -0,0 +1,153 @@
|
||||
<purpose>
|
||||
Capture an idea, task, or issue that surfaces during a GSD session as a structured todo for later work. Enables "thought → capture → continue" flow without losing context.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
Read all files referenced by the invoking prompt's execution_context before starting.
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="ensure_directory">
|
||||
```bash
|
||||
mkdir -p .planning/todos/pending .planning/todos/done
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="check_existing_areas">
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js list-todos | grep -oP '"area":\s*"\K[^"]+' | sort -u
|
||||
```
|
||||
|
||||
Note existing areas for consistency in infer_area step.
|
||||
</step>
|
||||
|
||||
<step name="extract_content">
|
||||
**With arguments:** Use as the title/focus.
|
||||
- `/gsd:add-todo Add auth token refresh` → title = "Add auth token refresh"
|
||||
|
||||
**Without arguments:** Analyze recent conversation to extract:
|
||||
- The specific problem, idea, or task discussed
|
||||
- Relevant file paths mentioned
|
||||
- Technical details (error messages, line numbers, constraints)
|
||||
|
||||
Formulate:
|
||||
- `title`: 3-10 word descriptive title (action verb preferred)
|
||||
- `problem`: What's wrong or why this is needed
|
||||
- `solution`: Approach hints or "TBD" if just an idea
|
||||
- `files`: Relevant paths with line numbers from conversation
|
||||
</step>
|
||||
|
||||
<step name="infer_area">
|
||||
Infer area from file paths:
|
||||
|
||||
| Path pattern | Area |
|
||||
|--------------|------|
|
||||
| `src/api/*`, `api/*` | `api` |
|
||||
| `src/components/*`, `src/ui/*` | `ui` |
|
||||
| `src/auth/*`, `auth/*` | `auth` |
|
||||
| `src/db/*`, `database/*` | `database` |
|
||||
| `tests/*`, `__tests__/*` | `testing` |
|
||||
| `docs/*` | `docs` |
|
||||
| `.planning/*` | `planning` |
|
||||
| `scripts/*`, `bin/*` | `tooling` |
|
||||
| No files or unclear | `general` |
|
||||
|
||||
Use existing area from step 2 if similar match exists.
|
||||
</step>
|
||||
|
||||
<step name="check_duplicates">
|
||||
```bash
|
||||
# Search for key words from title in existing todos
|
||||
grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
|
||||
```
|
||||
|
||||
If potential duplicate found:
|
||||
1. Read the existing todo
|
||||
2. Compare scope
|
||||
|
||||
If overlapping, use AskUserQuestion:
|
||||
- header: "Duplicate?"
|
||||
- question: "Similar todo exists: [title]. What would you like to do?"
|
||||
- options:
|
||||
- "Skip" — keep existing todo
|
||||
- "Replace" — update existing with new context
|
||||
- "Add anyway" — create as separate todo
|
||||
</step>
|
||||
|
||||
<step name="create_file">
|
||||
```bash
|
||||
timestamp=$(node ~/.claude/get-shit-done/bin/gsd-tools.js current-timestamp full --raw)
|
||||
date_prefix=$(node ~/.claude/get-shit-done/bin/gsd-tools.js current-timestamp date --raw)
|
||||
slug=$(node ~/.claude/get-shit-done/bin/gsd-tools.js generate-slug "$title" --raw)
|
||||
```
|
||||
|
||||
Write to `.planning/todos/pending/${date_prefix}-${slug}.md`:
|
||||
|
||||
```markdown
|
||||
---
|
||||
created: [timestamp]
|
||||
title: [title]
|
||||
area: [area]
|
||||
files:
|
||||
- [file:lines]
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
[problem description - enough context for future Claude to understand weeks later]
|
||||
|
||||
## Solution
|
||||
|
||||
[approach hints or "TBD"]
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
If `.planning/STATE.md` exists:
|
||||
|
||||
1. Count todos: `node ~/.claude/get-shit-done/bin/gsd-tools.js list-todos --raw`
|
||||
2. Update "### Pending Todos" under "## Accumulated Context"
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
Commit the todo and any updated state:
|
||||
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs: capture todo - [title]" --files .planning/todos/pending/[filename] .planning/STATE.md
|
||||
```
|
||||
|
||||
Tool respects `commit_docs` config and gitignore automatically.
|
||||
|
||||
Confirm: "Committed: docs: capture todo - [title]"
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
```
|
||||
Todo saved: .planning/todos/pending/[filename]
|
||||
|
||||
[title]
|
||||
Area: [area]
|
||||
Files: [count] referenced
|
||||
|
||||
---
|
||||
|
||||
Would you like to:
|
||||
|
||||
1. Continue with current work
|
||||
2. Add another todo
|
||||
3. View all todos (/gsd:check-todos)
|
||||
```
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Directory structure exists
|
||||
- [ ] Todo file created with valid frontmatter
|
||||
- [ ] Problem section has enough context for future Claude
|
||||
- [ ] No duplicates (checked and resolved)
|
||||
- [ ] Area consistent with existing todos
|
||||
- [ ] STATE.md updated if exists
|
||||
- [ ] Todo and state committed to git
|
||||
</success_criteria>
|
||||
122
get-shit-done/workflows/pause-work.md
Normal file
122
get-shit-done/workflows/pause-work.md
Normal file
@@ -0,0 +1,122 @@
|
||||
<purpose>
|
||||
Create `.continue-here.md` handoff file to preserve complete work state across sessions. Enables seamless resumption with full context restoration.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
Read all files referenced by the invoking prompt's execution_context before starting.
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="detect">
|
||||
Find current phase directory from most recently modified files:
|
||||
|
||||
```bash
|
||||
# Find most recent phase directory with work
|
||||
ls -lt .planning/phases/*/PLAN.md 2>/dev/null | head -1 | grep -oP 'phases/\K[^/]+'
|
||||
```
|
||||
|
||||
If no active phase detected, ask user which phase they're pausing work on.
|
||||
</step>
|
||||
|
||||
<step name="gather">
|
||||
**Collect complete state for handoff:**
|
||||
|
||||
1. **Current position**: Which phase, which plan, which task
|
||||
2. **Work completed**: What got done this session
|
||||
3. **Work remaining**: What's left in current plan/phase
|
||||
4. **Decisions made**: Key decisions and rationale
|
||||
5. **Blockers/issues**: Anything stuck
|
||||
6. **Mental context**: The approach, next steps, "vibe"
|
||||
7. **Files modified**: What's changed but not committed
|
||||
|
||||
Ask user for clarifications if needed via conversational questions.
|
||||
</step>
|
||||
|
||||
<step name="write">
|
||||
**Write handoff to `.planning/phases/XX-name/.continue-here.md`:**
|
||||
|
||||
```markdown
|
||||
---
|
||||
phase: XX-name
|
||||
task: 3
|
||||
total_tasks: 7
|
||||
status: in_progress
|
||||
last_updated: [timestamp from current-timestamp]
|
||||
---
|
||||
|
||||
<current_state>
|
||||
[Where exactly are we? Immediate context]
|
||||
</current_state>
|
||||
|
||||
<completed_work>
|
||||
|
||||
- Task 1: [name] - Done
|
||||
- Task 2: [name] - Done
|
||||
- Task 3: [name] - In progress, [what's done]
|
||||
</completed_work>
|
||||
|
||||
<remaining_work>
|
||||
|
||||
- Task 3: [what's left]
|
||||
- Task 4: Not started
|
||||
- Task 5: Not started
|
||||
</remaining_work>
|
||||
|
||||
<decisions_made>
|
||||
|
||||
- Decided to use [X] because [reason]
|
||||
- Chose [approach] over [alternative] because [reason]
|
||||
</decisions_made>
|
||||
|
||||
<blockers>
|
||||
- [Blocker 1]: [status/workaround]
|
||||
</blockers>
|
||||
|
||||
<context>
|
||||
[Mental state, what were you thinking, the plan]
|
||||
</context>
|
||||
|
||||
<next_action>
|
||||
Start with: [specific first action when resuming]
|
||||
</next_action>
|
||||
```
|
||||
|
||||
Be specific enough for a fresh Claude to understand immediately.
|
||||
|
||||
Use `current-timestamp` for last_updated field:
|
||||
```bash
|
||||
timestamp=$(node ~/.claude/get-shit-done/bin/gsd-tools.js current-timestamp full --raw)
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="commit">
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/phases/*/.continue-here.md
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
```
|
||||
✓ Handoff created: .planning/phases/[XX-name]/.continue-here.md
|
||||
|
||||
Current state:
|
||||
|
||||
- Phase: [XX-name]
|
||||
- Task: [X] of [Y]
|
||||
- Status: [in_progress/blocked]
|
||||
- Committed as WIP
|
||||
|
||||
To resume: /gsd:resume-work
|
||||
|
||||
```
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] .continue-here.md created in correct phase directory
|
||||
- [ ] All sections filled with specific content
|
||||
- [ ] Committed as WIP
|
||||
- [ ] User knows location and how to resume
|
||||
</success_criteria>
|
||||
80
get-shit-done/workflows/set-profile.md
Normal file
80
get-shit-done/workflows/set-profile.md
Normal file
@@ -0,0 +1,80 @@
|
||||
<purpose>
|
||||
Switch the model profile used by GSD agents. Controls which Claude model each agent uses, balancing quality vs token spend.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
Read all files referenced by the invoking prompt's execution_context before starting.
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="validate">
|
||||
Validate argument:
|
||||
|
||||
```
|
||||
if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
|
||||
Error: Invalid profile "$ARGUMENTS.profile"
|
||||
Valid profiles: quality, balanced, budget
|
||||
EXIT
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="ensure_config">
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js config-ensure-section
|
||||
```
|
||||
|
||||
Creates `.planning/config.json` with defaults if missing.
|
||||
</step>
|
||||
|
||||
<step name="update_config">
|
||||
Read current config:
|
||||
```bash
|
||||
cat .planning/config.json
|
||||
```
|
||||
|
||||
Update `model_profile` field:
|
||||
```json
|
||||
{
|
||||
"model_profile": "$ARGUMENTS.profile"
|
||||
}
|
||||
```
|
||||
|
||||
Write updated config back to `.planning/config.json`.
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
Display confirmation with model table for selected profile:
|
||||
|
||||
```
|
||||
✓ Model profile set to: $ARGUMENTS.profile
|
||||
|
||||
Agents will now use:
|
||||
|
||||
[Show table from MODEL_PROFILES in gsd-tools.js for selected profile]
|
||||
|
||||
Example:
|
||||
| Agent | Model |
|
||||
|-------|-------|
|
||||
| gsd-planner | opus |
|
||||
| gsd-executor | sonnet |
|
||||
| gsd-verifier | haiku |
|
||||
| ... | ... |
|
||||
|
||||
Next spawned agents will use the new profile.
|
||||
```
|
||||
|
||||
Map profile names:
|
||||
- quality: use "quality" column from MODEL_PROFILES
|
||||
- balanced: use "balanced" column from MODEL_PROFILES
|
||||
- budget: use "budget" column from MODEL_PROFILES
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Argument validated
|
||||
- [ ] Config file ensured
|
||||
- [ ] Config updated with new model_profile
|
||||
- [ ] Confirmation displayed with model table
|
||||
</success_criteria>
|
||||
142
get-shit-done/workflows/settings.md
Normal file
142
get-shit-done/workflows/settings.md
Normal file
@@ -0,0 +1,142 @@
|
||||
<purpose>
|
||||
Interactive configuration of GSD workflow agents (research, plan_check, verifier) and model profile selection via multi-question prompt. Updates .planning/config.json with user preferences.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
Read all files referenced by the invoking prompt's execution_context before starting.
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="ensure_config">
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js config-ensure-section
|
||||
```
|
||||
|
||||
Creates `.planning/config.json` with defaults if missing.
|
||||
</step>
|
||||
|
||||
<step name="read_current">
|
||||
```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
|
||||
- `model_profile` — which model each agent uses (default: `balanced`)
|
||||
- `git.branching_strategy` — branching approach (default: `"none"`)
|
||||
</step>
|
||||
|
||||
<step name="present_settings">
|
||||
Use AskUserQuestion with current values pre-selected:
|
||||
|
||||
```
|
||||
AskUserQuestion([
|
||||
{
|
||||
question: "Which model profile for agents?",
|
||||
header: "Model",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Quality", description: "Opus everywhere except verification (highest cost)" },
|
||||
{ label: "Balanced (Recommended)", description: "Opus for planning, Sonnet for execution/verification" },
|
||||
{ label: "Budget", description: "Sonnet for writing, Haiku for research/verification (lowest cost)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
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" }
|
||||
]
|
||||
},
|
||||
{
|
||||
question: "Git branching strategy?",
|
||||
header: "Branching",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "None (Recommended)", description: "Commit directly to current branch" },
|
||||
{ label: "Per Phase", description: "Create branch for each phase (gsd/phase-{N}-{name})" },
|
||||
{ label: "Per Milestone", description: "Create branch for entire milestone (gsd/{version}-{name})" }
|
||||
]
|
||||
}
|
||||
])
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="update_config">
|
||||
Merge new settings into existing config.json:
|
||||
|
||||
```json
|
||||
{
|
||||
...existing_config,
|
||||
"model_profile": "quality" | "balanced" | "budget",
|
||||
"workflow": {
|
||||
"research": true/false,
|
||||
"plan_check": true/false,
|
||||
"verifier": true/false
|
||||
},
|
||||
"git": {
|
||||
"branching_strategy": "none" | "phase" | "milestone"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Write updated config to `.planning/config.json`.
|
||||
</step>
|
||||
|
||||
<step name="confirm">
|
||||
Display:
|
||||
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► SETTINGS UPDATED
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
| Setting | Value |
|
||||
|----------------------|-------|
|
||||
| Model Profile | {quality/balanced/budget} |
|
||||
| Plan Researcher | {On/Off} |
|
||||
| Plan Checker | {On/Off} |
|
||||
| Execution Verifier | {On/Off} |
|
||||
| Git Branching | {None/Per Phase/Per Milestone} |
|
||||
|
||||
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
||||
|
||||
Quick commands:
|
||||
- /gsd:set-profile <profile> — switch model profile
|
||||
- /gsd:plan-phase --research — force research
|
||||
- /gsd:plan-phase --skip-research — skip research
|
||||
- /gsd:plan-phase --skip-verify — skip plan check
|
||||
```
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Current config read
|
||||
- [ ] User presented with 5 settings (profile + 3 workflow toggles + git branching)
|
||||
- [ ] Config updated with model_profile, workflow, and git sections
|
||||
- [ ] Changes confirmed to user
|
||||
</success_criteria>
|
||||
Reference in New Issue
Block a user