gsd-codex-cli 1.20.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 (160) hide show
  1. package/.codex/prompts/gsd-add-phase.md +44 -0
  2. package/.codex/prompts/gsd-add-todo.md +43 -0
  3. package/.codex/prompts/gsd-audit-milestone.md +43 -0
  4. package/.codex/prompts/gsd-check-todos.md +43 -0
  5. package/.codex/prompts/gsd-complete-milestone.md +43 -0
  6. package/.codex/prompts/gsd-debug.md +46 -0
  7. package/.codex/prompts/gsd-discuss-phase.md +43 -0
  8. package/.codex/prompts/gsd-execute-phase.md +43 -0
  9. package/.codex/prompts/gsd-help.md +43 -0
  10. package/.codex/prompts/gsd-insert-phase.md +43 -0
  11. package/.codex/prompts/gsd-list-phase-assumptions.md +43 -0
  12. package/.codex/prompts/gsd-map-codebase.md +43 -0
  13. package/.codex/prompts/gsd-new-milestone.md +43 -0
  14. package/.codex/prompts/gsd-new-project.md +43 -0
  15. package/.codex/prompts/gsd-pause-work.md +43 -0
  16. package/.codex/prompts/gsd-plan-milestone-gaps.md +43 -0
  17. package/.codex/prompts/gsd-plan-phase.md +43 -0
  18. package/.codex/prompts/gsd-progress.md +43 -0
  19. package/.codex/prompts/gsd-quick.md +43 -0
  20. package/.codex/prompts/gsd-remove-phase.md +43 -0
  21. package/.codex/prompts/gsd-research-phase.md +43 -0
  22. package/.codex/prompts/gsd-resume-work.md +43 -0
  23. package/.codex/prompts/gsd-set-profile.md +43 -0
  24. package/.codex/prompts/gsd-settings.md +43 -0
  25. package/.codex/prompts/gsd-update.md +43 -0
  26. package/.codex/prompts/gsd-verify-work.md +43 -0
  27. package/.codex/skills/get-shit-done-codex/SKILL.md +65 -0
  28. package/.codex/skills/get-shit-done-codex/references/compat.md +32 -0
  29. package/.codex/skills/get-shit-done-codex/references/windows.md +23 -0
  30. package/CHANGELOG.md +1434 -0
  31. package/LICENSE +21 -0
  32. package/README.md +690 -0
  33. package/agents/gsd-codebase-mapper.md +761 -0
  34. package/agents/gsd-debugger.md +1198 -0
  35. package/agents/gsd-executor.md +419 -0
  36. package/agents/gsd-integration-checker.md +423 -0
  37. package/agents/gsd-phase-researcher.md +469 -0
  38. package/agents/gsd-plan-checker.md +622 -0
  39. package/agents/gsd-planner.md +1159 -0
  40. package/agents/gsd-project-researcher.md +618 -0
  41. package/agents/gsd-research-synthesizer.md +236 -0
  42. package/agents/gsd-roadmapper.md +639 -0
  43. package/agents/gsd-verifier.md +541 -0
  44. package/bin/install-codex.js +100 -0
  45. package/bin/install.js +1806 -0
  46. package/commands/gsd/add-phase.md +39 -0
  47. package/commands/gsd/add-todo.md +42 -0
  48. package/commands/gsd/audit-milestone.md +42 -0
  49. package/commands/gsd/check-todos.md +41 -0
  50. package/commands/gsd/cleanup.md +18 -0
  51. package/commands/gsd/complete-milestone.md +136 -0
  52. package/commands/gsd/debug.md +162 -0
  53. package/commands/gsd/discuss-phase.md +87 -0
  54. package/commands/gsd/execute-phase.md +42 -0
  55. package/commands/gsd/health.md +22 -0
  56. package/commands/gsd/help.md +22 -0
  57. package/commands/gsd/insert-phase.md +33 -0
  58. package/commands/gsd/join-discord.md +18 -0
  59. package/commands/gsd/list-phase-assumptions.md +50 -0
  60. package/commands/gsd/map-codebase.md +71 -0
  61. package/commands/gsd/new-milestone.md +51 -0
  62. package/commands/gsd/new-project.md +42 -0
  63. package/commands/gsd/pause-work.md +35 -0
  64. package/commands/gsd/plan-milestone-gaps.md +40 -0
  65. package/commands/gsd/plan-phase.md +44 -0
  66. package/commands/gsd/progress.md +24 -0
  67. package/commands/gsd/quick.md +40 -0
  68. package/commands/gsd/reapply-patches.md +110 -0
  69. package/commands/gsd/remove-phase.md +32 -0
  70. package/commands/gsd/research-phase.md +187 -0
  71. package/commands/gsd/resume-work.md +40 -0
  72. package/commands/gsd/set-profile.md +34 -0
  73. package/commands/gsd/settings.md +36 -0
  74. package/commands/gsd/update.md +37 -0
  75. package/commands/gsd/verify-work.md +39 -0
  76. package/get-shit-done/bin/gsd-tools.cjs +5243 -0
  77. package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
  78. package/get-shit-done/references/checkpoints.md +775 -0
  79. package/get-shit-done/references/continuation-format.md +249 -0
  80. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  81. package/get-shit-done/references/git-integration.md +248 -0
  82. package/get-shit-done/references/git-planning-commit.md +38 -0
  83. package/get-shit-done/references/model-profile-resolution.md +34 -0
  84. package/get-shit-done/references/model-profiles.md +92 -0
  85. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  86. package/get-shit-done/references/planning-config.md +196 -0
  87. package/get-shit-done/references/questioning.md +145 -0
  88. package/get-shit-done/references/tdd.md +263 -0
  89. package/get-shit-done/references/ui-brand.md +160 -0
  90. package/get-shit-done/references/verification-patterns.md +612 -0
  91. package/get-shit-done/templates/DEBUG.md +159 -0
  92. package/get-shit-done/templates/UAT.md +247 -0
  93. package/get-shit-done/templates/codebase/architecture.md +255 -0
  94. package/get-shit-done/templates/codebase/concerns.md +310 -0
  95. package/get-shit-done/templates/codebase/conventions.md +307 -0
  96. package/get-shit-done/templates/codebase/integrations.md +280 -0
  97. package/get-shit-done/templates/codebase/stack.md +186 -0
  98. package/get-shit-done/templates/codebase/structure.md +285 -0
  99. package/get-shit-done/templates/codebase/testing.md +480 -0
  100. package/get-shit-done/templates/config.json +36 -0
  101. package/get-shit-done/templates/context.md +283 -0
  102. package/get-shit-done/templates/continue-here.md +78 -0
  103. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  104. package/get-shit-done/templates/discovery.md +146 -0
  105. package/get-shit-done/templates/milestone-archive.md +123 -0
  106. package/get-shit-done/templates/milestone.md +115 -0
  107. package/get-shit-done/templates/phase-prompt.md +567 -0
  108. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  109. package/get-shit-done/templates/project.md +184 -0
  110. package/get-shit-done/templates/requirements.md +231 -0
  111. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  112. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  113. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  114. package/get-shit-done/templates/research-project/STACK.md +120 -0
  115. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  116. package/get-shit-done/templates/research.md +552 -0
  117. package/get-shit-done/templates/roadmap.md +202 -0
  118. package/get-shit-done/templates/state.md +176 -0
  119. package/get-shit-done/templates/summary-complex.md +59 -0
  120. package/get-shit-done/templates/summary-minimal.md +41 -0
  121. package/get-shit-done/templates/summary-standard.md +48 -0
  122. package/get-shit-done/templates/summary.md +246 -0
  123. package/get-shit-done/templates/user-setup.md +311 -0
  124. package/get-shit-done/templates/verification-report.md +322 -0
  125. package/get-shit-done/workflows/add-phase.md +111 -0
  126. package/get-shit-done/workflows/add-todo.md +157 -0
  127. package/get-shit-done/workflows/audit-milestone.md +242 -0
  128. package/get-shit-done/workflows/check-todos.md +176 -0
  129. package/get-shit-done/workflows/cleanup.md +152 -0
  130. package/get-shit-done/workflows/complete-milestone.md +674 -0
  131. package/get-shit-done/workflows/diagnose-issues.md +219 -0
  132. package/get-shit-done/workflows/discovery-phase.md +289 -0
  133. package/get-shit-done/workflows/discuss-phase.md +485 -0
  134. package/get-shit-done/workflows/execute-phase.md +408 -0
  135. package/get-shit-done/workflows/execute-plan.md +441 -0
  136. package/get-shit-done/workflows/health.md +156 -0
  137. package/get-shit-done/workflows/help.md +486 -0
  138. package/get-shit-done/workflows/insert-phase.md +129 -0
  139. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  140. package/get-shit-done/workflows/map-codebase.md +327 -0
  141. package/get-shit-done/workflows/new-milestone.md +373 -0
  142. package/get-shit-done/workflows/new-project.md +1113 -0
  143. package/get-shit-done/workflows/pause-work.md +122 -0
  144. package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
  145. package/get-shit-done/workflows/plan-phase.md +448 -0
  146. package/get-shit-done/workflows/progress.md +393 -0
  147. package/get-shit-done/workflows/quick.md +444 -0
  148. package/get-shit-done/workflows/remove-phase.md +154 -0
  149. package/get-shit-done/workflows/research-phase.md +74 -0
  150. package/get-shit-done/workflows/resume-project.md +306 -0
  151. package/get-shit-done/workflows/set-profile.md +80 -0
  152. package/get-shit-done/workflows/settings.md +200 -0
  153. package/get-shit-done/workflows/transition.md +539 -0
  154. package/get-shit-done/workflows/update.md +214 -0
  155. package/get-shit-done/workflows/verify-phase.md +242 -0
  156. package/get-shit-done/workflows/verify-work.md +570 -0
  157. package/hooks/dist/gsd-check-update.js +62 -0
  158. package/hooks/dist/gsd-statusline.js +91 -0
  159. package/package.json +54 -0
  160. package/scripts/build-hooks.js +42 -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
