claude-cook 1.10.1

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.
Files changed (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +607 -0
  3. package/agents/gsd-codebase-mapper.md +738 -0
  4. package/agents/gsd-debugger.md +1203 -0
  5. package/agents/gsd-executor.md +784 -0
  6. package/agents/gsd-integration-checker.md +423 -0
  7. package/agents/gsd-phase-researcher.md +641 -0
  8. package/agents/gsd-plan-checker.md +745 -0
  9. package/agents/gsd-planner.md +1386 -0
  10. package/agents/gsd-pm.md +331 -0
  11. package/agents/gsd-project-researcher.md +865 -0
  12. package/agents/gsd-research-synthesizer.md +256 -0
  13. package/agents/gsd-roadmapper.md +605 -0
  14. package/agents/gsd-verifier.md +778 -0
  15. package/bin/install.js +1477 -0
  16. package/commands/gsd/add-phase.md +207 -0
  17. package/commands/gsd/add-todo.md +193 -0
  18. package/commands/gsd/audit-milestone.md +277 -0
  19. package/commands/gsd/check-todos.md +228 -0
  20. package/commands/gsd/complete-milestone.md +136 -0
  21. package/commands/gsd/debug.md +169 -0
  22. package/commands/gsd/discuss-phase.md +86 -0
  23. package/commands/gsd/execute-phase.md +339 -0
  24. package/commands/gsd/help.md +545 -0
  25. package/commands/gsd/insert-phase.md +227 -0
  26. package/commands/gsd/join-discord.md +18 -0
  27. package/commands/gsd/list-phase-assumptions.md +50 -0
  28. package/commands/gsd/map-codebase.md +71 -0
  29. package/commands/gsd/new-milestone.md +721 -0
  30. package/commands/gsd/new-project.md +1008 -0
  31. package/commands/gsd/pause-work.md +134 -0
  32. package/commands/gsd/plan-milestone-gaps.md +295 -0
  33. package/commands/gsd/plan-phase.md +525 -0
  34. package/commands/gsd/pm-check.md +115 -0
  35. package/commands/gsd/pm-replan.md +102 -0
  36. package/commands/gsd/pm-start.md +218 -0
  37. package/commands/gsd/pm-status.md +116 -0
  38. package/commands/gsd/pm-stop.md +72 -0
  39. package/commands/gsd/progress.md +415 -0
  40. package/commands/gsd/quick.md +309 -0
  41. package/commands/gsd/remove-phase.md +349 -0
  42. package/commands/gsd/research-phase.md +200 -0
  43. package/commands/gsd/resume-work.md +40 -0
  44. package/commands/gsd/set-profile.md +106 -0
  45. package/commands/gsd/settings.md +151 -0
  46. package/commands/gsd/update.md +172 -0
  47. package/commands/gsd/verify-work.md +219 -0
  48. package/get-shit-done/references/checkpoints.md +1078 -0
  49. package/get-shit-done/references/continuation-format.md +249 -0
  50. package/get-shit-done/references/git-integration.md +254 -0
  51. package/get-shit-done/references/model-profiles.md +73 -0
  52. package/get-shit-done/references/planning-config.md +189 -0
  53. package/get-shit-done/references/questioning.md +141 -0
  54. package/get-shit-done/references/tdd.md +263 -0
  55. package/get-shit-done/references/ui-brand.md +172 -0
  56. package/get-shit-done/references/verification-patterns.md +612 -0
  57. package/get-shit-done/references/vibe-kanban.md +142 -0
  58. package/get-shit-done/templates/DEBUG.md +159 -0
  59. package/get-shit-done/templates/UAT.md +247 -0
  60. package/get-shit-done/templates/codebase/architecture.md +255 -0
  61. package/get-shit-done/templates/codebase/concerns.md +310 -0
  62. package/get-shit-done/templates/codebase/conventions.md +307 -0
  63. package/get-shit-done/templates/codebase/integrations.md +280 -0
  64. package/get-shit-done/templates/codebase/stack.md +186 -0
  65. package/get-shit-done/templates/codebase/structure.md +285 -0
  66. package/get-shit-done/templates/codebase/testing.md +480 -0
  67. package/get-shit-done/templates/config.json +35 -0
  68. package/get-shit-done/templates/context.md +283 -0
  69. package/get-shit-done/templates/continue-here.md +78 -0
  70. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  71. package/get-shit-done/templates/discovery.md +146 -0
  72. package/get-shit-done/templates/milestone-archive.md +123 -0
  73. package/get-shit-done/templates/milestone.md +115 -0
  74. package/get-shit-done/templates/phase-prompt.md +567 -0
  75. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  76. package/get-shit-done/templates/pm-config.md +55 -0
  77. package/get-shit-done/templates/pm-log.md +27 -0
  78. package/get-shit-done/templates/project.md +184 -0
  79. package/get-shit-done/templates/requirements.md +231 -0
  80. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  81. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  82. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  83. package/get-shit-done/templates/research-project/STACK.md +120 -0
  84. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  85. package/get-shit-done/templates/research.md +529 -0
  86. package/get-shit-done/templates/roadmap.md +202 -0
  87. package/get-shit-done/templates/state.md +205 -0
  88. package/get-shit-done/templates/summary.md +246 -0
  89. package/get-shit-done/templates/ticket-map.md +28 -0
  90. package/get-shit-done/templates/user-setup.md +311 -0
  91. package/get-shit-done/templates/verification-report.md +322 -0
  92. package/get-shit-done/workflows/complete-milestone.md +903 -0
  93. package/get-shit-done/workflows/diagnose-issues.md +231 -0
  94. package/get-shit-done/workflows/discovery-phase.md +289 -0
  95. package/get-shit-done/workflows/discuss-phase.md +433 -0
  96. package/get-shit-done/workflows/execute-phase.md +671 -0
  97. package/get-shit-done/workflows/execute-plan.md +1844 -0
  98. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  99. package/get-shit-done/workflows/map-codebase.md +322 -0
  100. package/get-shit-done/workflows/pm-check.md +210 -0
  101. package/get-shit-done/workflows/pm-dispatch.md +104 -0
  102. package/get-shit-done/workflows/pm-replan.md +203 -0
  103. package/get-shit-done/workflows/pm-sync.md +130 -0
  104. package/get-shit-done/workflows/resume-project.md +307 -0
  105. package/get-shit-done/workflows/transition.md +556 -0
  106. package/get-shit-done/workflows/verify-phase.md +628 -0
  107. package/get-shit-done/workflows/verify-work.md +596 -0
  108. package/hooks/dist/gsd-check-update.js +61 -0
  109. package/hooks/dist/gsd-statusline.js +87 -0
  110. package/package.json +47 -0
  111. package/scripts/build-hooks.js +42 -0
  112. package/scripts/pm-loop.sh +155 -0
@@ -0,0 +1,339 @@
1
+ ---
2
+ name: gsd:execute-phase
3
+ description: Execute all plans in a phase with wave-based parallelization
4
+ argument-hint: "<phase-number> [--gaps-only]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
13
+ - TodoWrite
14
+ - AskUserQuestion
15
+ ---
16
+
17
+ <objective>
18
+ Execute all plans in a phase using wave-based parallel execution.
19
+
20
+ Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
21
+
22
+ Context budget: ~15% orchestrator, 100% fresh per subagent.
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @~/.claude/get-shit-done/references/ui-brand.md
27
+ @~/.claude/get-shit-done/workflows/execute-phase.md
28
+ </execution_context>
29
+
30
+ <context>
31
+ Phase: $ARGUMENTS
32
+
33
+ **Flags:**
34
+ - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
35
+
36
+ @.planning/ROADMAP.md
37
+ @.planning/STATE.md
38
+ </context>
39
+
40
+ <process>
41
+ 0. **Resolve Model Profile**
42
+
43
+ Read model profile for agent spawning:
44
+ ```bash
45
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
46
+ ```
47
+
48
+ Default to "balanced" if not set.
49
+
50
+ **Model lookup table:**
51
+
52
+ | Agent | quality | balanced | budget |
53
+ |-------|---------|----------|--------|
54
+ | gsd-executor | opus | sonnet | sonnet |
55
+ | gsd-verifier | sonnet | sonnet | haiku |
56
+
57
+ Store resolved models for use in Task calls below.
58
+
59
+ 1. **Validate phase exists**
60
+ - Find phase directory matching argument
61
+ - Count PLAN.md files
62
+ - Error if no plans found
63
+
64
+ 2. **Discover plans**
65
+ - List all *-PLAN.md files in phase directory
66
+ - Check which have *-SUMMARY.md (already complete)
67
+ - If `--gaps-only`: filter to only plans with `gap_closure: true`
68
+ - Build list of incomplete plans
69
+
70
+ 3. **Group by wave**
71
+ - Read `wave` from each plan's frontmatter
72
+ - Group plans by wave number
73
+ - Report wave structure to user
74
+
75
+ 4. **Execute waves**
76
+ For each wave in order:
77
+ - Spawn `gsd-executor` for each plan in wave (parallel Task calls)
78
+ - Wait for completion (Task blocks)
79
+ - Verify SUMMARYs created
80
+ - Proceed to next wave
81
+
82
+ 5. **Aggregate results**
83
+ - Collect summaries from all plans
84
+ - Report phase completion status
85
+
86
+ 6. **Commit any orchestrator corrections**
87
+ Check for uncommitted changes before verification:
88
+ ```bash
89
+ git status --porcelain
90
+ ```
91
+
92
+ **If changes exist:** Orchestrator made corrections between executor completions. Commit them:
93
+ ```bash
94
+ git add -u && git commit -m "fix({phase}): orchestrator corrections"
95
+ ```
96
+
97
+ **If clean:** Continue to verification.
98
+
99
+ 7. **Verify phase goal**
100
+ Check config: `WORKFLOW_VERIFIER=$(cat .planning/config.json 2>/dev/null | grep -o '"verifier"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
101
+
102
+ **If `workflow.verifier` is `false`:** Skip to step 8 (treat as passed).
103
+
104
+ **Otherwise:**
105
+ - Spawn `gsd-verifier` subagent with phase directory and goal
106
+ - Verifier checks must_haves against actual codebase (not SUMMARY claims)
107
+ - Creates VERIFICATION.md with detailed report
108
+ - Route by status:
109
+ - `passed` → continue to step 8
110
+ - `human_needed` → present items, get approval or feedback
111
+ - `gaps_found` → present gaps, offer `/gsd:plan-phase {X} --gaps`
112
+
113
+ 8. **Update roadmap and state**
114
+ - Update ROADMAP.md, STATE.md
115
+
116
+ 9. **Update requirements**
117
+ Mark phase requirements as Complete:
118
+ - Read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
119
+ - Read REQUIREMENTS.md traceability table
120
+ - For each REQ-ID in this phase: change Status from "Pending" to "Complete"
121
+ - Write updated REQUIREMENTS.md
122
+ - Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
123
+
124
+ 10. **Commit phase completion**
125
+ Check `COMMIT_PLANNING_DOCS` from config.json (default: true).
126
+ If false: Skip git operations for .planning/ files.
127
+ If true: Bundle all phase metadata updates in one commit:
128
+ - Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
129
+ - Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
130
+ - Commit: `docs({phase}): complete {phase-name} phase`
131
+
132
+ 11. **Offer next steps**
133
+ - Route to next action (see `<offer_next>`)
134
+ </process>
135
+
136
+ <offer_next>
137
+ Output this markdown directly (not as a code block). Route based on status:
138
+
139
+ | Status | Route |
140
+ |--------|-------|
141
+ | `gaps_found` | Route C (gap closure) |
142
+ | `human_needed` | Present checklist, then re-route based on approval |
143
+ | `passed` + more phases | Route A (next phase) |
144
+ | `passed` + last phase | Route B (milestone complete) |
145
+
146
+ ---
147
+
148
+ **Route A: Phase verified, more phases remain**
149
+
150
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
+ GSD ► PHASE {Z} COMPLETE ✓
152
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
153
+
154
+ **Phase {Z}: {Name}**
155
+
156
+ {Y} plans executed
157
+ Goal verified ✓
158
+
159
+ ───────────────────────────────────────────────────────────────
160
+
161
+ ## ▶ Next Up
162
+
163
+ **Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
164
+
165
+ /gsd:discuss-phase {Z+1} — gather context and clarify approach
166
+
167
+ <sub>/clear first → fresh context window</sub>
168
+
169
+ ───────────────────────────────────────────────────────────────
170
+
171
+ **Also available:**
172
+ - /gsd:plan-phase {Z+1} — skip discussion, plan directly
173
+ - /gsd:verify-work {Z} — manual acceptance testing before continuing
174
+
175
+ ───────────────────────────────────────────────────────────────
176
+
177
+ ---
178
+
179
+ **Route B: Phase verified, milestone complete**
180
+
181
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
+ GSD ► MILESTONE COMPLETE 🎉
183
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
184
+
185
+ **v1.0**
186
+
187
+ {N} phases completed
188
+ All phase goals verified ✓
189
+
190
+ ───────────────────────────────────────────────────────────────
191
+
192
+ ## ▶ Next Up
193
+
194
+ **Audit milestone** — verify requirements, cross-phase integration, E2E flows
195
+
196
+ /gsd:audit-milestone
197
+
198
+ <sub>/clear first → fresh context window</sub>
199
+
200
+ ───────────────────────────────────────────────────────────────
201
+
202
+ **Also available:**
203
+ - /gsd:verify-work — manual acceptance testing
204
+ - /gsd:complete-milestone — skip audit, archive directly
205
+
206
+ ───────────────────────────────────────────────────────────────
207
+
208
+ ---
209
+
210
+ **Route C: Gaps found — need additional planning**
211
+
212
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
213
+ GSD ► PHASE {Z} GAPS FOUND ⚠
214
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
215
+
216
+ **Phase {Z}: {Name}**
217
+
218
+ Score: {N}/{M} must-haves verified
219
+ Report: .planning/phases/{phase_dir}/{phase}-VERIFICATION.md
220
+
221
+ ### What's Missing
222
+
223
+ {Extract gap summaries from VERIFICATION.md}
224
+
225
+ ───────────────────────────────────────────────────────────────
226
+
227
+ ## ▶ Next Up
228
+
229
+ **Plan gap closure** — create additional plans to complete the phase
230
+
231
+ /gsd:plan-phase {Z} --gaps
232
+
233
+ <sub>/clear first → fresh context window</sub>
234
+
235
+ ───────────────────────────────────────────────────────────────
236
+
237
+ **Also available:**
238
+ - cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md — see full report
239
+ - /gsd:verify-work {Z} — manual testing before planning
240
+
241
+ ───────────────────────────────────────────────────────────────
242
+
243
+ ---
244
+
245
+ After user runs /gsd:plan-phase {Z} --gaps:
246
+ 1. Planner reads VERIFICATION.md gaps
247
+ 2. Creates plans 04, 05, etc. to close gaps
248
+ 3. User runs /gsd:execute-phase {Z} again
249
+ 4. Execute-phase runs incomplete plans (04, 05...)
250
+ 5. Verifier runs again → loop until passed
251
+ </offer_next>
252
+
253
+ <wave_execution>
254
+ **Parallel spawning:**
255
+
256
+ Before spawning, read file contents. The `@` syntax does not work across Task() boundaries.
257
+
258
+ ```bash
259
+ # Read each plan and STATE.md
260
+ PLAN_01_CONTENT=$(cat "{plan_01_path}")
261
+ PLAN_02_CONTENT=$(cat "{plan_02_path}")
262
+ PLAN_03_CONTENT=$(cat "{plan_03_path}")
263
+ STATE_CONTENT=$(cat .planning/STATE.md)
264
+ ```
265
+
266
+ Spawn all plans in a wave with a single message containing multiple Task calls, with inlined content:
267
+
268
+ ```
269
+ Task(prompt="Execute plan at {plan_01_path}\n\nPlan:\n{plan_01_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
270
+ Task(prompt="Execute plan at {plan_02_path}\n\nPlan:\n{plan_02_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
271
+ Task(prompt="Execute plan at {plan_03_path}\n\nPlan:\n{plan_03_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
272
+ ```
273
+
274
+ All three run in parallel. Task tool blocks until all complete.
275
+
276
+ **No polling.** No background agents. No TaskOutput loops.
277
+ </wave_execution>
278
+
279
+ <checkpoint_handling>
280
+ Plans with `autonomous: false` have checkpoints. The execute-phase.md workflow handles the full checkpoint flow:
281
+ - Subagent pauses at checkpoint, returns structured state
282
+ - Orchestrator presents to user, collects response
283
+ - Spawns fresh continuation agent (not resume)
284
+
285
+ See `@~/.claude/get-shit-done/workflows/execute-phase.md` step `checkpoint_handling` for complete details.
286
+ </checkpoint_handling>
287
+
288
+ <deviation_rules>
289
+ During execution, handle discoveries automatically:
290
+
291
+ 1. **Auto-fix bugs** - Fix immediately, document in Summary
292
+ 2. **Auto-add critical** - Security/correctness gaps, add and document
293
+ 3. **Auto-fix blockers** - Can't proceed without fix, do it and document
294
+ 4. **Ask about architectural** - Major structural changes, stop and ask user
295
+
296
+ Only rule 4 requires user intervention.
297
+ </deviation_rules>
298
+
299
+ <commit_rules>
300
+ **Per-Task Commits:**
301
+
302
+ After each task completes:
303
+ 1. Stage only files modified by that task
304
+ 2. Commit with format: `{type}({phase}-{plan}): {task-name}`
305
+ 3. Types: feat, fix, test, refactor, perf, chore
306
+ 4. Record commit hash for SUMMARY.md
307
+
308
+ **Plan Metadata Commit:**
309
+
310
+ After all tasks in a plan complete:
311
+ 1. Stage plan artifacts only: PLAN.md, SUMMARY.md
312
+ 2. Commit with format: `docs({phase}-{plan}): complete [plan-name] plan`
313
+ 3. NO code files (already committed per-task)
314
+
315
+ **Phase Completion Commit:**
316
+
317
+ After all plans in phase complete (step 7):
318
+ 1. Stage: ROADMAP.md, STATE.md, REQUIREMENTS.md (if updated), VERIFICATION.md
319
+ 2. Commit with format: `docs({phase}): complete {phase-name} phase`
320
+ 3. Bundles all phase-level state updates in one commit
321
+
322
+ **NEVER use:**
323
+ - `git add .`
324
+ - `git add -A`
325
+ - `git add src/` or any broad directory
326
+
327
+ **Always stage files individually.**
328
+ </commit_rules>
329
+
330
+ <success_criteria>
331
+ - [ ] All incomplete plans in phase executed
332
+ - [ ] Each plan has SUMMARY.md
333
+ - [ ] Phase goal verified (must_haves checked against codebase)
334
+ - [ ] VERIFICATION.md created in phase directory
335
+ - [ ] STATE.md reflects phase completion
336
+ - [ ] ROADMAP.md updated
337
+ - [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
338
+ - [ ] User informed of next steps
339
+ </success_criteria>