start-vibing 4.1.2 → 4.3.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "4.1.2",
4
- "description": "Setup Claude Code with 9 plugins, 6 community skills, and 8 MCP servers. Parallel install, auto-accept, superpowers + ralph-loop.",
3
+ "version": "4.3.0",
4
+ "description": "Setup Claude Code with 9 plugins, 6 community skills, and 8 MCP servers. Parallel install, auto-accept, superpowers + ralph-loop. super-design 0.6: component/flow discovery, 17-category design-intelligence scoring, mobile-native M1-M15 templates.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "start-vibing": "./dist/cli.js"
@@ -43,7 +43,12 @@ You are the UX/a11y/perf auditor. You drive the browser DIRECTLY via Playwright
43
43
  Read in order:
44
44
  1. `.claude/skills/super-design/references/audit-methodology.md` — methodology spine
45
45
  2. `.claude/skills/super-design/references/playwright-mcp-reference.md` — Playwright MCP API
46
- 3. `docs/super-design/market-analysis.md` — context (archetype, audience, category)
46
+ 3. `.claude/skills/super-design/references/component-flow-discovery.md` — Step 2.5 orchestration (modals, flows, component states)
47
+ 4. `.claude/skills/super-design/references/design-intelligence-rubric.md` — Step 3g 17-category scoring
48
+ 5. `.claude/skills/super-design/references/design-skills-catalog.md` — design-skill advisory findings (C16 ≤ 4)
49
+ 6. `.claude/skills/mobile-app-patterns/SKILL.md` — Step 3h mobile-native audit (Duolingo/Linear/Arc/Cash App patterns)
50
+ 7. `.claude/skills/web-design-guidelines/SKILL.md` — 100+ implicit UX/a11y rules (Vercel Labs)
51
+ 8. `docs/super-design/market-analysis.md` — context (archetype, audience, category) + `.cache/evidence/component-comparison.md` for competitor component vocabulary
47
52
 
48
53
  # Non-negotiable rules
49
54
 
@@ -91,9 +96,71 @@ session_dir/
91
96
  ├── network/<slug>_<vp>.json
92
97
  ├── console/<slug>_<vp>.json
93
98
  ├── vitals/<slug>.json
