opencodekit 0.10.0 → 0.11.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 (47) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +297 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +412 -20
  5. package/dist/template/.opencode/command/analyze-project.md +445 -30
  6. package/dist/template/.opencode/command/brainstorm.md +294 -5
  7. package/dist/template/.opencode/command/commit.md +231 -17
  8. package/dist/template/.opencode/command/create.md +415 -77
  9. package/dist/template/.opencode/command/design-audit.md +483 -29
  10. package/dist/template/.opencode/command/design.md +615 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +163 -71
  13. package/dist/template/.opencode/command/fix-ci.md +297 -24
  14. package/dist/template/.opencode/command/fix-types.md +351 -13
  15. package/dist/template/.opencode/command/fix-ui.md +299 -13
  16. package/dist/template/.opencode/command/fix.md +262 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +208 -31
  23. package/dist/template/.opencode/command/implement.md +163 -50
  24. package/dist/template/.opencode/command/import-plan.md +253 -52
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +410 -24
  27. package/dist/template/.opencode/command/issue.md +177 -21
  28. package/dist/template/.opencode/command/new-feature.md +390 -54
  29. package/dist/template/.opencode/command/plan.md +394 -107
  30. package/dist/template/.opencode/command/pr.md +235 -29
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +442 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +179 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +447 -63
  37. package/dist/template/.opencode/command/revert-feature.md +347 -65
  38. package/dist/template/.opencode/command/review-codebase.md +199 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +326 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +361 -0
  44. package/dist/template/.opencode/command/ui-review.md +296 -25
  45. package/dist/template/.opencode/skill/beads/SKILL.md +108 -3
  46. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  47. package/package.json +1 -1
