* feat: add workflow templates — named workflow shapes for different types of work Introduces `/gsd start <template>` and `/gsd templates` commands with 8 built-in workflow templates: bugfix, small-feature, spike, hotfix, refactor, security-audit, dep-upgrade, and full-project. Each template defines purpose-specific phases so work gets the right level of ceremony instead of forcing everything through the full milestone pipeline or /gsd quick. Includes auto-detection from natural language, --dry-run preview, state tracking for resume support, git branch management, and artifact directory organization. * fix: guard workflow templates against concurrent auto-mode sessions Block /gsd start when auto-mode is active to prevent git branch conflicts and competing message dispatch. When auto-mode is paused, allow templates to run with an informational notice. * feat: add workflow resume and in-progress detection - /gsd start resume — resumes the most recent in-progress workflow - /gsd start (no args) — shows in-progress workflow if one exists - STATE.json tracks artifactDir and completedAt for lifecycle management - Scans .gsd/workflows/*/STATE.json to find unfinished workflows * chore: remove copyright headers per project conventions
3.5 KiB
3.5 KiB
GSD Workflow Templates — Implementation Plan (Updated)
Date: 2026-03-18
Branch: feat/workflow-templates
Status: In Progress — Phase 1
Architecture Mapping (Plan → Actual Codebase)
The original plan referenced gsd-tools.cjs, lib/init.cjs, lib/core.cjs — these don't exist.
The actual architecture is a TypeScript extension system:
| Plan Reference | Actual Location |
|---|---|
gsd-tools.cjs command routing |
src/resources/extensions/gsd/commands.ts |
lib/workflow-template.cjs |
src/resources/extensions/gsd/workflow-templates.ts (new) |
lib/init.cjs |
No separate init; logic lives in handler module |
lib/core.cjs |
Utilities spread across paths.ts, state.ts, etc. |
~/.claude/get-shit-done/workflow-templates/ |
src/resources/extensions/gsd/workflow-templates/ (new dir) |
/gsd:start, /gsd:templates |
/gsd start, /gsd templates subcommands |
| Prompt templates | src/resources/extensions/gsd/prompts/ |
Phase 1: Foundation (Core Infrastructure)
Files to Create
-
src/resources/extensions/gsd/workflow-templates/registry.json- Template metadata: name, description, phases, triggers, artifact_dir, complexity, agents
-
src/resources/extensions/gsd/workflow-templates.tsloadRegistry()— parse registry.json from extension dirresolveTemplate(nameOrTrigger)— match by name, alias, or trigger keywordsautoDetect(context)— analyze user input + project state for best template matchlistTemplates()— formatted template list for displaygetTemplateInfo(name)— detailed template metadata
-
src/resources/extensions/gsd/commands-workflow-templates.tshandleStart(args, ctx, pi)—/gsd start [template] [args]handleTemplates(args, ctx)—/gsd templates [info <name>]
-
Wire into
commands.ts:- Add
startandtemplatesto subcommand completions - Add handler routing for both commands
- Add
Files to Create (Phase 2 — Templates)
src/resources/extensions/gsd/workflow-templates/bugfix.mdsrc/resources/extensions/gsd/workflow-templates/small-feature.mdsrc/resources/extensions/gsd/workflow-templates/spike.mdsrc/resources/extensions/gsd/workflow-templates/hotfix.mdsrc/resources/extensions/gsd/workflow-templates/refactor.mdsrc/resources/extensions/gsd/workflow-templates/security-audit.mdsrc/resources/extensions/gsd/workflow-templates/dep-upgrade.mdsrc/resources/extensions/gsd/workflow-templates/full-project.md
Prompt Templates
src/resources/extensions/gsd/prompts/workflow-start.md— dispatched when/gsd startresolves a templatesrc/resources/extensions/gsd/prompts/workflow-bugfix.md— bugfix-specific dispatch promptsrc/resources/extensions/gsd/prompts/workflow-small-feature.mdsrc/resources/extensions/gsd/prompts/workflow-spike.mdsrc/resources/extensions/gsd/prompts/workflow-hotfix.md
Success Criteria
/gsd start bugfixresolves template and dispatches workflow prompt/gsd startwith no args auto-detects from context or shows choices/gsd templateslists all available templates/gsd templates info bugfixshows detailed template info- All existing
/gsd *commands work unchanged (zero regression) - Registry validates (all referenced template files exist)
- Templates reuse existing agents and prompt patterns