gsd-remix 1.0.2 → 1.1.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 (230) hide show
  1. package/README.md +13 -81
  2. package/README.zh-CN.md +13 -57
  3. package/agents/gsd-debugger.md +0 -3
  4. package/agents/gsd-executor.md +5 -11
  5. package/agents/gsd-phase-researcher.md +3 -107
  6. package/agents/gsd-plan-checker.md +0 -61
  7. package/agents/gsd-planner.md +4 -63
  8. package/agents/gsd-roadmapper.md +0 -29
  9. package/agents/gsd-security-auditor.md +62 -114
  10. package/agents/gsd-verifier.md +0 -3
  11. package/bin/install.js +20 -118
  12. package/commands/gsd/complete-milestone.md +0 -22
  13. package/commands/gsd/plan-phase.md +1 -2
  14. package/get-shit-done/bin/gsd-tools.cjs +5 -224
  15. package/get-shit-done/bin/lib/claude-md.cjs +427 -0
  16. package/get-shit-done/bin/lib/config-schema.cjs +2 -12
  17. package/get-shit-done/bin/lib/config.cjs +3 -12
  18. package/get-shit-done/bin/lib/core.cjs +4 -5
  19. package/get-shit-done/bin/lib/init.cjs +0 -163
  20. package/get-shit-done/bin/lib/model-profiles.cjs +12 -18
  21. package/get-shit-done/bin/lib/verify.cjs +0 -66
  22. package/get-shit-done/references/agent-contracts.md +0 -6
  23. package/get-shit-done/references/artifact-types.md +0 -30
  24. package/get-shit-done/references/continuation-format.md +0 -1
  25. package/get-shit-done/references/model-profiles.md +39 -37
  26. package/get-shit-done/references/planning-config.md +7 -12
  27. package/get-shit-done/references/verification-overrides.md +1 -1
  28. package/get-shit-done/templates/README.md +2 -9
  29. package/get-shit-done/templates/claude-md.md +0 -14
  30. package/get-shit-done/templates/config.json +5 -19
  31. package/get-shit-done/workflows/autonomous.md +9 -141
  32. package/get-shit-done/workflows/complete-milestone.md +3 -4
  33. package/get-shit-done/workflows/discuss-phase-assumptions.md +1 -18
  34. package/get-shit-done/workflows/discuss-phase.md +10 -104
  35. package/get-shit-done/workflows/do.md +1 -5
  36. package/get-shit-done/workflows/execute-phase.md +53 -103
  37. package/get-shit-done/workflows/execute-plan.md +4 -4
  38. package/get-shit-done/workflows/health.md +2 -5
  39. package/get-shit-done/workflows/help.md +0 -165
  40. package/get-shit-done/workflows/new-milestone.md +0 -51
  41. package/get-shit-done/workflows/new-project.md +2 -63
  42. package/get-shit-done/workflows/next.md +0 -23
  43. package/get-shit-done/workflows/pause-work.md +7 -15
  44. package/get-shit-done/workflows/plan-phase.md +20 -304
  45. package/get-shit-done/workflows/pr-branch.md +0 -1
  46. package/get-shit-done/workflows/progress.md +1 -68
  47. package/get-shit-done/workflows/quick.md +0 -3
  48. package/get-shit-done/workflows/research-phase.md +0 -1
  49. package/get-shit-done/workflows/settings.md +1 -57
  50. package/get-shit-done/workflows/transition.md +3 -86
  51. package/get-shit-done/workflows/verify-work.md +0 -64
  52. package/package.json +1 -1
  53. package/scripts/build-hooks.js +0 -2
  54. package/sdk/prompts/agents/gsd-executor.md +2 -0
  55. package/sdk/prompts/agents/gsd-plan-checker.md +0 -3
  56. package/sdk/prompts/agents/gsd-roadmapper.md +0 -29
  57. package/sdk/src/config.ts +4 -5
  58. package/sdk/src/golden/golden-integration-covered.ts +0 -2
  59. package/sdk/src/golden/golden-policy.ts +1 -1
  60. package/sdk/src/golden/golden.integration.test.ts +0 -27
  61. package/sdk/src/golden/read-only-golden-rows.ts +0 -15
  62. package/sdk/src/query/QUERY-HANDLERS.md +3 -34
  63. package/sdk/src/query/claude-md.ts +421 -0
  64. package/sdk/src/query/commit.test.ts +155 -1
  65. package/sdk/src/query/commit.ts +71 -17
  66. package/sdk/src/query/config-gates.test.ts +1 -2
  67. package/sdk/src/query/config-gates.ts +1 -5
  68. package/sdk/src/query/config-mutation.test.ts +0 -1
  69. package/sdk/src/query/config-mutation.ts +5 -6
  70. package/sdk/src/query/config-query.test.ts +2 -2
  71. package/sdk/src/query/config-query.ts +12 -18
  72. package/sdk/src/query/decomposed-handlers.test.ts +0 -64
  73. package/sdk/src/query/index.ts +4 -68
  74. package/sdk/src/query/init.test.ts +0 -64
  75. package/sdk/src/query/init.ts +0 -189
  76. package/sdk/src/query/normalize-query-command.ts +0 -2
  77. package/sdk/src/query/profile.test.ts +0 -43
  78. package/sdk/src/query/profile.ts +1 -141
  79. package/sdk/src/query/state-mutation.ts +18 -0
  80. package/sdk/src/runtime-health.ts +3 -3
  81. package/agents/gsd-ai-researcher.md +0 -133
  82. package/agents/gsd-doc-classifier.md +0 -168
  83. package/agents/gsd-doc-synthesizer.md +0 -204
  84. package/agents/gsd-doc-verifier.md +0 -217
  85. package/agents/gsd-doc-writer.md +0 -615
  86. package/agents/gsd-domain-researcher.md +0 -153
  87. package/agents/gsd-eval-auditor.md +0 -191
  88. package/agents/gsd-eval-planner.md +0 -154
  89. package/agents/gsd-framework-selector.md +0 -160
  90. package/agents/gsd-intel-updater.md +0 -334
  91. package/agents/gsd-nyquist-auditor.md +0 -203
  92. package/agents/gsd-ui-auditor.md +0 -495
  93. package/agents/gsd-ui-checker.md +0 -309
  94. package/agents/gsd-ui-researcher.md +0 -380
  95. package/agents/gsd-user-profiler.md +0 -171
  96. package/commands/gsd/ai-integration-phase.md +0 -36
  97. package/commands/gsd/analyze-dependencies.md +0 -34
  98. package/commands/gsd/audit-fix.md +0 -33
  99. package/commands/gsd/audit-milestone.md +0 -36
  100. package/commands/gsd/audit-uat.md +0 -24
  101. package/commands/gsd/docs-update.md +0 -48
  102. package/commands/gsd/eval-review.md +0 -32
  103. package/commands/gsd/explore.md +0 -27
  104. package/commands/gsd/extract_learnings.md +0 -22
  105. package/commands/gsd/forensics.md +0 -56
  106. package/commands/gsd/from-gsd2.md +0 -47
  107. package/commands/gsd/graphify.md +0 -201
  108. package/commands/gsd/import.md +0 -37
  109. package/commands/gsd/inbox.md +0 -38
  110. package/commands/gsd/ingest-docs.md +0 -42
  111. package/commands/gsd/intel.md +0 -179
  112. package/commands/gsd/join-discord.md +0 -19
  113. package/commands/gsd/list-phase-assumptions.md +0 -46
  114. package/commands/gsd/list-workspaces.md +0 -19
  115. package/commands/gsd/manager.md +0 -40
  116. package/commands/gsd/milestone-summary.md +0 -51
  117. package/commands/gsd/new-workspace.md +0 -44
  118. package/commands/gsd/plan-milestone-gaps.md +0 -34
  119. package/commands/gsd/plan-review-convergence.md +0 -52
  120. package/commands/gsd/plant-seed.md +0 -28
  121. package/commands/gsd/profile-user.md +0 -46
  122. package/commands/gsd/reapply-patches.md +0 -331
  123. package/commands/gsd/remove-workspace.md +0 -26
  124. package/commands/gsd/review.md +0 -40
  125. package/commands/gsd/scan.md +0 -26
  126. package/commands/gsd/secure-phase.md +0 -35
  127. package/commands/gsd/session-report.md +0 -19
  128. package/commands/gsd/set-profile.md +0 -12
  129. package/commands/gsd/ship.md +0 -23
  130. package/commands/gsd/sketch-wrap-up.md +0 -31
  131. package/commands/gsd/sketch.md +0 -49
  132. package/commands/gsd/spec-phase.md +0 -62
  133. package/commands/gsd/spike-wrap-up.md +0 -31
  134. package/commands/gsd/spike.md +0 -46
  135. package/commands/gsd/stats.md +0 -18
  136. package/commands/gsd/sync-skills.md +0 -19
  137. package/commands/gsd/thread.md +0 -227
  138. package/commands/gsd/ui-phase.md +0 -34
  139. package/commands/gsd/ui-review.md +0 -32
  140. package/commands/gsd/ultraplan-phase.md +0 -33
  141. package/commands/gsd/update.md +0 -37
  142. package/commands/gsd/validate-phase.md +0 -35
  143. package/commands/gsd/workstreams.md +0 -69
  144. package/get-shit-done/bin/lib/docs.cjs +0 -267
  145. package/get-shit-done/bin/lib/graphify.cjs +0 -494
  146. package/get-shit-done/bin/lib/gsd2-import.cjs +0 -511
  147. package/get-shit-done/bin/lib/intel.cjs +0 -639
  148. package/get-shit-done/bin/lib/profile-output.cjs +0 -1080
  149. package/get-shit-done/bin/lib/profile-pipeline.cjs +0 -539
  150. package/get-shit-done/bin/lib/workstream.cjs +0 -495
  151. package/get-shit-done/references/ai-evals.md +0 -156
  152. package/get-shit-done/references/ai-frameworks.md +0 -186
  153. package/get-shit-done/references/doc-conflict-engine.md +0 -91
  154. package/get-shit-done/references/model-profile-resolution.md +0 -38
  155. package/get-shit-done/references/planner-reviews.md +0 -39
  156. package/get-shit-done/references/sketch-interactivity.md +0 -41
  157. package/get-shit-done/references/sketch-theme-system.md +0 -94
  158. package/get-shit-done/references/sketch-tooling.md +0 -45
  159. package/get-shit-done/references/sketch-variant-patterns.md +0 -81
  160. package/get-shit-done/references/thinking-models-debug.md +0 -44
  161. package/get-shit-done/references/thinking-models-execution.md +0 -50
  162. package/get-shit-done/references/thinking-models-planning.md +0 -62
  163. package/get-shit-done/references/thinking-models-research.md +0 -50
  164. package/get-shit-done/references/thinking-models-verification.md +0 -55
  165. package/get-shit-done/references/thinking-partner.md +0 -96
  166. package/get-shit-done/references/user-profiling.md +0 -681
  167. package/get-shit-done/references/workstream-flag.md +0 -111
  168. package/get-shit-done/templates/AI-SPEC.md +0 -246
  169. package/get-shit-done/templates/SECURITY.md +0 -61
  170. package/get-shit-done/templates/UI-SPEC.md +0 -100
  171. package/get-shit-done/templates/VALIDATION.md +0 -76
  172. package/get-shit-done/templates/dev-preferences.md +0 -21
  173. package/get-shit-done/templates/user-profile.md +0 -146
  174. package/get-shit-done/workflows/ai-integration-phase.md +0 -284
  175. package/get-shit-done/workflows/analyze-dependencies.md +0 -96
  176. package/get-shit-done/workflows/audit-fix.md +0 -175
  177. package/get-shit-done/workflows/audit-milestone.md +0 -340
  178. package/get-shit-done/workflows/audit-uat.md +0 -109
  179. package/get-shit-done/workflows/docs-update.md +0 -1155
  180. package/get-shit-done/workflows/eval-review.md +0 -155
  181. package/get-shit-done/workflows/explore.md +0 -141
  182. package/get-shit-done/workflows/extract_learnings.md +0 -242
  183. package/get-shit-done/workflows/forensics.md +0 -265
  184. package/get-shit-done/workflows/import.md +0 -246
  185. package/get-shit-done/workflows/inbox.md +0 -387
  186. package/get-shit-done/workflows/ingest-docs.md +0 -328
  187. package/get-shit-done/workflows/list-phase-assumptions.md +0 -178
  188. package/get-shit-done/workflows/list-workspaces.md +0 -56
  189. package/get-shit-done/workflows/manager.md +0 -365
  190. package/get-shit-done/workflows/milestone-summary.md +0 -223
  191. package/get-shit-done/workflows/new-workspace.md +0 -239
  192. package/get-shit-done/workflows/plan-milestone-gaps.md +0 -273
  193. package/get-shit-done/workflows/plan-review-convergence.md +0 -254
  194. package/get-shit-done/workflows/plant-seed.md +0 -172
  195. package/get-shit-done/workflows/profile-user.md +0 -452
  196. package/get-shit-done/workflows/remove-workspace.md +0 -92
  197. package/get-shit-done/workflows/review.md +0 -344
  198. package/get-shit-done/workflows/scan.md +0 -102
  199. package/get-shit-done/workflows/secure-phase.md +0 -166
  200. package/get-shit-done/workflows/session-report.md +0 -146
  201. package/get-shit-done/workflows/ship.md +0 -302
  202. package/get-shit-done/workflows/sketch-wrap-up.md +0 -283
  203. package/get-shit-done/workflows/sketch.md +0 -286
  204. package/get-shit-done/workflows/spec-phase.md +0 -262
  205. package/get-shit-done/workflows/spike-wrap-up.md +0 -281
  206. package/get-shit-done/workflows/spike.md +0 -362
  207. package/get-shit-done/workflows/stats.md +0 -60
  208. package/get-shit-done/workflows/sync-skills.md +0 -182
  209. package/get-shit-done/workflows/ui-phase.md +0 -323
  210. package/get-shit-done/workflows/ui-review.md +0 -190
  211. package/get-shit-done/workflows/ultraplan-phase.md +0 -189
  212. package/get-shit-done/workflows/update.md +0 -587
  213. package/get-shit-done/workflows/validate-phase.md +0 -176
  214. package/hooks/dist/gsd-check-update-worker.js +0 -108
  215. package/hooks/dist/gsd-check-update.js +0 -63
  216. package/hooks/gsd-check-update-worker.js +0 -108
  217. package/hooks/gsd-check-update.js +0 -63
  218. package/sdk/src/golden/fixtures/profile-sample-sessions/demo-project/sample.jsonl +0 -3
  219. package/sdk/src/query/docs-init.ts +0 -257
  220. package/sdk/src/query/intel.test.ts +0 -90
  221. package/sdk/src/query/intel.ts +0 -404
  222. package/sdk/src/query/profile-extract-messages.ts +0 -247
  223. package/sdk/src/query/profile-output.ts +0 -908
  224. package/sdk/src/query/profile-questionnaire-data.ts +0 -181
  225. package/sdk/src/query/profile-sample.ts +0 -184
  226. package/sdk/src/query/profile-scan-sessions.ts +0 -174
  227. package/sdk/src/query/workspace.test.ts +0 -119
  228. package/sdk/src/query/workspace.ts +0 -131
  229. package/sdk/src/query/workstream.test.ts +0 -51
  230. package/sdk/src/query/workstream.ts +0 -434