@@ -0,0 +1,361 @@
1
+ ---
2
+ description: AI-powered task triage, prioritization, and workload analysis
3
+ argument-hint: "[--auto-assign] [--sla] [--bottleneck]"
4
+ agent: build
5
+ ---
6
+
7
+ # Triage
8
+
9
+ ## Load Beads Skill
10
+
11
+ ```typescript
12
+ skill({ name: "beads" });
13
+ ```
14
+
15
+ Analyze open tasks and optimize prioritization using dependency graph analysis, SLA tracking, and multi-agent coordination.
16
+
17
+ ## Phase 1: Initialize Beads Connection
18
+
19
+ ```typescript
20
+ bd_init({ _: true, team: "project", role: "triage" });
21
+ ```
22
+
23
+ ## Phase 2: Gather Workspace State
24
+
25
+ Run in parallel:
26
+
27
+ ```typescript
28
+ bd_status({ include_agents: true });
29
+ bd_ls({ status: "open", limit: 50, offset: 0 });
30
+ bd_reservations({ reason: "Check active file locks" });
31
+ bd_inbox({ n: 10, unread: true, global: true });
32
+ ```
33
+
34
+ Capture:
35
+
36
+ - Total open tasks
37
+ - In-progress count
38
+ - Active agents
39
+ - File locks
40
+ - Pending messages
41
+
42
+ ## Phase 3: Run Graph Analysis
43
+
44
+ ```typescript
45
+ bd_insights({ reason: "Triage analysis" });
46
+ bd_priority({ limit: 10 });
47
+ bd_plan({ reason: "Parallel execution plan" });
48
+ ```
49
+
50
+ This provides:
51
+
52
+ - **Bottlenecks**: Tasks blocking the most downstream work
53
+ - **Keystones**: High-impact tasks that unlock multiple paths
54
+ - **Cycles**: Circular dependencies (must break)
55
+ - **PageRank**: Importance score based on graph centrality
56
+ - **Parallel Tracks**: Independent work streams
57
+
58
+ ## Phase 4: Priority Classification
59
+
60
+ ### Priority Matrix
61
+
62
+ ```
63
+ ┌─────────────────────────────────────────────────────────────────────────┐
64
+ │ URGENCY │
65
+ │ High Low │
66
+ │ ┌─────────────────────────────┬─────────────────────────────┐ │
67
+ │ │ P0 - CRITICAL │ P1 - HIGH │ High │
68
+ │ │ • Production down │ • Major feature blocked │ │
69
+ │ │ • Security vulnerability │ • Customer escalation │ I │
70
+ │ │ • Data loss risk │ • Sprint commitment │ M │
71
+ │ │ │ │ P │
72
+ │ │ SLA: 4 hours │ SLA: 24 hours │ A │
73
+ │ ├─────────────────────────────┼─────────────────────────────┤ C │
74
+ │ │ P2 - MEDIUM │ P3 - LOW │ T │
75
+ │ │ • Feature enhancement │ • Tech debt │ │
76
+ │ │ • Non-blocking bugs │ • Nice-to-have │ Low │
77
+ │ │ • Performance improvement │ • Documentation │ │
78
+ │ │ │ │ │
79
+ │ │ SLA: 1 week │ SLA: 2 weeks │ │
80
+ │ └─────────────────────────────┴─────────────────────────────┘ │
81
+ │ │
82
+ │ P4 - BACKLOG: No SLA, review monthly │
83
+ └─────────────────────────────────────────────────────────────────────────┘
84
+ ```
85
+
86
+ ### Impact Scoring Formula
87
+
88
+ ```
89
+ Impact Score = (Downstream Count × 2) + PageRank + (Priority Weight × 3)
90
+
91
+ Where Priority Weight:
92
+ P0 = 5, P1 = 4, P2 = 3, P3 = 2, P4 = 1
93
+ ```
94
+
95
+ ### SLA Tracking
96
+
97
+ For each open task, calculate:
98
+
99
+ ```typescript
100
+ const now = new Date();
101
+ const created = new Date(task.created_at);
102
+ const ageHours = (now - created) / (1000 * 60 * 60);
103
+
104
+ const slaByPriority = { 0: 4, 1: 24, 2: 168, 3: 336, 4: Infinity };
105
+ const slaHours = slaByPriority[task.priority];
106
+ const slaRemaining = slaHours - ageHours;
107
+ const slaStatus =
108
+ slaRemaining < 0
109
+ ? "BREACHED"
110
+ : slaRemaining < slaHours * 0.2
111
+ ? "AT_RISK"
112
+ : "OK";
113
+ ```
114
+
115
+ ## Phase 5: Bottleneck Analysis
116
+
117
+ Identify blocking patterns:
118
+
119
+ ### Critical Bottlenecks
120
+
121
+ Tasks where:
122
+
123
+ - `downstream_count >= 3` (blocks 3+ tasks)
124
+ - `priority >= 2` (medium or higher)
125
+ - `status = open` (not started)
126
+
127
+ ```
128
+ BOTTLENECK ALERT
129
+ ━━━━━━━━━━━━━━━━
130
+
131
+ 🔴 bd-abc12: "Database migration"
132
+ Blocks: bd-def34, bd-ghi56, bd-jkl78, bd-mno90
133
+ Impact Score: 24
134
+ Age: 3 days (SLA: AT_RISK)
135
+
136
+ Recommendation: Assign immediately to unblock 4 tasks
137
+ ```
138
+
139
+ ### Dependency Cycles
140
+
141
+ If cycles detected:
142
+
143
+ ```
144
+ ⚠️ CIRCULAR DEPENDENCY DETECTED
145
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
146
+
147
+ bd-abc12 → bd-def34 → bd-ghi56 → bd-abc12
148
+
149
+ Resolution Options:
150
+ 1. Remove weakest dependency (bd-ghi56 → bd-abc12)
151
+ 2. Merge tasks into single unit
152
+ 3. Split one task to break cycle
153
+
154
+ Run: bd update <id> --remove-dep <dep-id>
155
+ ```
156
+
157
+ ## Phase 6: Generate Triage Report
158
+
159
+ ```
160
+ ╔══════════════════════════════════════════════════════════════════════════╗
161
+ ║ TRIAGE REPORT ║
162
+ ║ [timestamp] ║
163
+ ╠══════════════════════════════════════════════════════════════════════════╣
164
+
165
+ SUMMARY
166
+ ━━━━━━━
167
+ Open: XX | In Progress: XX | Blocked: XX | Ready: XX
168
+
169
+ SLA STATUS
170
+ ━━━━━━━━━━
171
+ 🔴 BREACHED: X tasks
172
+ 🟡 AT RISK: X tasks
173
+ 🟢 ON TRACK: X tasks
174
+
175
+ BOTTLENECKS (Top 3)
176
+ ━━━━━━━━━━━━━━━━━━━
177
+ 1. bd-abc12 - "Database migration" - blocks 4 tasks
178
+ 2. bd-def34 - "API authentication" - blocks 3 tasks
179
+ 3. bd-ghi56 - "Config refactor" - blocks 2 tasks
180
+
181
+ PRIORITY ORDER
182
+ ━━━━━━━━━━━━━━
183
+ Priority │ ID │ Title │ Impact │ SLA
184
+ ─────────┼──────────┼──────────────────────────┼────────┼────────
185
+ P0 │ bd-abc12 │ Database migration │ 24 │ AT_RISK
186
+ P1 │ bd-def34 │ API authentication │ 18 │ OK
187
+ P2 │ bd-ghi56 │ Config refactor │ 12 │ OK
188
+
189
+ PARALLEL TRACKS
190
+ ━━━━━━━━━━━━━━━
191
+ Track A (Frontend): bd-xyz11, bd-xyz22 [can start now]
192
+ Track B (Backend): bd-xyz33, bd-xyz44 [can start now]
193
+ Track C (Infra): bd-xyz55 [blocked by bd-abc12]
194
+
195
+ AGENT WORKLOAD
196
+ ━━━━━━━━━━━━━━
197
+ Agent │ Active │ Completed │ Load
198
+ ──────────┼────────┼───────────┼──────
199
+ fe-agent │ 2 │ 8 │ HIGH
200
+ be-agent │ 1 │ 12 │ MEDIUM
201
+ qa-agent │ 0 │ 5 │ LOW
202
+
203
+ RECOMMENDATIONS
204
+ ━━━━━━━━━━━━━━━
205
+ 1. 🔴 URGENT: bd-abc12 is blocking 4 tasks - assign to be-agent
206
+ 2. 🟡 REBALANCE: fe-agent has high load - redistribute to qa-agent
207
+ 3. 🟢 PARALLEL: Start Track A and B simultaneously
208
+ 4. ⚠️ STALE: bd-old99 has no activity for 7 days - review or close
209
+
210
+ ╚══════════════════════════════════════════════════════════════════════════╝
211
+ ```
212
+
213
+ ## Phase 7: Auto-Assignment (Optional)
214
+
215
+ If `--auto-assign` flag:
216
+
217
+ ### Assignment Rules
218
+
219
+ ```typescript
220
+ const assignmentRules = {
221
+ // Role detection from task tags/title
222
+ "frontend|ui|css|react|vue": "fe",
223
+ "backend|api|database|server": "be",
224
+ "test|qa|e2e|integration": "qa",
225
+ "deploy|ci|docker|infra": "devops",
226
+ "mobile|ios|android|react-native": "mobile",
227
+ };
228
+
229
+ // Load balancing: prefer agent with lowest active count
230
+ function selectAgent(role: string, agents: Agent[]): Agent {
231
+ return agents
232
+ .filter((a) => a.role === role)
233
+ .sort((a, b) => a.activeCount - b.activeCount)[0];
234
+ }
235
+ ```
236
+
237
+ ### Execute Assignments
238
+
239
+ ```typescript
240
+ // For each unassigned high-priority ready task
241
+ for (const task of readyTasks.filter((t) => !t.assignee && t.priority <= 2)) {
242
+ const role = detectRole(task);
243
+ bd_assign({ id: task.id, role, notify: true });
244
+ }
245
+ ```
246
+
247
+ **Output:**
248
+
249
+ ```
250
+ AUTO-ASSIGNMENTS
251
+ ━━━━━━━━━━━━━━━━
252
+
253
+ ✓ bd-abc12 → be-agent (detected: backend, API)
254
+ ✓ bd-def34 → fe-agent (detected: frontend, React)
255
+ ✓ bd-ghi56 → devops (detected: infrastructure)
256
+
257
+ Skipped:
258
+ - bd-xyz99: Already assigned to qa-agent
259
+ - bd-old88: No matching role detected (manual assignment needed)
260
+ ```
261
+
262
+ ## Phase 8: Batch Operations
263
+
264
+ ### Bulk Priority Update
265
+
266
+ ```typescript
267
+ // Escalate all breached SLA tasks
268
+ for (const task of breachedTasks) {
269
+ if (task.priority > 1) {
270
+ bd_update({ id: task.id, priority: task.priority - 1 });
271
+ }
272
+ }
273
+ ```
274
+
275
+ ### Stale Task Cleanup
276
+
277
+ ```typescript
278
+ // Find tasks with no activity > 14 days
279
+ const staleTasks = openTasks.filter(
280
+ (t) => daysSince(t.updated_at) > 14 && t.status === "open",
281
+ );
282
+
283
+ // Prompt for action
284
+ console.log(`Found ${staleTasks.length} stale tasks. Options:`);
285
+ console.log("1. Close all as 'wontfix'");
286
+ console.log("2. Move to P4 backlog");
287
+ console.log("3. Review individually");
288
+ ```
289
+
290
+ ## Phase 9: Sync and Notify
291
+
292
+ ```typescript
293
+ bd_sync({ reason: "Triage complete" });
294
+
295
+ // Broadcast triage summary if significant changes
296
+ if (assignmentsMade > 0 || priorityChanges > 0) {
297
+ bd_msg({
298
+ subj: "Triage Complete",
299
+ body: `Assigned ${assignmentsMade} tasks, updated ${priorityChanges} priorities`,
300
+ to: "all",
301
+ global: true,
302
+ importance: "normal",
303
+ });
304
+ }
305
+ ```
306
+
307
+ ## Alternative: Manual Triage
308
+
309
+ If automated tools unavailable:
310
+
311
+ ### Step 1: List and Sort
312
+
313
+ ```bash
314
+ bd list --status=open --sort=priority
315
+ ```
316
+
317
+ ### Step 2: Identify Dependencies
318
+
319
+ ```bash
320
+ bd show <id> # Check "Blocks" and "Blocked By" fields
321
+ ```
322
+
323
+ ### Step 3: Manual Assignment
324
+
325
+ ```bash
326
+ bd update <id> --assign=@username
327
+ bd update <id> --priority=1
328
+ ```
329
+
330
+ ## Examples
331
+
332
+ ```bash
333
+ /triage # Full triage report
334
+ /triage --auto-assign # Auto-assign ready tasks
335
+ /triage --sla # Focus on SLA status
336
+ /triage --bottleneck # Focus on blocking tasks
337
+ /triage --stale # Review stale tasks
338
+ ```
339
+
340
+ ## Integration
341
+
342
+ After triage:
343
+
344
+ ```
345
+ Recommended Next Commands:
346
+ ━━━━━━━━━━━━━━━━━━━━━━━━━
347
+
348
+ /implement bd-abc12 # Start highest priority task
349
+ /start bd-def34 # Begin planning next task
350
+ /status # Verify changes applied
351
+ ```
352
+
353
+ ## Metrics to Track
354
+
355
+ Over time, monitor:
356
+
357
+ - **Throughput**: Tasks completed per week
358
+ - **Cycle Time**: Average time from open → closed
359
+ - **SLA Compliance**: % of tasks within SLA
360
+ - **Bottleneck Frequency**: How often same tasks block
361
+ - **Agent Utilization**: Balance across team
@@ -1,44 +1,315 @@
1
1
  ---
