@m3hti/commit-genie 3.2.0 → 3.3.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 (160) hide show
  1. package/.claude/agents/gsd-codebase-mapper.md +764 -0
  2. package/.claude/agents/gsd-debugger.md +1246 -0
  3. package/.claude/agents/gsd-executor.md +469 -0
  4. package/.claude/agents/gsd-integration-checker.md +443 -0
  5. package/.claude/agents/gsd-phase-researcher.md +546 -0
  6. package/.claude/agents/gsd-plan-checker.md +690 -0
  7. package/.claude/agents/gsd-planner.md +1275 -0
  8. package/.claude/agents/gsd-project-researcher.md +621 -0
  9. package/.claude/agents/gsd-research-synthesizer.md +239 -0
  10. package/.claude/agents/gsd-roadmapper.md +642 -0
  11. package/.claude/agents/gsd-verifier.md +573 -0
  12. package/.claude/commands/gsd/add-phase.md +43 -0
  13. package/.claude/commands/gsd/add-tests.md +41 -0
  14. package/.claude/commands/gsd/add-todo.md +47 -0
  15. package/.claude/commands/gsd/audit-milestone.md +36 -0
  16. package/.claude/commands/gsd/check-todos.md +45 -0
  17. package/.claude/commands/gsd/cleanup.md +18 -0
  18. package/.claude/commands/gsd/complete-milestone.md +136 -0
  19. package/.claude/commands/gsd/debug.md +167 -0
  20. package/.claude/commands/gsd/discuss-phase.md +83 -0
  21. package/.claude/commands/gsd/execute-phase.md +41 -0
  22. package/.claude/commands/gsd/health.md +22 -0
  23. package/.claude/commands/gsd/help.md +22 -0
  24. package/.claude/commands/gsd/insert-phase.md +32 -0
  25. package/.claude/commands/gsd/join-discord.md +18 -0
  26. package/.claude/commands/gsd/list-phase-assumptions.md +46 -0
  27. package/.claude/commands/gsd/map-codebase.md +71 -0
  28. package/.claude/commands/gsd/new-milestone.md +44 -0
  29. package/.claude/commands/gsd/new-project.md +42 -0
  30. package/.claude/commands/gsd/new-project.md.bak +1041 -0
  31. package/.claude/commands/gsd/pause-work.md +38 -0
  32. package/.claude/commands/gsd/plan-milestone-gaps.md +34 -0
  33. package/.claude/commands/gsd/plan-phase.md +45 -0
  34. package/.claude/commands/gsd/progress.md +24 -0
  35. package/.claude/commands/gsd/quick.md +41 -0
  36. package/.claude/commands/gsd/reapply-patches.md +110 -0
  37. package/.claude/commands/gsd/remove-phase.md +31 -0
  38. package/.claude/commands/gsd/research-phase.md +189 -0
  39. package/.claude/commands/gsd/resume-work.md +40 -0
  40. package/.claude/commands/gsd/set-profile.md +34 -0
  41. package/.claude/commands/gsd/settings.md +36 -0
  42. package/.claude/commands/gsd/update.md +37 -0
  43. package/.claude/commands/gsd/verify-work.md +38 -0
  44. package/.claude/get-shit-done/VERSION +1 -0
  45. package/.claude/get-shit-done/bin/gsd-tools.cjs +588 -0
  46. package/.claude/get-shit-done/bin/lib/commands.cjs +553 -0
  47. package/.claude/get-shit-done/bin/lib/config.cjs +162 -0
  48. package/.claude/get-shit-done/bin/lib/core.cjs +411 -0
  49. package/.claude/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  50. package/.claude/get-shit-done/bin/lib/init.cjs +710 -0
  51. package/.claude/get-shit-done/bin/lib/milestone.cjs +216 -0
  52. package/.claude/get-shit-done/bin/lib/phase.cjs +871 -0
  53. package/.claude/get-shit-done/bin/lib/roadmap.cjs +298 -0
  54. package/.claude/get-shit-done/bin/lib/state.cjs +679 -0
  55. package/.claude/get-shit-done/bin/lib/template.cjs +222 -0
  56. package/.claude/get-shit-done/bin/lib/verify.cjs +773 -0
  57. package/.claude/get-shit-done/references/checkpoints.md +776 -0
  58. package/.claude/get-shit-done/references/continuation-format.md +249 -0
  59. package/.claude/get-shit-done/references/decimal-phase-calculation.md +65 -0
  60. package/.claude/get-shit-done/references/git-integration.md +248 -0
  61. package/.claude/get-shit-done/references/git-planning-commit.md +38 -0
  62. package/.claude/get-shit-done/references/model-profile-resolution.md +34 -0
  63. package/.claude/get-shit-done/references/model-profiles.md +92 -0
  64. package/.claude/get-shit-done/references/phase-argument-parsing.md +61 -0
  65. package/.claude/get-shit-done/references/planning-config.md +196 -0
  66. package/.claude/get-shit-done/references/questioning.md +145 -0
  67. package/.claude/get-shit-done/references/tdd.md +263 -0
  68. package/.claude/get-shit-done/references/ui-brand.md +160 -0
  69. package/.claude/get-shit-done/references/verification-patterns.md +612 -0
  70. package/.claude/get-shit-done/templates/DEBUG.md +164 -0
  71. package/.claude/get-shit-done/templates/UAT.md +247 -0
  72. package/.claude/get-shit-done/templates/VALIDATION.md +76 -0
  73. package/.claude/get-shit-done/templates/codebase/architecture.md +255 -0
  74. package/.claude/get-shit-done/templates/codebase/concerns.md +310 -0
  75. package/.claude/get-shit-done/templates/codebase/conventions.md +307 -0
  76. package/.claude/get-shit-done/templates/codebase/integrations.md +280 -0
  77. package/.claude/get-shit-done/templates/codebase/stack.md +186 -0
  78. package/.claude/get-shit-done/templates/codebase/structure.md +285 -0
  79. package/.claude/get-shit-done/templates/codebase/testing.md +480 -0
  80. package/.claude/get-shit-done/templates/config.json +37 -0
  81. package/.claude/get-shit-done/templates/context.md +283 -0
  82. package/.claude/get-shit-done/templates/continue-here.md +78 -0
  83. package/.claude/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  84. package/.claude/get-shit-done/templates/discovery.md +146 -0
  85. package/.claude/get-shit-done/templates/milestone-archive.md +123 -0
  86. package/.claude/get-shit-done/templates/milestone.md +115 -0
  87. package/.claude/get-shit-done/templates/phase-prompt.md +569 -0
  88. package/.claude/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  89. package/.claude/get-shit-done/templates/project.md +184 -0
  90. package/.claude/get-shit-done/templates/requirements.md +231 -0
  91. package/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  92. package/.claude/get-shit-done/templates/research-project/FEATURES.md +147 -0
  93. package/.claude/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  94. package/.claude/get-shit-done/templates/research-project/STACK.md +120 -0
  95. package/.claude/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  96. package/.claude/get-shit-done/templates/research.md +552 -0
  97. package/.claude/get-shit-done/templates/retrospective.md +54 -0
  98. package/.claude/get-shit-done/templates/roadmap.md +202 -0
  99. package/.claude/get-shit-done/templates/state.md +176 -0
  100. package/.claude/get-shit-done/templates/summary-complex.md +59 -0
  101. package/.claude/get-shit-done/templates/summary-minimal.md +41 -0
  102. package/.claude/get-shit-done/templates/summary-standard.md +48 -0
  103. package/.claude/get-shit-done/templates/summary.md +248 -0
  104. package/.claude/get-shit-done/templates/user-setup.md +311 -0
  105. package/.claude/get-shit-done/templates/verification-report.md +322 -0
  106. package/.claude/get-shit-done/workflows/add-phase.md +111 -0
  107. package/.claude/get-shit-done/workflows/add-tests.md +350 -0
  108. package/.claude/get-shit-done/workflows/add-todo.md +157 -0
  109. package/.claude/get-shit-done/workflows/audit-milestone.md +297 -0
  110. package/.claude/get-shit-done/workflows/check-todos.md +176 -0
  111. package/.claude/get-shit-done/workflows/cleanup.md +152 -0
  112. package/.claude/get-shit-done/workflows/complete-milestone.md +763 -0
  113. package/.claude/get-shit-done/workflows/diagnose-issues.md +219 -0
  114. package/.claude/get-shit-done/workflows/discovery-phase.md +289 -0
  115. package/.claude/get-shit-done/workflows/discuss-phase.md +542 -0
  116. package/.claude/get-shit-done/workflows/execute-phase.md +449 -0
  117. package/.claude/get-shit-done/workflows/execute-plan.md +448 -0
  118. package/.claude/get-shit-done/workflows/health.md +156 -0
  119. package/.claude/get-shit-done/workflows/help.md +489 -0
  120. package/.claude/get-shit-done/workflows/insert-phase.md +129 -0
  121. package/.claude/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  122. package/.claude/get-shit-done/workflows/map-codebase.md +315 -0
  123. package/.claude/get-shit-done/workflows/new-milestone.md +382 -0
  124. package/.claude/get-shit-done/workflows/new-project.md +1116 -0
  125. package/.claude/get-shit-done/workflows/pause-work.md +122 -0
  126. package/.claude/get-shit-done/workflows/plan-milestone-gaps.md +274 -0
  127. package/.claude/get-shit-done/workflows/plan-phase.md +569 -0
  128. package/.claude/get-shit-done/workflows/progress.md +381 -0
  129. package/.claude/get-shit-done/workflows/quick.md +453 -0
  130. package/.claude/get-shit-done/workflows/remove-phase.md +154 -0
  131. package/.claude/get-shit-done/workflows/research-phase.md +73 -0
  132. package/.claude/get-shit-done/workflows/resume-project.md +306 -0
  133. package/.claude/get-shit-done/workflows/set-profile.md +80 -0
  134. package/.claude/get-shit-done/workflows/settings.md +213 -0
  135. package/.claude/get-shit-done/workflows/transition.md +544 -0
  136. package/.claude/get-shit-done/workflows/update.md +219 -0
  137. package/.claude/get-shit-done/workflows/verify-phase.md +242 -0
  138. package/.claude/get-shit-done/workflows/verify-work.md +569 -0
  139. package/.claude/gsd-file-manifest.json +144 -0
  140. package/.claude/hooks/gsd-check-update.js +62 -0
  141. package/.claude/hooks/gsd-context-monitor.js +122 -0
  142. package/.claude/hooks/gsd-statusline.js +108 -0
  143. package/.claude/package.json +1 -0
  144. package/.claude/settings.json +49 -0
  145. package/dist/commands/generate.d.ts.map +1 -1
  146. package/dist/commands/generate.js +18 -8
  147. package/dist/commands/generate.js.map +1 -1
  148. package/dist/services/analyzerService.d.ts.map +1 -1
  149. package/dist/services/analyzerService.js +10 -0
  150. package/dist/services/analyzerService.js.map +1 -1
  151. package/dist/services/descriptionGenerator.d.ts.map +1 -1
  152. package/dist/services/descriptionGenerator.js +56 -14
  153. package/dist/services/descriptionGenerator.js.map +1 -1
  154. package/dist/services/fileContentAnalyzer.js +136 -17
  155. package/dist/services/fileContentAnalyzer.js.map +1 -1
  156. package/dist/services/fileContentAnalyzer.test.js +64 -0
  157. package/dist/services/fileContentAnalyzer.test.js.map +1 -1
  158. package/dist/services/semanticAnalyzer.js +20 -0
  159. package/dist/services/semanticAnalyzer.js.map +1 -1
  160. package/package.json +1 -1