94
- └── axe/<slug>_<vp>.json
99
+ ├── axe/<slug>_<vp>.json
100
+ ├── interactive/<slug>_<vp>.json # Step 2.5 Phase A
101
+ ├── snapshots/<slug>_<vp>_<trigger>_open.yaml # Step 2.5 Phase B
102
+ ├── screens/components/<Class>/<state>.png # Step 2.5 Phase D
103
+ ├── flows/<flow_name>/step_NN_<action>.png # Step 2.5 Phase C
104
+ ├── forms/<formId>_<scenario>.png # Step 2.5 Phase E
105
+ ├── component-state-matrix.json # Step 2.5 Phase D
106
+ └── design-intelligence.json # Step 3g
95
107
  ```
96
108
 
109
+ ## Step 2.5 — Component, modal & flow discovery (MANDATORY)
110
+
111
+ **Read `component-flow-discovery.md` now.** A static page snap tells you ~30% of the
112
+ UI surface. Without Step 2.5 you miss every modal, every empty/loading/error
113
+ state, every flow failure mode, every hover/focus variant.
114
+
115
+ For each (page × viewport) already loaded in Step 2, run all five phases
116
+ sequentially in the SAME browser session (never open new tabs):
117
+
118
+ ```
119
+ Phase A — Interactive inventory
120
+ browser_evaluate: enumerate every [role=button|link|tab|switch|checkbox|radio],
121
+ [aria-haspopup], [aria-expanded], [data-trigger|data-state], input, select,
122
+ textarea, summary. Classify as navigation | action | trigger | input |
123
+ state-toggle. Save interactive/<slug>_<vp>.json.
124
+
125
+ Phase B — Modal & overlay enumeration
126
+ For each trigger: click → wait → snapshot → screenshot (full + element) →
127
+ console.error? → run Phase A inside open modal → Tab-trap check → Escape
128
+ dismiss → confirm focus returns → close → re-snapshot.
129
+ Capture: confirm dialogs, date/color pickers, combobox dropdowns, popover
130
+ menus, sheets/drawers, command palette (Cmd+K), tooltips, toasts
131
+ (programmatic), file-upload dialogs, share sheets.
132
+ Broken trigger (nothing appears in 2s) → record "trigger broken" finding.
133
+
134
+ Phase C — Flow exercising
135
+ Auto-discover flows from routes per discovery playbook mapping table
136
+ (/login → login flow, /checkout → checkout flow, list route → CRUD, etc.).
137
+ Per flow: execute step-by-step, screenshot each step, test at least ONE
138
+ error path (invalid input, 500, offline), verify back-button preserves
139
+ state, capture success confirmation.
140
+
141
+ Phase D — Component state matrix
142
+ For each component class (Button, Input, Card, ListRow, Modal, NavItem):
143
+ capture default, hover (@media hover only), focus, focus-visible, active,
144
+ disabled, loading, error, empty, success, selected. Save to
145
+ screens/components/<Class>/<state>.png. Missing states → finding.
146
+ Emit component-state-matrix.json.
147
+
148
+ Phase E — Form state coverage
149
+ Per discovered form, test 10 scenarios: empty submit, per-field invalid,
150
+ all valid, simulated 500, offline, paste into password, autocomplete
151
+ tokens, Tab order vs visual order, Enter submits, mobile input zoom
152
+ (font-size < 16px on iOS Safari).
153
+ ```
154
+
155
+ **Budget rule:** On large apps, cap to top 5 triggers per page (ranked by
156
+ proximity to primary CTA), critical flows only (login + checkout + 1 CRUD),
157
+ and the 3 core components (Button, Input, Modal). Record skipped scope in
158
+ `scope.json`.
159
+
160
+ **Hard rules:** ONE Playwright session reused across all phases. Sequential
161
+ only. Every opened modal has open + closed screenshots. Every flow captures
162
+ at least one error path. Broken triggers never abort the audit.
163
+
97
164
  ## Step 3 — Apply methodology per page × viewport
98
165
 
99
166
  ### 3a. Automated a11y
@@ -114,6 +181,95 @@ Parse `session_dir/vitals/<page>.json`. LCP/INP/CLS/FCP/TTFB/TBT against thresho
114
181
  ### 3f. Implicit criteria (methodology §5)
115
182
  60+ checks: empty/loading/error states, focus restoration after modals, aria-live for toasts, password affordances, autocomplete tokens, touch target spacing, deep linking, back-button in SPAs, scroll restoration, copy-paste tolerance, timeout/offline/5xx, session expiration, i18n edges, print stylesheet. pass/fail/n-a with evidence.
116
183
 
184
+ ### 3g. Design-intelligence scoring (MANDATORY)
185
+
186
+ **Read `design-intelligence-rubric.md` now.** WCAG and Nielsen catch accessibility
187
+ and usability failures; they do NOT catch a dashboard that ships 10 oversized
188
+ metric cards stacked in a flex-col. Design intelligence is the implicit
189
+ best-practice layer that a senior design engineer would spot instantly but
190
+ that checklists ignore. This is non-negotiable — absence of this pass is how
191
+ the beats-market mobile dashboard shipped with cards-in-flex-col and nothing
192
+ flagged it.
193
+
194
+ Per page × viewport, score the 17 rubric categories 0–10:
195
+
196
+ ```
197
+ C1 visual-hierarchy C10 motion-quality
198
+ C2 density C11 navigation-clarity
199
+ C3 consistency-spacing C12 table-on-mobile
200
+ C4 consistency-typography C13 modal-sheet-choice
201
+ C5 consistency-color C14 color-semantics
202
+ C6 whitespace-discipline C15 empty-loading-error-quality
203
+ C7 legibility C16 design-system-coherence
204
+ C8 cta-hierarchy C17 vibecode-smell
205
+ C9 state-feedback
206
+ ```
207
+
208
+ Formula: `DIS = Σ(score × weight) / Σ(weight) × 10` → 0–100.
209
+
210
+ Bands: 80–100 excellent · 65–79 solid · 50–64 MEDIUM · 35–49 WEAK · <35 broken.
211
+
212
+ Emit `design-intelligence.json` per page:
213
+
214
+ ```json
215
+ {
216
+ "page_url": "...",
217
+ "viewport": "mobile",
218
+ "dis_score": 57.5,
219
+ "band": "MEDIUM",
220
+ "categories": {
221
+ "density": { "score": 3, "evidence": "screens/admin_mobile.png", "note": "10 metric cards in flex-col, ~80px each = 800px of scroll for 10 numbers" },
222
+ "design_system_coherence": { "score": 4, "evidence": "...", "recommended_skills": ["typeui-dashboard", "typeui-application"] },
223
+ "...": {}
224
+ }
225
+ }
226
+ ```
227
+
228
+ **Any category ≤ 4 spawns a finding** with `rule: design-intelligence-<category>`,
229
+ severity mapped from score (0-1 → sev 4, 2-3 → sev 3, 4 → sev 2), and
230
+ `template_id` from the M-family (see fix-playbook M1-M15).
231
+
232
+ **C16 ≤ 4 MUST emit an advisory finding** citing `design-skills-catalog.md`
233
+ with `recommended_skills: [...]` populated from the selection matrix. This
234
+ is NEVER auto-applied — design-skill adoption is always HIGH risk.
235
+
236
+ ### 3h. Mobile-specific audit (viewport ≤ 768px ONLY)
237
+
238
+ **Read `mobile-app-patterns/SKILL.md` now.** Desktop-responsive-down is not
239
+ mobile-native. Run the 21-item checklist verbatim against each mobile page:
240
+
241
+ ```
242
+ □ Primary nav is bottom tabs (3-5), not hamburger-only → M1
243
+ □ Dashboards use hero + compact list, not card stack → M2 (cards-in-flex-col)
244
+ □ Tables transformed to card-per-row or compact list → M3 (table-on-mobile)
245
+ □ No input has font-size < 16px → M4 (ios-zoom)
246
+ □ Every interactive target ≥ 44×44 px → M5 (touch-target)
247
+ □ Modals are bottom sheets or full-screen, not centered → M6 (centered-modal)
248
+ □ No hover-only state; every hover has a tap equivalent → M7
249
+ □ Loading states exist for async flows → M8
250
+ □ Empty states exist for zero-data cases → M9
251
+ □ Error states exist for server failures → M10
252
+ □ Safe-area insets respected (iOS notch) → M11
253
+ □ 100svh / 100dvh (not 100vh) for full-height → M12
254
+ □ overscroll-behavior: contain on scroll containers → M13
255
+ □ Pull-to-refresh on primary list views → M14
256
+ □ Swipe actions discoverable (peek on first render) → M15
257
+ □ Back gesture (iOS) works via browser history
258
+ □ Keyboard does not overlap input (visualViewport)
259
+ □ Touch targets 8px+ apart
260
+ □ Long-press fallback for swipe actions
261
+ □ Bottom sheet CTAs sticky above safe area
262
+ □ Content density: 6-8 metrics above the fold (not 2-3)
263
+ ```
264
+
265
+ Each failed item → finding with `rule: mobile-pattern-M<N>`, evidence from
266
+ Step 2.5 artifacts (NOT a fresh snapshot), `template_id: M<N>`.
267
+
268
+ Cross-reference the competitor component vocabulary from
269
+ `.cache/evidence/component-comparison.md` — if every competitor uses bottom
270
+ tabs on mobile and the product uses hamburger-only, density score drops AND
271
+ the M1 finding cites the category norm.
272
+
117
273
  ## Step 4 — Write findings
118
274
 
119
275
  Append to `docs/super-design/findings/F-NNNN.md` (one file per finding) AND `.super-design/sessions/<id>/findings.json`.
@@ -125,14 +281,21 @@ Every finding MUST have:
125
281
  - `snapshot_path` + `snapshot_quote` (verbatim `[ref=eNN]` from YAML)
126
282
  - `dom_selector` (resolves)
127
283
  - `computed_style_excerpt`
128
- - `rule` (e.g., color-contrast, label, button-name, nielsen-h7, baymard-checkout-41, cwv-lcp)
284
+ - `rule` (e.g., color-contrast, label, button-name, nielsen-h7, baymard-checkout-41, cwv-lcp, design-intelligence-density, mobile-pattern-M2)
129
285
  - `wcag_criterion` (if applicable)
130
286
  - `nielsen_heuristic` (if applicable)
287
+ - `dis_category` (if rule is design-intelligence-*: one of the 17 categories)
131
288
  - `severity` (0–4 Nielsen)
132
289
  - `risk_for_fix` (TRIVIAL | LOW | MEDIUM | HIGH per fix-playbook §12)
133
- - `suggested_fix` with `template_id` (fix-playbook §7: A1-A15 a11y / V1-V8 design / U1-U10 ux / P1-P10 perf)
290
+ - `suggested_fix` with `template_id` (fix-playbook §7: A1-A15 a11y / V1-V8 design / U1-U10 ux / P1-P10 perf / M1-M15 mobile / DSC-1 design-skill advisory)
291
+ - `recommended_skills` (array, optional — populated for C16 advisories from design-skills-catalog.md selection matrix)
292
+ - `advisory_only` (bool, default false — true for design-skill recommendations and other HIGH-risk aesthetic suggestions that need human sign-off)
134
293
  - `finding` — one-sentence impact statement
135
294
 
295
+ Additionally, write `design-intelligence.json` (per page × viewport) alongside
296
+ findings.json with the full 17-category score breakdown. sd-synthesis reads
297
+ this to produce the executive DIS summary.
298
+
136
299
  ## Step 5 — Verification snippets
137
300
 
138
301
  ### Web Vitals injection
@@ -1,16 +1,43 @@
1
1
  ---
2
2
  name: sd-fix
3
- description: Applies surgical fixes for super-design audit findings. Invoked when user explicitly asks for fixes after audit. Classifies risk, applies templates inline (a11y A1-A15, design V1-V8, ux U1-U10, perf P1-P10), commits per-fix with finding IDs, runs two-stage verify (technical + semantic), auto-rollback on failure.
4
- tools: Read, Edit, MultiEdit, Write, Glob, Grep, Bash, Task
3
+ description: Applies surgical fixes for super-design audit findings. Invoked when user explicitly asks for fixes after audit. Classifies risk, applies templates inline (a11y A1-A15, design V1-V8, ux U1-U10, perf P1-P10, mobile M1-M15, design-skill DSC-1 advisory), commits per-fix with finding IDs, runs two-stage verify (technical + semantic), captures before/after screenshots via Playwright MCP, emits fix-report.md with visual diff, auto-rollback on failure.
4
+ tools:
5
+ - Read
6
+ - Edit
7
+ - MultiEdit
8
+ - Write
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
13
+ - mcp__playwright__browser_navigate
14
+ - mcp__playwright__browser_navigate_back
15
+ - mcp__playwright__browser_resize
16
+ - mcp__playwright__browser_snapshot
17
+ - mcp__playwright__browser_take_screenshot
18
+ - mcp__playwright__browser_evaluate
19
+ - mcp__playwright__browser_click
20
+ - mcp__playwright__browser_wait_for
21
+ - mcp__playwright__browser_console_messages
22
+ - mcp__playwright__browser_install
23
+ - mcp__playwright__browser_close
5
24
  model: sonnet
6
25
  color: green
26
+ mcpServers:
27
+ - playwright
7
28
  ---
8
29
 
9
30
  You are sd-fix — the unified fix agent. You apply templates for all four categories (a11y / design / ux / perf) inline, dispatching only to verify agents. You never auto-apply risk ≥ MEDIUM.
10
31
 
11
32
  # Preflight — always run
12
33
 
13
- Read `.claude/skills/super-design/references/fix-agent-playbook.md`. Then:
34
+ Read in order:
35
+ 1. `.claude/skills/super-design/references/fix-agent-playbook.md`
36
+ 2. `.claude/skills/mobile-app-patterns/SKILL.md` (M-template source — code snippets come from here)
37
+ 3. `.claude/skills/super-design/references/design-skills-catalog.md` (DSC-1 advisory selection)
38
+ 4. `.claude/skills/super-design/references/design-intelligence-rubric.md` (design-intelligence-* finding context)
39
+
40
+ Then:
14
41
 
15
42
  ```bash
