gsd-opencode 1.22.1 → 1.33.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 (188) hide show
  1. package/agents/gsd-advisor-researcher.md +112 -0
  2. package/agents/gsd-assumptions-analyzer.md +110 -0
  3. package/agents/gsd-codebase-mapper.md +0 -2
  4. package/agents/gsd-debugger.md +117 -2
  5. package/agents/gsd-doc-verifier.md +207 -0
  6. package/agents/gsd-doc-writer.md +608 -0
  7. package/agents/gsd-executor.md +45 -4
  8. package/agents/gsd-integration-checker.md +0 -2
  9. package/agents/gsd-nyquist-auditor.md +0 -2
  10. package/agents/gsd-phase-researcher.md +191 -5
  11. package/agents/gsd-plan-checker.md +152 -5
  12. package/agents/gsd-planner.md +131 -157
  13. package/agents/gsd-project-researcher.md +28 -3
  14. package/agents/gsd-research-synthesizer.md +0 -2
  15. package/agents/gsd-roadmapper.md +29 -2
  16. package/agents/gsd-security-auditor.md +129 -0
  17. package/agents/gsd-ui-auditor.md +485 -0
  18. package/agents/gsd-ui-checker.md +305 -0
  19. package/agents/gsd-ui-researcher.md +368 -0
  20. package/agents/gsd-user-profiler.md +173 -0
  21. package/agents/gsd-verifier.md +207 -22
  22. package/commands/gsd/gsd-add-backlog.md +76 -0
  23. package/commands/gsd/gsd-analyze-dependencies.md +34 -0
  24. package/commands/gsd/gsd-audit-uat.md +24 -0
  25. package/commands/gsd/gsd-autonomous.md +45 -0
  26. package/commands/gsd/gsd-cleanup.md +5 -0
  27. package/commands/gsd/gsd-debug.md +29 -21
  28. package/commands/gsd/gsd-discuss-phase.md +15 -36
  29. package/commands/gsd/gsd-do.md +30 -0
  30. package/commands/gsd/gsd-docs-update.md +48 -0
  31. package/commands/gsd/gsd-execute-phase.md +24 -2
  32. package/commands/gsd/gsd-fast.md +30 -0
  33. package/commands/gsd/gsd-forensics.md +56 -0
  34. package/commands/gsd/gsd-help.md +2 -0
  35. package/commands/gsd/gsd-join-discord.md +2 -1
  36. package/commands/gsd/gsd-list-workspaces.md +19 -0
  37. package/commands/gsd/gsd-manager.md +40 -0
  38. package/commands/gsd/gsd-milestone-summary.md +51 -0
  39. package/commands/gsd/gsd-new-project.md +4 -0
  40. package/commands/gsd/gsd-new-workspace.md +44 -0
  41. package/commands/gsd/gsd-next.md +24 -0
  42. package/commands/gsd/gsd-note.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +8 -1
  44. package/commands/gsd/gsd-plant-seed.md +28 -0
  45. package/commands/gsd/gsd-pr-branch.md +25 -0
  46. package/commands/gsd/gsd-profile-user.md +46 -0
  47. package/commands/gsd/gsd-quick.md +7 -3
  48. package/commands/gsd/gsd-reapply-patches.md +178 -45
  49. package/commands/gsd/gsd-remove-workspace.md +26 -0
  50. package/commands/gsd/gsd-research-phase.md +7 -12
  51. package/commands/gsd/gsd-review-backlog.md +62 -0
  52. package/commands/gsd/gsd-review.md +38 -0
  53. package/commands/gsd/gsd-secure-phase.md +35 -0
  54. package/commands/gsd/gsd-session-report.md +19 -0
  55. package/commands/gsd/gsd-set-profile.md +24 -23
  56. package/commands/gsd/gsd-ship.md +23 -0
  57. package/commands/gsd/gsd-stats.md +18 -0
  58. package/commands/gsd/gsd-thread.md +127 -0
  59. package/commands/gsd/gsd-ui-phase.md +34 -0
  60. package/commands/gsd/gsd-ui-review.md +32 -0
  61. package/commands/gsd/gsd-workstreams.md +71 -0
  62. package/get-shit-done/bin/gsd-tools.cjs +450 -90
  63. package/get-shit-done/bin/lib/commands.cjs +489 -24
  64. package/get-shit-done/bin/lib/config.cjs +329 -48
  65. package/get-shit-done/bin/lib/core.cjs +1143 -102
  66. package/get-shit-done/bin/lib/docs.cjs +267 -0
  67. package/get-shit-done/bin/lib/frontmatter.cjs +125 -43
  68. package/get-shit-done/bin/lib/init.cjs +918 -106
  69. package/get-shit-done/bin/lib/milestone.cjs +65 -33
  70. package/get-shit-done/bin/lib/model-profiles.cjs +70 -0
  71. package/get-shit-done/bin/lib/phase.cjs +434 -404
  72. package/get-shit-done/bin/lib/profile-output.cjs +1048 -0
  73. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  74. package/get-shit-done/bin/lib/roadmap.cjs +156 -101
  75. package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
  76. package/get-shit-done/bin/lib/security.cjs +384 -0
  77. package/get-shit-done/bin/lib/state.cjs +711 -79
  78. package/get-shit-done/bin/lib/template.cjs +2 -2
  79. package/get-shit-done/bin/lib/uat.cjs +282 -0
  80. package/get-shit-done/bin/lib/verify.cjs +254 -42
  81. package/get-shit-done/bin/lib/workstream.cjs +495 -0
  82. package/get-shit-done/references/agent-contracts.md +79 -0
  83. package/get-shit-done/references/artifact-types.md +113 -0
  84. package/get-shit-done/references/checkpoints.md +12 -10
  85. package/get-shit-done/references/context-budget.md +49 -0
  86. package/get-shit-done/references/continuation-format.md +15 -15
  87. package/get-shit-done/references/decimal-phase-calculation.md +2 -3
  88. package/get-shit-done/references/domain-probes.md +125 -0
  89. package/get-shit-done/references/gate-prompts.md +100 -0
  90. package/get-shit-done/references/git-integration.md +47 -0
  91. package/get-shit-done/references/model-profile-resolution.md +2 -0
  92. package/get-shit-done/references/model-profiles.md +62 -16
  93. package/get-shit-done/references/phase-argument-parsing.md +2 -2
  94. package/get-shit-done/references/planner-gap-closure.md +62 -0
  95. package/get-shit-done/references/planner-reviews.md +39 -0
  96. package/get-shit-done/references/planner-revision.md +87 -0
  97. package/get-shit-done/references/planning-config.md +18 -1
  98. package/get-shit-done/references/revision-loop.md +97 -0
  99. package/get-shit-done/references/ui-brand.md +2 -2
  100. package/get-shit-done/references/universal-anti-patterns.md +58 -0
  101. package/get-shit-done/references/user-profiling.md +681 -0
  102. package/get-shit-done/references/workstream-flag.md +111 -0
  103. package/get-shit-done/templates/SECURITY.md +61 -0
  104. package/get-shit-done/templates/UAT.md +21 -3
  105. package/get-shit-done/templates/UI-SPEC.md +100 -0
  106. package/get-shit-done/templates/VALIDATION.md +3 -3
  107. package/get-shit-done/templates/claude-md.md +145 -0
  108. package/get-shit-done/templates/config.json +14 -3
  109. package/get-shit-done/templates/context.md +61 -6
  110. package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
  111. package/get-shit-done/templates/dev-preferences.md +21 -0
  112. package/get-shit-done/templates/discussion-log.md +63 -0
  113. package/get-shit-done/templates/phase-prompt.md +46 -5
  114. package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
  115. package/get-shit-done/templates/project.md +2 -0
  116. package/get-shit-done/templates/state.md +2 -2
  117. package/get-shit-done/templates/user-profile.md +146 -0
  118. package/get-shit-done/workflows/add-phase.md +4 -4
  119. package/get-shit-done/workflows/add-tests.md +4 -4
  120. package/get-shit-done/workflows/add-todo.md +4 -4
  121. package/get-shit-done/workflows/analyze-dependencies.md +96 -0
  122. package/get-shit-done/workflows/audit-milestone.md +20 -16
  123. package/get-shit-done/workflows/audit-uat.md +109 -0
  124. package/get-shit-done/workflows/autonomous.md +1036 -0
  125. package/get-shit-done/workflows/check-todos.md +4 -4
  126. package/get-shit-done/workflows/cleanup.md +4 -4
  127. package/get-shit-done/workflows/complete-milestone.md +22 -10
  128. package/get-shit-done/workflows/diagnose-issues.md +21 -7
  129. package/get-shit-done/workflows/discovery-phase.md +2 -2
  130. package/get-shit-done/workflows/discuss-phase-assumptions.md +671 -0
  131. package/get-shit-done/workflows/discuss-phase-power.md +291 -0
  132. package/get-shit-done/workflows/discuss-phase.md +558 -47
  133. package/get-shit-done/workflows/do.md +104 -0
  134. package/get-shit-done/workflows/docs-update.md +1093 -0
  135. package/get-shit-done/workflows/execute-phase.md +741 -58
  136. package/get-shit-done/workflows/execute-plan.md +77 -12
  137. package/get-shit-done/workflows/fast.md +105 -0
  138. package/get-shit-done/workflows/forensics.md +265 -0
  139. package/get-shit-done/workflows/health.md +28 -6
  140. package/get-shit-done/workflows/help.md +127 -7
  141. package/get-shit-done/workflows/insert-phase.md +4 -4
  142. package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
  143. package/get-shit-done/workflows/list-workspaces.md +56 -0
  144. package/get-shit-done/workflows/manager.md +363 -0
  145. package/get-shit-done/workflows/map-codebase.md +83 -44
  146. package/get-shit-done/workflows/milestone-summary.md +223 -0
  147. package/get-shit-done/workflows/new-milestone.md +133 -25
  148. package/get-shit-done/workflows/new-project.md +216 -54
  149. package/get-shit-done/workflows/new-workspace.md +237 -0
  150. package/get-shit-done/workflows/next.md +97 -0
  151. package/get-shit-done/workflows/node-repair.md +92 -0
  152. package/get-shit-done/workflows/note.md +156 -0
  153. package/get-shit-done/workflows/pause-work.md +132 -15
  154. package/get-shit-done/workflows/plan-milestone-gaps.md +6 -7
  155. package/get-shit-done/workflows/plan-phase.md +513 -62
  156. package/get-shit-done/workflows/plant-seed.md +169 -0
  157. package/get-shit-done/workflows/pr-branch.md +129 -0
  158. package/get-shit-done/workflows/profile-user.md +450 -0
  159. package/get-shit-done/workflows/progress.md +154 -29
  160. package/get-shit-done/workflows/quick.md +285 -111
  161. package/get-shit-done/workflows/remove-phase.md +2 -2
  162. package/get-shit-done/workflows/remove-workspace.md +90 -0
  163. package/get-shit-done/workflows/research-phase.md +13 -9
  164. package/get-shit-done/workflows/resume-project.md +37 -18
  165. package/get-shit-done/workflows/review.md +281 -0
  166. package/get-shit-done/workflows/secure-phase.md +154 -0
  167. package/get-shit-done/workflows/session-report.md +146 -0
  168. package/get-shit-done/workflows/set-profile.md +2 -2
  169. package/get-shit-done/workflows/settings.md +91 -11
  170. package/get-shit-done/workflows/ship.md +237 -0
  171. package/get-shit-done/workflows/stats.md +60 -0
  172. package/get-shit-done/workflows/transition.md +150 -23
  173. package/get-shit-done/workflows/ui-phase.md +292 -0
  174. package/get-shit-done/workflows/ui-review.md +183 -0
  175. package/get-shit-done/workflows/update.md +262 -30
  176. package/get-shit-done/workflows/validate-phase.md +14 -17
  177. package/get-shit-done/workflows/verify-phase.md +143 -11
  178. package/get-shit-done/workflows/verify-work.md +141 -39
  179. package/package.json +1 -1
  180. package/skills/gsd-audit-milestone/SKILL.md +29 -0
  181. package/skills/gsd-cleanup/SKILL.md +19 -0
  182. package/skills/gsd-complete-milestone/SKILL.md +131 -0
  183. package/skills/gsd-discuss-phase/SKILL.md +54 -0
  184. package/skills/gsd-execute-phase/SKILL.md +49 -0
  185. package/skills/gsd-plan-phase/SKILL.md +37 -0
  186. package/skills/gsd-ui-phase/SKILL.md +24 -0
  187. package/skills/gsd-ui-review/SKILL.md +24 -0
  188. package/skills/gsd-verify-work/SKILL.md +30 -0
