@oxgeneral/orch 1.0.6 → 1.0.8

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 (72) hide show
  1. package/dist/{App-LEVUTWQN.js → App-5OVBVRCD.js} +1 -1
  2. package/dist/{agent-Q34L27AY.js → agent-SI4JF5MV.js} +1 -1
  3. package/dist/{agent-shop-D2RS4BZK.js → agent-shop-JHDTCWCD.js} +1 -1
  4. package/dist/chunk-3AXNSYCM.js +2 -0
  5. package/dist/{chunk-BCPUTULS.js → chunk-HWEMBO36.js} +83 -54
  6. package/dist/chunk-J7ITYXE6.js +116 -0
  7. package/dist/chunk-J7ITYXE6.js.map +1 -0
  8. package/dist/{chunk-4TDXD3LA.js → chunk-SWNSNPBO.js} +12 -2
  9. package/dist/chunk-SWNSNPBO.js.map +1 -0
  10. package/dist/chunk-U2JVMD2G.js +66 -0
  11. package/dist/chunk-U2JVMD2G.js.map +1 -0
  12. package/dist/{chunk-EH3HRQP4.js → chunk-W3J7CURM.js} +8 -116
  13. package/dist/chunk-W3J7CURM.js.map +1 -0
  14. package/dist/chunk-ZMLF5HI5.js +11 -0
  15. package/dist/cli.js +1 -1
  16. package/dist/container-SEIWOLHY.js +4 -0
  17. package/dist/doctor-Q3GHJNZL.js +2 -0
  18. package/dist/index.d.ts +32 -1
  19. package/dist/index.js +12 -5
  20. package/dist/index.js.map +1 -1
  21. package/dist/init-D4356W7G.js +73 -0
  22. package/dist/orchestrator-G3Y7THMG.js +6 -0
  23. package/dist/{orchestrator-XPEMMBOO.js.map → orchestrator-G3Y7THMG.js.map} +1 -1
  24. package/dist/{orchestrator-JOTMB5XT.js → orchestrator-GQLNLOXB.js} +8 -4
  25. package/dist/{org-WAK3CDPG.js → org-KLYK6MMJ.js} +1 -1
  26. package/dist/skill-loader-IGRIELEM.js +9 -0
  27. package/dist/skill-loader-RHCFIK74.js +4 -0
  28. package/dist/skill-loader-RHCFIK74.js.map +1 -0
  29. package/dist/{task-QFLIIRKZ.js → task-3R2IX4HM.js} +1 -1
  30. package/dist/{tui-BJHZBCIR.js → tui-47O2OCKC.js} +1 -1
  31. package/dist/{workspace-manager-5EYCMAEO.js → workspace-manager-RH24FSNT.js} +4 -3
  32. package/dist/workspace-manager-RH24FSNT.js.map +1 -0
  33. package/dist/workspace-manager-VJ4FN5PJ.js +3 -0
  34. package/package.json +4 -3
  35. package/readme.md +11 -0
  36. package/scripts/{postinstall.js → postinstall.cjs} +24 -5
  37. package/skills/library/autoplan.md +315 -0
  38. package/skills/library/benchmark.md +242 -0
  39. package/skills/library/browse.md +266 -0
  40. package/skills/library/canary.md +248 -0
  41. package/skills/library/careful.md +42 -0
  42. package/skills/library/codex.md +431 -0
  43. package/skills/library/design-consultation.md +367 -0
  44. package/skills/library/design-review.md +744 -0
  45. package/skills/library/document-release.md +365 -0
  46. package/skills/library/freeze.md +60 -0
  47. package/skills/library/guard.md +55 -0
  48. package/skills/library/investigate.md +171 -0
  49. package/skills/library/land-and-deploy.md +636 -0
  50. package/skills/library/office-hours.md +746 -0
  51. package/skills/library/plan-ceo-review.md +1029 -0
  52. package/skills/library/plan-design-review.md +428 -0
  53. package/skills/library/plan-eng-review.md +420 -0
  54. package/skills/library/qa-only.md +388 -0
  55. package/skills/library/qa.md +766 -0
  56. package/skills/library/retro.md +532 -0
  57. package/skills/library/review.md +421 -0
  58. package/skills/library/setup-browser-cookies.md +86 -0
  59. package/skills/library/setup-deploy.md +211 -0
  60. package/skills/library/ship.md +1018 -0
  61. package/skills/library/unfreeze.md +31 -0
  62. package/skills/library/upgrade.md +220 -0
  63. package/skills/orch/SKILL.md +416 -0
  64. package/dist/chunk-4TDXD3LA.js.map +0 -1
  65. package/dist/chunk-EH3HRQP4.js.map +0 -1
  66. package/dist/chunk-WVJTXBPL.js +0 -11
  67. package/dist/container-FXUUV6PP.js +0 -4
  68. package/dist/doctor-P2J6VAUX.js +0 -2
  69. package/dist/init-PTAYCSMO.js +0 -53
  70. package/dist/orchestrator-XPEMMBOO.js +0 -6
  71. package/dist/workspace-manager-5EYCMAEO.js.map +0 -1
  72. package/dist/workspace-manager-XKOZ5WM6.js +0 -3