+ 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,327 @@
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
+ Task tool parameters:
94
+ ```
95
+ subagent_type: "gsd-codebase-mapper"
96
+ model: "{mapper_model}"
97
+ run_in_background: true
98
+ description: "Map codebase tech stack"
99
+ ```
100
+
101
+ Prompt:
102
+ ```
103
+ Focus: tech
104
+
105
+ Analyze this codebase for technology stack and external integrations.
106
+
107
+ Write these documents to .planning/codebase/:
108
+ - STACK.md - Languages, runtime, frameworks, dependencies, configuration
109
+ - INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
110
+
111
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
112
+ ```
113
+
114
+ **Agent 2: Architecture Focus**
115
+
116
+ Task tool parameters:
117
+ ```
118
+ subagent_type: "gsd-codebase-mapper"
119
+ model: "{mapper_model}"
120
+ run_in_background: true
121
+ description: "Map codebase architecture"
122
+ ```
123
+
124
+ Prompt:
125
+ ```
126
+ Focus: arch
127
+
128
+ Analyze this codebase architecture and directory structure.
129
+
130
+ Write these documents to .planning/codebase/:
131
+ - ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
132
+ - STRUCTURE.md - Directory layout, key locations, naming conventions
133
+
134
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
135
+ ```
136
+
137
+ **Agent 3: Quality Focus**
138
+
139
+ Task tool parameters:
140
+ ```
141
+ subagent_type: "gsd-codebase-mapper"
142
+ model: "{mapper_model}"
143
+ run_in_background: true
144
+ description: "Map codebase conventions"
145
+ ```
146
+
147
+ Prompt:
148
+ ```
149
+ Focus: quality
150
+
151
+ Analyze this codebase for coding conventions and testing patterns.
152
+
153
+ Write these documents to .planning/codebase/:
154
+ - CONVENTIONS.md - Code style, naming, patterns, error handling
155
+ - TESTING.md - Framework, structure, mocking, coverage
156
+
157
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
158
+ ```
159
+
160
+ **Agent 4: Concerns Focus**
161
+
162
+ Task tool parameters:
163
+ ```
164
+ subagent_type: "gsd-codebase-mapper"
165
+ model: "{mapper_model}"
166
+ run_in_background: true
167
+ description: "Map codebase concerns"
168
+ ```
169
+
170
+ Prompt:
171
+ ```
172
+ Focus: concerns
173
+
174
+ Analyze this codebase for technical debt, known issues, and areas of concern.
175
+
176
+ Write this document to .planning/codebase/:
177
+ - CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
178
+
179
+ Explore thoroughly. Write document directly using template. Return confirmation only.
180
+ ```
181
+
182
+ Continue to collect_confirmations.
183
+ </step>
184
+
185
+ <step name="collect_confirmations">
186
+ Wait for all 4 agents to complete.
187
+
188
+ Read each agent's output file to collect confirmations.
189
+
190
+ **Expected confirmation format from each agent:**
191
+ ```
192
+ ## Mapping Complete
193
+
194
+ **Focus:** {focus}
195
+ **Documents written:**
196
+ - `.planning/codebase/{DOC1}.md` ({N} lines)
197
+ - `.planning/codebase/{DOC2}.md` ({N} lines)
198
+
199
+ Ready for orchestrator summary.
200
+ ```
201
+
202
+ **What you receive:** Just file paths and line counts. NOT document contents.
203
+
204
+ If any agent failed, note the failure and continue with successful documents.
205
+
206
+ Continue to verify_output.
207
+ </step>
208
+
209
+ <step name="verify_output">
210
+ Verify all documents created successfully:
211
+
212
+ ```bash
213
+ ls -la .planning/codebase/
214
+ wc -l .planning/codebase/*.md
215
+ ```
216
+
217
+ **Verification checklist:**
218
+ - All 7 documents exist
219
+ - No empty documents (each should have >20 lines)
220
+
221
+ If any documents missing or empty, note which agents may have failed.
222
+
223
+ Continue to scan_for_secrets.
224
+ </step>
225
+
226
+ <step name="scan_for_secrets">
227
+ **CRITICAL SECURITY CHECK:** Scan output files for accidentally leaked secrets before committing.
228
+
229
+ Run secret pattern detection:
230
+
231
+ ```bash
232
+ # Check for common API key patterns in generated docs
233
+ 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
234
+ ```
235
+
236
+ **If SECRETS_FOUND=true:**
237
+
238
+ ```
239
+ ⚠️ SECURITY ALERT: Potential secrets detected in codebase documents!
240
+
241
+ Found patterns that look like API keys or tokens in:
242
+ [show grep output]
243
+
244
+ This would expose credentials if committed.
245
+
246
+ **Action required:**
247
+ 1. Review the flagged content above
248
+ 2. If these are real secrets, they must be removed before committing
249
+ 3. Consider adding sensitive files to Claude Code "Deny" permissions
250
+
251
+ Pausing before commit. Reply "safe to proceed" if the flagged content is not actually sensitive, or edit the files first.
252
+ ```
253
+
254
+ Wait for user confirmation before continuing to commit_codebase_map.
255
+
256
+ **If SECRETS_FOUND=false:**
257
+
258
+ Continue to commit_codebase_map.
259
+ </step>
260
+
261
+ <step name="commit_codebase_map">
262
+ Commit the codebase map:
263
+
264
+ ```bash
265
+ node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "docs: map existing codebase" --files .planning/codebase/*.md
266
+ ```
267
+
268
+ Continue to offer_next.
269
+ </step>
270
+
271
+ <step name="offer_next">
272
+ Present completion summary and next steps.
273
+
274
+ **Get line counts:**
275
+ ```bash
276
+ wc -l .planning/codebase/*.md
277
+ ```
278
+
279
+ **Output format:**
280
+
281
+ ```
282
+ Codebase mapping complete.
283
+
284
+ Created .planning/codebase/:
285
+ - STACK.md ([N] lines) - Technologies and dependencies
286
+ - ARCHITECTURE.md ([N] lines) - System design and patterns
287
+ - STRUCTURE.md ([N] lines) - Directory layout and organization
288
+ - CONVENTIONS.md ([N] lines) - Code style and patterns
289
+ - TESTING.md ([N] lines) - Test structure and practices
290
+ - INTEGRATIONS.md ([N] lines) - External services and APIs
291
+ - CONCERNS.md ([N] lines) - Technical debt and issues
292
+
293
+
294
+ ---
295
+
296
+ ## ▶ Next Up
297
+
298
+ **Initialize project** — use codebase context for planning
299
+
300
+ `/gsd:new-project`
301
+
302
+ <sub>`/clear` first → fresh context window</sub>
303
+
304
+ ---
305
+
306
+ **Also available:**
307
+ - Re-run mapping: `/gsd:map-codebase`
308
+ - Review specific file: `cat .planning/codebase/STACK.md`
309
+ - Edit any document before proceeding
310
+
311
+ ---
312
+ ```
313
+
314
+ End workflow.
315
+ </step>
316
+
317
+ </process>
318
+
319
+ <success_criteria>
320
+ - .planning/codebase/ directory created
321
+ - 4 parallel gsd-codebase-mapper agents spawned with run_in_background=true
322
+ - Agents write documents directly (orchestrator doesn't receive document contents)
323
+ - Read agent output files to collect confirmations
324
+ - All 7 codebase documents exist
325
+ - Clear completion summary with line counts
326
+ - User offered clear next steps in GSD style
327
+ </success_criteria>