* feat(gsd-tools): add compound init commands for workflow setup Adds 8 compound commands that return all context a workflow needs in one JSON blob, replacing 5-10 atomic calls per workflow: - init execute-phase: models, config, phase info, plan inventory - init plan-phase: models, workflow flags, existing artifacts - init new-project: models, brownfield detection, state checks - init new-milestone: models, milestone info - init quick: models, next task number, timestamps - init resume: file existence, interrupted agent - init verify-work: models, phase info - init phase-op: generic phase context Updated 8 workflows to use compound commands: - execute-phase, plan-phase, new-project, quick - resume-project, verify-work, discuss-phase Token savings: ~200 lines of bash setup replaced with single init calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(gsd-tools): add 4 new init commands and update files to use compound commands Add new compound init commands: - init todos - context for todo workflows - init milestone-op - context for milestone operations - init map-codebase - context for codebase mapping - init progress - context for progress workflow Update 24 files to use compound init commands instead of atomic calls: - 4 phase operation workflows (add-phase, insert-phase, remove-phase, verify-phase) - 5 todo/milestone workflows (add-todo, check-todos, audit-milestone, complete-milestone, new-milestone) - 6 misc workflows (execute-plan, map-codebase, pause-work, progress, set-profile, settings) - 6 agent files (gsd-executor, gsd-planner, gsd-phase-researcher, gsd-plan-checker, gsd-debugger, gsd-research-synthesizer) - 2 command files (debug, research-phase) - 1 reference file (planning-config) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(gsd-tools): add init to help output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(verify-phase): correct expected init fields The workflow was referencing plans/summaries from init phase-op, but those fields come from ls command. Updated to reference has_plans and plan_count which are actually in phase-op output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
5.3 KiB
<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>
**Step 1: Get task description**Prompt user interactively for the task description:
AskUserQuestion(
header: "Quick Task",
question: "What do you want to do?",
followUp: null
)
Store response as $DESCRIPTION.
If empty, re-prompt: "Please provide a task description."
Step 2: Initialize
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.js init quick "$DESCRIPTION")
Parse JSON for: planner_model, executor_model, commit_docs, next_num, slug, date, timestamp, quick_dir, task_dir, roadmap_exists, planning_exists.
If roadmap_exists is false: Error — Quick mode requires an active project with ROADMAP.md. Run /gsd:new-project first.
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
Step 3: Create task directory
mkdir -p "${task_dir}"
Step 4: Create quick task directory
Create the directory for this quick task:
QUICK_DIR=".planning/quick/${next_num}-${slug}"
mkdir -p "$QUICK_DIR"
Report to user:
Creating quick task ${next_num}: ${DESCRIPTION}
Directory: ${QUICK_DIR}
Store $QUICK_DIR for use in orchestration.
Step 5: Spawn planner (quick mode)
Spawn gsd-planner with quick mode context:
Task(
prompt="
<planning_context>
**Mode:** quick
**Directory:** ${QUICK_DIR}
**Description:** ${DESCRIPTION}
**Project State:**
@.planning/STATE.md
</planning_context>
<constraints>
- Create a SINGLE plan with 1-3 focused tasks
- Quick tasks should be atomic and self-contained
- No research phase, no checker phase
- Target ~30% context usage (simple, focused)
</constraints>
<output>
Write plan to: ${QUICK_DIR}/${next_num}-PLAN.md
Return: ## PLANNING COMPLETE with plan path
</output>
",
subagent_type="gsd-planner",
model="{planner_model}",
description="Quick plan: ${DESCRIPTION}"
)
After planner returns:
- Verify plan exists at
${QUICK_DIR}/${next_num}-PLAN.md - Extract plan count (typically 1 for quick tasks)
- Report: "Plan created: ${QUICK_DIR}/${next_num}-PLAN.md"
If plan not found, error: "Planner failed to create ${next_num}-PLAN.md"
Step 6: Spawn executor
Spawn gsd-executor with plan reference:
Task(
prompt="
Execute quick task ${next_num}.
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
Project state: @.planning/STATE.md
<constraints>
- Execute all tasks in the plan
- Commit each task atomically
- Create summary at: ${QUICK_DIR}/${next_num}-SUMMARY.md
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
</constraints>
",
subagent_type="gsd-executor",
model="{executor_model}",
description="Execute: ${DESCRIPTION}"
)
After executor returns:
- Verify summary exists at
${QUICK_DIR}/${next_num}-SUMMARY.md - Extract commit hash from executor output
- Report completion status
If summary not found, error: "Executor failed to create ${next_num}-SUMMARY.md"
Note: For quick tasks producing multiple plans (rare), spawn executors in parallel waves per execute-phase patterns.
Step 7: Update STATE.md
Update STATE.md with quick task completion record.
7a. Check if "Quick Tasks Completed" section exists:
Read STATE.md and check for ### Quick Tasks Completed section.
7b. If section doesn't exist, create it:
Insert after ### Blockers/Concerns section:
### Quick Tasks Completed
| # | Description | Date | Commit | Directory |
|---|-------------|------|--------|-----------|
7c. Append new row to table:
Use date from init:
| ${next_num} | ${DESCRIPTION} | ${date} | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
7d. Update "Last activity" line:
Use date from init:
Last activity: ${date} - Completed quick task ${next_num}: ${DESCRIPTION}
Use Edit tool to make these changes atomically
Step 8: Final commit and completion
Stage and commit quick task artifacts:
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(quick-${next_num}): ${DESCRIPTION}" --files ${QUICK_DIR}/${next_num}-PLAN.md ${QUICK_DIR}/${next_num}-SUMMARY.md .planning/STATE.md
Get final commit hash:
commit_hash=$(git rev-parse --short HEAD)
Display completion output:
---
GSD > QUICK TASK COMPLETE
Quick Task ${next_num}: ${DESCRIPTION}
Summary: ${QUICK_DIR}/${next_num}-SUMMARY.md
Commit: ${commit_hash}
---
Ready for next task: /gsd:quick
<success_criteria>
- ROADMAP.md validation passes
- User provides task description
- Slug generated (lowercase, hyphens, max 40 chars)
- Next number calculated (001, 002, 003...)
- Directory created at
.planning/quick/NNN-slug/ ${next_num}-PLAN.mdcreated by planner${next_num}-SUMMARY.mdcreated by executor- STATE.md updated with quick task row
- Artifacts committed </success_criteria>