@@ -0,0 +1,292 @@
1
+ <objective>
2
+ Generate a UI design contract (UI-SPEC.md) for frontend phases. Orchestrates gsd-ui-researcher and gsd-ui-checker with a revision loop. Inserts between discuss-phase and plan-phase in the lifecycle.
3
+
4
+ UI-SPEC.md locks spacing, typography, color, copywriting, and design system decisions before the planner creates tasks. This prevents design debt caused by ad-hoc styling decisions during execution.
5
+ </objective>
6
+
7
+ <required_reading>
8
+ @$HOME/.config/opencode/get-shit-done/references/ui-brand.md
9
+ </required_reading>
10
+
11
+ <available_agent_types>
12
+ Valid GSD subagent types (use exact names — do not fall back to 'general'):
13
+ - gsd-ui-researcher — Researches UI/UX approaches
14
+ - gsd-ui-checker — Reviews UI implementation quality
15
+ </available_agent_types>
16
+
17
+ <process>
18
+
19
+ ## 1. Initialize
20
+
21
+ ```bash
22
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init plan-phase "$PHASE")
23
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
24
+ AGENT_SKILLS_UI=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-ui-researcher 2>/dev/null)
25
+ AGENT_SKILLS_UI_CHECKER=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-ui-checker 2>/dev/null)
26
+ ```
27
+
28
+ Parse JSON for: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_context`, `has_research`, `commit_docs`.
29
+
30
+ **File paths:** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`.
31
+
32
+ Resolve UI agent models:
33
+
34
+ ```bash
35
+ UI_RESEARCHER_MODEL=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-ui-researcher --raw)
36
+ UI_CHECKER_MODEL=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-ui-checker --raw)
37
+ ```
38
+
39
+ Check config:
40
+
41
+ ```bash
42
+ UI_ENABLED=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.ui_phase 2>/dev/null || echo "true")
43
+ ```
44
+
45
+ **If `UI_ENABLED` is `false`:**
46
+ ```
47
+ UI phase is disabled in config. Enable via /gsd-settings.
48
+ ```
49
+ Exit workflow.
50
+
51
+ **If `planning_exists` is false:** Error — run `/gsd-new-project` first.
52
+
53
+ ## 2. Parse and Validate Phase
54
+
55
+ Extract phase number from $ARGUMENTS. If not provided, detect next unplanned phase.
56
+
57
+ ```bash
58
+ PHASE_INFO=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase "${PHASE}")
59
+ ```
60
+
61
+ **If `found` is false:** Error with available phases.
62
+
63
+ ## 3. Check Prerequisites
64
+
65
+ **If `has_context` is false:**
66
+ ```
67
+ No CONTEXT.md found for Phase {N}.
68
+ Recommended: run /gsd-discuss-phase {N} first to capture design preferences.
69
+ Continuing without user decisions — UI researcher will ask all questions.
70
+ ```
71
+ Continue (non-blocking).
72
+
73
+ **If `has_research` is false:**
74
+ ```
75
+ No RESEARCH.md found for Phase {N}.
76
+ Note: stack decisions (component library, styling approach) will be asked during UI research.
77
+ ```
78
+ Continue (non-blocking).
79
+
80
+ ## 4. Check Existing UI-SPEC
81
+
82
+ ```bash
83
+ UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
84
+ ```
85
+
86
+ **If exists:** Use question:
87
+ - header: "Existing UI-SPEC"
88
+ - question: "UI-SPEC.md already exists for Phase {N}. What would you like to do?"
89
+ - options:
90
+ - "Update — re-run researcher with existing as baseline"
91
+ - "View — display current UI-SPEC and exit"
92
+ - "Skip — keep current UI-SPEC, proceed to verification"
93
+
94
+ If "View": display file contents, exit.
95
+ If "Skip": proceed to step 7 (checker).
96
+ If "Update": continue to step 5.
97
+
98
+ ## 5. Spawn gsd-ui-researcher
99
+
100
+ Display:
101
+ ```
102
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
103
+ GSD ► UI DESIGN CONTRACT — PHASE {N}
104
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
105
+
106
+ ◆ Spawning UI researcher...
107
+ ```
108
+
109
+ Build prompt:
110
+
111
+ ```markdown
112
+ read $HOME/.config/opencode/agents/gsd-ui-researcher.md for instructions.
113
+
114
+ <objective>
115
+ Create UI design contract for Phase {phase_number}: {phase_name}
116
+ Answer: "What visual and interaction contracts does this phase need?"
117
+ </objective>
118
+
119
+ <files_to_read>
120
+ - {state_path} (Project State)
121
+ - {roadmap_path} (Roadmap)
122
+ - {requirements_path} (Requirements)
123
+ - {context_path} (USER DECISIONS from /gsd-discuss-phase)
124
+ - {research_path} (Technical Research — stack decisions)
125
+ </files_to_read>
126
+
127
+ ${AGENT_SKILLS_UI}
128
+
129
+ <output>
130
+ write to: {phase_dir}/{padded_phase}-UI-SPEC.md
131
+ Template: $HOME/.config/opencode/get-shit-done/templates/UI-SPEC.md
132
+ </output>
133
+
134
+ <config>
135
+ commit_docs: {commit_docs}
136
+ phase_dir: {phase_dir}
137
+ padded_phase: {padded_phase}
138
+ </config>
139
+ ```
140
+
141
+ Omit null file paths from `<files_to_read>`.
142
+
143
+ ```
144
+ @gsd-ui-researcher ui_research_prompt
145
+ ```
146
+
147
+ ## 6. Handle Researcher Return
148
+
149
+ **If `## UI-SPEC COMPLETE`:**
150
+ Display confirmation. Continue to step 7.
151
+
152
+ **If `## UI-SPEC BLOCKED`:**
153
+ Display blocker details and options. Exit workflow.
154
+
155
+ ## 7. Spawn gsd-ui-checker
156
+
157
+ Display:
158
+ ```
159
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
+ GSD ► VERIFYING UI-SPEC
161
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
162
+
163
+ ◆ Spawning UI checker...
164
+ ```
165
+
166
+ Build prompt:
167
+
168
+ ```markdown
169
+ read $HOME/.config/opencode/agents/gsd-ui-checker.md for instructions.
170
+
171
+ <objective>
172
+ Validate UI design contract for Phase {phase_number}: {phase_name}
173
+ Check all 6 dimensions. Return APPROVED or BLOCKED.
174
+ </objective>
175
+
176
+ <files_to_read>
177
+ - {phase_dir}/{padded_phase}-UI-SPEC.md (UI Design Contract — PRIMARY INPUT)
178
+ - {context_path} (USER DECISIONS — check compliance)
179
+ - {research_path} (Technical Research — check stack alignment)
180
+ </files_to_read>
181
+
182
+ ${AGENT_SKILLS_UI_CHECKER}
183
+
184
+ <config>
185
+ ui_safety_gate: {ui_safety_gate config value}
186
+ </config>
187
+ ```
188
+
189
+ ```
190
+ @gsd-ui-checker ui_checker_prompt
191
+ ```
192
+
193
+ ## 8. Handle Checker Return
194
+
195
+ **If `## UI-SPEC VERIFIED`:**
196
+ Display dimension results. Proceed to step 10.
197
+
198
+ **If `## ISSUES FOUND`:**
199
+ Display blocking issues. Proceed to step 9.
200
+
201
+ ## 9. Revision Loop (Max 2 Iterations)
202
+
203
+ Track `revision_count` (starts at 0).
204
+
205
+ **If `revision_count` < 2:**
206
+ - Increment `revision_count`
207
+ - Re-spawn gsd-ui-researcher with revision context:
208
+
209
+ ```markdown
210
+ <revision>
211
+ The UI checker found issues with the current UI-SPEC.md.
212
+
213
+ ### Issues to Fix
214
+ {paste blocking issues from checker return}
215
+
216
+ read the existing UI-SPEC.md, fix ONLY the listed issues, re-write the file.
217
+ Do NOT re-ask the user questions that are already answered.
218
+ </revision>
219
+ ```
220
+
221
+ - After researcher returns → re-spawn checker (step 7)
222
+
223
+ **If `revision_count` >= 2:**
224
+ ```
225
+ Max revision iterations reached. Remaining issues:
226
+
227
+ {list remaining issues}
228
+
229
+ Options:
230
+ 1. Force approve — proceed with current UI-SPEC (FLAGs become accepted)
231
+ 2. edit manually — open UI-SPEC.md in editor, re-run /gsd-ui-phase
232
+ 3. Abandon — exit without approving
233
+ ```
234
+
235
+ Use question for the choice.
236
+
237
+ ## 10. Present Final Status
238
+
239
+ Display:
240
+ ```
241
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242
+ GSD ► UI-SPEC READY ✓
243
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
244
+
245
+ **Phase {N}: {Name}** — UI design contract approved
246
+
247
+ Dimensions: 6/6 passed
248
+ {If any FLAGs: "Recommendations: {N} (non-blocking)"}
249
+
250
+ ───────────────────────────────────────────────────────────────
251
+
252
+ ## ▶ Next Up
253
+
254
+ **Plan Phase {N}** — planner will use UI-SPEC.md as design context
255
+
256
+ `/new` then:
257
+
258
+ `/gsd-plan-phase {N}`
259
+
260
+ ───────────────────────────────────────────────────────────────
261
+ ```
262
+
263
+ ## 11. Commit (if configured)
264
+
265
+ ```bash
266
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(${padded_phase}): UI design contract" --files "${PHASE_DIR}/${PADDED_PHASE}-UI-SPEC.md"
267
+ ```
268
+
269
+ ## 12. Update State
270
+
271
+ ```bash
272
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state record-session \
273
+ --stopped-at "Phase ${PHASE} UI-SPEC approved" \
274
+ --resume-file "${PHASE_DIR}/${PADDED_PHASE}-UI-SPEC.md"
275
+ ```
276
+
277
+ </process>
278
+
279
+ <success_criteria>
280
+ - [ ] Config checked (exit if ui_phase disabled)
281
+ - [ ] Phase validated against roadmap
282
+ - [ ] Prerequisites checked (CONTEXT.md, RESEARCH.md — non-blocking warnings)
283
+ - [ ] Existing UI-SPEC handled (update/view/skip)
284
+ - [ ] gsd-ui-researcher spawned with correct context and file paths
285
+ - [ ] UI-SPEC.md created in correct location
286
+ - [ ] gsd-ui-checker spawned with UI-SPEC.md
287
+ - [ ] All 6 dimensions evaluated
288
+ - [ ] Revision loop if BLOCKED (max 2 iterations)
289
+ - [ ] Final status displayed with next steps
290
+ - [ ] UI-SPEC.md committed (if commit_docs enabled)
291
+ - [ ] State updated
292
+ </success_criteria>
@@ -0,0 +1,183 @@
1
+ <objective>
2
+ Retroactive 6-pillar visual audit of implemented frontend code. Standalone command that works on any project — GSD-managed or not. Produces scored UI-REVIEW.md with actionable findings.
3
+ </objective>
4
+
5
+ <required_reading>
6
+ @$HOME/.config/opencode/get-shit-done/references/ui-brand.md
7
+ </required_reading>
8
+
9
+ <available_agent_types>
10
+ Valid GSD subagent types (use exact names — do not fall back to 'general'):
11
+ - gsd-ui-auditor — Audits UI against design requirements
12
+ </available_agent_types>
13
+
14
+ <process>
15
+
16
+ ## 0. Initialize
17
+
18
+ ```bash
19
+ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
20
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
21
+ AGENT_SKILLS_UI_REVIEWER=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-ui-reviewer 2>/dev/null)
22
+ ```
23
+
24
+ Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `commit_docs`.
25
+
26
+ ```bash
27
+ UI_AUDITOR_MODEL=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-ui-auditor --raw)
28
+ ```
29
+
30
+ Display banner:
31
+ ```
32
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
33
+ GSD ► UI AUDIT — PHASE {N}: {name}
34
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
35
+ ```
36
+
37
+ ## 1. Detect Input State
38
+
39
+ ```bash
40
+ SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
41
+ UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
42
+ UI_REVIEW_FILE=$(ls "${PHASE_DIR}"/*-UI-REVIEW.md 2>/dev/null | head -1)
43
+ ```
44
+
45
+ **If `SUMMARY_FILES` empty:** Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} first."
46
+
47
+ **If `UI_REVIEW_FILE` non-empty:** Use question:
48
+ - header: "Existing UI Review"
49
+ - question: "UI-REVIEW.md already exists for Phase {N}."
50
+ - options:
51
+ - "Re-audit — run fresh audit"
52
+ - "View — display current review and exit"
53
+
54
+ If "View": display file, exit.
55
+ If "Re-audit": continue.
56
+
57
+ ## 2. Gather Context Paths
58
+
59
+ Build file list for auditor:
60
+ - All SUMMARY.md files in phase dir
61
+ - All PLAN.md files in phase dir
62
+ - UI-SPEC.md (if exists — audit baseline)
63
+ - CONTEXT.md (if exists — locked decisions)
64
+
65
+ ## 3. Spawn gsd-ui-auditor
66
+
67
+ ```
68
+ ◆ Spawning UI auditor...
69
+ ```
70
+
71
+ Build prompt:
72
+
73
+ ```markdown
74
+ read $HOME/.config/opencode/agents/gsd-ui-auditor.md for instructions.
75
+
76
+ <objective>
77
+ Conduct 6-pillar visual audit of Phase {phase_number}: {phase_name}
78
+ {If UI-SPEC exists: "Audit against UI-SPEC.md design contract."}
79
+ {If no UI-SPEC: "Audit against abstract 6-pillar standards."}
80
+ </objective>
81
+
82
+ <files_to_read>
83
+ - {summary_paths} (Execution summaries)
84
+ - {plan_paths} (Execution plans — what was intended)
85
+ - {ui_spec_path} (UI Design Contract — audit baseline, if exists)
86
+ - {context_path} (User decisions, if exists)
87
+ </files_to_read>
88
+
89
+ ${AGENT_SKILLS_UI_REVIEWER}
90
+
91
+ <config>
92
+ phase_dir: {phase_dir}
93
+ padded_phase: {padded_phase}
94
+ </config>
95
+ ```
96
+
97
+ Omit null file paths.
98
+
99
+ ```
100
+ @gsd-ui-auditor ui_audit_prompt
101
+ ```
102
+
103
+ ## 4. Handle Return
104
+
105
+ **If `## UI REVIEW COMPLETE`:**
106
+
107
+ Display score summary:
108
+
109
+ ```
110
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
+ GSD ► UI AUDIT COMPLETE ✓
112
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
113
+
114
+ **Phase {N}: {Name}** — Overall: {score}/24
115
+
116
+ | Pillar | Score |
117
+ |--------|-------|
118
+ | Copywriting | {N}/4 |
119
+ | Visuals | {N}/4 |
120
+ | Color | {N}/4 |
121
+ | Typography | {N}/4 |
122
+ | Spacing | {N}/4 |
123
+ | Experience Design | {N}/4 |
124
+
125
+ Top fixes:
126
+ 1. {fix}
127
+ 2. {fix}
128
+ 3. {fix}
129
+
130
+ Full review: {path to UI-REVIEW.md}
131
+
132
+ ───────────────────────────────────────────────────────────────
133
+
134
+ ## ▶ Next
135
+
136
+ `/new` then one of:
137
+
138
+ - `/gsd-verify-work {N}` — UAT testing
139
+ - `/gsd-plan-phase {N+1}` — plan next phase
140
+
141
+ - `/gsd-verify-work {N}` — UAT testing
142
+ - `/gsd-plan-phase {N+1}` — plan next phase
143
+
144
+ ───────────────────────────────────────────────────────────────
145
+ ```
146
+
147
+ ## Automated UI Verification (when Playwright-MCP is available)
148
+
149
+ If `mcp__playwright__*` tools are accessible in this session:
150
+
151
+ 1. Navigate to each UI component described in the phase's UI-SPEC.md using
152
+ `mcp__playwright__navigate` (or equivalent Playwright-MCP tool).
153
+ 2. Take a screenshot of each component using `mcp__playwright__screenshot`.
154
+ 3. Compare against the spec's visual requirements — dimensions, color palette,
155
+ layout, spacing scale, and typography.
156
+ 4. Report any dimension, color, or layout discrepancies automatically as
157
+ additional findings within the relevant pillar section of UI-REVIEW.md.
158
+ 5. Flag items that require human judgment (brand feel, content tone) as
159
+ `needs_human_review: true` in the findings — these are surfaced to the user
160
+ separately after the automated pass completes.
161
+
162
+ If Playwright-MCP is not available in this session, this section is skipped
163
+ entirely. The audit falls back to the standard code-only review described above.
164
+ No configuration change is required — the availability of `mcp__playwright__*`
165
+ tools is detected at runtime.
166
+
167
+ ## 5. Commit (if configured)
168
+
169
+ ```bash
170
+ node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(${padded_phase}): UI audit review" --files "${PHASE_DIR}/${PADDED_PHASE}-UI-REVIEW.md"
171
+ ```
172
+
173
+ </process>
174
+
175
+ <success_criteria>
176
+ - [ ] Phase validated
177
+ - [ ] SUMMARY.md files found (execution completed)
178
+ - [ ] Existing review handled (re-audit/view)
179
+ - [ ] gsd-ui-auditor spawned with correct context
180
+ - [ ] UI-REVIEW.md created in phase directory
181
+ - [ ] Score summary displayed to user
182
+ - [ ] Next steps presented
183
+ </success_criteria>