gsd-opencode 1.3.31

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 (68) hide show
  1. package/bin/install.js +222 -0
  2. package/command/gsd/add-phase.md +207 -0
  3. package/command/gsd/complete-milestone.md +105 -0
  4. package/command/gsd/consider-issues.md +201 -0
  5. package/command/gsd/create-roadmap.md +115 -0
  6. package/command/gsd/discuss-milestone.md +47 -0
  7. package/command/gsd/discuss-phase.md +60 -0
  8. package/command/gsd/execute-plan.md +128 -0
  9. package/command/gsd/help.md +315 -0
  10. package/command/gsd/insert-phase.md +227 -0
  11. package/command/gsd/list-phase-assumptions.md +50 -0
  12. package/command/gsd/map-codebase.md +84 -0
  13. package/command/gsd/new-milestone.md +59 -0
  14. package/command/gsd/new-project.md +316 -0
  15. package/command/gsd/pause-work.md +122 -0
  16. package/command/gsd/plan-fix.md +205 -0
  17. package/command/gsd/plan-phase.md +67 -0
  18. package/command/gsd/progress.md +316 -0
  19. package/command/gsd/remove-phase.md +338 -0
  20. package/command/gsd/research-phase.md +91 -0
  21. package/command/gsd/resume-work.md +40 -0
  22. package/command/gsd/verify-work.md +71 -0
  23. package/get-shit-done/references/checkpoints.md +287 -0
  24. package/get-shit-done/references/continuation-format.md +255 -0
  25. package/get-shit-done/references/git-integration.md +254 -0
  26. package/get-shit-done/references/plan-format.md +428 -0
  27. package/get-shit-done/references/principles.md +157 -0
  28. package/get-shit-done/references/questioning.md +162 -0
  29. package/get-shit-done/references/research-pitfalls.md +215 -0
  30. package/get-shit-done/references/scope-estimation.md +172 -0
  31. package/get-shit-done/references/tdd.md +263 -0
  32. package/get-shit-done/templates/codebase/architecture.md +255 -0
  33. package/get-shit-done/templates/codebase/concerns.md +310 -0
  34. package/get-shit-done/templates/codebase/conventions.md +307 -0
  35. package/get-shit-done/templates/codebase/integrations.md +280 -0
  36. package/get-shit-done/templates/codebase/stack.md +186 -0
  37. package/get-shit-done/templates/codebase/structure.md +285 -0
  38. package/get-shit-done/templates/codebase/testing.md +480 -0
  39. package/get-shit-done/templates/config.json +18 -0
  40. package/get-shit-done/templates/context.md +161 -0
  41. package/get-shit-done/templates/continue-here.md +78 -0
  42. package/get-shit-done/templates/discovery.md +146 -0
  43. package/get-shit-done/templates/issues.md +32 -0
  44. package/get-shit-done/templates/milestone-archive.md +123 -0
  45. package/get-shit-done/templates/milestone-context.md +93 -0
  46. package/get-shit-done/templates/milestone.md +115 -0
  47. package/get-shit-done/templates/phase-prompt.md +303 -0
  48. package/get-shit-done/templates/project.md +184 -0
  49. package/get-shit-done/templates/research.md +529 -0
  50. package/get-shit-done/templates/roadmap.md +196 -0
  51. package/get-shit-done/templates/state.md +210 -0
  52. package/get-shit-done/templates/summary.md +273 -0
  53. package/get-shit-done/templates/uat-issues.md +143 -0
  54. package/get-shit-done/workflows/complete-milestone.md +643 -0
  55. package/get-shit-done/workflows/create-milestone.md +416 -0
  56. package/get-shit-done/workflows/create-roadmap.md +481 -0
  57. package/get-shit-done/workflows/discovery-phase.md +293 -0
  58. package/get-shit-done/workflows/discuss-milestone.md +236 -0
  59. package/get-shit-done/workflows/discuss-phase.md +247 -0
  60. package/get-shit-done/workflows/execute-phase.md +1625 -0
  61. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  62. package/get-shit-done/workflows/map-codebase.md +434 -0
  63. package/get-shit-done/workflows/plan-phase.md +488 -0
  64. package/get-shit-done/workflows/research-phase.md +436 -0
  65. package/get-shit-done/workflows/resume-project.md +287 -0
  66. package/get-shit-done/workflows/transition.md +580 -0
  67. package/get-shit-done/workflows/verify-work.md +202 -0
  68. package/package.json +38 -0
