claude-code-pilot 2.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.
Files changed (257) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -0
  3. package/bin/install.js +431 -0
  4. package/docs/agent-guides/architecture.md +107 -0
  5. package/ecc/agents/architect.md +211 -0
  6. package/ecc/agents/code-reviewer.md +237 -0
  7. package/ecc/agents/doc-updater.md +107 -0
  8. package/ecc/agents/e2e-runner.md +107 -0
  9. package/ecc/agents/security-reviewer.md +108 -0
  10. package/ecc/agents/tdd-guide.md +91 -0
  11. package/ecc/commands/checkpoint.md +74 -0
  12. package/ecc/commands/evolve.md +178 -0
  13. package/ecc/commands/learn.md +70 -0
  14. package/ecc/commands/model-route.md +26 -0
  15. package/ecc/commands/quality-gate.md +29 -0
  16. package/ecc/commands/resume-session.md +155 -0
  17. package/ecc/commands/save-session.md +275 -0
  18. package/ecc/commands/sessions.md +305 -0
  19. package/ecc/commands/verify.md +59 -0
  20. package/ecc/contexts/dev.md +20 -0
  21. package/ecc/contexts/research.md +26 -0
  22. package/ecc/contexts/review.md +22 -0
  23. package/ecc/examples/CLAUDE.md +100 -0
  24. package/ecc/examples/django-api-CLAUDE.md +308 -0
  25. package/ecc/examples/go-microservice-CLAUDE.md +267 -0
  26. package/ecc/examples/rust-api-CLAUDE.md +285 -0
  27. package/ecc/examples/saas-nextjs-CLAUDE.md +166 -0
  28. package/ecc/examples/user-CLAUDE.md +109 -0
  29. package/ecc/rules/common/agents.md +49 -0
  30. package/ecc/rules/common/coding-style.md +48 -0
  31. package/ecc/rules/common/development-workflow.md +37 -0
  32. package/ecc/rules/common/git-workflow.md +24 -0
  33. package/ecc/rules/common/hooks.md +30 -0
  34. package/ecc/rules/common/patterns.md +31 -0
  35. package/ecc/rules/common/performance.md +55 -0
  36. package/ecc/rules/common/security.md +29 -0
  37. package/ecc/rules/common/testing.md +29 -0
  38. package/ecc/rules/golang/coding-style.md +32 -0
  39. package/ecc/rules/golang/hooks.md +17 -0
  40. package/ecc/rules/golang/patterns.md +45 -0
  41. package/ecc/rules/golang/security.md +34 -0
  42. package/ecc/rules/golang/testing.md +31 -0
  43. package/ecc/rules/kotlin/coding-style.md +86 -0
  44. package/ecc/rules/kotlin/patterns.md +146 -0
  45. package/ecc/rules/kotlin/security.md +82 -0
  46. package/ecc/rules/kotlin/testing.md +128 -0
  47. package/ecc/rules/perl/coding-style.md +46 -0
  48. package/ecc/rules/perl/hooks.md +22 -0
  49. package/ecc/rules/perl/patterns.md +76 -0
  50. package/ecc/rules/perl/security.md +69 -0
  51. package/ecc/rules/perl/testing.md +54 -0
  52. package/ecc/rules/php/coding-style.md +35 -0
  53. package/ecc/rules/php/hooks.md +24 -0
  54. package/ecc/rules/php/patterns.md +32 -0
  55. package/ecc/rules/php/security.md +33 -0
  56. package/ecc/rules/php/testing.md +34 -0
  57. package/ecc/rules/python/coding-style.md +42 -0
  58. package/ecc/rules/python/hooks.md +19 -0
  59. package/ecc/rules/python/patterns.md +39 -0
  60. package/ecc/rules/python/security.md +30 -0
  61. package/ecc/rules/python/testing.md +38 -0
  62. package/ecc/rules/swift/coding-style.md +47 -0
  63. package/ecc/rules/swift/hooks.md +20 -0
  64. package/ecc/rules/swift/patterns.md +66 -0
  65. package/ecc/rules/swift/security.md +33 -0
  66. package/ecc/rules/swift/testing.md +45 -0
  67. package/ecc/rules/typescript/coding-style.md +199 -0
  68. package/ecc/rules/typescript/hooks.md +22 -0
  69. package/ecc/rules/typescript/patterns.md +52 -0
  70. package/ecc/rules/typescript/security.md +28 -0
  71. package/ecc/rules/typescript/testing.md +18 -0
  72. package/ecc/scripts/hooks/check-hook-enabled.js +12 -0
  73. package/ecc/scripts/hooks/evaluate-session.js +100 -0
  74. package/ecc/scripts/hooks/pre-compact.js +48 -0
  75. package/ecc/scripts/hooks/run-with-flags-shell.sh +32 -0
  76. package/ecc/scripts/hooks/run-with-flags.js +120 -0
  77. package/ecc/scripts/hooks/session-end-marker.js +15 -0
  78. package/ecc/scripts/hooks/session-end.js +258 -0
  79. package/ecc/scripts/hooks/session-start.js +97 -0
  80. package/ecc/scripts/hooks/suggest-compact.js +80 -0
  81. package/ecc/scripts/lib/hook-flags.js +74 -0
  82. package/ecc/scripts/lib/package-manager.d.ts +119 -0
  83. package/ecc/scripts/lib/package-manager.js +431 -0
  84. package/ecc/scripts/lib/project-detect.js +428 -0
  85. package/ecc/scripts/lib/resolve-formatter.js +185 -0
  86. package/ecc/scripts/lib/session-aliases.d.ts +136 -0
  87. package/ecc/scripts/lib/session-aliases.js +481 -0
  88. package/ecc/scripts/lib/session-manager.d.ts +131 -0
  89. package/ecc/scripts/lib/session-manager.js +444 -0
  90. package/ecc/scripts/lib/shell-split.js +86 -0
  91. package/ecc/scripts/lib/utils.d.ts +183 -0
  92. package/ecc/scripts/lib/utils.js +543 -0
  93. package/ecc/skills/continuous-learning-v2/SKILL.md +365 -0
  94. package/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +144 -0
  95. package/ecc/skills/continuous-learning-v2/agents/observer.md +198 -0
  96. package/ecc/skills/continuous-learning-v2/agents/start-observer.sh +194 -0
  97. package/ecc/skills/continuous-learning-v2/config.json +8 -0
  98. package/ecc/skills/continuous-learning-v2/hooks/observe.sh +246 -0
  99. package/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +218 -0
  100. package/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +1148 -0
  101. package/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +984 -0
  102. package/ecc/skills/strategic-compact/SKILL.md +103 -0
  103. package/ecc/skills/strategic-compact/suggest-compact.sh +54 -0
  104. package/ecc/skills/verification-loop-SKILL.md +126 -0
  105. package/gsd/LICENSE +21 -0
  106. package/gsd/agents/gsd-codebase-mapper.md +772 -0
  107. package/gsd/agents/gsd-debugger.md +1257 -0
  108. package/gsd/agents/gsd-executor.md +489 -0
  109. package/gsd/agents/gsd-integration-checker.md +445 -0
  110. package/gsd/agents/gsd-nyquist-auditor.md +178 -0
  111. package/gsd/agents/gsd-phase-researcher.md +555 -0
  112. package/gsd/agents/gsd-plan-checker.md +708 -0
  113. package/gsd/agents/gsd-planner.md +1309 -0
  114. package/gsd/agents/gsd-project-researcher.md +631 -0
  115. package/gsd/agents/gsd-research-synthesizer.md +249 -0
  116. package/gsd/agents/gsd-roadmapper.md +652 -0
  117. package/gsd/agents/gsd-verifier.md +581 -0
  118. package/gsd/commands-gsd/add-phase.md +43 -0
  119. package/gsd/commands-gsd/add-tests.md +41 -0
  120. package/gsd/commands-gsd/add-todo.md +47 -0
  121. package/gsd/commands-gsd/audit-milestone.md +36 -0
  122. package/gsd/commands-gsd/check-todos.md +45 -0
  123. package/gsd/commands-gsd/cleanup.md +18 -0
  124. package/gsd/commands-gsd/complete-milestone.md +136 -0
  125. package/gsd/commands-gsd/debug.md +168 -0
  126. package/gsd/commands-gsd/discuss-phase.md +90 -0
  127. package/gsd/commands-gsd/execute-phase.md +41 -0
  128. package/gsd/commands-gsd/health.md +22 -0
  129. package/gsd/commands-gsd/help.md +22 -0
  130. package/gsd/commands-gsd/insert-phase.md +32 -0
  131. package/gsd/commands-gsd/join-discord.md +18 -0
  132. package/gsd/commands-gsd/list-phase-assumptions.md +46 -0
  133. package/gsd/commands-gsd/map-codebase.md +71 -0
  134. package/gsd/commands-gsd/new-milestone.md +44 -0
  135. package/gsd/commands-gsd/new-project.md +42 -0
  136. package/gsd/commands-gsd/pause-work.md +38 -0
  137. package/gsd/commands-gsd/plan-milestone-gaps.md +34 -0
  138. package/gsd/commands-gsd/plan-phase.md +45 -0
  139. package/gsd/commands-gsd/progress.md +24 -0
  140. package/gsd/commands-gsd/quick.md +45 -0
  141. package/gsd/commands-gsd/reapply-patches.md +123 -0
  142. package/gsd/commands-gsd/remove-phase.md +31 -0
  143. package/gsd/commands-gsd/research-phase.md +190 -0
  144. package/gsd/commands-gsd/resume-work.md +40 -0
  145. package/gsd/commands-gsd/set-profile.md +34 -0
  146. package/gsd/commands-gsd/settings.md +36 -0
  147. package/gsd/commands-gsd/update.md +37 -0
  148. package/gsd/commands-gsd/validate-phase.md +35 -0
  149. package/gsd/commands-gsd/verify-work.md +38 -0
  150. package/gsd/get-shit-done/bin/gsd-tools.cjs +592 -0
  151. package/gsd/get-shit-done/bin/lib/commands.cjs +548 -0
  152. package/gsd/get-shit-done/bin/lib/config.cjs +169 -0
  153. package/gsd/get-shit-done/bin/lib/core.cjs +492 -0
  154. package/gsd/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  155. package/gsd/get-shit-done/bin/lib/init.cjs +710 -0
  156. package/gsd/get-shit-done/bin/lib/milestone.cjs +241 -0
  157. package/gsd/get-shit-done/bin/lib/phase.cjs +901 -0
  158. package/gsd/get-shit-done/bin/lib/roadmap.cjs +298 -0
  159. package/gsd/get-shit-done/bin/lib/state.cjs +721 -0
  160. package/gsd/get-shit-done/bin/lib/template.cjs +222 -0
  161. package/gsd/get-shit-done/bin/lib/verify.cjs +820 -0
  162. package/gsd/get-shit-done/references/checkpoints.md +776 -0
  163. package/gsd/get-shit-done/references/continuation-format.md +249 -0
  164. package/gsd/get-shit-done/references/decimal-phase-calculation.md +65 -0
  165. package/gsd/get-shit-done/references/git-integration.md +248 -0
  166. package/gsd/get-shit-done/references/git-planning-commit.md +38 -0
  167. package/gsd/get-shit-done/references/model-profile-resolution.md +34 -0
  168. package/gsd/get-shit-done/references/model-profiles.md +93 -0
  169. package/gsd/get-shit-done/references/phase-argument-parsing.md +61 -0
  170. package/gsd/get-shit-done/references/planning-config.md +200 -0
  171. package/gsd/get-shit-done/references/questioning.md +162 -0
  172. package/gsd/get-shit-done/references/tdd.md +263 -0
  173. package/gsd/get-shit-done/references/ui-brand.md +160 -0
  174. package/gsd/get-shit-done/references/verification-patterns.md +612 -0
  175. package/gsd/get-shit-done/templates/DEBUG.md +164 -0
  176. package/gsd/get-shit-done/templates/UAT.md +247 -0
  177. package/gsd/get-shit-done/templates/VALIDATION.md +76 -0
  178. package/gsd/get-shit-done/templates/codebase/architecture.md +255 -0
  179. package/gsd/get-shit-done/templates/codebase/concerns.md +310 -0
  180. package/gsd/get-shit-done/templates/codebase/conventions.md +307 -0
  181. package/gsd/get-shit-done/templates/codebase/integrations.md +280 -0
  182. package/gsd/get-shit-done/templates/codebase/stack.md +186 -0
  183. package/gsd/get-shit-done/templates/codebase/structure.md +285 -0
  184. package/gsd/get-shit-done/templates/codebase/testing.md +480 -0
  185. package/gsd/get-shit-done/templates/config.json +37 -0
  186. package/gsd/get-shit-done/templates/context.md +297 -0
  187. package/gsd/get-shit-done/templates/continue-here.md +78 -0
  188. package/gsd/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  189. package/gsd/get-shit-done/templates/discovery.md +146 -0
  190. package/gsd/get-shit-done/templates/milestone-archive.md +123 -0
  191. package/gsd/get-shit-done/templates/milestone.md +115 -0
  192. package/gsd/get-shit-done/templates/phase-prompt.md +569 -0
  193. package/gsd/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  194. package/gsd/get-shit-done/templates/project.md +184 -0
  195. package/gsd/get-shit-done/templates/requirements.md +231 -0
  196. package/gsd/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  197. package/gsd/get-shit-done/templates/research-project/FEATURES.md +147 -0
  198. package/gsd/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  199. package/gsd/get-shit-done/templates/research-project/STACK.md +120 -0
  200. package/gsd/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  201. package/gsd/get-shit-done/templates/research.md +552 -0
  202. package/gsd/get-shit-done/templates/retrospective.md +54 -0
  203. package/gsd/get-shit-done/templates/roadmap.md +202 -0
  204. package/gsd/get-shit-done/templates/state.md +176 -0
  205. package/gsd/get-shit-done/templates/summary-complex.md +59 -0
  206. package/gsd/get-shit-done/templates/summary-minimal.md +41 -0
  207. package/gsd/get-shit-done/templates/summary-standard.md +48 -0
  208. package/gsd/get-shit-done/templates/summary.md +248 -0
  209. package/gsd/get-shit-done/templates/user-setup.md +311 -0
  210. package/gsd/get-shit-done/templates/verification-report.md +322 -0
  211. package/gsd/get-shit-done/workflows/add-phase.md +112 -0
  212. package/gsd/get-shit-done/workflows/add-tests.md +351 -0
  213. package/gsd/get-shit-done/workflows/add-todo.md +158 -0
  214. package/gsd/get-shit-done/workflows/audit-milestone.md +332 -0
  215. package/gsd/get-shit-done/workflows/check-todos.md +177 -0
  216. package/gsd/get-shit-done/workflows/cleanup.md +152 -0
  217. package/gsd/get-shit-done/workflows/complete-milestone.md +764 -0
  218. package/gsd/get-shit-done/workflows/diagnose-issues.md +219 -0
  219. package/gsd/get-shit-done/workflows/discovery-phase.md +289 -0
  220. package/gsd/get-shit-done/workflows/discuss-phase.md +676 -0
  221. package/gsd/get-shit-done/workflows/execute-phase.md +459 -0
  222. package/gsd/get-shit-done/workflows/execute-plan.md +449 -0
  223. package/gsd/get-shit-done/workflows/health.md +159 -0
  224. package/gsd/get-shit-done/workflows/help.md +489 -0
  225. package/gsd/get-shit-done/workflows/insert-phase.md +130 -0
  226. package/gsd/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  227. package/gsd/get-shit-done/workflows/map-codebase.md +316 -0
  228. package/gsd/get-shit-done/workflows/new-milestone.md +384 -0
  229. package/gsd/get-shit-done/workflows/new-project.md +1111 -0
  230. package/gsd/get-shit-done/workflows/pause-work.md +122 -0
  231. package/gsd/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  232. package/gsd/get-shit-done/workflows/plan-phase.md +560 -0
  233. package/gsd/get-shit-done/workflows/progress.md +382 -0
  234. package/gsd/get-shit-done/workflows/quick.md +601 -0
  235. package/gsd/get-shit-done/workflows/remove-phase.md +155 -0
  236. package/gsd/get-shit-done/workflows/research-phase.md +74 -0
  237. package/gsd/get-shit-done/workflows/resume-project.md +307 -0
  238. package/gsd/get-shit-done/workflows/set-profile.md +81 -0
  239. package/gsd/get-shit-done/workflows/settings.md +214 -0
  240. package/gsd/get-shit-done/workflows/transition.md +544 -0
  241. package/gsd/get-shit-done/workflows/update.md +240 -0
  242. package/gsd/get-shit-done/workflows/validate-phase.md +167 -0
  243. package/gsd/get-shit-done/workflows/verify-phase.md +243 -0
  244. package/gsd/get-shit-done/workflows/verify-work.md +583 -0
  245. package/gsd/hooks/gsd-check-update.js +81 -0
  246. package/gsd/hooks/gsd-context-monitor.js +141 -0
  247. package/gsd/hooks/gsd-statusline.js +115 -0
  248. package/kit/CLAUDE.md +43 -0
  249. package/kit/commands/kit/update.md +46 -0
  250. package/kit/commands/setup-refresh.md +50 -0
  251. package/kit/commands/setup.md +579 -0
  252. package/kit/commands/tool-guide.md +44 -0
  253. package/kit/hooks/kit-check-update.js +54 -0
  254. package/kit/mcp.json +10 -0
  255. package/kit/rules/code-style.md +24 -0
  256. package/manifest.json +30 -0
  257. package/package.json +36 -0