2
- description: Review UI/UX design for quality and aesthetics
3
- argument-hint: "<image-or-component-path> [bead-id]"
2
+ description: Review UI/UX design for quality, aesthetics, and best practices
3
+ argument-hint: "<image-or-component-path> [--bead=<id>] [--responsive] [--dark-mode]"
4
4
  agent: vision
5
5
  model: proxypal/gemini-3-pro-preview
6
6
  ---
7
7
 
8
8
  # UI Review: $ARGUMENTS
9
9
 
10
- skill({ name: "frontend-aesthetics" })
11
- skill({ name: "visual-analysis" })
10
+ Comprehensive UI/UX review with structured scoring and actionable feedback.
12
11
 
13
- Review UI/UX design for quality, aesthetics, and best practices.
12
+ ## Load Skills
14
13
 
15
- ## Instructions
14
+ ```typescript
15
+ skill({ name: "beads" }); // Session protocol
16
+ ```
16
17
 
17
- Parse image/component path and optional bead ID from `$ARGUMENTS`.
18
+ ```typescript
19
+ skill({ name: "frontend-aesthetics" });
20
+ skill({ name: "visual-analysis" });
21
+ skill({ name: "accessibility-audit" });
22
+ ```
18
23
 
19
- ## What to Evaluate
24
+ ## Parse Arguments
20
25
 