@@ -0,0 +1,178 @@
1
+ <purpose>
2
+ Surface Claude's assumptions about a phase before planning, enabling users to correct misconceptions early.
3
+
4
+ Key difference from discuss-phase: This is ANALYSIS of what Claude thinks, not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
5
+ </purpose>
6
+
7
+ <process>
8
+
9
+ <step name="validate_phase" priority="first">
10
+ Phase number: $ARGUMENTS (required)
11
+
12
+ **If argument missing:**
13
+
14
+ ```
15
+ Error: Phase number required.
16
+
17
+ Usage: /gsd:list-phase-assumptions [phase-number]
18
+ Example: /gsd:list-phase-assumptions 3
19
+ ```
20
+
21
+ Exit workflow.
22
+
23
+ **If argument provided:**
24
+ Validate phase exists in roadmap:
25
+
26
+ ```bash
27
+ cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
28
+ ```
29
+
30
+ **If phase not found:**
31
+
32
+ ```
33
+ Error: Phase ${PHASE} not found in roadmap.
34
+
35
+ Available phases:
36
+ [list phases from roadmap]
37
+ ```
38
+
39
+ Exit workflow.
40
+
41
+ **If phase found:**
42
+ Parse phase details from roadmap:
43
+
44
+ - Phase number
45
+ - Phase name
46
+ - Phase description/goal
47
+ - Any scope details mentioned
48
+
49
+ Continue to analyze_phase.
50
+ </step>
51
+
52
+ <step name="analyze_phase">
53
+ Based on roadmap description and project context, identify assumptions across five areas:
54
+
55
+ **1. Technical Approach:**
56
+ What libraries, frameworks, patterns, or tools would Claude use?
57
+ - "I'd use X library because..."
58
+ - "I'd follow Y pattern because..."
59
+ - "I'd structure this as Z because..."
60
+
61
+ **2. Implementation Order:**
62
+ What would Claude build first, second, third?
63
+ - "I'd start with X because it's foundational"
64
+ - "Then Y because it depends on X"
65
+ - "Finally Z because..."
66
+
67
+ **3. Scope Boundaries:**
68
+ What's included vs excluded in Claude's interpretation?
69
+ - "This phase includes: A, B, C"
70
+ - "This phase does NOT include: D, E, F"
71
+ - "Boundary ambiguities: G could go either way"
72
+
73
+ **4. Risk Areas:**
74
+ Where does Claude expect complexity or challenges?
75
+ - "The tricky part is X because..."
76
+ - "Potential issues: Y, Z"
77
+ - "I'd watch out for..."
78
+
79
+ **5. Dependencies:**
80
+ What does Claude assume exists or needs to be in place?
81
+ - "This assumes X from previous phases"
82
+ - "External dependencies: Y, Z"
83
+ - "This will be consumed by..."
84
+
85
+ Be honest about uncertainty. Mark assumptions with confidence levels:
86
+ - "Fairly confident: ..." (clear from roadmap)
87
+ - "Assuming: ..." (reasonable inference)
88
+ - "Unclear: ..." (could go multiple ways)
89
+ </step>
90
+
91
+ <step name="present_assumptions">
92
+ Present assumptions in a clear, scannable format:
93
+
94
+ ```
95
+ ## My Assumptions for Phase ${PHASE}: ${PHASE_NAME}
96
+
97
+ ### Technical Approach
98
+ [List assumptions about how to implement]
99
+
100
+ ### Implementation Order
101
+ [List assumptions about sequencing]
102
+
103
+ ### Scope Boundaries
104
+ **In scope:** [what's included]
105
+ **Out of scope:** [what's excluded]
106
+ **Ambiguous:** [what could go either way]
107
+
108
+ ### Risk Areas
109
+ [List anticipated challenges]
110
+
111
+ ### Dependencies
112
+ **From prior phases:** [what's needed]
113
+ **External:** [third-party needs]
114
+ **Feeds into:** [what future phases need from this]
115
+
116
+ ---
117
+
118
+ **What do you think?**
119
+
120
+ Are these assumptions accurate? Let me know:
121
+ - What I got right
122
+ - What I got wrong
123
+ - What I'm missing
124
+ ```
125
+
126
+ Wait for user response.
127
+ </step>
128
+
129
+ <step name="gather_feedback">
130
+ **If user provides corrections:**
131
+
132
+ Acknowledge the corrections:
133
+
134
+ ```
135
+ Got it. Key corrections:
136
+ - [correction 1]
137
+ - [correction 2]
138
+
139
+ This changes my understanding significantly. [Summarize new understanding]
140
+ ```
141
+
142
+ **If user confirms assumptions:**
143
+
144
+ ```
145
+ Great, assumptions validated.
146
+ ```
147
+
148
+ Continue to offer_next.
149
+ </step>
150
+
151
+ <step name="offer_next">
152
+ Present next steps:
153
+
154
+ ```
155
+ What's next?
156
+ 1. Discuss context (/gsd:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
157
+ 2. Plan this phase (/gsd:plan-phase ${PHASE}) - Create detailed execution plans
158
+ 3. Re-examine assumptions - I'll analyze again with your corrections
159
+ 4. Done for now
160
+ ```
161
+
162
+ Wait for user selection.
163
+
164
+ If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
165
+ If "Plan this phase": Proceed knowing assumptions are understood
166
+ If "Re-examine": Return to analyze_phase with updated understanding
167
+ </step>
168
+
169
+ </process>
170
+
171
+ <success_criteria>
172
+ - Phase number validated against roadmap
173
+ - Assumptions surfaced across five areas: technical approach, implementation order, scope, risks, dependencies
174
+ - Confidence levels marked where appropriate
175
+ - "What do you think?" prompt presented
176
+ - User feedback acknowledged
177
+ - Clear next steps offered
178
+ </success_criteria>
@@ -0,0 +1,434 @@
1
+ <purpose>
2
+ Orchestrate parallel Explore agents to analyze codebase and produce structured documents in .planning/codebase/
3
+
4
+ Each agent has fresh context and focuses on specific aspects. Output is concise and actionable for planning.
5
+ </purpose>
6
+
7
+ <philosophy>
8
+ **Why parallel agents:**
9
+ - Fresh context per domain (no token contamination)
10
+ - Thorough analysis without context exhaustion
11
+ - Each agent optimized for its domain (tech vs organization vs quality vs issues)
12
+ - Faster execution (agents run simultaneously)
13
+
14
+ **Document quality over length:**
15
+ Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity. A 200-line TESTING.md with real patterns is more valuable than a 74-line summary.
16
+
17
+ **Always include file paths:**
18
+ Documents are reference material for Claude when planning/executing. Vague descriptions like "UserService handles users" are not actionable. Always include actual file paths formatted with backticks: `src/services/user.ts`. This allows Claude to navigate directly to relevant code without re-searching. Do NOT include line numbers (they go stale), just file paths.
19
+ </philosophy>
20
+
21
+ <process>
22
+
23
+ <step name="check_existing" priority="first">
24
+ Check if .planning/codebase/ already exists:
25
+
26
+ ```bash
27
+ ls -la .planning/codebase/ 2>/dev/null
28
+ ```
29
+
30
+ **If exists:**
31
+
32
+ ```
33
+ .planning/codebase/ already exists with these documents:
34
+ [List files found]
35
+
36
+ What's next?
37
+ 1. Refresh - Delete existing and remap codebase
38
+ 2. Update - Keep existing, only update specific documents
39
+ 3. Skip - Use existing codebase map as-is
40
+ ```
41
+
42
+ Wait for user response.
43
+
44
+ If "Refresh": Delete .planning/codebase/, continue to create_structure
45
+ If "Update": Ask which documents to update, continue to spawn_agents (filtered)
46
+ If "Skip": Exit workflow
47
+
48
+ **If doesn't exist:**
49
+ Continue to create_structure.
50
+ </step>
51
+
52
+ <step name="create_structure">
53
+ Create .planning/codebase/ directory:
54
+
55
+ ```bash
56
+ mkdir -p .planning/codebase
57
+ ```
58
+
59
+ **Expected output files:**
60
+ - STACK.md (from stack.md template)
61
+ - ARCHITECTURE.md (from architecture.md template)
62
+ - STRUCTURE.md (from structure.md template)
63
+ - CONVENTIONS.md (from conventions.md template)
64
+ - TESTING.md (from testing.md template)
65
+ - INTEGRATIONS.md (from integrations.md template)
66
+ - CONCERNS.md (from concerns.md template)
67
+
68
+ Continue to spawn_agents.
69
+ </step>
70
+
71
+ <step name="spawn_agents">
72
+ Spawn 4 parallel Explore agents to analyze codebase.
73
+
74
+ Use Task tool with `subagent_type="Explore"` and `run_in_background=true` for parallel execution.
75
+
76
+ **Agent 1: Stack + Integrations (Technology Focus)**
77
+
78
+ Task tool parameters:
79
+ ```
80
+ subagent_type: "Explore"
81
+ run_in_background: true
82
+ task_description: "Analyze codebase technology stack and external integrations"
83
+ ```
84
+
85
+ Prompt:
86
+ ```
87
+ Analyze this codebase for technology stack and external integrations.
88
+
89
+ IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `src/config/database.ts`. This makes the output actionable for planning.
90
+
91
+ Focus areas:
92
+ 1. Languages (check file extensions, package manifests)
93
+ 2. Runtime environment (Node.js, Python, etc. - check .nvmrc, .python-version, engines field)
94
+ 3. Package manager and lockfiles
95
+ 4. Frameworks (web, testing, build tools)
96
+ 5. Key dependencies (critical packages for functionality)
97
+ 6. External services (APIs, databases, auth providers)
98
+ 7. Third-party integrations (payment, analytics, etc.)
99
+ 8. Configuration approach (.env, config files)
100
+
101
+ Search for:
102
+ - package.json / requirements.txt / Cargo.toml / go.mod
103
+ - .env files, .env.example
104
+ - Config files (vite.config, webpack.config, tsconfig.json)
105
+ - API client code, database connection code
106
+ - Import statements for major libraries
107
+
108
+ Output findings for populating these sections:
109
+ - STACK.md: Languages, Runtime, Frameworks, Dependencies, Configuration
110
+ - INTEGRATIONS.md: External APIs, Services, Third-party tools
111
+
112
+ For each finding, include the file path where you found it. Example:
113
+ - "TypeScript 5.3 - `package.json`"
114
+ - "Supabase client - `src/lib/supabase.ts`"
115
+ - "Stripe integration - `src/services/stripe.ts`, `src/webhooks/stripe.ts`"
116
+
117
+ If something is not found, note "Not detected" for that category.
118
+ ```
119
+
120
+ **Agent 2: Architecture + Structure (Organization Focus)**
121
+
122
+ Task tool parameters:
123
+ ```
124
+ subagent_type: "Explore"
125
+ run_in_background: true
126
+ task_description: "Analyze codebase architecture patterns and directory structure"
127
+ ```
128
+
129
+ Prompt:
130
+ ```
131
+ Analyze this codebase architecture and directory structure.
132
+
133
+ IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `src/index.ts`. This makes the output actionable for planning.
134
+
135
+ Focus areas:
136
+ 1. Overall architectural pattern (monolith, microservices, layered, etc.)
137
+ 2. Conceptual layers (API, service, data, utility)
138
+ 3. Data flow and request lifecycle
139
+ 4. Key abstractions and patterns (services, controllers, repositories)
140
+ 5. Entry points (main files, server files, CLI entry)
141
+ 6. Directory organization and purposes
142
+ 7. Module boundaries
143
+ 8. Naming conventions for directories and files
144
+
145
+ Search for:
146
+ - Entry points: index.ts, main.ts, server.ts, app.ts, cli.ts
147
+ - Directory structure patterns (src/, lib/, components/, services/)
148
+ - Import patterns (what imports what)
149
+ - Recurring code patterns (base classes, interfaces, common abstractions)
150
+
151
+ Output findings for populating these sections:
152
+ - ARCHITECTURE.md: Pattern, Layers, Data Flow, Abstractions, Entry Points
153
+ - STRUCTURE.md: Directory layout, Organization, Key locations
154
+
155
+ For each finding, include the file path. Examples:
156
+ - "CLI entry point: `bin/install.js`"
157
+ - "Service layer: `src/services/*.ts` (UserService, ProjectService)"
158
+ - "API routes: `src/routes/api/*.ts`"
159
+
160
+ If something is not clear, provide best-guess interpretation based on code structure.
161
+ ```
162
+
163
+ **Agent 3: Conventions + Testing (Quality Focus)**
164
+
165
+ Task tool parameters:
166
+ ```
167
+ subagent_type: "Explore"
168
+ run_in_background: true
169
+ task_description: "Analyze coding conventions and test patterns"
170
+ ```
171
+
172
+ Prompt:
173
+ ```
174
+ Analyze this codebase for coding conventions and testing practices.
175
+
176
+ IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `vitest.config.ts`. This makes the output actionable for planning.
177
+
178
+ Focus areas:
179
+ 1. Code style (indentation, quotes, semicolons, formatting)
180
+ 2. File naming conventions (kebab-case, PascalCase, etc.)
181
+ 3. Function/variable naming patterns
182
+ 4. Comment and documentation style
183
+ 5. Test framework and structure
184
+ 6. Test organization (unit, integration, e2e)
185
+ 7. Test coverage approach
186
+ 8. Linting and formatting tools
187
+
188
+ Search for:
189
+ - Config files: .eslintrc, .prettierrc, tsconfig.json
190
+ - Test files: *.test.*, *.spec.*, __tests__/
191
+ - Test setup: vitest.config, jest.config
192
+ - Code patterns across multiple files
193
+ - README or CONTRIBUTING docs
194
+
195
+ Output findings for populating these sections:
196
+ - CONVENTIONS.md: Code Style, Naming, Patterns, Documentation
197
+ - TESTING.md: Framework, Structure, Coverage, Tools
198
+
199
+ For each finding, include file paths. Examples:
200
+ - "Prettier config: `.prettierrc`"
201
+ - "Test pattern: `src/**/*.test.ts` (co-located with source)"
202
+ - "Example of naming convention: `src/services/user-service.ts`"
203
+
204
+ Look at actual code files to infer conventions if config files are missing.
205
+ ```
206
+
207
+ **Agent 4: Concerns (Issues Focus)**
208
+
209
+ Task tool parameters:
210
+ ```
211
+ subagent_type: "Explore"
212
+ run_in_background: true
213
+ task_description: "Identify technical debt and areas of concern"
214
+ ```
215
+
216
+ Prompt:
217
+ ```
218
+ Analyze this codebase for technical debt, known issues, and areas of concern.
219
+
220
+ CRITICAL: Always include actual file paths in your findings. Use backtick formatting like `src/auth/login.ts`. Concerns without file paths are not actionable. For each issue found, specify exactly where it is.
221
+
222
+ Focus areas:
223
+ 1. TODO and FIXME comments
224
+ 2. Complex or hard-to-understand code
225
+ 3. Missing error handling (try/catch, error checks)
226
+ 4. Security patterns (hardcoded secrets, unsafe operations)
227
+ 5. Outdated dependencies (check versions against current)
228
+ 6. Missing tests for critical code
229
+ 7. Duplicate code patterns
230
+ 8. Performance concerns (N+1 queries, inefficient loops)
231
+ 9. Documentation gaps (complex code without comments)
232
+
233
+ Search for:
234
+ - TODO, FIXME, HACK, XXX comments
235
+ - Large functions or files (>200 lines)
236
+ - Repeated code patterns
237
+ - Missing .env.example when .env is used
238
+ - Dependencies with known vulnerabilities (check versions)
239
+ - Error-prone patterns (no validation, no error handling)
240
+
241
+ Output findings for populating:
242
+ - CONCERNS.md: Technical Debt, Issues, Security, Performance, Documentation
243
+
244
+ For EVERY concern, include file paths. Examples:
245
+ - "Direct DB queries in components: `src/pages/Dashboard.tsx`, `src/pages/Profile.tsx`"
246
+ - "Missing error handling: `src/api/webhook.ts` (Stripe webhook has no try/catch)"
247
+ - "TODO: 'fix race condition' in `src/services/subscription.ts`"
248
+
249
+ Be constructive - focus on actionable concerns, not nitpicks.
250
+ If codebase is clean, note that rather than inventing problems.
251
+ ```
252
+
253
+ Continue to collect_results.
254
+ </step>
255
+
256
+ <step name="collect_results">
257
+ Wait for all 4 agents to complete.
258
+
259
+ Use TaskOutput tool to collect results from each agent. Since agents were run with `run_in_background=true`, retrieve their output.
260
+
261
+ **Collection pattern:**
262
+
263
+ For each agent, use TaskOutput tool to get the full exploration findings.
264
+
265
+ **Aggregate findings by document:**
266
+
267
+ From Agent 1 output, extract:
268
+ - STACK.md sections: Languages, Runtime, Frameworks, Dependencies, Configuration, Platform
269
+ - INTEGRATIONS.md sections: External APIs, Services, Authentication, Webhooks
270
+
271
+ From Agent 2 output, extract:
272
+ - ARCHITECTURE.md sections: Pattern Overview, Layers, Data Flow, Key Abstractions, Entry Points
273
+ - STRUCTURE.md sections: Directory Layout, Key Locations, Organization
274
+
275
+ From Agent 3 output, extract:
276
+ - CONVENTIONS.md sections: Code Style, Naming Conventions, Common Patterns, Documentation Style
277
+ - TESTING.md sections: Framework, Structure, Coverage, Tools
278
+
279
+ From Agent 4 output, extract:
280
+ - CONCERNS.md sections: Technical Debt, Known Issues, Security, Performance, Missing
281
+
282
+ **Handling missing findings:**
283
+
284
+ If an agent didn't find information for a section, use placeholder:
285
+ - "Not detected" (for infrastructure/tools that may not exist)
286
+ - "Not applicable" (for patterns that don't apply to this codebase)
287
+ - "No significant concerns" (for CONCERNS.md if codebase is clean)
288
+
289
+ Continue to write_documents.
290
+ </step>
291
+
292
+ <step name="write_documents">
293
+ Write all 7 codebase documents using templates and agent findings.
294
+
295
+ **Template filling process:**
296
+
297
+ For each document:
298
+
299
+ 1. **Read template file** from `~/.config/opencode/get-shit-done/templates/codebase/{name}.md`
300
+ 2. **Extract the "File Template" section** - this is the markdown code block containing the actual document structure
301
+ 3. **Fill template placeholders** with agent findings:
302
+ - Replace `[YYYY-MM-DD]` with current date
303
+ - Replace `[Placeholder text]` with specific findings from agents
304
+ - If agent found nothing for a section, use appropriate placeholder:
305
+ - "Not detected" for optional infrastructure
306
+ - "Not applicable" for patterns that don't fit this codebase
307
+ - "No significant concerns" for clean codebase areas
308
+ 4. **Write to .planning/codebase/{NAME}.md** (uppercase filename)
309
+
310
+ **Example filling pattern:**
311
+
312
+ Template placeholder:
313
+ ```
314
+ **Primary:**
315
+ - [Language] [Version] - [Where used: e.g., "all application code"]
316
+ ```
317
+
318
+ Agent finding:
319
+ ```
320
+ Found: TypeScript 5.3 used in all .ts files throughout src/
321
+ ```
322
+
323
+ Filled result:
324
+ ```
325
+ **Primary:**
326
+ - TypeScript 5.3 - All application code
327
+ ```
328
+
329
+ **Document writing order:**
330
+
331
+ 1. **STACK.md** (from stack.md template + Agent 1 findings)
332
+ 2. **INTEGRATIONS.md** (from integrations.md template + Agent 1 findings)
333
+ 3. **ARCHITECTURE.md** (from architecture.md template + Agent 2 findings)
334
+ 4. **STRUCTURE.md** (from structure.md template + Agent 2 findings)
335
+ 5. **CONVENTIONS.md** (from conventions.md template + Agent 3 findings)
336
+ 6. **TESTING.md** (from testing.md template + Agent 3 findings)
337
+ 7. **CONCERNS.md** (from concerns.md template + Agent 4 findings)
338
+
339
+ After all documents written, continue to verify_output.
340
+ </step>
341
+
342
+ <step name="verify_output">
343
+ Verify all documents created successfully:
344
+
345
+ ```bash
346
+ ls -la .planning/codebase/
347
+ wc -l .planning/codebase/*.md
348
+ ```
349
+
350
+ **Verification checklist:**
351
+ - All 7 documents exist
352
+ - No empty documents
353
+ - Templates populated with findings
354
+
355
+ If any checks fail, report issues to user.
356
+
357
+ Continue to commit_codebase_map.
358
+ </step>
359
+
360
+ <step name="commit_codebase_map">
361
+ Commit the codebase map:
362
+
363
+ ```bash
364
+ git add .planning/codebase/*.md
365
+ git commit -m "$(cat <<'EOF'
366
+ docs: map existing codebase
367
+
368
+ - STACK.md - Technologies and dependencies
369
+ - ARCHITECTURE.md - System design and patterns
370
+ - STRUCTURE.md - Directory layout
371
+ - CONVENTIONS.md - Code style and patterns
372
+ - TESTING.md - Test structure
373
+ - INTEGRATIONS.md - External services
374
+ - CONCERNS.md - Technical debt and issues
375
+ EOF
376
+ )"
377
+ ```
378
+
379
+ Continue to offer_next.
380
+ </step>
381
+
382
+ <step name="offer_next">
383
+ Present completion summary and next steps.
384
+
385
+ **Output format:**
386
+
387
+ ```
388
+ Codebase mapping complete.
389
+
390
+ Created .planning/codebase/:
391
+ - STACK.md ([N] lines) - Technologies and dependencies
392
+ - ARCHITECTURE.md ([N] lines) - System design and patterns
393
+ - STRUCTURE.md ([N] lines) - Directory layout and organization
394
+ - CONVENTIONS.md ([N] lines) - Code style and patterns
395
+ - TESTING.md ([N] lines) - Test structure and practices
396
+ - INTEGRATIONS.md ([N] lines) - External services and APIs
397
+ - CONCERNS.md ([N] lines) - Technical debt and issues
398
+
399
+
400
+ ---
401
+
402
+ ## ▶ Next Up
403
+
404
+ **Initialize project** — use codebase context for planning
405
+
406
+ `/gsd:new-project`
407
+
408
+ <sub>`/clear` first → fresh context window</sub>
409
+
410
+ ---
411
+
412
+ **Also available:**
413
+ - Re-run mapping: `/gsd:map-codebase`
414
+ - Review specific file: `cat .planning/codebase/STACK.md`
415
+ - Edit any document before proceeding
416
+
417
+ ---
418
+ ```
419
+
420
+ End workflow.
421
+ </step>
422
+
423
+ </process>
424
+
425
+ <success_criteria>
426
+ - .planning/codebase/ directory created
427
+ - 4 parallel Explore agents spawned with run_in_background=true
428
+ - Agent prompts are specific and actionable
429
+ - TaskOutput used to collect all agent results
430
+ - All 7 codebase documents written using template filling
431
+ - Documents follow template structure with actual findings
432
+ - Clear completion summary with line counts
433
+ - User offered clear next steps in GSD style
434
+ </success_criteria>