@@ -0,0 +1,744 @@
1
+ ---
2
+ name: design-review
3
+ version: 2.0.0
4
+ description: |
5
+ Designer's eye QA: finds visual inconsistency, spacing issues, hierarchy problems,
6
+ AI slop patterns, and slow interactions — then fixes them. Iteratively fixes issues
7
+ in source code, committing each fix atomically and re-verifying with before/after
8
+ screenshots. For plan-mode design review (before implementation), use /plan-design-review.
9
+ Use when asked to "audit the design", "visual QA", "check if it looks good", or "design polish".
10
+ Proactively suggest when the user mentions visual inconsistencies or
11
+ wants to polish the look of a live site.
12
+ ---
13
+
14
+ ## Setup
15
+
16
+ **Parse the user's request for these parameters:**
17
+
18
+ | Parameter | Default | Override example |
19
+ |-----------|---------|-----------------:|
20
+ | Target URL | (auto-detect or ask) | `https://myapp.com`, `http://localhost:3000` |
21
+ | Scope | Full site | `Focus on the settings page`, `Just the homepage` |
22
+ | Depth | Standard (5-8 pages) | `--quick` (homepage + 2), `--deep` (10-15 pages) |
23
+ | Auth | None | `Sign in as user@example.com`, `Import cookies` |
24
+
25
+ **If no URL is given and you're on a feature branch:** Automatically enter **diff-aware mode** (see Modes below).
26
+
27
+ **If no URL is given and you're on main/master:** Ask the user for a URL.
28
+
29
+ **Check for DESIGN.md:**
30
+
31
+ Look for `DESIGN.md`, `design-system.md`, or similar in the repo root. If found, read it — all design decisions must be calibrated against it. Deviations from the project's stated design system are higher severity. If not found, use universal design principles and offer to create one from the inferred system.
32
+
33
+ **Check for clean working tree:**
34
+
35
+ ```bash
36
+ git status --porcelain
37
+ ```
38
+
39
+ If the output is non-empty (working tree is dirty), **STOP** and use AskUserQuestion:
40
+
41
+ "Your working tree has uncommitted changes. /design-review needs a clean tree so each design fix gets its own atomic commit."
42
+
43
+ - A) Commit my changes — commit all current changes with a descriptive message, then start design review
44
+ - B) Stash my changes — stash, run design review, pop the stash after
45
+ - C) Abort — I'll clean up manually
46
+
47
+ RECOMMENDATION: Choose A because uncommitted work should be preserved as a commit before design review adds its own fix commits.
48
+
49
+ After the user chooses, execute their choice (commit or stash), then continue with setup.
50
+
51
+ **Find the browse binary:**
52
+
53
+ ## SETUP (run this check BEFORE any browse command)
54
+
55
+ ```bash
56
+ _ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
57
+ B=""
58
+ [ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/orch/browse/dist/browse" ] && B="$_ROOT/.claude/skills/orch/browse/dist/browse"
59
+ [ -z "$B" ] && B=~/.claude/skills/orch/browse/dist/browse
60
+ if [ -x "$B" ]; then
61
+ echo "READY: $B"
62
+ else
63
+ echo "NEEDS_SETUP"
64
+ fi
65
+ ```
66
+
67
+ If `NEEDS_SETUP`:
68
+ 1. Tell the user: "orch browse needs a one-time build (~10 seconds). OK to proceed?" Then STOP and wait.
69
+ 2. Run: `cd <SKILL_DIR> && ./setup`
70
+ 3. If `bun` is not installed: `curl -fsSL https://bun.sh/install | bash`
71
+
72
+ **Check test framework (bootstrap if needed):**
73
+
74
+ ## Test Framework Bootstrap
75
+
76
+ **Detect existing test framework and project runtime:**
77
+
78
+ ```bash
79
+ # Detect project runtime
80
+ [ -f Gemfile ] && echo "RUNTIME:ruby"
81
+ [ -f package.json ] && echo "RUNTIME:node"
82
+ [ -f requirements.txt ] || [ -f pyproject.toml ] && echo "RUNTIME:python"
83
+ [ -f go.mod ] && echo "RUNTIME:go"
84
+ [ -f Cargo.toml ] && echo "RUNTIME:rust"
85
+ [ -f composer.json ] && echo "RUNTIME:php"
86
+ [ -f mix.exs ] && echo "RUNTIME:elixir"
87
+ # Detect sub-frameworks
88
+ [ -f Gemfile ] && grep -q "rails" Gemfile 2>/dev/null && echo "FRAMEWORK:rails"
89
+ [ -f package.json ] && grep -q '"next"' package.json 2>/dev/null && echo "FRAMEWORK:nextjs"
90
+ # Check for existing test infrastructure
91
+ ls jest.config.* vitest.config.* playwright.config.* .rspec pytest.ini pyproject.toml phpunit.xml 2>/dev/null
92
+ ls -d test/ tests/ spec/ __tests__/ cypress/ e2e/ 2>/dev/null
93
+ # Check opt-out marker
94
+ [ -f .orch/no-test-bootstrap ] && echo "BOOTSTRAP_DECLINED"
95
+ ```
96
+
97
+ **If test framework detected** (config files or test directories found):
98
+ Print "Test framework detected: {name} ({N} existing tests). Skipping bootstrap."
99
+ Read 2-3 existing test files to learn conventions (naming, imports, assertion style, setup patterns).
100
+ Store conventions as prose context for use in Phase 8e.5 or Step 3.4. **Skip the rest of bootstrap.**
101
+
102
+ **If BOOTSTRAP_DECLINED** appears: Print "Test bootstrap previously declined — skipping." **Skip the rest of bootstrap.**
103
+
104
+ **If NO runtime detected** (no config files found): Use AskUserQuestion:
105
+ "I couldn't detect your project's language. What runtime are you using?"
106
+ Options: A) Node.js/TypeScript B) Ruby/Rails C) Python D) Go E) Rust F) PHP G) Elixir H) This project doesn't need tests.
107
+ If user picks H → write `.orch/no-test-bootstrap` and continue without tests.
108
+
109
+ **If runtime detected but no test framework — bootstrap:**
110
+
111
+ ### B2. Research best practices
112
+
113
+ Use WebSearch to find current best practices for the detected runtime:
114
+ - `"[runtime] best test framework 2025 2026"`
115
+ - `"[framework A] vs [framework B] comparison"`
116
+
117
+ If WebSearch is unavailable, use this built-in knowledge table:
118
+
119
+ | Runtime | Primary recommendation | Alternative |
120
+ |---------|----------------------|-------------|
121
+ | Ruby/Rails | minitest + fixtures + capybara | rspec + factory_bot + shoulda-matchers |
122
+ | Node.js | vitest + @testing-library | jest + @testing-library |
123
+ | Next.js | vitest + @testing-library/react + playwright | jest + cypress |
124
+ | Python | pytest + pytest-cov | unittest |
125
+ | Go | stdlib testing + testify | stdlib only |
126
+ | Rust | cargo test (built-in) + mockall | — |
127
+ | PHP | phpunit + mockery | pest |
128
+ | Elixir | ExUnit (built-in) + ex_machina | — |
129
+
130
+ ### B3. Framework selection
131
+
132
+ Use AskUserQuestion:
133
+ "I detected this is a [Runtime/Framework] project with no test framework. I researched current best practices. Here are the options:
134
+ A) [Primary] — [rationale]. Includes: [packages]. Supports: unit, integration, smoke, e2e
135
+ B) [Alternative] — [rationale]. Includes: [packages]
136
+ C) Skip — don't set up testing right now
137
+ RECOMMENDATION: Choose A because [reason based on project context]"
138
+
139
+ If user picks C → write `.orch/no-test-bootstrap`. Tell user: "If you change your mind later, delete `.orch/no-test-bootstrap` and re-run." Continue without tests.
140
+
141
+ If multiple runtimes detected (monorepo) → ask which runtime to set up first, with option to do both sequentially.
142
+
143
+ ### B4. Install and configure
144
+
145
+ 1. Install the chosen packages (npm/bun/gem/pip/etc.)
146
+ 2. Create minimal config file
147
+ 3. Create directory structure (test/, spec/, etc.)
148
+ 4. Create one example test matching the project's code to verify setup works
149
+
150
+ If package installation fails → debug once. If still failing → revert with `git checkout -- package.json package-lock.json` (or equivalent for the runtime). Warn user and continue without tests.
151
+
152
+ ### B4.5. First real tests
153
+
154
+ Generate 3-5 real tests for existing code:
155
+
156
+ 1. **Find recently changed files:** `git log --since=30.days --name-only --format="" | sort | uniq -c | sort -rn | head -10`
157
+ 2. **Prioritize by risk:** Error handlers > business logic with conditionals > API endpoints > pure functions
158
+ 3. **For each file:** Write one test that tests real behavior with meaningful assertions. Never `expect(x).toBeDefined()` — test what the code DOES.
159
+ 4. Run each test. Passes → keep. Fails → fix once. Still fails → delete silently.
160
+ 5. Generate at least 1 test, cap at 5.
161
+
162
+ Never import secrets, API keys, or credentials in test files. Use environment variables or test fixtures.
163
+
164
+ ### B5. Verify
165
+
166
+ ```bash
167
+ # Run the full test suite to confirm everything works
168
+ {detected test command}
169
+ ```
170
+
171
+ If tests fail → debug once. If still failing → revert all bootstrap changes and warn user.
172
+
173
+ ### B5.5. CI/CD pipeline
174
+
175
+ ```bash
176
+ # Check CI provider
177
+ ls -d .github/ 2>/dev/null && echo "CI:github"
178
+ ls .gitlab-ci.yml .circleci/ bitrise.yml 2>/dev/null
179
+ ```
180
+
181
+ If `.github/` exists (or no CI detected — default to GitHub Actions):
182
+ Create `.github/workflows/test.yml` with:
183
+ - `runs-on: ubuntu-latest`
184
+ - Appropriate setup action for the runtime (setup-node, setup-ruby, setup-python, etc.)
185
+ - The same test command verified in B5
186
+ - Trigger: push + pull_request
187
+
188
+ If non-GitHub CI detected → skip CI generation with note: "Detected {provider} — CI pipeline generation supports GitHub Actions only. Add test step to your existing pipeline manually."
189
+
190
+ ### B6. Create TESTING.md
191
+
192
+ First check: If TESTING.md already exists → read it and update/append rather than overwriting. Never destroy existing content.
193
+
194
+ Write TESTING.md with:
195
+ - Philosophy: "100% test coverage is the key to great vibe coding. Tests let you move fast, trust your instincts, and ship with confidence — without them, vibe coding is just yolo coding. With tests, it's a superpower."
196
+ - Framework name and version
197
+ - How to run tests (the verified command from B5)
198
+ - Test layers: Unit tests (what, where, when), Integration tests, Smoke tests, E2E tests
199
+ - Conventions: file naming, assertion style, setup/teardown patterns
200
+
201
+ ### B7. Update CLAUDE.md
202
+
203
+ First check: If CLAUDE.md already has a `## Testing` section → skip. Don't duplicate.
204
+
205
+ Append a `## Testing` section:
206
+ - Run command and test directory
207
+ - Reference to TESTING.md
208
+ - Test expectations:
209
+ - 100% test coverage is the goal — tests make vibe coding safe
210
+ - When writing new functions, write a corresponding test
211
+ - When fixing a bug, write a regression test
212
+ - When adding error handling, write a test that triggers the error
213
+ - When adding a conditional (if/else, switch), write tests for BOTH paths
214
+ - Never commit code that makes existing tests fail
215
+
216
+ ### B8. Commit
217
+
218
+ ```bash
219
+ git status --porcelain
220
+ ```
221
+
222
+ Only commit if there are changes. Stage all bootstrap files (config, test directory, TESTING.md, CLAUDE.md, .github/workflows/test.yml if created):
223
+ `git commit -m "chore: bootstrap test framework ({framework name})"`
224
+
225
+ ---
226
+
227
+ **Create output directories:**
228
+
229
+ ```bash
230
+ REPORT_DIR=".orch/design-reports"
231
+ mkdir -p "$REPORT_DIR/screenshots"
232
+ ```
233
+
234
+ ---
235
+
236
+ ## Phases 1-6: Design Audit Baseline
237
+
238
+ ## Modes
239
+
240
+ ### Full (default)
241
+ Systematic review of all pages reachable from homepage. Visit 5-8 pages. Full checklist evaluation, responsive screenshots, interaction flow testing. Produces complete design audit report with letter grades.
242
+
243
+ ### Quick (`--quick`)
244
+ Homepage + 2 key pages only. First Impression + Design System Extraction + abbreviated checklist. Fastest path to a design score.
245
+
246
+ ### Deep (`--deep`)
247
+ Comprehensive review: 10-15 pages, every interaction flow, exhaustive checklist. For pre-launch audits or major redesigns.
248
+
249
+ ### Diff-aware (automatic when on a feature branch with no URL)
250
+ When on a feature branch, scope to pages affected by the branch changes:
251
+ 1. Analyze the branch diff: `git diff main...HEAD --name-only`
252
+ 2. Map changed files to affected pages/routes
253
+ 3. Detect running app on common local ports (3000, 4000, 8080)
254
+ 4. Audit only affected pages, compare design quality before/after
255
+
256
+ ### Regression (`--regression` or previous `design-baseline.json` found)
257
+ Run full audit, then load previous `design-baseline.json`. Compare: per-category grade deltas, new findings, resolved findings. Output regression table in report.
258
+
259
+ ---
260
+
261
+ ## Phase 1: First Impression
262
+
263
+ The most uniquely designer-like output. Form a gut reaction before analyzing anything.
264
+
265
+ 1. Navigate to the target URL
266
+ 2. Take a full-page desktop screenshot: `$B screenshot "$REPORT_DIR/screenshots/first-impression.png"`
267
+ 3. Write the **First Impression** using this structured critique format:
268
+ - "The site communicates **[what]**." (what it says at a glance — competence? playfulness? confusion?)
269
+ - "I notice **[observation]**." (what stands out, positive or negative — be specific)
270
+ - "The first 3 things my eye goes to are: **[1]**, **[2]**, **[3]**." (hierarchy check — are these intentional?)
271
+ - "If I had to describe this in one word: **[word]**." (gut verdict)
272
+
273
+ This is the section users read first. Be opinionated. A designer doesn't hedge — they react.
274
+
275
+ ---
276
+
277
+ ## Phase 2: Design System Extraction
278
+
279
+ Extract the actual design system the site uses (not what a DESIGN.md says, but what's rendered):
280
+
281
+ ```bash
282
+ # Fonts in use (capped at 500 elements to avoid timeout)
283
+ $B js "JSON.stringify([...new Set([...document.querySelectorAll('*')].slice(0,500).map(e => getComputedStyle(e).fontFamily))])"
284
+
285
+ # Color palette in use
286
+ $B js "JSON.stringify([...new Set([...document.querySelectorAll('*')].slice(0,500).flatMap(e => [getComputedStyle(e).color, getComputedStyle(e).backgroundColor]).filter(c => c !== 'rgba(0, 0, 0, 0)'))])"
287
+
288
+ # Heading hierarchy
289
+ $B js "JSON.stringify([...document.querySelectorAll('h1,h2,h3,h4,h5,h6')].map(h => ({tag:h.tagName, text:h.textContent.trim().slice(0,50), size:getComputedStyle(h).fontSize, weight:getComputedStyle(h).fontWeight})))"
290
+
291
+ # Touch target audit (find undersized interactive elements)
292
+ $B js "JSON.stringify([...document.querySelectorAll('a,button,input,[role=button]')].filter(e => {const r=e.getBoundingClientRect(); return r.width>0 && (r.width<44||r.height<44)}).map(e => ({tag:e.tagName, text:(e.textContent||'').trim().slice(0,30), w:Math.round(e.getBoundingClientRect().width), h:Math.round(e.getBoundingClientRect().height)})).slice(0,20))"
293
+
294
+ # Performance baseline
295
+ $B perf
296
+ ```
297
+
298
+ Structure findings as an **Inferred Design System**:
299
+ - **Fonts:** list with usage counts. Flag if >3 distinct font families.
300
+ - **Colors:** palette extracted. Flag if >12 unique non-gray colors. Note warm/cool/mixed.
301
+ - **Heading Scale:** h1-h6 sizes. Flag skipped levels, non-systematic size jumps.
302
+ - **Spacing Patterns:** sample padding/margin values. Flag non-scale values.
303
+
304
+ After extraction, offer: *"Want me to save this as your DESIGN.md? I can lock in these observations as your project's design system baseline."*
305
+
306
+ ---
307
+
308
+ ## Phase 3: Page-by-Page Visual Audit
309
+
310
+ For each page in scope:
311
+
312
+ ```bash
313
+ $B goto <url>
314
+ $B snapshot -i -a -o "$REPORT_DIR/screenshots/{page}-annotated.png"
315
+ $B responsive "$REPORT_DIR/screenshots/{page}"
316
+ $B console --errors
317
+ $B perf
318
+ ```
319
+
320
+ ### Auth Detection
321
+
322
+ After the first navigation, check if the URL changed to a login-like path:
323
+ ```bash
324
+ $B url
325
+ ```
326
+ If URL contains `/login`, `/signin`, `/auth`, or `/sso`: the site requires authentication. AskUserQuestion: "This site requires authentication. Want to import cookies from your browser? Run `/setup-browser-cookies` first if needed."
327
+
328
+ ### Design Audit Checklist (10 categories, ~80 items)
329
+
330
+ Apply these at each page. Each finding gets an impact rating (high/medium/polish) and category.
331
+
332
+ **1. Visual Hierarchy & Composition** (8 items)
333
+ - Clear focal point? One primary CTA per view?
334
+ - Eye flows naturally top-left to bottom-right?
335
+ - Visual noise — competing elements fighting for attention?
336
+ - Information density appropriate for content type?
337
+ - Z-index clarity — nothing unexpectedly overlapping?
338
+ - Above-the-fold content communicates purpose in 3 seconds?
339
+ - Squint test: hierarchy still visible when blurred?
340
+ - White space is intentional, not leftover?
341
+
342
+ **2. Typography** (15 items)
343
+ - Font count <=3 (flag if more)
344
+ - Scale follows ratio (1.25 major third or 1.333 perfect fourth)
345
+ - Line-height: 1.5x body, 1.15-1.25x headings
346
+ - Measure: 45-75 chars per line (66 ideal)
347
+ - Heading hierarchy: no skipped levels (h1→h3 without h2)
348
+ - Weight contrast: >=2 weights used for hierarchy
349
+ - No blacklisted fonts (Papyrus, Comic Sans, Lobster, Impact, Jokerman)
350
+ - If primary font is Inter/Roboto/Open Sans/Poppins → flag as potentially generic
351
+ - `text-wrap: balance` or `text-pretty` on headings (check via `$B css <heading> text-wrap`)
352
+ - Curly quotes used, not straight quotes
353
+ - Ellipsis character (`…`) not three dots (`...`)
354
+ - `font-variant-numeric: tabular-nums` on number columns
355
+ - Body text >= 16px
356
+ - Caption/label >= 12px
357
+ - No letterspacing on lowercase text
358
+
359
+ **3. Color & Contrast** (10 items)
360
+ - Palette coherent (<=12 unique non-gray colors)
361
+ - WCAG AA: body text 4.5:1, large text (18px+) 3:1, UI components 3:1
362
+ - Semantic colors consistent (success=green, error=red, warning=yellow/amber)
363
+ - No color-only encoding (always add labels, icons, or patterns)
364
+ - Dark mode: surfaces use elevation, not just lightness inversion
365
+ - Dark mode: text off-white (~#E0E0E0), not pure white
366
+ - Primary accent desaturated 10-20% in dark mode
367
+ - `color-scheme: dark` on html element (if dark mode present)
368
+ - No red/green only combinations (8% of men have red-green deficiency)
369
+ - Neutral palette is warm or cool consistently — not mixed
370
+
371
+ **4. Spacing & Layout** (12 items)
372
+ - Grid consistent at all breakpoints
373
+ - Spacing uses a scale (4px or 8px base), not arbitrary values
374
+ - Alignment is consistent — nothing floats outside the grid
375
+ - Rhythm: related items closer together, distinct sections further apart
376
+ - Border-radius hierarchy (not uniform bubbly radius on everything)
377
+ - Inner radius = outer radius - gap (nested elements)
378
+ - No horizontal scroll on mobile
379
+ - Max content width set (no full-bleed body text)
380
+ - `env(safe-area-inset-*)` for notch devices
381
+ - URL reflects state (filters, tabs, pagination in query params)
382
+ - Flex/grid used for layout (not JS measurement)
383
+ - Breakpoints: mobile (375), tablet (768), desktop (1024), wide (1440)
384
+
385
+ **5. Interaction States** (10 items)
386
+ - Hover state on all interactive elements
387
+ - `focus-visible` ring present (never `outline: none` without replacement)
388
+ - Active/pressed state with depth effect or color shift
389
+ - Disabled state: reduced opacity + `cursor: not-allowed`
390
+ - Loading: skeleton shapes match real content layout
391
+ - Empty states: warm message + primary action + visual (not just "No items.")
392
+ - Error messages: specific + include fix/next step
393
+ - Success: confirmation animation or color, auto-dismiss
394
+ - Touch targets >= 44px on all interactive elements
395
+ - `cursor: pointer` on all clickable elements
396
+
397
+ **6. Responsive Design** (8 items)
398
+ - Mobile layout makes *design* sense (not just stacked desktop columns)
399
+ - Touch targets sufficient on mobile (>= 44px)
400
+ - No horizontal scroll on any viewport
401
+ - Images handle responsive (srcset, sizes, or CSS containment)
402
+ - Text readable without zooming on mobile (>= 16px body)
403
+ - Navigation collapses appropriately (hamburger, bottom nav, etc.)
404
+ - Forms usable on mobile (correct input types, no autoFocus on mobile)
405
+ - No `user-scalable=no` or `maximum-scale=1` in viewport meta
406
+
407
+ **7. Motion & Animation** (6 items)
408
+ - Easing: ease-out for entering, ease-in for exiting, ease-in-out for moving
409
+ - Duration: 50-700ms range (nothing slower unless page transition)
410
+ - Purpose: every animation communicates something (state change, attention, spatial relationship)
411
+ - `prefers-reduced-motion` respected (check: `$B js "matchMedia('(prefers-reduced-motion: reduce)').matches"`)
412
+ - No `transition: all` — properties listed explicitly
413
+ - Only `transform` and `opacity` animated (not layout properties like width, height, top, left)
414
+
415
+ **8. Content & Microcopy** (8 items)
416
+ - Empty states designed with warmth (message + action + illustration/icon)
417
+ - Error messages specific: what happened + why + what to do next
418
+ - Button labels specific ("Save API Key" not "Continue" or "Submit")
419
+ - No placeholder/lorem ipsum text visible in production
420
+ - Truncation handled (`text-overflow: ellipsis`, `line-clamp`, or `break-words`)
421
+ - Active voice ("Install the CLI" not "The CLI will be installed")
422
+ - Loading states end with `…` ("Saving…" not "Saving...")
423
+ - Destructive actions have confirmation modal or undo window
424
+
425
+ **9. AI Slop Detection** (10 anti-patterns — the blacklist)
426
+
427
+ The test: would a human designer at a respected studio ever ship this?
428
+
429
+ - Purple/violet/indigo gradient backgrounds or blue-to-purple color schemes
430
+ - **The 3-column feature grid:** icon-in-colored-circle + bold title + 2-line description, repeated 3x symmetrically. THE most recognizable AI layout.
431
+ - Icons in colored circles as section decoration (SaaS starter template look)
432
+ - Centered everything (`text-align: center` on all headings, descriptions, cards)
433
+ - Uniform bubbly border-radius on every element (same large radius on everything)
434
+ - Decorative blobs, floating circles, wavy SVG dividers (if a section feels empty, it needs better content, not decoration)
435
+ - Emoji as design elements (rockets in headings, emoji as bullet points)
436
+ - Colored left-border on cards (`border-left: 3px solid <accent>`)
437
+ - Generic hero copy ("Welcome to [X]", "Unlock the power of...", "Your all-in-one solution for...")
438
+ - Cookie-cutter section rhythm (hero → 3 features → testimonials → pricing → CTA, every section same height)
439
+
440
+ **10. Performance as Design** (6 items)
441
+ - LCP < 2.0s (web apps), < 1.5s (informational sites)
442
+ - CLS < 0.1 (no visible layout shifts during load)
443
+ - Skeleton quality: shapes match real content, shimmer animation
444
+ - Images: `loading="lazy"`, width/height dimensions set, WebP/AVIF format
445
+ - Fonts: `font-display: swap`, preconnect to CDN origins
446
+ - No visible font swap flash (FOUT) — critical fonts preloaded
447
+
448
+ ---
449
+
450
+ ## Phase 4: Interaction Flow Review
451
+
452
+ Walk 2-3 key user flows and evaluate the *feel*, not just the function:
453
+
454
+ ```bash
455
+ $B snapshot -i
456
+ $B click @e3 # perform action
457
+ $B snapshot -D # diff to see what changed
458
+ ```
459
+
460
+ Evaluate:
461
+ - **Response feel:** Does clicking feel responsive? Any delays or missing loading states?
462
+ - **Transition quality:** Are transitions intentional or generic/absent?
463
+ - **Feedback clarity:** Did the action clearly succeed or fail? Is the feedback immediate?
464
+ - **Form polish:** Focus states visible? Validation timing correct? Errors near the source?
465
+
466
+ ---
467
+
468
+ ## Phase 5: Cross-Page Consistency
469
+
470
+ Compare screenshots and observations across pages for:
471
+ - Navigation bar consistent across all pages?
472
+ - Footer consistent?
473
+ - Component reuse vs one-off designs (same button styled differently on different pages?)
474
+ - Tone consistency (one page playful while another is corporate?)
475
+ - Spacing rhythm carries across pages?
476
+
477
+ ---
478
+
479
+ ## Phase 6: Compile Report
480
+
481
+ ### Output Locations
482
+
483
+ **Local:** `.orch/design-reports/design-audit-{domain}-{YYYY-MM-DD}.md`
484
+
485
+ **Project-scoped:**
486
+ ```bash
487
+ source <(~/.claude/skills/orch/bin/orch-slug 2>/dev/null) && mkdir -p ~/.orch/projects/$SLUG
488
+ ```
489
+ Write to: `~/.orch/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
490
+
491
+ **Baseline:** Write `design-baseline.json` for regression mode:
492
+ ```json
493
+ {
494
+ "date": "YYYY-MM-DD",
495
+ "url": "<target>",
496
+ "designScore": "B",
497
+ "aiSlopScore": "C",
498
+ "categoryGrades": { "hierarchy": "A", "typography": "B", ... },
499
+ "findings": [{ "id": "FINDING-001", "title": "...", "impact": "high", "category": "typography" }]
500
+ }
501
+ ```
502
+
503
+ ### Scoring System
504
+
505
+ **Dual headline scores:**
506
+ - **Design Score: {A-F}** — weighted average of all 10 categories
507
+ - **AI Slop Score: {A-F}** — standalone grade with pithy verdict
508
+
509
+ **Per-category grades:**
510
+ - **A:** Intentional, polished, delightful. Shows design thinking.
511
+ - **B:** Solid fundamentals, minor inconsistencies. Looks professional.
512
+ - **C:** Functional but generic. No major problems, no design point of view.
513
+ - **D:** Noticeable problems. Feels unfinished or careless.
514
+ - **F:** Actively hurting user experience. Needs significant rework.
515
+
516
+ **Grade computation:** Each category starts at A. Each High-impact finding drops one letter grade. Each Medium-impact finding drops half a letter grade. Polish findings are noted but do not affect grade. Minimum is F.
517
+
518
+ **Category weights for Design Score:**
519
+ | Category | Weight |
520
+ |----------|--------|
521
+ | Visual Hierarchy | 15% |
522
+ | Typography | 15% |
523
+ | Spacing & Layout | 15% |
524
+ | Color & Contrast | 10% |
525
+ | Interaction States | 10% |
526
+ | Responsive | 10% |
527
+ | Content Quality | 10% |
528
+ | AI Slop | 5% |
529
+ | Motion | 5% |
530
+ | Performance Feel | 5% |
531
+
532
+ AI Slop is 5% of Design Score but also graded independently as a headline metric.
533
+
534
+ ### Regression Output
535
+
536
+ When previous `design-baseline.json` exists or `--regression` flag is used:
537
+ - Load baseline grades
538
+ - Compare: per-category deltas, new findings, resolved findings
539
+ - Append regression table to report
540
+
541
+ ---
542
+
543
+ ## Design Critique Format
544
+
545
+ Use structured feedback, not opinions:
546
+ - "I notice..." — observation (e.g., "I notice the primary CTA competes with the secondary action")
547
+ - "I wonder..." — question (e.g., "I wonder if users will understand what 'Process' means here")
548
+ - "What if..." — suggestion (e.g., "What if we moved search to a more prominent position?")
549
+ - "I think... because..." — reasoned opinion (e.g., "I think the spacing between sections is too uniform because it doesn't create hierarchy")
550
+
551
+ Tie everything to user goals and product objectives. Always suggest specific improvements alongside problems.
552
+
553
+ ---
554
+
555
+ ## Important Rules
556
+
557
+ 1. **Think like a designer, not a QA engineer.** You care whether things feel right, look intentional, and respect the user. You do NOT just care whether things "work."
558
+ 2. **Screenshots are evidence.** Every finding needs at least one screenshot. Use annotated screenshots (`snapshot -a`) to highlight elements.
559
+ 3. **Be specific and actionable.** "Change X to Y because Z" — not "the spacing feels off."
560
+ 4. **Never read source code.** Evaluate the rendered site, not the implementation. (Exception: offer to write DESIGN.md from extracted observations.)
561
+ 5. **AI Slop detection is your superpower.** Most developers can't evaluate whether their site looks AI-generated. You can. Be direct about it.
562
+ 6. **Quick wins matter.** Always include a "Quick Wins" section — the 3-5 highest-impact fixes that take <30 minutes each.
563
+ 7. **Use `snapshot -C` for tricky UIs.** Finds clickable divs that the accessibility tree misses.
564
+ 8. **Responsive is design, not just "not broken."** A stacked desktop layout on mobile is not responsive design — it's lazy. Evaluate whether the mobile layout makes *design* sense.
565
+ 9. **Document incrementally.** Write each finding to the report as you find it. Don't batch.
566
+ 10. **Depth over breadth.** 5-10 well-documented findings with screenshots and specific suggestions > 20 vague observations.
567
+ 11. **Show screenshots to the user.** After every `$B screenshot`, `$B snapshot -a -o`, or `$B responsive` command, use the Read tool on the output file(s) so the user can see them inline. For `responsive` (3 files), Read all three. This is critical — without it, screenshots are invisible to the user.
568
+
569
+ Record baseline design score and AI slop score at end of Phase 6.
570
+
571
+ ---
572
+
573
+ ## Output Structure
574
+
575
+ ```
576
+ .orch/design-reports/
577
+ ├── design-audit-{domain}-{YYYY-MM-DD}.md # Structured report
578
+ ├── screenshots/
579
+ │ ├── first-impression.png # Phase 1
580
+ │ ├── {page}-annotated.png # Per-page annotated
581
+ │ ├── {page}-mobile.png # Responsive
582
+ │ ├── {page}-tablet.png
583
+ │ ├── {page}-desktop.png
584
+ │ ├── finding-001-before.png # Before fix
585
+ │ ├── finding-001-after.png # After fix
586
+ │ └── ...
587
+ └── design-baseline.json # For regression mode
588
+ ```
589
+
590
+ ---
591
+
592
+ ## Phase 7: Triage
593
+
594
+ Sort all discovered findings by impact, then decide which to fix:
595
+
596
+ - **High Impact:** Fix first. These affect the first impression and hurt user trust.
597
+ - **Medium Impact:** Fix next. These reduce polish and are felt subconsciously.
598
+ - **Polish:** Fix if time allows. These separate good from great.
599
+
600
+ Mark findings that cannot be fixed from source code (e.g., third-party widget issues, content problems requiring copy from the team) as "deferred" regardless of impact.
601
+
602
+ ---
603
+
604
+ ## Phase 8: Fix Loop
605
+
606
+ For each fixable finding, in impact order:
607
+
608
+ ### 8a. Locate source
609
+
610
+ ```bash
611
+ # Search for CSS classes, component names, style files
612
+ # Glob for file patterns matching the affected page
613
+ ```
614
+
615
+ - Find the source file(s) responsible for the design issue
616
+ - ONLY modify files directly related to the finding
617
+ - Prefer CSS/styling changes over structural component changes
618
+
619
+ ### 8b. Fix
620
+
621
+ - Read the source code, understand the context
622
+ - Make the **minimal fix** — smallest change that resolves the design issue
623
+ - CSS-only changes are preferred (safer, more reversible)
624
+ - Do NOT refactor surrounding code, add features, or "improve" unrelated things
625
+
626
+ ### 8c. Commit
627
+
628
+ ```bash
629
+ git add <only-changed-files>
630
+ git commit -m "style(design): FINDING-NNN — short description"
631
+ ```
632
+
633
+ - One commit per fix. Never bundle multiple fixes.
634
+ - Message format: `style(design): FINDING-NNN — short description`
635
+
636
+ ### 8d. Re-test
637
+
638
+ Navigate back to the affected page and verify the fix:
639
+
640
+ ```bash
641
+ $B goto <affected-url>
642
+ $B screenshot "$REPORT_DIR/screenshots/finding-NNN-after.png"
643
+ $B console --errors
644
+ $B snapshot -D
645
+ ```
646
+
647
+ Take **before/after screenshot pair** for every fix.
648
+
649
+ ### 8e. Classify
650
+
651
+ - **verified**: re-test confirms the fix works, no new errors introduced
652
+ - **best-effort**: fix applied but couldn't fully verify (e.g., needs specific browser state)
653
+ - **reverted**: regression detected → `git revert HEAD` → mark finding as "deferred"
654
+
655
+ ### 8e.5. Regression Test (design-review variant)
656
+
657
+ Design fixes are typically CSS-only. Only generate regression tests for fixes involving
658
+ JavaScript behavior changes — broken dropdowns, animation failures, conditional rendering,
659
+ interactive state issues.
660
+
661
+ For CSS-only fixes: skip entirely. CSS regressions are caught by re-running /design-review.
662
+
663
+ If the fix involved JS behavior: follow the same procedure as /qa Phase 8e.5 (study existing
664
+ test patterns, write a regression test encoding the exact bug condition, run it, commit if
665
+ passes or defer if fails). Commit format: `test(design): regression test for FINDING-NNN`.
666
+
667
+ ### 8f. Self-Regulation (STOP AND EVALUATE)
668
+
669
+ Every 5 fixes (or after any revert), compute the design-fix risk level:
670
+
671
+ ```
672
+ DESIGN-FIX RISK:
673
+ Start at 0%
674
+ Each revert: +15%
675
+ Each CSS-only file change: +0% (safe — styling only)
676
+ Each JSX/TSX/component file change: +5% per file
677
+ After fix 10: +1% per additional fix
678
+ Touching unrelated files: +20%
679
+ ```
680
+
681
+ **If risk > 20%:** STOP immediately. Show the user what you've done so far. Ask whether to continue.
682
+
683
+ **Hard cap: 30 fixes.** After 30 fixes, stop regardless of remaining findings.
684
+
685
+ ---
686
+
687
+ ## Phase 9: Final Design Audit
688
+
689
+ After all fixes are applied:
690
+
691
+ 1. Re-run the design audit on all affected pages
692
+ 2. Compute final design score and AI slop score
693
+ 3. **If final scores are WORSE than baseline:** WARN prominently — something regressed
694
+
695
+ ---
696
+
697
+ ## Phase 10: Report
698
+
699
+ Write the report to both local and project-scoped locations:
700
+
701
+ **Local:** `.orch/design-reports/design-audit-{domain}-{YYYY-MM-DD}.md`
702
+
703
+ **Project-scoped:**
704
+ ```bash
705
+ source <(~/.claude/skills/orch/bin/orch-slug 2>/dev/null) && mkdir -p ~/.orch/projects/$SLUG
706
+ ```
707
+ Write to `~/.orch/projects/{slug}/{user}-{branch}-design-audit-{datetime}.md`
708
+
709
+ **Per-finding additions** (beyond standard design audit report):
710
+ - Fix Status: verified / best-effort / reverted / deferred
711
+ - Commit SHA (if fixed)
712
+ - Files Changed (if fixed)
713
+ - Before/After screenshots (if fixed)
714
+
715
+ **Summary section:**
716
+ - Total findings
717
+ - Fixes applied (verified: X, best-effort: Y, reverted: Z)
718
+ - Deferred findings
719
+ - Design score delta: baseline → final
720
+ - AI slop score delta: baseline → final
721
+
722
+ **PR Summary:** Include a one-line summary suitable for PR descriptions:
723
+ > "Design review found N issues, fixed M. Design score X → Y, AI slop score X → Y."
724
+
725
+ ---
726
+
727
+ ## Phase 11: TODOS.md Update
728
+
729
+ If the repo has a `TODOS.md`:
730
+
731
+ 1. **New deferred design findings** → add as TODOs with impact level, category, and description
732
+ 2. **Fixed findings that were in TODOS.md** → annotate with "Fixed by /design-review on {branch}, {date}"
733
+
734
+ ---
735
+
736
+ ## Additional Rules (design-review specific)
737
+
738
+ 11. **Clean working tree required.** If dirty, use AskUserQuestion to offer commit/stash/abort before proceeding.
739
+ 12. **One commit per fix.** Never bundle multiple design fixes into one commit.
740
+ 13. **Only modify tests when generating regression tests in Phase 8e.5.** Never modify CI configuration. Never modify existing tests — only create new test files.
741
+ 14. **Revert on regression.** If a fix makes things worse, `git revert HEAD` immediately.
742
+ 15. **Self-regulate.** Follow the design-fix risk heuristic. When in doubt, stop and ask.
743
+ 16. **CSS-first.** Prefer CSS/styling changes over structural component changes. CSS-only changes are safer and more reversible.
744
+ 17. **DESIGN.md export.** You MAY write a DESIGN.md file if the user accepts the offer from Phase 2.