@@ -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
+ 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
+ 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,315 @@
1
+ <purpose>
2
+ Orchestrate parallel codebase mapper agents to analyze codebase and produce structured documents in .planning/codebase/
3
+
4
+ Each agent has fresh context, explores a specific focus area, and **writes documents directly**. The orchestrator only receives confirmation + line counts, then writes a summary.
5
+
6
+ Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
7
+ </purpose>
8
+
9
+ <philosophy>
10
+ **Why dedicated mapper agents:**
11
+ - Fresh context per domain (no token contamination)
12
+ - Agents write documents directly (no context transfer back to orchestrator)
13
+ - Orchestrator only summarizes what was created (minimal context usage)
14
+ - Faster execution (agents run simultaneously)
15
+
16
+ **Document quality over length:**
17
+ Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity.
18
+
19
+ **Always include file paths:**
20
+ Documents are reference material for Claude when planning/executing. Always include actual file paths formatted with backticks: `src/services/user.ts`.
21
+ </philosophy>
22
+
23
+ <process>
24
+
25
+ <step name="init_context" priority="first">
26
+ Load codebase mapping context:
27
+
28
+ ```bash
29
+ INIT=$(node ./.claude/get-shit-done/bin/gsd-tools.cjs init map-codebase)
30
+ ```
31
+
32
+ Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
33
+ </step>
34
+
35
+ <step name="check_existing">
36
+ Check if .planning/codebase/ already exists using `has_maps` from init context.
37
+
38
+ If `codebase_dir_exists` is true:
39
+ ```bash
40
+ ls -la .planning/codebase/
41
+ ```
42
+
43
+ **If exists:**
44
+
45
+ ```
46
+ .planning/codebase/ already exists with these documents:
47
+ [List files found]
48
+
49
+ What's next?
50
+ 1. Refresh - Delete existing and remap codebase
51
+ 2. Update - Keep existing, only update specific documents
52
+ 3. Skip - Use existing codebase map as-is
53
+ ```
54
+
55
+ Wait for user response.
56
+
57
+ If "Refresh": Delete .planning/codebase/, continue to create_structure
58
+ If "Update": Ask which documents to update, continue to spawn_agents (filtered)
59
+ If "Skip": Exit workflow
60
+
61
+ **If doesn't exist:**
62
+ Continue to create_structure.
63
+ </step>
64
+
65
+ <step name="create_structure">
66
+ Create .planning/codebase/ directory:
67
+
68
+ ```bash
69
+ mkdir -p .planning/codebase
70
+ ```
71
+
72
+ **Expected output files:**
73
+ - STACK.md (from tech mapper)
74
+ - INTEGRATIONS.md (from tech mapper)
75
+ - ARCHITECTURE.md (from arch mapper)
76
+ - STRUCTURE.md (from arch mapper)
77
+ - CONVENTIONS.md (from quality mapper)
78
+ - TESTING.md (from quality mapper)
79
+ - CONCERNS.md (from concerns mapper)
80
+
81
+ Continue to spawn_agents.
82
+ </step>
83
+
84
+ <step name="spawn_agents">
85
+ Spawn 4 parallel gsd-codebase-mapper agents.
86
+
87
+ Use Task tool with `subagent_type="gsd-codebase-mapper"`, `model="{mapper_model}"`, and `run_in_background=true` for parallel execution.
88
+
89
+ **CRITICAL:** Use the dedicated `gsd-codebase-mapper` agent, NOT `Explore`. The mapper agent writes documents directly.
90
+
91
+ **Agent 1: Tech Focus**
92
+
93
+ ```
94
+ Task(
95
+ subagent_type="gsd-codebase-mapper",
96
+ model="{mapper_model}",
97
+ run_in_background=true,
98
+ description="Map codebase tech stack",
99
+ prompt="Focus: tech
100
+
101
+ Analyze this codebase for technology stack and external integrations.
102
+
103
+ Write these documents to .planning/codebase/:
104
+ - STACK.md - Languages, runtime, frameworks, dependencies, configuration
105
+ - INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
106
+
107
+ Explore thoroughly. Write documents directly using templates. Return confirmation only."
108
+ )
109
+ ```
110
+
111
+ **Agent 2: Architecture Focus**
112
+
113
+ ```
114
+ Task(
115
+ subagent_type="gsd-codebase-mapper",
116
+ model="{mapper_model}",
117
+ run_in_background=true,
118
+ description="Map codebase architecture",
119
+ prompt="Focus: arch
120
+
121
+ Analyze this codebase architecture and directory structure.
122
+
123
+ Write these documents to .planning/codebase/:
124
+ - ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
125
+ - STRUCTURE.md - Directory layout, key locations, naming conventions
126
+
127
+ Explore thoroughly. Write documents directly using templates. Return confirmation only."
128
+ )
129
+ ```
130
+
131
+ **Agent 3: Quality Focus**
132
+
133
+ ```
134
+ Task(
135
+ subagent_type="gsd-codebase-mapper",
136
+ model="{mapper_model}",
137
+ run_in_background=true,
138
+ description="Map codebase conventions",
139
+ prompt="Focus: quality
140
+
141
+ Analyze this codebase for coding conventions and testing patterns.
142
+
143
+ Write these documents to .planning/codebase/:
144
+ - CONVENTIONS.md - Code style, naming, patterns, error handling
145
+ - TESTING.md - Framework, structure, mocking, coverage
146
+
147
+ Explore thoroughly. Write documents directly using templates. Return confirmation only."
148
+ )
149
+ ```
150
+
151
+ **Agent 4: Concerns Focus**
152
+
153
+ ```
154
+ Task(
155
+ subagent_type="gsd-codebase-mapper",
156
+ model="{mapper_model}",
157
+ run_in_background=true,
158
+ description="Map codebase concerns",
159
+ prompt="Focus: concerns
160
+
161
+ Analyze this codebase for technical debt, known issues, and areas of concern.
162
+
163
+ Write this document to .planning/codebase/:
164
+ - CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
165
+
166
+ Explore thoroughly. Write document directly using template. Return confirmation only."
167
+ )
168
+ ```
169
+
170
+ Continue to collect_confirmations.
171
+ </step>
172
+
173
+ <step name="collect_confirmations">
174
+ Wait for all 4 agents to complete.
175
+
176
+ Read each agent's output file to collect confirmations.
177
+
178
+ **Expected confirmation format from each agent:**
179
+ ```
180
+ ## Mapping Complete
181
+
182
+ **Focus:** {focus}
183
+ **Documents written:**
184
+ - `.planning/codebase/{DOC1}.md` ({N} lines)
185
+ - `.planning/codebase/{DOC2}.md` ({N} lines)
186
+
187
+ Ready for orchestrator summary.
188
+ ```
189
+
190
+ **What you receive:** Just file paths and line counts. NOT document contents.
191
+
192
+ If any agent failed, note the failure and continue with successful documents.
193
+
194
+ Continue to verify_output.
195
+ </step>
196
+
197
+ <step name="verify_output">
198
+ Verify all documents created successfully:
199
+
200
+ ```bash
201
+ ls -la .planning/codebase/
202
+ wc -l .planning/codebase/*.md
203
+ ```
204
+
205
+ **Verification checklist:**
206
+ - All 7 documents exist
207
+ - No empty documents (each should have >20 lines)
208
+
209
+ If any documents missing or empty, note which agents may have failed.
210
+
211
+ Continue to scan_for_secrets.
212
+ </step>
213
+
214
+ <step name="scan_for_secrets">
215
+ **CRITICAL SECURITY CHECK:** Scan output files for accidentally leaked secrets before committing.
216
+
217
+ Run secret pattern detection:
218
+
219
+ ```bash
220
+ # Check for common API key patterns in generated docs
221
+ grep -E '(sk-[a-zA-Z0-9]{20,}|sk_live_[a-zA-Z0-9]+|sk_test_[a-zA-Z0-9]+|ghp_[a-zA-Z0-9]{36}|gho_[a-zA-Z0-9]{36}|glpat-[a-zA-Z0-9_-]+|AKIA[A-Z0-9]{16}|xox[baprs]-[a-zA-Z0-9-]+|-----BEGIN.*PRIVATE KEY|eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.)' .planning/codebase/*.md 2>/dev/null && SECRETS_FOUND=true || SECRETS_FOUND=false
222
+ ```
223
+
224
+ **If SECRETS_FOUND=true:**
225
+
226
+ ```
227
+ ⚠️ SECURITY ALERT: Potential secrets detected in codebase documents!
228
+
229
+ Found patterns that look like API keys or tokens in:
230
+ [show grep output]
231
+
232
+ This would expose credentials if committed.
233
+
234
+ **Action required:**
235
+ 1. Review the flagged content above
236
+ 2. If these are real secrets, they must be removed before committing
237
+ 3. Consider adding sensitive files to Claude Code "Deny" permissions
238
+
239
+ Pausing before commit. Reply "safe to proceed" if the flagged content is not actually sensitive, or edit the files first.
240
+ ```
241
+
242
+ Wait for user confirmation before continuing to commit_codebase_map.
243
+
244
+ **If SECRETS_FOUND=false:**
245
+
246
+ Continue to commit_codebase_map.
247
+ </step>
248
+
249
+ <step name="commit_codebase_map">
250
+ Commit the codebase map:
251
+
252
+ ```bash
253
+ node ./.claude/get-shit-done/bin/gsd-tools.cjs commit "docs: map existing codebase" --files .planning/codebase/*.md
254
+ ```
255
+
256
+ Continue to offer_next.
257
+ </step>
258
+
259
+ <step name="offer_next">
260
+ Present completion summary and next steps.
261
+
262
+ **Get line counts:**
263
+ ```bash
264
+ wc -l .planning/codebase/*.md
265
+ ```
266
+
267
+ **Output format:**
268
+
269
+ ```
270
+ Codebase mapping complete.
271
+
272
+ Created .planning/codebase/:
273
+ - STACK.md ([N] lines) - Technologies and dependencies
274
+ - ARCHITECTURE.md ([N] lines) - System design and patterns
275
+ - STRUCTURE.md ([N] lines) - Directory layout and organization
276
+ - CONVENTIONS.md ([N] lines) - Code style and patterns
277
+ - TESTING.md ([N] lines) - Test structure and practices
278
+ - INTEGRATIONS.md ([N] lines) - External services and APIs
279
+ - CONCERNS.md ([N] lines) - Technical debt and issues
280
+
281
+
282
+ ---
283
+
284
+ ## ▶ Next Up
285
+
286
+ **Initialize project** — use codebase context for planning
287
+
288
+ `/gsd:new-project`
289
+
290
+ <sub>`/clear` first → fresh context window</sub>
291
+
292
+ ---
293
+
294
+ **Also available:**
295
+ - Re-run mapping: `/gsd:map-codebase`
296
+ - Review specific file: `cat .planning/codebase/STACK.md`
297
+ - Edit any document before proceeding
298
+
299
+ ---
300
+ ```
301
+
302
+ End workflow.
303
+ </step>
304
+
305
+ </process>
306
+
307
+ <success_criteria>
308
+ - .planning/codebase/ directory created
309
+ - 4 parallel gsd-codebase-mapper agents spawned with run_in_background=true
310
+ - Agents write documents directly (orchestrator doesn't receive document contents)
311
+ - Read agent output files to collect confirmations
312
+ - All 7 codebase documents exist
313
+ - Clear completion summary with line counts
314
+ - User offered clear next steps in GSD style
315
+ </success_criteria>