21
- 1. **Typography** - Avoid generic fonts (Inter/Roboto without purpose)
22
- 2. **Colors** - Check for overused AI patterns (purple gradients, flat white)
23
- 3. **Layout** - Hierarchy, spacing, visual rhythm
24
- 4. **Motion** - Micro-interactions, transitions
25
- 5. **Atmosphere** - Texture, depth, personality
26
- 6. **Accessibility** - Contrast, focus states, ARIA
26
+ | Argument | Default | Description |
27
+ | -------------- | -------- | ------------------------------------ |
28
+ | Path | required | Image, screenshot, or component file |
29
+ | `--bead` | none | Link findings to bead |
30
+ | `--responsive` | false | Include responsive breakpoint review |
31
+ | `--dark-mode` | false | Include dark mode review |
32
+ | `--compare` | none | Compare against design spec |
33
+
34
+ ---
35
+
36
+ ## Review Categories
37
+
38
+ ### 1. Typography (Weight: 15%)
39
+
40
+ | Check | Pass | Fail |
41
+ | --------------- | --------------------------------------- | ----------------------------------- |
42
+ | Font purpose | Intentional choice for brand/context | Generic Inter/Roboto without reason |
43
+ | Hierarchy | Clear H1 > H2 > H3 > body scale | Flat, unclear importance |
44
+ | Readability | Appropriate size, line-height, contrast | Too small, cramped, low contrast |
45
+ | Weight contrast | Uses extremes (300 vs 700) | Muddy middle weights (400 vs 500) |
46
+ | Pairing | Harmonious combination | Clashing or too similar |
47
+
48
+ **Scoring:**
49
+
50
+ - 10: Distinctive, intentional, excellent hierarchy
51
+ - 7-9: Good choices, minor issues
52
+ - 4-6: Generic but functional
53
+ - 1-3: Poor readability or choices
54
+
55
+ ### 2. Color (Weight: 15%)
56
+
57
+ | Check | Pass | Fail |
58
+ | ---------------- | ------------------------------------- | ---------------------------- |
59
+ | Palette cohesion | Unified, intentional palette | Random or clashing colors |
60
+ | Brand alignment | Colors support brand identity | Generic or off-brand |
61
+ | Contrast | WCAG AA minimum (4.5:1 text) | Insufficient contrast |
62
+ | Semantic usage | Consistent meaning (red=error) | Confusing color meaning |
63
+ | No AI slop | Avoids purple/blue gradients, #667eea | Generic AI-generated palette |
64
+
65
+ **Scoring:**
66
+
67
+ - 10: Distinctive, accessible, cohesive
68
+ - 7-9: Good palette, minor issues
69
+ - 4-6: Functional but generic
70
+ - 1-3: Accessibility failures or AI slop
71
+
72
+ ### 3. Layout & Spacing (Weight: 20%)
73
+
74
+ | Check | Pass | Fail |
75
+ | ------------------- | ------------------------------ | ----------------------- |
76
+ | Visual hierarchy | Clear content priority | Everything same weight |
77
+ | Spacing consistency | Uses spacing scale (4/8/16/24) | Random pixel values |
78
+ | Alignment | Elements properly aligned | Misaligned or sloppy |
79
+ | White space | Breathing room, not cramped | Too dense or too sparse |
80
+ | Grid system | Consistent column structure | Arbitrary positioning |
81
+
82
+ **Scoring:**
83
+
84
+ - 10: Professional, balanced, rhythmic
85
+ - 7-9: Good structure, minor inconsistencies
86
+ - 4-6: Functional but lacks polish
87
+ - 1-3: Chaotic or broken layout
88
+
89
+ ### 4. Interactive States (Weight: 15%)
90
+
91
+ | State | Required | Check |
92
+ | -------------- | ------------- | ---------------------------------- |
93
+ | Default | Yes | Clear, inviting appearance |
94
+ | Hover | Yes | Visible change, not jarring |
95
+ | Focus | Yes | Clear ring/outline for keyboard |
96
+ | Active/Pressed | Recommended | Feedback on click |
97
+ | Disabled | If applicable | Obviously inactive, not just faded |
98
+ | Loading | If applicable | Clear loading indication |
99
+
100
+ **Scoring:**
101
+
102
+ - 10: All states polished, consistent
103
+ - 7-9: Most states covered, minor gaps
104
+ - 4-6: Basic states only
105
+ - 1-3: Missing critical states (focus)
106
+
107
+ ### 5. Accessibility (Weight: 20%)
108
+
109
+ | Check | Pass | Fail |
110
+ | -------------- | ---------------------------------- | ------------------------- |
111
+ | Color contrast | 4.5:1 text, 3:1 UI | Below WCAG AA |
112
+ | Focus visible | Clear focus indicator | Hidden or invisible focus |
113
+ | Touch targets | 44x44px minimum | Too small to tap |
114
+ | Alt text | Images have descriptions | Missing alt attributes |
115
+ | Keyboard nav | All interactive elements reachable | Keyboard traps or gaps |
116
+ | Screen reader | Logical reading order | Confusing or broken |
117
+
118
+ **Scoring:**
119
+
120
+ - 10: WCAG AAA compliant
121
+ - 7-9: WCAG AA compliant, minor issues
122
+ - 4-6: Some accessibility, gaps remain
123
+ - 1-3: Significant barriers
124
+
125
+ ### 6. Visual Polish (Weight: 15%)
126
+
127
+ | Check | Pass | Fail |
128
+ | ------------------- | ------------------------ | -------------------------- |
129
+ | Consistency | Same patterns throughout | Inconsistent styling |
130
+ | Attention to detail | Pixel-perfect alignment | Sloppy edges, misalignment |
131
+ | Motion/animation | Purposeful, smooth | Jarring or excessive |
132
+ | Depth/shadow | Consistent shadow system | Random or heavy shadows |
133
+ | Icons | Consistent style, size | Mixed icon sets |
134
+
135
+ **Scoring:**
136
+
137
+ - 10: Exceptional craft and attention
138
+ - 7-9: Professional, polished
139
+ - 4-6: Acceptable, room for improvement
140
+ - 1-3: Unpolished, inconsistent
141
+
142
+ ---
27
143
 