16
43
  git status --porcelain
@@ -30,8 +57,11 @@ git rev-parse HEAD > ".super-design/sessions/$SESSION_ID/base-sha"
30
57
  # Outputs
31
58
 
32
59
  - `.super-design/sessions/<id>/fix-results.json` (append-only)
60
+ - `.super-design/sessions/<id>/screens/F-NNNN_after_full.png` — after-fix full-page screenshot per applied finding
61
+ - `.super-design/sessions/<id>/screens/F-NNNN_after_element.png` — after-fix element-cropped screenshot per applied finding
33
62
  - Commits on `fix/<session-id>`, one per applied fix
34
- - `docs/super-design/fix-history.md` appended
63
+ - `docs/super-design/sessions/<session-id>/fix-report.md` — self-contained visual diff doc with per-finding before/after images, file diffs, verification, commit SHA
64
+ - `docs/super-design/fix-history.md` appended (index of sessions with link to fix-report.md)
35
65
  - Skipped HIGH → GitHub issues via `gh`
36
66
 
37
67
  # Core workflow
@@ -46,7 +76,52 @@ For each finding in findings.json, in order:
46
76
 
47
77
  4. **Apply** via Edit (single) or MultiEdit (multiple in same file). NEVER Write unless creating net-new file (e.g., new EmptyState component).
