gsd-code-first 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.ja-JP.md +834 -0
- package/README.ko-KR.md +823 -0
- package/README.md +937 -0
- package/README.pt-BR.md +452 -0
- package/README.zh-CN.md +800 -0
- package/agents/gsd-advisor-researcher.md +104 -0
- package/agents/gsd-annotator.md +148 -0
- package/agents/gsd-arc-executor.md +537 -0
- package/agents/gsd-arc-planner.md +374 -0
- package/agents/gsd-assumptions-analyzer.md +105 -0
- package/agents/gsd-code-planner.md +155 -0
- package/agents/gsd-codebase-mapper.md +770 -0
- package/agents/gsd-debugger.md +1373 -0
- package/agents/gsd-executor.md +509 -0
- package/agents/gsd-integration-checker.md +443 -0
- package/agents/gsd-nyquist-auditor.md +176 -0
- package/agents/gsd-phase-researcher.md +698 -0
- package/agents/gsd-plan-checker.md +773 -0
- package/agents/gsd-planner.md +1354 -0
- package/agents/gsd-project-researcher.md +654 -0
- package/agents/gsd-prototyper.md +161 -0
- package/agents/gsd-research-synthesizer.md +247 -0
- package/agents/gsd-roadmapper.md +679 -0
- package/agents/gsd-ui-auditor.md +439 -0
- package/agents/gsd-ui-checker.md +300 -0
- package/agents/gsd-ui-researcher.md +357 -0
- package/agents/gsd-user-profiler.md +171 -0
- package/agents/gsd-verifier.md +700 -0
- package/bin/install.js +5009 -0
- package/commands/gsd/add-backlog.md +76 -0
- package/commands/gsd/add-phase.md +43 -0
- package/commands/gsd/add-tests.md +41 -0
- package/commands/gsd/add-todo.md +47 -0
- package/commands/gsd/annotate.md +54 -0
- package/commands/gsd/audit-milestone.md +36 -0
- package/commands/gsd/audit-uat.md +24 -0
- package/commands/gsd/autonomous.md +41 -0
- package/commands/gsd/check-todos.md +45 -0
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/complete-milestone.md +136 -0
- package/commands/gsd/debug.md +173 -0
- package/commands/gsd/deep-plan.md +52 -0
- package/commands/gsd/discuss-phase.md +64 -0
- package/commands/gsd/do.md +30 -0
- package/commands/gsd/execute-phase.md +59 -0
- package/commands/gsd/extract-plan.md +35 -0
- package/commands/gsd/fast.md +30 -0
- package/commands/gsd/forensics.md +56 -0
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +22 -0
- package/commands/gsd/insert-phase.md +32 -0
- package/commands/gsd/iterate.md +124 -0
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/list-phase-assumptions.md +46 -0
- package/commands/gsd/list-workspaces.md +19 -0
- package/commands/gsd/manager.md +39 -0
- package/commands/gsd/map-codebase.md +71 -0
- package/commands/gsd/milestone-summary.md +51 -0
- package/commands/gsd/new-milestone.md +44 -0
- package/commands/gsd/new-project.md +42 -0
- package/commands/gsd/new-workspace.md +44 -0
- package/commands/gsd/next.md +24 -0
- package/commands/gsd/note.md +34 -0
- package/commands/gsd/pause-work.md +38 -0
- package/commands/gsd/plan-milestone-gaps.md +34 -0
- package/commands/gsd/plan-phase.md +47 -0
- package/commands/gsd/plant-seed.md +28 -0
- package/commands/gsd/pr-branch.md +25 -0
- package/commands/gsd/profile-user.md +46 -0
- package/commands/gsd/progress.md +24 -0
- package/commands/gsd/prototype.md +56 -0
- package/commands/gsd/quick.md +47 -0
- package/commands/gsd/reapply-patches.md +123 -0
- package/commands/gsd/remove-phase.md +31 -0
- package/commands/gsd/remove-workspace.md +26 -0
- package/commands/gsd/research-phase.md +195 -0
- package/commands/gsd/resume-work.md +40 -0
- package/commands/gsd/review-backlog.md +61 -0
- package/commands/gsd/review.md +37 -0
- package/commands/gsd/session-report.md +19 -0
- package/commands/gsd/set-mode.md +41 -0
- package/commands/gsd/set-profile.md +12 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/ship.md +23 -0
- package/commands/gsd/stats.md +18 -0
- package/commands/gsd/thread.md +127 -0
- package/commands/gsd/ui-phase.md +34 -0
- package/commands/gsd/ui-review.md +32 -0
- package/commands/gsd/update.md +37 -0
- package/commands/gsd/validate-phase.md +35 -0
- package/commands/gsd/verify-work.md +38 -0
- package/commands/gsd/workstreams.md +63 -0
- package/get-shit-done/bin/gsd-tools.cjs +946 -0
- package/get-shit-done/bin/lib/arc-scanner.cjs +341 -0
- package/get-shit-done/bin/lib/commands.cjs +959 -0
- package/get-shit-done/bin/lib/config.cjs +466 -0
- package/get-shit-done/bin/lib/core.cjs +1230 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +336 -0
- package/get-shit-done/bin/lib/init.cjs +1442 -0
- package/get-shit-done/bin/lib/milestone.cjs +252 -0
- package/get-shit-done/bin/lib/model-profiles.cjs +68 -0
- package/get-shit-done/bin/lib/phase.cjs +888 -0
- package/get-shit-done/bin/lib/profile-output.cjs +952 -0
- package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
- package/get-shit-done/bin/lib/roadmap.cjs +329 -0
- package/get-shit-done/bin/lib/security.cjs +382 -0
- package/get-shit-done/bin/lib/state.cjs +1031 -0
- package/get-shit-done/bin/lib/template.cjs +222 -0
- package/get-shit-done/bin/lib/uat.cjs +282 -0
- package/get-shit-done/bin/lib/verify.cjs +888 -0
- package/get-shit-done/bin/lib/workstream.cjs +491 -0
- package/get-shit-done/commands/gsd/workstreams.md +63 -0
- package/get-shit-done/references/arc-standard.md +315 -0
- package/get-shit-done/references/checkpoints.md +778 -0
- package/get-shit-done/references/continuation-format.md +249 -0
- package/get-shit-done/references/decimal-phase-calculation.md +64 -0
- package/get-shit-done/references/git-integration.md +295 -0
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +36 -0
- package/get-shit-done/references/model-profiles.md +139 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +202 -0
- package/get-shit-done/references/questioning.md +162 -0
- package/get-shit-done/references/tdd.md +263 -0
- package/get-shit-done/references/ui-brand.md +160 -0
- package/get-shit-done/references/user-profiling.md +681 -0
- package/get-shit-done/references/verification-patterns.md +612 -0
- package/get-shit-done/references/workstream-flag.md +58 -0
- package/get-shit-done/templates/DEBUG.md +164 -0
- package/get-shit-done/templates/UAT.md +265 -0
- package/get-shit-done/templates/UI-SPEC.md +100 -0
- package/get-shit-done/templates/VALIDATION.md +76 -0
- package/get-shit-done/templates/claude-md.md +122 -0
- package/get-shit-done/templates/codebase/architecture.md +255 -0
- package/get-shit-done/templates/codebase/concerns.md +310 -0
- package/get-shit-done/templates/codebase/conventions.md +307 -0
- package/get-shit-done/templates/codebase/integrations.md +280 -0
- package/get-shit-done/templates/codebase/stack.md +186 -0
- package/get-shit-done/templates/codebase/structure.md +285 -0
- package/get-shit-done/templates/codebase/testing.md +480 -0
- package/get-shit-done/templates/config.json +44 -0
- package/get-shit-done/templates/context.md +352 -0
- package/get-shit-done/templates/continue-here.md +78 -0
- package/get-shit-done/templates/copilot-instructions.md +7 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/get-shit-done/templates/dev-preferences.md +21 -0
- package/get-shit-done/templates/discovery.md +146 -0
- package/get-shit-done/templates/discussion-log.md +63 -0
- package/get-shit-done/templates/milestone-archive.md +123 -0
- package/get-shit-done/templates/milestone.md +115 -0
- package/get-shit-done/templates/phase-prompt.md +610 -0
- package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/get-shit-done/templates/project.md +186 -0
- package/get-shit-done/templates/requirements.md +231 -0
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/get-shit-done/templates/research-project/STACK.md +120 -0
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/get-shit-done/templates/research.md +552 -0
- package/get-shit-done/templates/retrospective.md +54 -0
- package/get-shit-done/templates/roadmap.md +202 -0
- package/get-shit-done/templates/state.md +176 -0
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +248 -0
- package/get-shit-done/templates/user-profile.md +146 -0
- package/get-shit-done/templates/user-setup.md +311 -0
- package/get-shit-done/templates/verification-report.md +322 -0
- package/get-shit-done/workflows/add-phase.md +112 -0
- package/get-shit-done/workflows/add-tests.md +351 -0
- package/get-shit-done/workflows/add-todo.md +158 -0
- package/get-shit-done/workflows/audit-milestone.md +340 -0
- package/get-shit-done/workflows/audit-uat.md +109 -0
- package/get-shit-done/workflows/autonomous.md +891 -0
- package/get-shit-done/workflows/check-todos.md +177 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +767 -0
- package/get-shit-done/workflows/diagnose-issues.md +231 -0
- package/get-shit-done/workflows/discovery-phase.md +289 -0
- package/get-shit-done/workflows/discuss-phase-assumptions.md +653 -0
- package/get-shit-done/workflows/discuss-phase.md +1049 -0
- package/get-shit-done/workflows/do.md +104 -0
- package/get-shit-done/workflows/execute-phase.md +846 -0
- package/get-shit-done/workflows/execute-plan.md +514 -0
- package/get-shit-done/workflows/fast.md +105 -0
- package/get-shit-done/workflows/forensics.md +265 -0
- package/get-shit-done/workflows/health.md +181 -0
- package/get-shit-done/workflows/help.md +634 -0
- package/get-shit-done/workflows/insert-phase.md +130 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/get-shit-done/workflows/list-workspaces.md +56 -0
- package/get-shit-done/workflows/manager.md +362 -0
- package/get-shit-done/workflows/map-codebase.md +377 -0
- package/get-shit-done/workflows/milestone-summary.md +223 -0
- package/get-shit-done/workflows/new-milestone.md +486 -0
- package/get-shit-done/workflows/new-project.md +1250 -0
- package/get-shit-done/workflows/new-workspace.md +237 -0
- package/get-shit-done/workflows/next.md +97 -0
- package/get-shit-done/workflows/node-repair.md +92 -0
- package/get-shit-done/workflows/note.md +156 -0
- package/get-shit-done/workflows/pause-work.md +176 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +273 -0
- package/get-shit-done/workflows/plan-phase.md +859 -0
- package/get-shit-done/workflows/plant-seed.md +169 -0
- package/get-shit-done/workflows/pr-branch.md +129 -0
- package/get-shit-done/workflows/profile-user.md +450 -0
- package/get-shit-done/workflows/progress.md +507 -0
- package/get-shit-done/workflows/quick.md +757 -0
- package/get-shit-done/workflows/remove-phase.md +155 -0
- package/get-shit-done/workflows/remove-workspace.md +90 -0
- package/get-shit-done/workflows/research-phase.md +82 -0
- package/get-shit-done/workflows/resume-project.md +326 -0
- package/get-shit-done/workflows/review.md +228 -0
- package/get-shit-done/workflows/session-report.md +146 -0
- package/get-shit-done/workflows/settings.md +283 -0
- package/get-shit-done/workflows/ship.md +228 -0
- package/get-shit-done/workflows/stats.md +60 -0
- package/get-shit-done/workflows/transition.md +671 -0
- package/get-shit-done/workflows/ui-phase.md +302 -0
- package/get-shit-done/workflows/ui-review.md +165 -0
- package/get-shit-done/workflows/update.md +323 -0
- package/get-shit-done/workflows/validate-phase.md +174 -0
- package/get-shit-done/workflows/verify-phase.md +254 -0
- package/get-shit-done/workflows/verify-work.md +637 -0
- package/hooks/dist/gsd-check-update.js +114 -0
- package/hooks/dist/gsd-context-monitor.js +156 -0
- package/hooks/dist/gsd-prompt-guard.js +96 -0
- package/hooks/dist/gsd-statusline.js +119 -0
- package/hooks/dist/gsd-workflow-guard.js +94 -0
- package/package.json +52 -0
- package/scripts/base64-scan.sh +262 -0
- package/scripts/build-hooks.js +82 -0
- package/scripts/prompt-injection-scan.sh +198 -0
- package/scripts/run-tests.cjs +29 -0
- package/scripts/secret-scan.sh +227 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Execute a phase prompt (PLAN.md) and create the outcome summary (SUMMARY.md).
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read STATE.md before any operation to load project context.
|
|
7
|
+
Read config.json for planning behavior settings.
|
|
8
|
+
|
|
9
|
+
@~/.claude/get-shit-done/references/git-integration.md
|
|
10
|
+
</required_reading>
|
|
11
|
+
|
|
12
|
+
<available_agent_types>
|
|
13
|
+
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
14
|
+
- gsd-executor — Executes plan tasks, commits, creates SUMMARY.md
|
|
15
|
+
</available_agent_types>
|
|
16
|
+
|
|
17
|
+
<process>
|
|
18
|
+
|
|
19
|
+
<step name="init_context" priority="first">
|
|
20
|
+
Load execution context (paths only to minimize orchestrator context):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init execute-phase "${PHASE}")
|
|
24
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Extract from init JSON: `executor_model`, `commit_docs`, `sub_repos`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`, `state_path`, `config_path`.
|
|
28
|
+
|
|
29
|
+
If `.planning/` missing: error.
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="identify_plan">
|
|
33
|
+
```bash
|
|
34
|
+
# Use plans/summaries from INIT JSON, or list files
|
|
35
|
+
(ls .planning/phases/XX-name/*-PLAN.md 2>/dev/null || true) | sort
|
|
36
|
+
(ls .planning/phases/XX-name/*-SUMMARY.md 2>/dev/null || true) | sort
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Find first PLAN without matching SUMMARY. Decimal phases supported (`01.1-hotfix/`):
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
PHASE=$(echo "$PLAN_PATH" | grep -oE '[0-9]+(\.[0-9]+)?-[0-9]+')
|
|
43
|
+
# config settings can be fetched via gsd-tools config-get if needed
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
<if mode="yolo">
|
|
47
|
+
Auto-approve: `⚡ Execute {phase}-{plan}-PLAN.md [Plan X of Y for Phase Z]` → parse_segments.
|
|
48
|
+
</if>
|
|
49
|
+
|
|
50
|
+
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
51
|
+
Present plan identification, wait for confirmation.
|
|
52
|
+
</if>
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="record_start_time">
|
|
56
|
+
```bash
|
|
57
|
+
PLAN_START_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
58
|
+
PLAN_START_EPOCH=$(date +%s)
|
|
59
|
+
```
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step name="parse_segments">
|
|
63
|
+
```bash
|
|
64
|
+
grep -n "type=\"checkpoint" .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Routing by checkpoint type:**
|
|
68
|
+
|
|
69
|
+
| Checkpoints | Pattern | Execution |
|
|
70
|
+
|-------------|---------|-----------|
|
|
71
|
+
| None | A (autonomous) | Single subagent: full plan + SUMMARY + commit |
|
|
72
|
+
| Verify-only | B (segmented) | Segments between checkpoints. After none/human-verify → SUBAGENT. After decision/human-action → MAIN |
|
|
73
|
+
| Decision | C (main) | Execute entirely in main context |
|
|
74
|
+
|
|
75
|
+
**Pattern A:** init_agent_tracking → spawn Task(subagent_type="gsd-executor", model=executor_model, isolation="worktree") with prompt: execute plan at [path], autonomous, all tasks + SUMMARY + commit, follow deviation/auth rules, report: plan name, tasks, SUMMARY path, commit hash → track agent_id → wait → update tracking → report.
|
|
76
|
+
|
|
77
|
+
**Pattern B:** Execute segment-by-segment. Autonomous segments: spawn subagent for assigned tasks only (no SUMMARY/commit). Checkpoints: main context. After all segments: aggregate, create SUMMARY, commit. See segment_execution.
|
|
78
|
+
|
|
79
|
+
**Pattern C:** Execute in main using standard flow (step name="execute").
|
|
80
|
+
|
|
81
|
+
Fresh context per subagent preserves peak quality. Main context stays lean.
|
|
82
|
+
</step>
|
|
83
|
+
|
|
84
|
+
<step name="init_agent_tracking">
|
|
85
|
+
```bash
|
|
86
|
+
if [ ! -f .planning/agent-history.json ]; then
|
|
87
|
+
echo '{"version":"1.0","max_entries":50,"entries":[]}' > .planning/agent-history.json
|
|
88
|
+
fi
|
|
89
|
+
rm -f .planning/current-agent-id.txt
|
|
90
|
+
if [ -f .planning/current-agent-id.txt ]; then
|
|
91
|
+
INTERRUPTED_ID=$(cat .planning/current-agent-id.txt)
|
|
92
|
+
echo "Found interrupted agent: $INTERRUPTED_ID"
|
|
93
|
+
fi
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
If interrupted: ask user to resume (Task `resume` parameter) or start fresh.
|
|
97
|
+
|
|
98
|
+
**Tracking protocol:** On spawn: write agent_id to `current-agent-id.txt`, append to agent-history.json: `{"agent_id":"[id]","task_description":"[desc]","phase":"[phase]","plan":"[plan]","segment":[num|null],"timestamp":"[ISO]","status":"spawned","completion_timestamp":null}`. On completion: status → "completed", set completion_timestamp, delete current-agent-id.txt. Prune: if entries > max_entries, remove oldest "completed" (never "spawned").
|
|
99
|
+
|
|
100
|
+
Run for Pattern A/B before spawning. Pattern C: skip.
|
|
101
|
+
</step>
|
|
102
|
+
|
|
103
|
+
<step name="segment_execution">
|
|
104
|
+
Pattern B only (verify-only checkpoints). Skip for A/C.
|
|
105
|
+
|
|
106
|
+
1. Parse segment map: checkpoint locations and types
|
|
107
|
+
2. Per segment:
|
|
108
|
+
- Subagent route: spawn gsd-executor for assigned tasks only. Prompt: task range, plan path, read full plan for context, execute assigned tasks, track deviations, NO SUMMARY/commit. Track via agent protocol.
|
|
109
|
+
- Main route: execute tasks using standard flow (step name="execute")
|
|
110
|
+
3. After ALL segments: aggregate files/deviations/decisions → create SUMMARY.md → commit → self-check:
|
|
111
|
+
- Verify key-files.created exist on disk with `[ -f ]`
|
|
112
|
+
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
113
|
+
- Append `## Self-Check: PASSED` or `## Self-Check: FAILED` to SUMMARY
|
|
114
|
+
|
|
115
|
+
**Known Claude Code bug (classifyHandoffIfNeeded):** If any segment agent reports "failed" with `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a real failure. Run spot-checks; if they pass, treat as successful.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</step>
|
|
121
|
+
|
|
122
|
+
<step name="load_prompt">
|
|
123
|
+
```bash
|
|
124
|
+
cat .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
125
|
+
```
|
|
126
|
+
This IS the execution instructions. Follow exactly. If plan references CONTEXT.md: honor user's vision throughout.
|
|
127
|
+
|
|
128
|
+
**If plan contains `<interfaces>` block:** These are pre-extracted type definitions and contracts. Use them directly — do NOT re-read the source files to discover types. The planner already extracted what you need.
|
|
129
|
+
</step>
|
|
130
|
+
|
|
131
|
+
<step name="previous_phase_check">
|
|
132
|
+
```bash
|
|
133
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phases list --type summaries --raw
|
|
134
|
+
# Extract the second-to-last summary from the JSON result
|
|
135
|
+
```
|
|
136
|
+
If previous SUMMARY has unresolved "Issues Encountered" or "Next Phase Readiness" blockers: AskUserQuestion(header="Previous Issues", options: "Proceed anyway" | "Address first" | "Review previous").
|
|
137
|
+
</step>
|
|
138
|
+
|
|
139
|
+
<step name="execute">
|
|
140
|
+
Deviations are normal — handle via rules below.
|
|
141
|
+
|
|
142
|
+
1. Read @context files from prompt
|
|
143
|
+
2. **MCP tools:** If CLAUDE.md or project instructions reference MCP tools (e.g. jCodeMunch for code navigation), prefer them over Grep/Glob when available. Fall back to Grep/Glob if MCP tools are not accessible.
|
|
144
|
+
3. Per task:
|
|
145
|
+
- **MANDATORY read_first gate:** If the task has a `<read_first>` field, you MUST read every listed file BEFORE making any edits. This is not optional. Do not skip files because you "already know" what's in them — read them. The read_first files establish ground truth for the task.
|
|
146
|
+
- `type="auto"`: if `tdd="true"` → TDD execution. Implement with deviation rules + auth gates. Verify done criteria. Commit (see task_commit). Track hash for Summary.
|
|
147
|
+
- `type="checkpoint:*"`: STOP → checkpoint_protocol → wait for user → continue only after confirmation.
|
|
148
|
+
- **MANDATORY acceptance_criteria check:** After completing each task, if it has `<acceptance_criteria>`, verify EVERY criterion before moving to the next task. Use grep, file reads, or CLI commands to confirm each criterion. If any criterion fails, fix the implementation before proceeding. Do not skip criteria or mark them as "will verify later".
|
|
149
|
+
3. Run `<verification>` checks
|
|
150
|
+
4. Confirm `<success_criteria>` met
|
|
151
|
+
5. Document deviations in Summary
|
|
152
|
+
</step>
|
|
153
|
+
|
|
154
|
+
<authentication_gates>
|
|
155
|
+
|
|
156
|
+
## Authentication Gates
|
|
157
|
+
|
|
158
|
+
Auth errors during execution are NOT failures — they're expected interaction points.
|
|
159
|
+
|
|
160
|
+
**Indicators:** "Not authenticated", "Unauthorized", 401/403, "Please run {tool} login", "Set {ENV_VAR}"
|
|
161
|
+
|
|
162
|
+
**Protocol:**
|
|
163
|
+
1. Recognize auth gate (not a bug)
|
|
164
|
+
2. STOP task execution
|
|
165
|
+
3. Create dynamic checkpoint:human-action with exact auth steps
|
|
166
|
+
4. Wait for user to authenticate
|
|
167
|
+
5. Verify credentials work
|
|
168
|
+
6. Retry original task
|
|
169
|
+
7. Continue normally
|
|
170
|
+
|
|
171
|
+
**Example:** `vercel --yes` → "Not authenticated" → checkpoint asking user to `vercel login` → verify with `vercel whoami` → retry deploy → continue
|
|
172
|
+
|
|
173
|
+
**In Summary:** Document as normal flow under "## Authentication Gates", not as deviations.
|
|
174
|
+
|
|
175
|
+
</authentication_gates>
|
|
176
|
+
|
|
177
|
+
<deviation_rules>
|
|
178
|
+
|
|
179
|
+
## Deviation Rules
|
|
180
|
+
|
|
181
|
+
You WILL discover unplanned work. Apply automatically, track all for Summary.
|
|
182
|
+
|
|
183
|
+
| Rule | Trigger | Action | Permission |
|
|
184
|
+
|------|---------|--------|------------|
|
|
185
|
+
| **1: Bug** | Broken behavior, errors, wrong queries, type errors, security vulns, race conditions, leaks | Fix → test → verify → track `[Rule 1 - Bug]` | Auto |
|
|
186
|
+
| **2: Missing Critical** | Missing essentials: error handling, validation, auth, CSRF/CORS, rate limiting, indexes, logging | Add → test → verify → track `[Rule 2 - Missing Critical]` | Auto |
|
|
187
|
+
| **3: Blocking** | Prevents completion: missing deps, wrong types, broken imports, missing env/config/files, circular deps | Fix blocker → verify proceeds → track `[Rule 3 - Blocking]` | Auto |
|
|
188
|
+
| **4: Architectural** | Structural change: new DB table, schema change, new service, switching libs, breaking API, new infra | STOP → present decision (below) → track `[Rule 4 - Architectural]` | Ask user |
|
|
189
|
+
|
|
190
|
+
**Rule 4 format:**
|
|
191
|
+
```
|
|
192
|
+
⚠️ Architectural Decision Needed
|
|
193
|
+
|
|
194
|
+
Current task: [task name]
|
|
195
|
+
Discovery: [what prompted this]
|
|
196
|
+
Proposed change: [modification]
|
|
197
|
+
Why needed: [rationale]
|
|
198
|
+
Impact: [what this affects]
|
|
199
|
+
Alternatives: [other approaches]
|
|
200
|
+
|
|
201
|
+
Proceed with proposed change? (yes / different approach / defer)
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Priority:** Rule 4 (STOP) > Rules 1-3 (auto) > unsure → Rule 4
|
|
205
|
+
**Edge cases:** missing validation → R2 | null crash → R1 | new table → R4 | new column → R1/2
|
|
206
|
+
**Heuristic:** Affects correctness/security/completion? → R1-3. Maybe? → R4.
|
|
207
|
+
|
|
208
|
+
</deviation_rules>
|
|
209
|
+
|
|
210
|
+
<deviation_documentation>
|
|
211
|
+
|
|
212
|
+
## Documenting Deviations
|
|
213
|
+
|
|
214
|
+
Summary MUST include deviations section. None? → `## Deviations from Plan\n\nNone - plan executed exactly as written.`
|
|
215
|
+
|
|
216
|
+
Per deviation: **[Rule N - Category] Title** — Found during: Task X | Issue | Fix | Files modified | Verification | Commit hash
|
|
217
|
+
|
|
218
|
+
End with: **Total deviations:** N auto-fixed (breakdown). **Impact:** assessment.
|
|
219
|
+
|
|
220
|
+
</deviation_documentation>
|
|
221
|
+
|
|
222
|
+
<tdd_plan_execution>
|
|
223
|
+
## TDD Execution
|
|
224
|
+
|
|
225
|
+
For `type: tdd` plans — RED-GREEN-REFACTOR:
|
|
226
|
+
|
|
227
|
+
1. **Infrastructure** (first TDD plan only): detect project, install framework, config, verify empty suite
|
|
228
|
+
2. **RED:** Read `<behavior>` → failing test(s) → run (MUST fail) → commit: `test({phase}-{plan}): add failing test for [feature]`
|
|
229
|
+
3. **GREEN:** Read `<implementation>` → minimal code → run (MUST pass) → commit: `feat({phase}-{plan}): implement [feature]`
|
|
230
|
+
4. **REFACTOR:** Clean up → tests MUST pass → commit: `refactor({phase}-{plan}): clean up [feature]`
|
|
231
|
+
|
|
232
|
+
Errors: RED doesn't fail → investigate test/existing feature. GREEN doesn't pass → debug, iterate. REFACTOR breaks → undo.
|
|
233
|
+
|
|
234
|
+
See `~/.claude/get-shit-done/references/tdd.md` for structure.
|
|
235
|
+
</tdd_plan_execution>
|
|
236
|
+
|
|
237
|
+
<precommit_failure_handling>
|
|
238
|
+
## Pre-commit Hook Failure Handling
|
|
239
|
+
|
|
240
|
+
Your commits may trigger pre-commit hooks. Auto-fix hooks handle themselves transparently — files get fixed and re-staged automatically.
|
|
241
|
+
|
|
242
|
+
**If running as a parallel executor agent (spawned by execute-phase):**
|
|
243
|
+
Use `--no-verify` on all commits. Pre-commit hooks cause build lock contention when multiple agents commit simultaneously (e.g., cargo lock fights in Rust projects). The orchestrator validates once after all agents complete.
|
|
244
|
+
|
|
245
|
+
**If running as the sole executor (sequential mode):**
|
|
246
|
+
If a commit is BLOCKED by a hook:
|
|
247
|
+
|
|
248
|
+
1. The `git commit` command fails with hook error output
|
|
249
|
+
2. Read the error — it tells you exactly which hook and what failed
|
|
250
|
+
3. Fix the issue (type error, lint violation, secret leak, etc.)
|
|
251
|
+
4. `git add` the fixed files
|
|
252
|
+
5. Retry the commit
|
|
253
|
+
6. Budget 1-2 retry cycles per commit
|
|
254
|
+
</precommit_failure_handling>
|
|
255
|
+
|
|
256
|
+
<task_commit>
|
|
257
|
+
## Task Commit Protocol
|
|
258
|
+
|
|
259
|
+
After each task (verification passed, done criteria met), commit immediately.
|
|
260
|
+
|
|
261
|
+
**1. Check:** `git status --short`
|
|
262
|
+
|
|
263
|
+
**2. Stage individually** (NEVER `git add .` or `git add -A`):
|
|
264
|
+
```bash
|
|
265
|
+
git add src/api/auth.ts
|
|
266
|
+
git add src/types/user.ts
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**3. Commit type:**
|
|
270
|
+
|
|
271
|
+
| Type | When | Example |
|
|
272
|
+
|------|------|---------|
|
|
273
|
+
| `feat` | New functionality | feat(08-02): create user registration endpoint |
|
|
274
|
+
| `fix` | Bug fix | fix(08-02): correct email validation regex |
|
|
275
|
+
| `test` | Test-only (TDD RED) | test(08-02): add failing test for password hashing |
|
|
276
|
+
| `refactor` | No behavior change (TDD REFACTOR) | refactor(08-02): extract validation to helper |
|
|
277
|
+
| `perf` | Performance | perf(08-02): add database index |
|
|
278
|
+
| `docs` | Documentation | docs(08-02): add API docs |
|
|
279
|
+
| `style` | Formatting | style(08-02): format auth module |
|
|
280
|
+
| `chore` | Config/deps | chore(08-02): add bcrypt dependency |
|
|
281
|
+
|
|
282
|
+
**4. Format:** `{type}({phase}-{plan}): {description}` with bullet points for key changes.
|
|
283
|
+
|
|
284
|
+
<sub_repos_commit_flow>
|
|
285
|
+
**Sub-repos mode:** If `sub_repos` is configured (non-empty array from init context), use `commit-to-subrepo` instead of standard git commit. This routes files to their correct sub-repo based on path prefix.
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit-to-subrepo "{type}({phase}-{plan}): {description}" --files file1 file2 ...
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The command groups files by sub-repo prefix and commits atomically to each. Returns JSON: `{ committed: true, repos: { "backend": { hash: "abc", files: [...] }, ... } }`.
|
|
292
|
+
|
|
293
|
+
Record hashes from each repo in the response for SUMMARY tracking.
|
|
294
|
+
|
|
295
|
+
**If `sub_repos` is empty or not set:** Use standard git commit flow below.
|
|
296
|
+
</sub_repos_commit_flow>
|
|
297
|
+
|
|
298
|
+
**5. Record hash:**
|
|
299
|
+
```bash
|
|
300
|
+
TASK_COMMIT=$(git rev-parse --short HEAD)
|
|
301
|
+
TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}")
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**6. Check for untracked generated files:**
|
|
305
|
+
```bash
|
|
306
|
+
git status --short | grep '^??'
|
|
307
|
+
```
|
|
308
|
+
If new untracked files appeared after running scripts or tools, decide for each:
|
|
309
|
+
- **Commit it** — if it's a source file, config, or intentional artifact
|
|
310
|
+
- **Add to .gitignore** — if it's a generated/runtime output (build artifacts, `.env` files, cache files, compiled output)
|
|
311
|
+
- Do NOT leave generated files untracked
|
|
312
|
+
|
|
313
|
+
</task_commit>
|
|
314
|
+
|
|
315
|
+
<step name="checkpoint_protocol">
|
|
316
|
+
On `type="checkpoint:*"`: automate everything possible first. Checkpoints are for verification/decisions only.
|
|
317
|
+
|
|
318
|
+
Display: `CHECKPOINT: [Type]` box → Progress {X}/{Y} → Task name → type-specific content → `YOUR ACTION: [signal]`
|
|
319
|
+
|
|
320
|
+
| Type | Content | Resume signal |
|
|
321
|
+
|------|---------|---------------|
|
|
322
|
+
| human-verify (90%) | What was built + verification steps (commands/URLs) | "approved" or describe issues |
|
|
323
|
+
| decision (9%) | Decision needed + context + options with pros/cons | "Select: option-id" |
|
|
324
|
+
| human-action (1%) | What was automated + ONE manual step + verification plan | "done" |
|
|
325
|
+
|
|
326
|
+
After response: verify if specified. Pass → continue. Fail → inform, wait. WAIT for user — do NOT hallucinate completion.
|
|
327
|
+
|
|
328
|
+
See ~/.claude/get-shit-done/references/checkpoints.md for details.
|
|
329
|
+
</step>
|
|
330
|
+
|
|
331
|
+
<step name="checkpoint_return_for_orchestrator">
|
|
332
|
+
When spawned via Task and hitting checkpoint: return structured state (cannot interact with user directly).
|
|
333
|
+
|
|
334
|
+
**Required return:** 1) Completed Tasks table (hashes + files) 2) Current Task (what's blocking) 3) Checkpoint Details (user-facing content) 4) Awaiting (what's needed from user)
|
|
335
|
+
|
|
336
|
+
Orchestrator parses → presents to user → spawns fresh continuation with your completed tasks state. You will NOT be resumed. In main context: use checkpoint_protocol above.
|
|
337
|
+
</step>
|
|
338
|
+
|
|
339
|
+
<step name="verification_failure_gate">
|
|
340
|
+
If verification fails:
|
|
341
|
+
|
|
342
|
+
**Check if node repair is enabled** (default: on):
|
|
343
|
+
```bash
|
|
344
|
+
NODE_REPAIR=$(node "./.claude/get-shit-done/bin/gsd-tools.cjs" config-get workflow.node_repair 2>/dev/null || echo "true")
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
If `NODE_REPAIR` is `true`: invoke `@./.claude/get-shit-done/workflows/node-repair.md` with:
|
|
348
|
+
- FAILED_TASK: task number, name, done-criteria
|
|
349
|
+
- ERROR: expected vs actual result
|
|
350
|
+
- PLAN_CONTEXT: adjacent task names + phase goal
|
|
351
|
+
- REPAIR_BUDGET: `workflow.node_repair_budget` from config (default: 2)
|
|
352
|
+
|
|
353
|
+
Node repair will attempt RETRY, DECOMPOSE, or PRUNE autonomously. Only reaches this gate again if repair budget is exhausted (ESCALATE).
|
|
354
|
+
|
|
355
|
+
If `NODE_REPAIR` is `false` OR repair returns ESCALATE: STOP. Present: "Verification failed for Task [X]: [name]. Expected: [criteria]. Actual: [result]. Repair attempted: [summary of what was tried]." Options: Retry | Skip (mark incomplete) | Stop (investigate). If skipped → SUMMARY "Issues Encountered".
|
|
356
|
+
</step>
|
|
357
|
+
|
|
358
|
+
<step name="record_completion_time">
|
|
359
|
+
```bash
|
|
360
|
+
PLAN_END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
361
|
+
PLAN_END_EPOCH=$(date +%s)
|
|
362
|
+
|
|
363
|
+
DURATION_SEC=$(( PLAN_END_EPOCH - PLAN_START_EPOCH ))
|
|
364
|
+
DURATION_MIN=$(( DURATION_SEC / 60 ))
|
|
365
|
+
|
|
366
|
+
if [[ $DURATION_MIN -ge 60 ]]; then
|
|
367
|
+
HRS=$(( DURATION_MIN / 60 ))
|
|
368
|
+
MIN=$(( DURATION_MIN % 60 ))
|
|
369
|
+
DURATION="${HRS}h ${MIN}m"
|
|
370
|
+
else
|
|
371
|
+
DURATION="${DURATION_MIN} min"
|
|
372
|
+
fi
|
|
373
|
+
```
|
|
374
|
+
</step>
|
|
375
|
+
|
|
376
|
+
<step name="generate_user_setup">
|
|
377
|
+
```bash
|
|
378
|
+
grep -A 50 "^user_setup:" .planning/phases/XX-name/{phase}-{plan}-PLAN.md | head -50
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
If user_setup exists: create `{phase}-USER-SETUP.md` using template `~/.claude/get-shit-done/templates/user-setup.md`. Per service: env vars table, account setup checklist, dashboard config, local dev notes, verification commands. Status "Incomplete". Set `USER_SETUP_CREATED=true`. If empty/missing: skip.
|
|
382
|
+
</step>
|
|
383
|
+
|
|
384
|
+
<step name="create_summary">
|
|
385
|
+
Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `~/.claude/get-shit-done/templates/summary.md`.
|
|
386
|
+
|
|
387
|
+
**Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements-completed (**MUST** copy `requirements` array from PLAN.md frontmatter verbatim) | duration ($DURATION), completed ($PLAN_END_TIME date).
|
|
388
|
+
|
|
389
|
+
Title: `# Phase [X] Plan [Y]: [Name] Summary`
|
|
390
|
+
|
|
391
|
+
One-liner SUBSTANTIVE: "JWT auth with refresh rotation using jose library" not "Authentication implemented"
|
|
392
|
+
|
|
393
|
+
Include: duration, start/end times, task count, file count.
|
|
394
|
+
|
|
395
|
+
Next: more plans → "Ready for {next-plan}" | last → "Phase complete, ready for next step".
|
|
396
|
+
</step>
|
|
397
|
+
|
|
398
|
+
<step name="update_current_position">
|
|
399
|
+
Update STATE.md using gsd-tools:
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
# Advance plan counter (handles last-plan edge case)
|
|
403
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state advance-plan
|
|
404
|
+
|
|
405
|
+
# Recalculate progress bar from disk state
|
|
406
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state update-progress
|
|
407
|
+
|
|
408
|
+
# Record execution metrics
|
|
409
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state record-metric \
|
|
410
|
+
--phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
|
|
411
|
+
--tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
|
|
412
|
+
```
|
|
413
|
+
</step>
|
|
414
|
+
|
|
415
|
+
<step name="extract_decisions_and_issues">
|
|
416
|
+
From SUMMARY: Extract decisions and add to STATE.md:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# Add each decision from SUMMARY key-decisions
|
|
420
|
+
# Prefer file inputs for shell-safe text (preserves `$`, `*`, etc. exactly)
|
|
421
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state add-decision \
|
|
422
|
+
--phase "${PHASE}" --summary-file "${DECISION_TEXT_FILE}" --rationale-file "${RATIONALE_FILE}"
|
|
423
|
+
|
|
424
|
+
# Add blockers if any found
|
|
425
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state add-blocker --text-file "${BLOCKER_TEXT_FILE}"
|
|
426
|
+
```
|
|
427
|
+
</step>
|
|
428
|
+
|
|
429
|
+
<step name="update_session_continuity">
|
|
430
|
+
Update session info using gsd-tools:
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" state record-session \
|
|
434
|
+
--stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md" \
|
|
435
|
+
--resume-file "None"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
Keep STATE.md under 150 lines.
|
|
439
|
+
</step>
|
|
440
|
+
|
|
441
|
+
<step name="issues_review_gate">
|
|
442
|
+
If SUMMARY "Issues Encountered" ≠ "None": yolo → log and continue. Interactive → present issues, wait for acknowledgment.
|
|
443
|
+
</step>
|
|
444
|
+
|
|
445
|
+
<step name="update_roadmap">
|
|
446
|
+
```bash
|
|
447
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap update-plan-progress "${PHASE}"
|
|
448
|
+
```
|
|
449
|
+
Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct count and status (`In Progress` or `Complete` with date).
|
|
450
|
+
</step>
|
|
451
|
+
|
|
452
|
+
<step name="update_requirements">
|
|
453
|
+
Mark completed requirements from the PLAN.md frontmatter `requirements:` field:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" requirements mark-complete ${REQ_IDS}
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH-01, AUTH-02]`). If no requirements field, skip.
|
|
460
|
+
</step>
|
|
461
|
+
|
|
462
|
+
<step name="git_commit_metadata">
|
|
463
|
+
Task code already committed per-task. Commit plan metadata:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
|
|
467
|
+
```
|
|
468
|
+
</step>
|
|
469
|
+
|
|
470
|
+
<step name="update_codebase_map">
|
|
471
|
+
If .planning/codebase/ doesn't exist: skip.
|
|
472
|
+
|
|
473
|
+
```bash
|
|
474
|
+
FIRST_TASK=$(git log --oneline --grep="feat({phase}-{plan}):" --grep="fix({phase}-{plan}):" --grep="test({phase}-{plan}):" --reverse | head -1 | cut -d' ' -f1)
|
|
475
|
+
git diff --name-only ${FIRST_TASK}^..HEAD 2>/dev/null || true
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Update only structural changes: new src/ dir → STRUCTURE.md | deps → STACK.md | file pattern → CONVENTIONS.md | API client → INTEGRATIONS.md | config → STACK.md | renamed → update paths. Skip code-only/bugfix/content changes.
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "" --files .planning/codebase/*.md --amend
|
|
482
|
+
```
|
|
483
|
+
</step>
|
|
484
|
+
|
|
485
|
+
<step name="offer_next">
|
|
486
|
+
If `USER_SETUP_CREATED=true`: display `⚠️ USER SETUP REQUIRED` with path + env/config tasks at TOP.
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
(ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null || true) | wc -l
|
|
490
|
+
(ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null || true) | wc -l
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
| Condition | Route | Action |
|
|
494
|
+
|-----------|-------|--------|
|
|
495
|
+
| summaries < plans | **A: More plans** | Find next PLAN without SUMMARY. Yolo: auto-continue. Interactive: show next plan, suggest `/gsd:execute-phase {phase}` + `/gsd:verify-work`. STOP here. |
|
|
496
|
+
| summaries = plans, current < highest phase | **B: Phase done** | Show completion, suggest `/gsd:plan-phase {Z+1}` + `/gsd:verify-work {Z}` + `/gsd:discuss-phase {Z+1}` |
|
|
497
|
+
| summaries = plans, current = highest phase | **C: Milestone done** | Show banner, suggest `/gsd:complete-milestone` + `/gsd:verify-work` + `/gsd:add-phase` |
|
|
498
|
+
|
|
499
|
+
All routes: `/clear` first for fresh context.
|
|
500
|
+
</step>
|
|
501
|
+
|
|
502
|
+
</process>
|
|
503
|
+
|
|
504
|
+
<success_criteria>
|
|
505
|
+
|
|
506
|
+
- All tasks from PLAN.md completed
|
|
507
|
+
- All verifications pass
|
|
508
|
+
- USER-SETUP.md generated if user_setup in frontmatter
|
|
509
|
+
- SUMMARY.md created with substantive content
|
|
510
|
+
- STATE.md updated (position, decisions, issues, session)
|
|
511
|
+
- ROADMAP.md updated
|
|
512
|
+
- If codebase map exists: map updated with execution changes (or skipped if no significant changes)
|
|
513
|
+
- If USER-SETUP.md created: prominently surfaced in completion output
|
|
514
|
+
</success_criteria>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Execute a trivial task inline without subagent overhead. No PLAN.md, no Task spawning,
|
|
3
|
+
no research, no plan checking. Just: understand → do → commit → log.
|
|
4
|
+
|
|
5
|
+
For tasks like: fix a typo, update a config value, add a missing import, rename a
|
|
6
|
+
variable, commit uncommitted work, add a .gitignore entry, bump a version number.
|
|
7
|
+
|
|
8
|
+
Use /gsd:quick for anything that needs multi-step planning or research.
|
|
9
|
+
</purpose>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse_task">
|
|
14
|
+
Parse `$ARGUMENTS` for the task description.
|
|
15
|
+
|
|
16
|
+
If empty, ask:
|
|
17
|
+
```
|
|
18
|
+
What's the quick fix? (one sentence)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Store as `$TASK`.
|
|
22
|
+
</step>
|
|
23
|
+
|
|
24
|
+
<step name="scope_check">
|
|
25
|
+
**Before doing anything, verify this is actually trivial.**
|
|
26
|
+
|
|
27
|
+
A task is trivial if it can be completed in:
|
|
28
|
+
- ≤ 3 file edits
|
|
29
|
+
- ≤ 1 minute of work
|
|
30
|
+
- No new dependencies or architecture changes
|
|
31
|
+
- No research needed
|
|
32
|
+
|
|
33
|
+
If the task seems non-trivial (multi-file refactor, new feature, needs research),
|
|
34
|
+
say:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
This looks like it needs planning. Use /gsd:quick instead:
|
|
38
|
+
/gsd:quick "{task description}"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
And stop.
|
|
42
|
+
</step>
|
|
43
|
+
|
|
44
|
+
<step name="execute_inline">
|
|
45
|
+
Do the work directly:
|
|
46
|
+
|
|
47
|
+
1. Read the relevant file(s)
|
|
48
|
+
2. Make the change(s)
|
|
49
|
+
3. Verify the change works (run existing tests if applicable, or do a quick sanity check)
|
|
50
|
+
|
|
51
|
+
**No PLAN.md.** Just do it.
|
|
52
|
+
</step>
|
|
53
|
+
|
|
54
|
+
<step name="commit">
|
|
55
|
+
Commit the change atomically:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
git add -A
|
|
59
|
+
git commit -m "fix: {concise description of what changed}"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use conventional commit format: `fix:`, `feat:`, `docs:`, `chore:`, `refactor:` as appropriate.
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="log_to_state">
|
|
66
|
+
If `.planning/STATE.md` exists, append to the "Quick Tasks Completed" table.
|
|
67
|
+
If the table doesn't exist, skip this step silently.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Check if STATE.md has quick tasks table
|
|
71
|
+
if grep -q "Quick Tasks Completed" .planning/STATE.md 2>/dev/null; then
|
|
72
|
+
# Append entry — workflow handles the format
|
|
73
|
+
echo "| $(date +%Y-%m-%d) | fast | $TASK | ✅ |" >> .planning/STATE.md
|
|
74
|
+
fi
|
|
75
|
+
```
|
|
76
|
+
</step>
|
|
77
|
+
|
|
78
|
+
<step name="done">
|
|
79
|
+
Report completion:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
✅ Done: {what was changed}
|
|
83
|
+
Commit: {short hash}
|
|
84
|
+
Files: {list of changed files}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
No next-step suggestions. No workflow routing. Just done.
|
|
88
|
+
</step>
|
|
89
|
+
|
|
90
|
+
</process>
|
|
91
|
+
|
|
92
|
+
<guardrails>
|
|
93
|
+
- NEVER spawn a Task/subagent — this runs inline
|
|
94
|
+
- NEVER create PLAN.md or SUMMARY.md files
|
|
95
|
+
- NEVER run research or plan-checking
|
|
96
|
+
- If the task takes more than 3 file edits, STOP and redirect to /gsd:quick
|
|
97
|
+
- If you're unsure how to implement it, STOP and redirect to /gsd:quick
|
|
98
|
+
</guardrails>
|
|
99
|
+
|
|
100
|
+
<success_criteria>
|
|
101
|
+
- [ ] Task completed in current context (no subagents)
|
|
102
|
+
- [ ] Atomic git commit with conventional message
|
|
103
|
+
- [ ] STATE.md updated if it exists
|
|
104
|
+
- [ ] Total operation under 2 minutes wall time
|
|
105
|
+
</success_criteria>
|