@@ -0,0 +1,297 @@
1
+ # Phase Context Template
2
+
3
+ Template for `.planning/phases/XX-name/{phase_num}-CONTEXT.md` - captures implementation decisions for a phase.
4
+
5
+ **Purpose:** Document decisions that downstream agents need. Researcher uses this to know WHAT to investigate. Planner uses this to know WHAT choices are locked vs flexible.
6
+
7
+ **Key principle:** Categories are NOT predefined. They emerge from what was actually discussed for THIS phase. A CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
8
+
9
+ **Downstream consumers:**
10
+ - `gsd-phase-researcher` — Reads decisions to focus research (e.g., "card layout" → research card component patterns)
11
+ - `gsd-planner` — Reads decisions to create specific tasks (e.g., "infinite scroll" → task includes virtualization)
12
+
13
+ ---
14
+
15
+ ## File Template
16
+
17
+ ```markdown
18
+ # Phase [X]: [Name] - Context
19
+
20
+ **Gathered:** [date]
21
+ **Status:** Ready for planning
22
+
23
+ <domain>
24
+ ## Phase Boundary
25
+
26
+ [Clear statement of what this phase delivers — the scope anchor. This comes from ROADMAP.md and is fixed. Discussion clarifies implementation within this boundary.]
27
+
28
+ </domain>
29
+
30
+ <decisions>
31
+ ## Implementation Decisions
32
+
33
+ ### [Area 1 that was discussed]
34
+ - [Specific decision made]
35
+ - [Another decision if applicable]
36
+
37
+ ### [Area 2 that was discussed]
38
+ - [Specific decision made]
39
+
40
+ ### [Area 3 that was discussed]
41
+ - [Specific decision made]
42
+
43
+ ### Claude's Discretion
44
+ [Areas where user explicitly said "you decide" — Claude has flexibility here during planning/implementation]
45
+
46
+ </decisions>
47
+
48
+ <specifics>
49
+ ## Specific Ideas
50
+
51
+ [Any particular references, examples, or "I want it like X" moments from discussion. Product references, specific behaviors, interaction patterns.]
52
+
53
+ [If none: "No specific requirements — open to standard approaches"]
54
+
55
+ </specifics>
56
+
57
+ <code_context>
58
+ ## Existing Code Insights
59
+
60
+ ### Reusable Assets
61
+ - [Component/hook/utility]: [How it could be used in this phase]
62
+
63
+ ### Established Patterns
64
+ - [Pattern]: [How it constrains/enables this phase]
65
+
66
+ ### Integration Points
67
+ - [Where new code connects to existing system]
68
+
69
+ </code_context>
70
+
71
+ <deferred>
72
+ ## Deferred Ideas
73
+
74
+ [Ideas that came up during discussion but belong in other phases. Captured here so they're not lost, but explicitly out of scope for this phase.]
75
+
76
+ [If none: "None — discussion stayed within phase scope"]
77
+
78
+ </deferred>
79
+
80
+ ---
81
+
82
+ *Phase: XX-name*
83
+ *Context gathered: [date]*
84
+ ```
85
+
86
+ <good_examples>
87
+
88
+ **Example 1: Visual feature (Post Feed)**
89
+
90
+ ```markdown
91
+ # Phase 3: Post Feed - Context
92
+
93
+ **Gathered:** 2025-01-20
94
+ **Status:** Ready for planning
95
+
96
+ <domain>
97
+ ## Phase Boundary
98
+
99
+ Display posts from followed users in a scrollable feed. Users can view posts and see engagement counts. Creating posts and interactions are separate phases.
100
+
101
+ </domain>
102
+
103
+ <decisions>
104
+ ## Implementation Decisions
105
+
106
+ ### Layout style
107
+ - Card-based layout, not timeline or list
108
+ - Each card shows: author avatar, name, timestamp, full post content, reaction counts
109
+ - Cards have subtle shadows, rounded corners — modern feel
110
+
111
+ ### Loading behavior
112
+ - Infinite scroll, not pagination
113
+ - Pull-to-refresh on mobile
114
+ - New posts indicator at top ("3 new posts") rather than auto-inserting
115
+
116
+ ### Empty state
117
+ - Friendly illustration + "Follow people to see posts here"
118
+ - Suggest 3-5 accounts to follow based on interests
119
+
120
+ ### Claude's Discretion
121
+ - Loading skeleton design
122
+ - Exact spacing and typography
123
+ - Error state handling
124
+
125
+ </decisions>
126
+
127
+ <specifics>
128
+ ## Specific Ideas
129
+
130
+ - "I like how Twitter shows the new posts indicator without disrupting your scroll position"
131
+ - Cards should feel like Linear's issue cards — clean, not cluttered
132
+
133
+ </specifics>
134
+
135
+ <deferred>
136
+ ## Deferred Ideas
137
+
138
+ - Commenting on posts — Phase 5
139
+ - Bookmarking posts — add to backlog
140
+
141
+ </deferred>
142
+
143
+ ---
144
+
145
+ *Phase: 03-post-feed*
146
+ *Context gathered: 2025-01-20*
147
+ ```
148
+
149
+ **Example 2: CLI tool (Database backup)**
150
+
151
+ ```markdown
152
+ # Phase 2: Backup Command - Context
153
+
154
+ **Gathered:** 2025-01-20
155
+ **Status:** Ready for planning
156
+
157
+ <domain>
158
+ ## Phase Boundary
159
+
160
+ CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate phase.
161
+
162
+ </domain>
163
+
164
+ <decisions>
165
+ ## Implementation Decisions
166
+
167
+ ### Output format
168
+ - JSON for programmatic use, table format for humans
169
+ - Default to table, --json flag for JSON
170
+ - Verbose mode (-v) shows progress, silent by default
171
+
172
+ ### Flag design
173
+ - Short flags for common options: -o (output), -v (verbose), -f (force)
174
+ - Long flags for clarity: --incremental, --compress, --encrypt
175
+ - Required: database connection string (positional or --db)
176
+
177
+ ### Error recovery
178
+ - Retry 3 times on network failure, then fail with clear message
179
+ - --no-retry flag to fail fast
180
+ - Partial backups are deleted on failure (no corrupt files)
181
+
182
+ ### Claude's Discretion
183
+ - Exact progress bar implementation
184
+ - Compression algorithm choice
185
+ - Temp file handling
186
+
187
+ </decisions>
188
+
189
+ <specifics>
190
+ ## Specific Ideas
191
+
192
+ - "I want it to feel like pg_dump — familiar to database people"
193
+ - Should work in CI pipelines (exit codes, no interactive prompts)
194
+
195
+ </specifics>
196
+
197
+ <deferred>
198
+ ## Deferred Ideas
199
+
200
+ - Scheduled backups — separate phase
201
+ - Backup rotation/retention — add to backlog
202
+
203
+ </deferred>
204
+
205
+ ---
206
+
207
+ *Phase: 02-backup-command*
208
+ *Context gathered: 2025-01-20*
209
+ ```
210
+
211
+ **Example 3: Organization task (Photo library)**
212
+
213
+ ```markdown
214
+ # Phase 1: Photo Organization - Context
215
+
216
+ **Gathered:** 2025-01-20
217
+ **Status:** Ready for planning
218
+
219
+ <domain>
220
+ ## Phase Boundary
221
+
222
+ Organize existing photo library into structured folders. Handle duplicates and apply consistent naming. Tagging and search are separate phases.
223
+
224
+ </domain>
225
+
226
+ <decisions>
227
+ ## Implementation Decisions
228
+
229
+ ### Grouping criteria
230
+ - Primary grouping by year, then by month
231
+ - Events detected by time clustering (photos within 2 hours = same event)
232
+ - Event folders named by date + location if available
233
+
234
+ ### Duplicate handling
235
+ - Keep highest resolution version
236
+ - Move duplicates to _duplicates folder (don't delete)
237
+ - Log all duplicate decisions for review
238
+
239
+ ### Naming convention
240
+ - Format: YYYY-MM-DD_HH-MM-SS_originalname.ext
241
+ - Preserve original filename as suffix for searchability
242
+ - Handle name collisions with incrementing suffix
243
+
244
+ ### Claude's Discretion
245
+ - Exact clustering algorithm
246
+ - How to handle photos with no EXIF data
247
+ - Folder emoji usage
248
+
249
+ </decisions>
250
+
251
+ <specifics>
252
+ ## Specific Ideas
253
+
254
+ - "I want to be able to find photos by roughly when they were taken"
255
+ - Don't delete anything — worst case, move to a review folder
256
+
257
+ </specifics>
258
+
259
+ <deferred>
260
+ ## Deferred Ideas
261
+
262
+ - Face detection grouping — future phase
263
+ - Cloud sync — out of scope for now
264
+
265
+ </deferred>
266
+
267
+ ---
268
+
269
+ *Phase: 01-photo-organization*
270
+ *Context gathered: 2025-01-20*
271
+ ```
272
+
273
+ </good_examples>
274
+
275
+ <guidelines>
276
+ **This template captures DECISIONS for downstream agents.**
277
+
278
+ The output should answer: "What does the researcher need to investigate? What choices are locked for the planner?"
279
+
280
+ **Good content (concrete decisions):**
281
+ - "Card-based layout, not timeline"
282
+ - "Retry 3 times on network failure, then fail"
283
+ - "Group by year, then by month"
284
+ - "JSON for programmatic use, table for humans"
285
+
286
+ **Bad content (too vague):**
287
+ - "Should feel modern and clean"
288
+ - "Good user experience"
289
+ - "Fast and responsive"
290
+ - "Easy to use"
291
+
292
+ **After creation:**
293
+ - File lives in phase directory: `.planning/phases/XX-name/{phase_num}-CONTEXT.md`
294
+ - `gsd-phase-researcher` uses decisions to focus investigation
295
+ - `gsd-planner` uses decisions + research to create executable tasks
296
+ - Downstream agents should NOT need to ask the user again about captured decisions
297
+ </guidelines>
@@ -0,0 +1,78 @@
1
+ # Continue-Here Template
2
+
3
+ Copy and fill this structure for `.planning/phases/XX-name/.continue-here.md`:
4
+
5
+ ```yaml
6
+ ---
7
+ phase: XX-name
8
+ task: 3
9
+ total_tasks: 7
10
+ status: in_progress
11
+ last_updated: 2025-01-15T14:30:00Z
12
+ ---
13
+ ```
14
+
15
+ ```markdown
16
+ <current_state>
17
+ [Where exactly are we? What's the immediate context?]
18
+ </current_state>
19
+
20
+ <completed_work>
21
+ [What got done this session - be specific]
22
+
23
+ - Task 1: [name] - Done
24
+ - Task 2: [name] - Done
25
+ - Task 3: [name] - In progress, [what's done on it]
26
+ </completed_work>
27
+
28
+ <remaining_work>
29
+ [What's left in this phase]
30
+
31
+ - Task 3: [name] - [what's left to do]
32
+ - Task 4: [name] - Not started
33
+ - Task 5: [name] - Not started
34
+ </remaining_work>
35
+
36
+ <decisions_made>
37
+ [Key decisions and why - so next session doesn't re-debate]
38
+
39
+ - Decided to use [X] because [reason]
40
+ - Chose [approach] over [alternative] because [reason]
41
+ </decisions_made>
42
+
43
+ <blockers>
44
+ [Anything stuck or waiting on external factors]
45
+
46
+ - [Blocker 1]: [status/workaround]
47
+ </blockers>
48
+
49
+ <context>
50
+ [Mental state, "vibe", anything that helps resume smoothly]
51
+
52
+ [What were you thinking about? What was the plan?
53
+ This is the "pick up exactly where you left off" context.]
54
+ </context>
55
+
56
+ <next_action>
57
+ [The very first thing to do when resuming]
58
+
59
+ Start with: [specific action]
60
+ </next_action>
61
+ ```
62
+
63
+ <yaml_fields>
64
+ Required YAML frontmatter:
65
+
66
+ - `phase`: Directory name (e.g., `02-authentication`)
67
+ - `task`: Current task number
68
+ - `total_tasks`: How many tasks in phase
69
+ - `status`: `in_progress`, `blocked`, `almost_done`
70
+ - `last_updated`: ISO timestamp
71
+ </yaml_fields>
72
+
73
+ <guidelines>
74
+ - Be specific enough that a fresh Claude instance understands immediately
75
+ - Include WHY decisions were made, not just what
76
+ - The `<next_action>` should be actionable without reading anything else
77
+ - This file gets DELETED after resume - it's not permanent storage
78
+ </guidelines>
@@ -0,0 +1,91 @@
1
+ # Debug Subagent Prompt Template
2
+
3
+ Template for spawning gsd-debugger agent. The agent contains all debugging expertise - this template provides problem context only.
4
+
5
+ ---
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ <objective>
11
+ Investigate issue: {issue_id}
12
+
13
+ **Summary:** {issue_summary}
14
+ </objective>
15
+
16
+ <symptoms>
17
+ expected: {expected}
18
+ actual: {actual}
19
+ errors: {errors}
20
+ reproduction: {reproduction}
21
+ timeline: {timeline}
22
+ </symptoms>
23
+
24
+ <mode>
25
+ symptoms_prefilled: {true_or_false}
26
+ goal: {find_root_cause_only | find_and_fix}
27
+ </mode>
28
+
29
+ <debug_file>
30
+ Create: .planning/debug/{slug}.md
31
+ </debug_file>
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Placeholders
37
+
38
+ | Placeholder | Source | Example |
39
+ |-------------|--------|---------|
40
+ | `{issue_id}` | Orchestrator-assigned | `auth-screen-dark` |
41
+ | `{issue_summary}` | User description | `Auth screen is too dark` |
42
+ | `{expected}` | From symptoms | `See logo clearly` |
43
+ | `{actual}` | From symptoms | `Screen is dark` |
44
+ | `{errors}` | From symptoms | `None in console` |
45
+ | `{reproduction}` | From symptoms | `Open /auth page` |
46
+ | `{timeline}` | From symptoms | `After recent deploy` |
47
+ | `{goal}` | Orchestrator sets | `find_and_fix` |
48
+ | `{slug}` | Generated | `auth-screen-dark` |
49
+
50
+ ---
51
+
52
+ ## Usage
53
+
54
+ **From /gsd:debug:**
55
+ ```python
56
+ Task(
57
+ prompt=filled_template,
58
+ subagent_type="gsd-debugger",
59
+ description="Debug {slug}"
60
+ )
61
+ ```
62
+
63
+ **From diagnose-issues (UAT):**
64
+ ```python
65
+ Task(prompt=template, subagent_type="gsd-debugger", description="Debug UAT-001")
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Continuation
71
+
72
+ For checkpoints, spawn fresh agent with:
73
+
74
+ ```markdown
75
+ <objective>
76
+ Continue debugging {slug}. Evidence is in the debug file.
77
+ </objective>
78
+
79
+ <prior_state>
80
+ Debug file: @.planning/debug/{slug}.md
81
+ </prior_state>
82
+
83
+ <checkpoint_response>
84
+ **Type:** {checkpoint_type}
85
+ **Response:** {user_response}
86
+ </checkpoint_response>
87
+
88
+ <mode>
89
+ goal: {goal}
90
+ </mode>
91
+ ```
@@ -0,0 +1,146 @@
1
+ # Discovery Template
2
+
3
+ Template for `.planning/phases/XX-name/DISCOVERY.md` - shallow research for library/option decisions.
4
+
5
+ **Purpose:** Answer "which library/option should we use" questions during mandatory discovery in plan-phase.
6
+
7
+ For deep ecosystem research ("how do experts build this"), use `/gsd:research-phase` which produces RESEARCH.md.
8
+
9
+ ---
10
+
11
+ ## File Template
12
+
13
+ ```markdown
14
+ ---
15
+ phase: XX-name
16
+ type: discovery
17
+ topic: [discovery-topic]
18
+ ---
19
+
20
+ <session_initialization>
21
+ Before beginning discovery, verify today's date:
22
+ !`date +%Y-%m-%d`
23
+
24
+ Use this date when searching for "current" or "latest" information.
25
+ Example: If today is 2025-11-22, search for "2025" not "2024".
26
+ </session_initialization>
27
+
28
+ <discovery_objective>
29
+ Discover [topic] to inform [phase name] implementation.
30
+
31
+ Purpose: [What decision/implementation this enables]
32
+ Scope: [Boundaries]
33
+ Output: DISCOVERY.md with recommendation
34
+ </discovery_objective>
35
+
36
+ <discovery_scope>
37
+ <include>
38
+ - [Question to answer]
39
+ - [Area to investigate]
40
+ - [Specific comparison if needed]
41
+ </include>
42
+
43
+ <exclude>
44
+ - [Out of scope for this discovery]
45
+ - [Defer to implementation phase]
46
+ </exclude>
47
+ </discovery_scope>
48
+
49
+ <discovery_protocol>
50
+
51
+ **Source Priority:**
52
+ 1. **Context7 MCP** - For library/framework documentation (current, authoritative)
53
+ 2. **Official Docs** - For platform-specific or non-indexed libraries
54
+ 3. **WebSearch** - For comparisons, trends, community patterns (verify all findings)
55
+
56
+ **Quality Checklist:**
57
+ Before completing discovery, verify:
58
+ - [ ] All claims have authoritative sources (Context7 or official docs)
59
+ - [ ] Negative claims ("X is not possible") verified with official documentation
60
+ - [ ] API syntax/configuration from Context7 or official docs (never WebSearch alone)
61
+ - [ ] WebSearch findings cross-checked with authoritative sources
62
+ - [ ] Recent updates/changelogs checked for breaking changes
63
+ - [ ] Alternative approaches considered (not just first solution found)
64
+
65
+ **Confidence Levels:**
66
+ - HIGH: Context7 or official docs confirm
67
+ - MEDIUM: WebSearch + Context7/official docs confirm
68
+ - LOW: WebSearch only or training knowledge only (mark for validation)
69
+
70
+ </discovery_protocol>
71
+
72
+
73
+ <output_structure>
74
+ Create `.planning/phases/XX-name/DISCOVERY.md`:
75
+
76
+ ```markdown
77
+ # [Topic] Discovery
78
+
79
+ ## Summary
80
+ [2-3 paragraph executive summary - what was researched, what was found, what's recommended]
81
+
82
+ ## Primary Recommendation
83
+ [What to do and why - be specific and actionable]
84
+
85
+ ## Alternatives Considered
86
+ [What else was evaluated and why not chosen]
87
+
88
+ ## Key Findings
89
+
90
+ ### [Category 1]
91
+ - [Finding with source URL and relevance to our case]
92
+
93
+ ### [Category 2]
94
+ - [Finding with source URL and relevance]
95
+
96
+ ## Code Examples
97
+ [Relevant implementation patterns, if applicable]
98
+
99
+ ## Metadata
100
+
101
+ <metadata>
102
+ <confidence level="high|medium|low">
103
+ [Why this confidence level - based on source quality and verification]
104
+ </confidence>
105
+
106
+ <sources>
107
+ - [Primary authoritative sources used]
108
+ </sources>
109
+
110
+ <open_questions>
111
+ [What couldn't be determined or needs validation during implementation]
112
+ </open_questions>
113
+
114
+ <validation_checkpoints>
115
+ [If confidence is LOW or MEDIUM, list specific things to verify during implementation]
116
+ </validation_checkpoints>
117
+ </metadata>
118
+ ```
119
+ </output_structure>
120
+
121
+ <success_criteria>
122
+ - All scope questions answered with authoritative sources
123
+ - Quality checklist items completed
124
+ - Clear primary recommendation
125
+ - Low-confidence findings marked with validation checkpoints
126
+ - Ready to inform PLAN.md creation
127
+ </success_criteria>
128
+
129
+ <guidelines>
130
+ **When to use discovery:**
131
+ - Technology choice unclear (library A vs B)
132
+ - Best practices needed for unfamiliar integration
133
+ - API/library investigation required
134
+ - Single decision pending
135
+
136
+ **When NOT to use:**
137
+ - Established patterns (CRUD, auth with known library)
138
+ - Implementation details (defer to execution)
139
+ - Questions answerable from existing project context
140
+
141
+ **When to use RESEARCH.md instead:**
142
+ - Niche/complex domains (3D, games, audio, shaders)
143
+ - Need ecosystem knowledge, not just library choice
144
+ - "How do experts build this" questions
145
+ - Use `/gsd:research-phase` for these
146
+ </guidelines>