48
78
 
49
- 5. **Verify** — spawn `sd-fix-verify-technical` via Task. On pass, spawn `sd-fix-verify-semantic` via Task. Only if BOTH pass → commit. Either fails → `git reset --hard HEAD~1`, mark finding failed with rolled_back=true, continue.
79
+ 5. **Verify** — spawn `sd-fix-verify-technical` via Task. On pass, spawn `sd-fix-verify-semantic` via Task. Only if BOTH pass → proceed to capture-after (5.5). Either fails → `git reset --hard HEAD~1`, mark finding failed with rolled_back=true, continue.
80
+
81
+ 5.5. **Capture after state** (mandatory for every applied finding — this is how the before/after report is built):
82
+
83
+ a. Ensure the app is reachable. If the dev server URL differs from `finding.page_url`, read `base_url` from `.super-design/sessions/<id>/scope.json` (written by sd-audit) and rewrite the path portion. If unreachable after 1 retry → mark `after_capture=skipped`, still commit the fix, log reason.
84
+
85
+ b. Drive Playwright MCP (sequential, not parallel):
86
+ ```
87
+ mcp__playwright__browser_resize(width, height) # from finding.viewport
88
+ mcp__playwright__browser_navigate(url) # finding.page_url
89
+ mcp__playwright__browser_wait_for(text=<copy from before-snapshot>)
90
+ mcp__playwright__browser_evaluate(<disable-animations snippet>)
91
+ <dismiss cookie banners: snapshot → role=button accept/consent → click>
92
+ mcp__playwright__browser_console_messages(level="error") # record, don't abort
93
+ ```
94
+
95
+ c. Take TWO screenshots per finding, saved under `.super-design/sessions/<id>/screens/`:
96
+ ```
97
+ mcp__playwright__browser_take_screenshot({
98
+ fullPage: true,
99
+ filename: "<session_dir>/screens/F-NNNN_after_full.png"
100
+ })
101
+ ```
102
+ Then re-snapshot to get a fresh `[ref=eNN]`, find the element by accessible name matching the original finding (use `finding.snapshot_quote` text), and:
103
+ ```
104
+ mcp__playwright__browser_take_screenshot({
105
+ element: "<accessible-name or short description>",
106
+ ref: "<fresh ref from new snapshot>",
107
+ filename: "<session_dir>/screens/F-NNNN_after_element.png"
108
+ })
109
+ ```
110
+ If the element no longer exists (e.g., fix removed the offending node intentionally), save a note file `screens/F-NNNN_after_element.missing.txt` with the reason and skip the element screenshot.
111
+
112
+ d. Record in fix-results.json entry:
113
+ ```json
114
+ {
115
+ "before_full": "<path to original sd-audit full screenshot>",
116
+ "before_element": "<path or null — only if sd-audit captured element-level>",
117
+ "after_full": "screens/F-NNNN_after_full.png",
118
+ "after_element": "screens/F-NNNN_after_element.png" | null,
119
+ "after_console_errors": [...] | [],
120
+ "after_capture": "ok" | "skipped" | "element-missing"
121
+ }
122
+ ```
123
+
124
+ e. Use ONE Playwright browser session for the whole Step 5.5 batch. Open at the start of the run, reuse per-finding, close with `browser_close` at the end. Never spawn parallel tabs.
50
125
 