@@ -1,452 +0,0 @@
1
- <purpose>
2
- Orchestrate the full developer profiling flow: consent, session analysis (or questionnaire fallback), profile generation, result display, and artifact creation.
3
-
4
- This workflow wires Phase 1 (session pipeline) and Phase 2 (profiling engine) into a cohesive user-facing experience. All heavy lifting is done by existing `gsd-remix-sdk query` handlers (with legacy `gsd-tools.cjs` parity where needed) and the gsd-user-profiler agent -- this workflow orchestrates the sequence, handles branching, and provides the UX.
5
- </purpose>
6
-
7
- <required_reading>
8
- Read all files referenced by the invoking prompt's execution_context before starting.
9
-
10
- Key references:
11
- - @$HOME/.claude/get-shit-done/references/ui-brand.md (display patterns)
12
- - @$HOME/.claude/agents/gsd-user-profiler.md (profiler agent definition)
13
- - @$HOME/.claude/get-shit-done/references/user-profiling.md (profiling reference doc)
14
- </required_reading>
15
-
16
- <process>
17
-
18
- ## 1. Initialize
19
-
20
- Parse flags from $ARGUMENTS:
21
- - Detect `--questionnaire` flag (skip session analysis, questionnaire-only)
22
- - Detect `--refresh` flag (rebuild profile even when one exists)
23
-
24
- Check for existing profile:
25
-
26
- ```bash
27
- PROFILE_PATH="$HOME/.claude/get-shit-done/USER-PROFILE.md"
28
- [ -f "$PROFILE_PATH" ] && echo "EXISTS" || echo "NOT_FOUND"
29
- ```
30
-
31
- **If profile exists AND --refresh NOT set AND --questionnaire NOT set:**
32
-
33
-
34
- **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
35
- Use AskUserQuestion:
36
- - header: "Existing Profile"
37
- - question: "You already have a profile. What would you like to do?"
38
- - options:
39
- - "View it" -- Display summary card from existing profile data, then exit
40
- - "Refresh it" -- Continue with --refresh behavior
41
- - "Cancel" -- Exit workflow
42
-
43
- If "View it": Read USER-PROFILE.md, display its content formatted as a summary card, then exit.
44
- If "Refresh it": Set --refresh behavior and continue.
45
- If "Cancel": Display "No changes made." and exit.
46
-
47
- **If profile exists AND --refresh IS set:**
48
-
49
- Backup existing profile:
50
- ```bash
51
- cp "$HOME/.claude/get-shit-done/USER-PROFILE.md" "$HOME/.claude/USER-PROFILE.backup.md"
52
- ```
53
-
54
- Display: "Re-analyzing your sessions to update your profile."
55
- Continue to step 2.
56
-
57
- **If no profile exists:** Continue to step 2.
58
-
59
- ---
60
-
61
- ## 2. Consent Gate (ACTV-06)
62
-
63
- **Skip if** `--questionnaire` flag is set (no JSONL reading occurs -- jump directly to step 4b).
64
-
65
- Display consent screen:
66
-
67
- ```
68
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
69
- GSD > PROFILE YOUR CODING STYLE
70
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
71
-
72
- Claude starts every conversation generic. A profile teaches Claude
73
- how YOU actually work -- not how you think you work.
74
-
75
- ## What We'll Analyze
76
-
77
- Your recent Claude Code sessions, looking for patterns in these
78
- 8 behavioral dimensions:
79
-
80
- | Dimension | What It Measures |
81
- |----------------------|---------------------------------------------|
82
- | Communication Style | How you phrase requests (terse vs. detailed) |
83
- | Decision Speed | How you choose between options |
84
- | Explanation Depth | How much explanation you want with code |
85
- | Debugging Approach | How you tackle errors and bugs |
86
- | UX Philosophy | How much you care about design vs. function |
87
- | Vendor Philosophy | How you evaluate libraries and tools |
88
- | Frustration Triggers | What makes you correct Claude |
89
- | Learning Style | How you prefer to learn new things |
90
-
91
- ## Data Handling
92
-
93
- ✓ Reads session files locally (read-only, nothing modified)
94
- ✓ Analyzes message patterns (not content meaning)
95
- ✓ Stores profile at $HOME/.claude/get-shit-done/USER-PROFILE.md
96
- ✗ Nothing is sent to external services
97
- ✗ Sensitive content (API keys, passwords) is automatically excluded
98
- ```
99
-
100
- **If --refresh path:**
101
- Show abbreviated consent instead:
102
-
103
- ```
104
- Re-analyzing your sessions to update your profile.
105
- Your existing profile has been backed up to USER-PROFILE.backup.md.
106
- ```
107
-
108
- Use AskUserQuestion:
109
- - header: "Refresh"
110
- - question: "Continue with profile refresh?"
111
- - options:
112
- - "Continue" -- Proceed to step 3
113
- - "Cancel" -- Exit workflow
114
-
115
- **If default (no --refresh) path:**
116
-
117
- Use AskUserQuestion:
118
- - header: "Ready?"
119
- - question: "Ready to analyze your sessions?"
120
- - options:
121
- - "Let's go" -- Proceed to step 3 (session analysis)
122
- - "Use questionnaire instead" -- Jump to step 4b (questionnaire path)
123
- - "Not now" -- Display "No worries. Run /gsd-profile-user when ready." and exit
124
-
125
- ---
126
-
127
- ## 3. Session Scan
128
-
129
- Display: "◆ Scanning sessions..."
130
-
131
- Run session scan:
132
- ```bash
133
- SCAN_RESULT=$(gsd-remix-sdk query scan-sessions --json 2>/dev/null)
134
- ```
135
-
136
- Parse the JSON output to get session count and project count.
137
-
138
- Display: "✓ Found N sessions across M projects"
139
-
140
- **Determine data sufficiency:**
141
- - Count total messages available from the scan result (sum sessions across projects)
142
- - If 0 sessions found: Display "No sessions found. Switching to questionnaire." and jump to step 4b
143
- - If sessions found: Continue to step 4a
144
-
145
- ---
146
-
147
- ## 4a. Session Analysis Path
148
-
149
- Display: "◆ Sampling messages..."
150
-
151
- Run profile sampling:
152
- ```bash
153
- SAMPLE_RESULT=$(gsd-remix-sdk query profile-sample --json 2>/dev/null)
154
- ```
155
-
156
- Parse the JSON output to get the temp directory path and message count.
157
-
158
- Display: "✓ Sampled N messages from M projects"
159
-
160
- Display: "◆ Analyzing patterns..."
161
-
162
- **Spawn gsd-user-profiler agent using Task tool:**
163
-
164
- Use the Task tool to spawn the `gsd-user-profiler` agent. Provide it with:
165
- - The sampled JSONL file path from profile-sample output
166
- - The user-profiling reference doc at `$HOME/.claude/get-shit-done/references/user-profiling.md`
167
-
168
- The agent prompt should follow this structure:
169
- ```
170
- Read the profiling reference document and the sampled session messages, then analyze the developer's behavioral patterns across all 8 dimensions.
171
-
172
- Reference: @$HOME/.claude/get-shit-done/references/user-profiling.md
173
- Session data: @{temp_dir}/profile-sample.jsonl
174
-
175
- Analyze these messages and return your analysis in the <analysis> JSON format specified in the reference document.
176
- ```
177
-
178
- **Parse the agent's output:**
179
- - Extract the `<analysis>` JSON block from the agent's response
180
- - Save analysis JSON to a temp file (in the same temp directory created by profile-sample)
181
-
182
- ```bash
183
- ANALYSIS_PATH="{temp_dir}/analysis.json"
184
- ```
185
-
186
- Write the analysis JSON to `$ANALYSIS_PATH`.
187
-
188
- Display: "✓ Analysis complete (N dimensions scored)"
189
-
190
- **Check for thin data:**
191
- - Read the analysis JSON and check the total message count
192
- - If < 50 messages were analyzed: Note that a questionnaire supplement could improve accuracy. Display: "Note: Limited session data (N messages). Results may have lower confidence."
193
-
194
- Continue to step 5.
195
-
196
- ---
197
-
198
- ## 4b. Questionnaire Path
199
-
200
- Display: "Using questionnaire to build your profile."
201
-
202
- **Get questions:**
203
- ```bash
204
- QUESTIONS=$(gsd-remix-sdk query profile-questionnaire --json 2>/dev/null)
205
- ```
206
-
207
- Parse the questions JSON. It contains 8 questions, one per dimension.
208
-
209
- **Present each question to the user via AskUserQuestion:**
210
-
211
- For each question in the questions array:
212
- - header: The dimension name (e.g., "Communication Style")
213
- - question: The question text
214
- - options: The answer options from the question definition
215
-
216
- Collect all answers into an answers JSON object mapping dimension keys to selected answer values.
217
-
218
- **Save answers to temp file:**
219
- ```bash
220
- ANSWERS_PATH=$(mktemp /tmp/gsd-profile-answers-XXXXXX.json)
221
- ```
222
-
223
- Write the answers JSON to `$ANSWERS_PATH`.
224
-
225
- **Convert answers to analysis:**
226
- ```bash
227
- ANALYSIS_RESULT=$(gsd-remix-sdk query profile-questionnaire --answers "$ANSWERS_PATH" --json 2>/dev/null)
228
- ```
229
-
230
- Parse the analysis JSON from the result.
231
-
232
- Save analysis JSON to a temp file:
233
- ```bash
234
- ANALYSIS_PATH=$(mktemp /tmp/gsd-profile-analysis-XXXXXX.json)
235
- ```
236
-
237
- Write the analysis JSON to `$ANALYSIS_PATH`.
238
-
239
- Continue to step 5 (skip split resolution since questionnaire handles ambiguity internally).
240
-
241
- ---
242
-
243
- ## 5. Split Resolution
244
-
245
- **Skip if** questionnaire-only path (splits already handled internally).
246
-
247
- Read the analysis JSON from `$ANALYSIS_PATH`.
248
-
249
- Check each dimension for `cross_project_consistent: false`.
250
-
251
- **For each split detected:**
252
-
253
- Use AskUserQuestion:
254
- - header: The dimension name (e.g., "Communication Style")
255
- - question: "Your sessions show different patterns:" followed by the split context (e.g., "CLI/backend projects -> terse-direct, Frontend/UI projects -> detailed-structured")
256
- - options:
257
- - Rating option A (e.g., "terse-direct")
258
- - Rating option B (e.g., "detailed-structured")
259
- - "Context-dependent (keep both)"
260
-
261
- **If user picks a specific rating:** Update the dimension's `rating` field in the analysis JSON to the selected value.
262
-
263
- **If user picks "Context-dependent":** Keep the dominant rating in the `rating` field. Add a `context_note` to the dimension's summary describing the split (e.g., "Context-dependent: terse in CLI projects, detailed in frontend projects").
264
-
265
- Write updated analysis JSON back to `$ANALYSIS_PATH`.
266
-
267
- ---
268
-
269
- ## 6. Profile Write
270
-
271
- Display: "◆ Writing profile..."
272
-
273
- ```bash
274
- gsd-remix-sdk query write-profile --input "$ANALYSIS_PATH" --json 2>/dev/null
275
- ```
276
-
277
- Display: "✓ Profile written to $HOME/.claude/get-shit-done/USER-PROFILE.md"
278
-
279
- ---
280
-
281
- ## 7. Result Display
282
-
283
- Read the analysis JSON from `$ANALYSIS_PATH` to build the display.
284
-
285
- **Show report card table:**
286
-
287
- ```
288
- ## Your Profile
289
-
290
- | Dimension | Rating | Confidence |
291
- |----------------------|----------------------|------------|
292
- | Communication Style | detailed-structured | HIGH |
293
- | Decision Speed | deliberate-informed | MEDIUM |
294
- | Explanation Depth | concise | HIGH |
295
- | Debugging Approach | hypothesis-driven | MEDIUM |
296
- | UX Philosophy | pragmatic | LOW |
297
- | Vendor Philosophy | thorough-evaluator | HIGH |
298
- | Frustration Triggers | scope-creep | MEDIUM |
299
- | Learning Style | self-directed | HIGH |
300
- ```
301
-
302
- (Populate with actual values from the analysis JSON.)
303
-
304
- **Show highlight reel:**
305
-
306
- Pick 3-4 dimensions with the highest confidence and most evidence signals. Format as:
307
-
308
- ```
309
- ## Highlights
310
-
311
- - **Communication (HIGH):** You consistently provide structured context with
312
- headers and problem statements before making requests
313
- - **Vendor Choices (HIGH):** You research alternatives thoroughly -- comparing
314
- docs, GitHub activity, and bundle sizes before committing
315
- - **Frustrations (MEDIUM):** You correct Claude most often for doing things
316
- you didn't ask for -- scope creep is your primary trigger
317
- ```
318
-
319
- Build highlights from the `evidence` array and `summary` fields in the analysis JSON. Use the most compelling evidence quotes. Format each as "You tend to..." or "You consistently..." with evidence attribution.
320
-
321
- **Offer full profile view:**
322
-
323
- Use AskUserQuestion:
324
- - header: "Profile"
325
- - question: "Want to see the full profile?"
326
- - options:
327
- - "Yes" -- Read and display the full USER-PROFILE.md content, then continue to step 8
328
- - "Continue to artifacts" -- Proceed directly to step 8
329
-
330
- ---
331
-
332
- ## 8. Artifact Selection (ACTV-05)
333
-
334
- Use AskUserQuestion with multiSelect:
335
- - header: "Artifacts"
336
- - question: "Which artifacts should I generate?"
337
- - options (ALL pre-selected by default):
338
- - "/gsd-dev-preferences command file" -- "Load your preferences in any session"
339
- - "CLAUDE.md profile section" -- "Add profile to this project's CLAUDE.md"
340
- - "Global CLAUDE.md" -- "Add profile to $HOME/.claude/CLAUDE.md for all projects"
341
-
342
- **If no artifacts selected:** Display "No artifacts generated. Your profile is saved at $HOME/.claude/get-shit-done/USER-PROFILE.md" and jump to step 10.
343
-
344
- ---
345
-
346
- ## 9. Artifact Generation
347
-
348
- Generate selected artifacts sequentially (file I/O is fast, no benefit from parallel agents):
349
-
350
- **For /gsd-dev-preferences (if selected):**
351
-
352
- ```bash
353
- gsd-remix-sdk query generate-dev-preferences --analysis "$ANALYSIS_PATH" --json 2>/dev/null
354
- ```
355
-
356
- Display: "✓ Generated /gsd-dev-preferences at $HOME/.claude/commands/gsd/dev-preferences.md"
357
-
358
- **For CLAUDE.md profile section (if selected):**
359
-
360
- ```bash
361
- gsd-remix-sdk query generate-claude-profile --analysis "$ANALYSIS_PATH" --json 2>/dev/null
362
- ```
363
-
364
- Display: "✓ Added profile section to CLAUDE.md"
365
-
366
- **For Global CLAUDE.md (if selected):**
367
-
368
- ```bash
369
- gsd-remix-sdk query generate-claude-profile --analysis "$ANALYSIS_PATH" --global --json 2>/dev/null
370
- ```
371
-
372
- Display: "✓ Added profile section to $HOME/.claude/CLAUDE.md"
373
-
374
- **Error handling:** If any `gsd-remix-sdk query` or gsd-tools.cjs call fails, display the error message and use AskUserQuestion to offer "Retry" or "Skip this artifact". On retry, re-run the command. On skip, continue to next artifact.
375
-
376
- ---
377
-
378
- ## 10. Summary & Refresh Diff
379
-
380
- **If --refresh path:**
381
-
382
- Read both old backup and new analysis to compare dimension ratings/confidence.
383
-
384
- Read the backed-up profile:
385
- ```bash
386
- BACKUP_PATH="$HOME/.claude/USER-PROFILE.backup.md"
387
- ```
388
-
389
- Compare each dimension's rating and confidence between old and new. Display diff table showing only changed dimensions:
390
-
391
- ```
392
- ## Changes
393
-
394
- | Dimension | Before | After |
395
- |-----------------|-----------------------------|-----------------------------|
396
- | Communication | terse-direct (LOW) | detailed-structured (HIGH) |
397
- | Debugging | fix-first (MEDIUM) | hypothesis-driven (MEDIUM) |
398
- ```
399
-
400
- If nothing changed: Display "No changes detected -- your profile is already up to date."
401
-
402
- **Display final summary:**
403
-
404
- ```
405
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
406
- GSD > PROFILE COMPLETE ✓
407
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
408
-
409
- Your profile: $HOME/.claude/get-shit-done/USER-PROFILE.md
410
- ```
411
-
412
- Then list paths for each generated artifact:
413
- ```
414
- Artifacts:
415
- ✓ /gsd-dev-preferences $HOME/.claude/commands/gsd/dev-preferences.md
416
- ✓ CLAUDE.md section ./CLAUDE.md
417
- ✓ Global CLAUDE.md $HOME/.claude/CLAUDE.md
418
- ```
419
-
420
- (Only show artifacts that were actually generated.)
421
-
422
- **Clean up temp files:**
423
-
424
- Remove the temp directory created by profile-sample (contains sample JSONL and analysis JSON):
425
- ```bash
426
- rm -rf "$TEMP_DIR"
427
- ```
428
-
429
- Also remove any standalone temp files created for questionnaire answers:
430
- ```bash
431
- rm -f "$ANSWERS_PATH" 2>/dev/null
432
- rm -f "$ANALYSIS_PATH" 2>/dev/null
433
- ```
434
-
435
- (Only clean up temp paths that were actually created during this workflow run.)
436
-
437
- </process>
438
-
439
- <success_criteria>
440
- - [ ] Initialization detects existing profile and handles all three responses (view/refresh/cancel)
441
- - [ ] Consent gate shown for session analysis path, skipped for questionnaire path
442
- - [ ] Session scan discovers sessions and reports statistics
443
- - [ ] Session analysis path: samples messages, spawns profiler agent, extracts analysis JSON
444
- - [ ] Questionnaire path: presents 8 questions, collects answers, converts to analysis JSON
445
- - [ ] Split resolution presents context-dependent splits with user resolution options
446
- - [ ] Profile written to USER-PROFILE.md via write-profile subcommand
447
- - [ ] Result display shows report card table and highlight reel with evidence
448
- - [ ] Artifact selection uses multiSelect with all options pre-selected
449
- - [ ] Artifacts generated sequentially via gsd-remix-sdk query (or gsd-tools.cjs) subcommands
450
- - [ ] Refresh diff shows changed dimensions when --refresh was used
451
- - [ ] Temp files cleaned up on completion
452
- </success_criteria>
@@ -1,92 +0,0 @@
1
- <purpose>
2
- Remove a GSD workspace, cleaning up git worktrees and deleting the workspace directory.
3
- </purpose>
4
-
5
- <required_reading>
6
- Read all files referenced by the invoking prompt's execution_context before starting.
7
- </required_reading>
8
-
9
- <process>
10
-
11
- ## 1. Setup
12
-
13
- Extract workspace name from $ARGUMENTS.
14
-
15
- ```bash
16
- INIT=$(gsd-remix-sdk query init.remove-workspace "$WORKSPACE_NAME")
17
- if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
18
- ```
19
-
20
- Parse JSON for: `workspace_name`, `workspace_path`, `has_manifest`, `strategy`, `repos`, `repo_count`, `dirty_repos`, `has_dirty_repos`.
21
-
22
- **If no workspace name provided:**
23
-
24
- First run `/gsd-list-workspaces` to show available workspaces, then ask:
25
-
26
-
27
- **Text mode (`workflow.text_mode: true` in config or `--text` flag):** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (OpenAI Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
28
- Use AskUserQuestion:
29
- - header: "Remove Workspace"
30
- - question: "Which workspace do you want to remove?"
31
- - requireAnswer: true
32
-
33
- Re-run init with the provided name.
34
-
35
- ## 2. Safety Checks
36
-
37
- **If `has_dirty_repos` is true:**
38
-
39
- ```
40
- Cannot remove workspace "$WORKSPACE_NAME" — the following repos have uncommitted changes:
41
-
42
- - repo1
43
- - repo2
44
-
45
- Commit or stash changes in these repos before removing the workspace:
46
- cd "$WORKSPACE_PATH/repo1"
47
- git stash # or git commit
48
- ```
49
-
50
- Exit. Do NOT proceed.
51
-
52
- ## 3. Confirm Removal
53
-
54
- Use AskUserQuestion:
55
- - header: "Confirm Removal"
56
- - question: "Remove workspace '$WORKSPACE_NAME' at $WORKSPACE_PATH? This will delete all files in the workspace directory. Type the workspace name to confirm:"
57
- - requireAnswer: true
58
-
59
- **If answer does not match `$WORKSPACE_NAME`:** Exit with "Removal cancelled."
60
-
61
- ## 4. Clean Up Worktrees
62
-
63
- **If strategy is `worktree`:**
64
-
65
- For each repo in the workspace:
66
-
67
- ```bash
68
- cd "$SOURCE_REPO_PATH"
69
- git worktree remove "$WORKSPACE_PATH/$REPO_NAME" 2>&1 || true
70
- ```
71
-
72
- If `git worktree remove` fails, warn but continue:
73
- ```
74
- Warning: Could not remove worktree for $REPO_NAME — source repo may have been moved or deleted.
75
- ```
76
-
77
- ## 5. Delete Workspace Directory
78
-
79
- ```bash
80
- rm -rf "$WORKSPACE_PATH"
81
- ```
82
-
83
- ## 6. Report
84
-
85
- ```
86
- Workspace "$WORKSPACE_NAME" removed.
87
-
88
- Path: $WORKSPACE_PATH (deleted)
89
- Repos: $REPO_COUNT worktrees cleaned up
90
- ```
91
-
92
- </process>