Files
msd-core/get-shit-done/workflows/quick.md
TÂCHES d44c7dcc9b refactor: update commands, workflows, agents for gsd-tools integration
Commands (15): audit-milestone, complete-milestone, debug, execute-phase,
help, insert-phase, new-milestone, new-project, plan-milestone-gaps,
plan-phase, progress, quick, remove-phase, research-phase, verify-work

Workflows (22): execute-plan (69% reduction), verify-phase (55%), others
Agents (14): All updated for new workflow structure

Total token savings: ~22k chars (75.6% in affected sections)

Ported from: get-shit-done-v2@d1fb2d5, 7f79a9b
2026-02-07 11:25:35 -06:00

6.1 KiB

Execute small, ad-hoc tasks with GSD guarantees (atomic commits, STATE.md tracking) while skipping optional agents (research, plan-checker, verifier). Quick mode spawns gsd-planner (quick mode) + gsd-executor(s), tracks tasks in `.planning/quick/`, and updates STATE.md's "Quick Tasks Completed" table.

<required_reading> Read all files referenced by the invoking prompt's execution_context before starting. </required_reading>

**Step 0: Resolve Model Profile**
PLANNER_MODEL=$(node ~/.claude/get-shit-done/bin/gsd-tools.js resolve-model gsd-planner --raw)
EXECUTOR_MODEL=$(node ~/.claude/get-shit-done/bin/gsd-tools.js resolve-model gsd-executor --raw)

Step 1: Pre-flight validation

Check that an active GSD project exists:

ROADMAP_EXISTS=$(node ~/.claude/get-shit-done/bin/gsd-tools.js verify-path-exists .planning/ROADMAP.md --raw)
if [ "$ROADMAP_EXISTS" != "true" ]; then
  echo "Quick mode requires an active project with ROADMAP.md."
  echo "Run /gsd:new-project first."
  exit 1
fi

If validation fails, stop immediately with the error message.

Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.


Step 2: 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."

Generate slug from description:

slug=$(node ~/.claude/get-shit-done/bin/gsd-tools.js generate-slug "$DESCRIPTION" --raw | cut -c1-40)

Step 3: Calculate next quick task number

Ensure .planning/quick/ directory exists and find the next sequential number:

# Ensure .planning/quick/ exists
mkdir -p .planning/quick

# Find highest existing number and increment
last=$(ls -1d .planning/quick/[0-9][0-9][0-9]-* 2>/dev/null | sort -r | head -1 | xargs -I{} basename {} | grep -oE '^[0-9]+')

if [ -z "$last" ]; then
  next_num="001"
else
  next_num=$(printf "%03d" $((10#$last + 1)))
fi

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:

  1. Verify plan exists at ${QUICK_DIR}/${next_num}-PLAN.md
  2. Extract plan count (typically 1 for quick tasks)
  3. 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:

  1. Verify summary exists at ${QUICK_DIR}/${next_num}-SUMMARY.md
  2. Extract commit hash from executor output
  3. 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:

| ${next_num} | ${DESCRIPTION} | $(node ~/.claude/get-shit-done/bin/gsd-tools.js current-timestamp date --raw) | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |

7d. Update "Last activity" line:

Find and update the line:

Last activity: $(node ~/.claude/get-shit-done/bin/gsd-tools.js current-timestamp date --raw) - 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.md created by planner
  • ${next_num}-SUMMARY.md created by executor
  • STATE.md updated with quick task row
  • Artifacts committed </success_criteria>