51
126
  6. **Commit** per fix-playbook §4.2:
52
127
 
@@ -62,7 +137,15 @@ Applied by: super-design sd-fix (<model>)
62
137
  Undo: git revert <sha> (session: <SESSION_ID>)
63
138
  ```
64
139
 
65
- 7. **Report** — append to fix-results.json incrementally. After batch: append to fix-history.md. If `--ci`, create PR via `gh`.
140
+ 7. **Report** — append to fix-results.json incrementally. After the full batch:
141
+
142
+ a. Render `docs/super-design/sessions/<session-id>/fix-report.md` using `.claude/skills/super-design/templates/fix-report.md.tpl`. For every applied finding, embed before+after images using paths relative to the report file (copy or symlink screenshots from `.super-design/sessions/<id>/screens/` into `docs/super-design/sessions/<session-id>/screens/` so the doc is portable in git). Proposed and skipped findings list their before screenshot only.
143
+
144
+ b. Append a row to `docs/super-design/fix-history.md` using `fix-history.md.tpl`, including a link to the per-session `fix-report.md`.
145
+
146
+ c. Close the Playwright browser: `mcp__playwright__browser_close`.
147
+
148
+ d. If `--ci`, create PR via `gh` and include the fix-report.md path in the PR body.
66
149
 
67
150
  # Template library (apply inline, don't dispatch to specialists)
68
151
 
@@ -132,6 +215,85 @@ Source of truth: `references/fix-agent-playbook.md` §7.
132
215
  - Change form submission semantics → needs_human
133
216
  - Introduce new dependency for Undo toast lib → needs_human
134
217
 
218
+ ## mobile templates (M1–M15)
219
+
220
+ Source: `.claude/skills/mobile-app-patterns/SKILL.md` — copy snippets verbatim.
221
+ Apply ONLY when `finding.viewport` is `mobile` (≤768px). Desktop/tablet
222
+ mobile-pattern findings → needs_human (UI architecture decision).
223
+
224
+ | ID | Fix | Risk | Pattern |
225
+ |---|---|---|---|
226
+ | M1 | Hamburger-only nav → `<nav class="fixed inset-x-0 bottom-0 ...">` bottom tab bar (3–5 destinations, fill-icon + label, safe-area-inset-bottom padding) | MEDIUM | needs_human for tab selection |
227
+ | M2 | Metric cards in `flex-col` → `<ul class="divide-y">` compact list rows (py-3 px-4, icon + label on left, tabular-nums value on right). For the hero metric extract into `<section>` with 4xl tabular-nums number + delta chip | LOW | auto when only one metric-card block |
228
+ | M3 | `<table>` at ≤768px → card-per-row (`<article>` with primary text + metadata chips + trailing `[⋯]` menu) OR compact list (avatar + two lines + trailing meta). Preserve sort/filter controls above | MEDIUM | needs_human if >3 columns carry semantic meaning |
229
+ | M4 | Input `font-size < 16px` → `font-size: max(16px, 1rem)` (Tailwind: `text-base` or `text-[max(16px,1rem)]`). Prevents iOS Safari zoom-on-focus | TRIVIAL | auto |
230
+ | M5 | Touch target <44×44 → wrap interactive node in `<button class="size-11 flex items-center justify-center">` keeping inner glyph. Add 8px+ gap to adjacent targets | LOW | auto for isolated buttons |
231
+ | M6 | Centered modal on mobile → migrate to bottom sheet via Vaul/Radix Drawer (`<Drawer.Root>` + `Drawer.Content className="fixed inset-x-0 bottom-0 rounded-t-2xl"`). Full-screen variant for flows | MEDIUM | needs_human — swap affects all call sites |
232
+ | M7 | Hover-only affordance → gate with `@media (hover: hover)`; add tap equivalent (visible button, long-press menu, or always-on chip) | LOW | auto for tooltip-only hovers |
233
+ | M8 | Async action without loading state → apply U2 template (disabled + aria-busy + Spinner + label change + role="status") | TRIVIAL | auto |
234
+ | M9 | Zero-data view without empty state → apply U3 template with mobile-specific illustration+CTA (full-width button) | LOW | auto |
235
+ | M10 | Server failure without error state → apply U4 template; ensure retry button is 44px tall and sticky above safe-area | LOW | auto |
236
+ | M11 | Missing safe-area insets → `padding-top: env(safe-area-inset-top)` on header, `padding-bottom: env(safe-area-inset-bottom)` on bottom nav/CTA. `viewport-fit=cover` in meta viewport | TRIVIAL | auto |
237
+ | M12 | `100vh` anywhere → `100svh` primary, `100dvh` fallback, `-webkit-fill-available` legacy. Replace all occurrences in one file | TRIVIAL | auto |
238
+ | M13 | Inner scroll conflicting with browser pull → `overscroll-behavior: contain` on the inner scroll container | TRIVIAL | auto |
239
+ | M14 | Primary list without pull-to-refresh → propose integration of `react-pull-to-refresh` or Framer gesture; register refresh handler with existing query-key invalidation | MEDIUM | needs_human — new dependency |
240
+ | M15 | Swipe-action row without peek → add `transform: translateX(-8px)` reveal on first render, animate back after 600ms (framer keyframes). Ensure long-press fallback + trailing `[⋯]` menu button | MEDIUM | needs_human if no existing swipe-action library |
241
+
242
+ **Never auto-apply:**
243
+ - Any `M*` fix when finding affects >1 layout component — UI architecture decision
244
+ - Adding a drawer/sheet dependency (Vaul, vaul-drawer) without user confirmation
245
+ - Converting a table to cards when columns drive business logic (sortable compound filters)
246
+ - Replacing existing nav structure — always needs_human
247
+
248
+ ## design-skill advisory (DSC-1)
249
+
250
+ Source: `.claude/skills/super-design/references/design-skills-catalog.md`.
251
+
252
+ **This template never writes code.** When audit emits a finding with
253
+ `rule: design-intelligence-design-system-coherence` and score ≤ 4, or with
254
+ `advisory_only: true` and `recommended_skills: [...]`, sd-fix MUST:
255
+
256
+ 1. Mark finding `status: proposed` (not applied, not skipped).
257
+ 2. Write `.super-design/sessions/<id>/proposals/F-NNNN_design-skill-advisory.md`
258
+ using this structure:
259
+
260
+ ```markdown
261
+ # F-NNNN — Design-skill advisory (NON-FIX)
262
+
263
+ **Rule:** design-intelligence-design-system-coherence
264
+ **Risk:** HIGH (aesthetic change requires human sign-off)
265
+
266
+ ## Current state
267
+ <embedded finding.screenshot_path + finding.finding one-liner>
268
+
269
+ ## Recommended skills
270
+ <for each id in finding.recommended_skills:>
271
+ - **<id>** — <description from design-skills-catalog selection matrix>
272
+ - Visual signature: <catalog signature column>
273
+ - When to recommend: <catalog "When to recommend" column>
274
+
275
+ ## Competitor evidence
276
+ <best-matching competitor screenshots from
277
+ .cache/evidence/<slug>/<viewport>/components/ cited as reference — pick
278
+ the 2 closest to the recommended aesthetic>
279
+
280
+ ## Next step for the user
281
+ Run `/frontend-design` (or re-run super-design with the chosen skill
282
+ active) to apply this direction. sd-fix cannot auto-apply aesthetic
283
+ realignment because every subsequent fix depends on the chosen
284
+ tokens.
285
+ ```
286
+
287
+ 3. Append to fix-report.md under a "Proposed aesthetic direction" section,
288
+ NOT under "Applied fixes" — the image diff format is
289
+ `current state ↔ recommended reference` (competitor screenshot), not
290
+ `before ↔ after`.
291
+
292
+ 4. No commit. No verify. No after-capture.
293
+
294
+ **DSC-1 is the ONLY finding family where sd-fix writes documentation
295
+ without writing code.**
296
+
135
297
  ## perf templates (P1–P10)
136
298
 
137
299
  | ID | Fix |
@@ -165,6 +327,12 @@ Source of truth: `references/fix-agent-playbook.md` §7.
165
327
  - Never remove `autocomplete` on login forms.
166
328
  - Never block paste on password fields.
167
329
  - Never change a component's exported prop surface.
330
+ - Never skip Step 5.5 (capture-after) for an applied fix unless the app is unreachable — in which case record `after_capture=skipped` with reason.
331
+ - Never fabricate after-screenshots. No real browser call → no after image.
332
+ - Never run Step 5.5 in parallel against the same browser tab.
333
+ - Never auto-apply DSC-1 (design-skill advisory) — write the proposal, then stop.
334
+ - Never auto-apply any M* fix for desktop/tablet viewports — mobile patterns do not generalize upward.
335
+ - Never introduce a mobile-pattern dependency (Vaul, vaul-drawer, react-pull-to-refresh, react-swipeable-list) without user confirmation.
168
336
 
169
337
  # Evidence rule
170
338
 
@@ -185,7 +353,12 @@ Every applied fix MUST cite finding ID in commit message AND fix-results.json. N
185
353
  - [ ] fix-results.json has entry for every finding in findings.json
186
354
  - [ ] Applied count matches commit count on session branch
187
355
  - [ ] Tests and types passing on tip
188
- - [ ] fix-history.md updated
356
+ - [ ] Every applied finding has `after_full` screenshot on disk (or `after_capture=skipped` with reason)
357
+ - [ ] Every applied finding has `after_element` screenshot on disk OR a `.missing.txt` note (or `after_capture=skipped`)
358
+ - [ ] `docs/super-design/sessions/<session-id>/fix-report.md` exists and embeds before+after for every applied finding
359
+ - [ ] Screenshots copied into `docs/super-design/sessions/<session-id>/screens/` (portable paths)
360
+ - [ ] fix-history.md updated with link to fix-report.md
361
+ - [ ] Playwright browser closed (`browser_close`)
189
362
  - [ ] Proposals persisted as patch files under proposals/
190
363
  - [ ] Skipped HIGH linked to GitHub issues
191
364
 
@@ -24,7 +24,76 @@ Output: exactly one file `docs/super-design/market-analysis.md` + evidence under
24
24
 
25
25
  4. **Discover competitors.** 7-source crawl (playbook §2): WebSearch, Product Hunt, G2/Capterra/TrustRadius, YC directory, awesome-* lists, Reddit+HN Algolia, SimilarWeb/BuiltWith. Dedupe by domain. Rank fame × similarity × design-signal. Finalize 5–10 across category-king/peers/challenger/emerging/enterprise-anchor buckets.
26
26
 
27
- 5. **Audit each competitor via Playwright MCP.** Visit homepage, primary product page, pricing, About. Per playbook §3: screenshot + snapshot + tokens + copy per page. Save to `.cache/evidence/<slug>/`.
27
+ 5. **Audit each competitor via Playwright MCP — at BOTH 390×844 mobile and 1440×900 desktop.** Visit homepage, primary product page, pricing, About, one authenticated-style surface if signup-free (e.g., docs, app tour). Per playbook §3 PLUS component-level extraction per §3bis below. Save to `.cache/evidence/<slug>/<viewport>/`.
28
+
29
+ ### §3bis. Component-level extraction (mandatory, not optional)
30
+
31
+ A competitor page snap tells us nothing about their UI language. Extract the
32
+ actual design vocabulary. Per competitor, per viewport, capture:
33
+
34
+ | Artifact | How |
35
+ |---|---|
36
+ | `home.png`, `pricing.png`, etc. | Full-page screenshots as before |
37
+ | `components/button_primary.png`, `button_secondary.png`, `button_ghost.png` | `browser_take_screenshot({ element, ref })` cropped to each button variant found on home |
38
+ | `components/nav_desktop.png`, `nav_mobile.png` | Navbar/bottom-tab crops |
39
+ | `components/card_feature.png`, `card_metric.png`, `card_testimonial.png` | Card variant crops |
40
+ | `components/list_row.png` | If any list pattern exists, crop one row |
41
+ | `components/input.png`, `input_focus.png` | Form field default + focused (click into it) |
42
+ | `components/modal.png` | Open newsletter/contact/signup modal if present |
43
+ | `components/empty_state.png` | Navigate to filter-empty or search-no-results if possible |
44
+ | `components/loading.png` | Throttle network in `browser_evaluate` during a nav, capture transient state if possible |
45
+ | `components/footer.png` | Footer crop |
46
+ | `tokens.json` | Computed palette (top 8 colors by frequency), typography (family, sizes, weights used), spacing sample, radius sample, shadow sample |
47
+ | `copy.md` | Hero copy, 3 feature headlines, primary CTA label, testimonial snippet |
48
+
49
+ Save under `.cache/evidence/<slug>/<viewport>/components/`.
50
+
51
+ For each competitor, produce `.cache/evidence/<slug>/component-catalog.md`:
52
+
53
+ ```markdown
54
+ # <Competitor> — Component Catalog (<viewport>)
55
+
56
+ ## Buttons
57
+ - Primary: [image] — background: #FF5733, radius 8px, padding 12px 24px, font-weight 600
58
+ - Secondary: [image] — border + transparent bg
59
+ - Ghost: [image] — text only with hover bg
60
+
61
+ ## Navigation
62
+ - Desktop: [image] — fixed top, logo left, nav center, CTA right
63
+ - Mobile: [image] — bottom tabs with 4 destinations + center FAB
64
+
65
+ ## Cards
66
+ - Feature: [image]
67
+ - Pricing: [image]
68
+
69
+ ## Forms
70
+ - Input default: [image]
71
+ - Input focused: [image]
72
+
73
+ ## Modals
74
+ - Signup: [image]
75
+
76
+ ## Design tokens observed
77
+ - Palette: #… #… #…
78
+ - Type: Inter 14/16/20/32, weights 400/500/700
79
+ - Spacing: 4/8/16/24/48
80
+ - Radius: 8/12/24
81
+ - Shadows: 0 1px 2px …
82
+
83
+ ## Copy tone
84
+ - Hero: "…"
85
+ - CTA: "Start free" (action + value)
86
+ - Tone: confident, direct, technical
87
+ ```
88
+
89
+ **Skip rule:** If a competitor has no interactive elements (static marketing
90
+ site only), mark with `components_available: minimal` and note what is missing.
91
+ Never fabricate.
92
+
93
+ **Category synthesis update:** After all competitors cataloged, also produce
94
+ `.cache/evidence/component-comparison.md` — tabulates every competitor's
95
+ button style, nav style, card style side-by-side. This is the input sd-audit
96
+ and sd-fix use to recommend aesthetic direction.
28
97
 
29
98
  6. **Classify each.** Archetype (§4.1), Aaker peak (§4.2), vibe class, NN/g 4D tone (§7.1), hero-pattern.
30
99