28
144
  ## Anti-Patterns to Flag
29
145
 
30
- - Cookie-cutter card layouts
31
- - Excessive rounded corners
32
- - Glassmorphism without purpose
33
- - Generic stock illustration style
146
+ | Anti-Pattern | Severity | Why It's Bad |
147
+ | --------------------------------- | -------- | ------------------------ |
148
+ | Purple/blue gradient backgrounds | Warning | AI slop signature |
149
+ | 3-column feature cards with icons | Warning | Overused, generic |
150
+ | Excessive rounded corners (16px+) | Info | Trendy but often misused |
151
+ | Glassmorphism without purpose | Warning | Style over function |
152
+ | Generic stock illustrations | Warning | Lacks personality |
153
+ | Drop shadows on everything | Info | Visual noise |
154
+ | Flat white (#FFFFFF) backgrounds | Info | Harsh, sterile |
155
+
156
+ ---
157
+
158
+ ## Responsive Review (--responsive)
159
+
160
+ Check at each breakpoint:
161
+
162
+ | Breakpoint | Width | Check |
163
+ | ---------- | ------- | ------------------------------------ |
164
+ | Mobile | 375px | Touch targets, stacking, readability |
165
+ | Tablet | 768px | Layout adaptation, spacing |
166
+ | Desktop | 1280px | Full layout, hover states |
167
+ | Wide | 1536px+ | Content doesn't stretch awkwardly |
168
+
169
+ **Common responsive issues:**
170
+
171
+ - Text too small on mobile
172
+ - Horizontal scroll
173
+ - Touch targets too close
174
+ - Images not responsive
175
+ - Hidden content on mobile
176
+
177
+ ---
178
+
179
+ ## Dark Mode Review (--dark-mode)
180
+
181
+ | Check | Pass | Fail |
182
+ | -------------------- | ------------------------ | ------------------------ |
183
+ | Contrast maintained | Text readable on dark bg | Washed out or too bright |
184
+ | Colors adapted | Not just inverted | Jarring or ugly colors |
185
+ | Images appropriate | Dark-compatible images | Light images on dark bg |
186
+ | Shadows adjusted | Softer or removed | Heavy shadows on dark |
187
+ | Focus states visible | Clear on dark background | Invisible focus ring |
188
+
189
+ ---
190
+
191
+ ## Output Format
192
+
193
+ ### Review Scorecard
194
+
195
+ ```
196
+ UI Review: [Component/Screen Name]
197
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
198
+
199
+ Category Scores:
200
+ ├── Typography: 8/10 ████████░░
201
+ ├── Color: 6/10 ██████░░░░ ⚠ Issues
202
+ ├── Layout: 9/10 █████████░
203
+ ├── Interactive: 7/10 ███████░░░
204
+ ├── Accessibility: 5/10 █████░░░░░ ⚠ Critical
205
+ └── Visual Polish: 8/10 ████████░░
206
+
207
+ Overall Score: 7.2/10 (Good, needs work)
208
+
209
+ Grade: B
210
+ ```
211
+
212
+ ### Findings by Severity
213
+
214
+ ```
215
+ Critical (Must Fix):
216
+ ━━━━━━━━━━━━━━━━━━━
217
+
218
+ 1. [A11Y] Focus states invisible on buttons
219
+ Location: All primary buttons
220
+ Impact: Keyboard users cannot navigate
221
+ Fix: Add `focus-visible:ring-2 focus-visible:ring-primary`
222
+
223
+ 2. [A11Y] Color contrast 2.8:1 on muted text
224
+ Location: Footer links, captions
225
+ Impact: WCAG AA failure
226
+ Fix: Change from #9CA3AF to #6B7280
227
+
228
+ Warning (Should Fix):
229
+ ━━━━━━━━━━━━━━━━━━━━
230
+
231
+ 3. [COLOR] Purple-blue gradient detected
232
+ Location: Hero background
233
+ Impact: AI slop aesthetic
234
+ Fix: Consider solid color or subtle texture
235
+
236
+ 4. [LAYOUT] Inconsistent spacing
237
+ Location: Card grid gaps
238
+ Impact: Visual rhythm broken
239
+ Fix: Standardize to 24px gap
240
+
241
+ Info (Nice to Have):
242
+ ━━━━━━━━━━━━━━━━━━━
34
243
 
35
- ## Output
244
+ 5. [TYPOGRAPHY] Could use more weight contrast
245
+ Location: Section headings
246
+ Suggestion: Try font-bold (700) instead of semibold (600)
247
+ ```
36
248
 
37
- Provide:
249
+ ### Code Fixes
250
+
251
+ ```tsx
252
+ // Before: Invisible focus
253
+ <button className="bg-primary text-white">
254
+ Submit
255
+ </button>
256
+
257
+ // After: Visible focus
258
+ <button className="bg-primary text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2">
259
+ Submit
260
+ </button>
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Bead Integration
266
+
267
+ If `--bead=<id>` provided:
268
+
269
+ ```typescript
270
+ // Create issues for critical findings
271
+ bd_add({
272
+ title: "[UI] Fix invisible focus states",
273
+ desc: "Focus states not visible on primary buttons.\n\nFix: Add focus-visible ring classes",
274
+ type: "bug",
275
+ pri: 1,
276
+ parent: "<bead-id>",
277
+ tags: ["accessibility", "ui"],
278
+ });
279
+
280
+ // Update review.md
281
+ write(".beads/artifacts/<bead-id>/review.md", reviewContent);
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Examples
287
+
288
+ ```bash
289
+ # Review a screenshot
290
+ /ui-review designs/homepage.png
291
+
292
+ # Review with responsive check
293
+ /ui-review src/components/Card.tsx --responsive
294
+
295
+ # Review and link to bead
296
+ /ui-review screenshots/dashboard.png --bead=bd-feature-123
297
+
298
+ # Full review with dark mode
299
+ /ui-review app/page.tsx --responsive --dark-mode
300
+
301
+ # Compare to design spec
302
+ /ui-review screenshots/current.png --compare designs/mockup.png
303
+ ```
304
+
305
+ ---
38
306
 
39
- 1. Summary of issues found
40
- 2. Specific actionable recommendations
41
- 3. Code snippets for improvements
42
- 4. Before/after suggestions
307
+ ## Related Commands
43
308
 
44
- If bead ID provided, record findings to the bead.
309
+ | Need | Command |
310
+ | ------------------- | ---------------------- |
311
+ | Analyze mockup | `/analyze-mockup` |
312
+ | Fix UI issues | `/fix-ui` |
313
+ | Accessibility audit | `/accessibility-check` |
314
+ | Design from scratch | `/design` |
315
+ | Audit design system | `/design-audit` |