Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

ux-audit: 5 additions from vite-flare-starter v2 review

Jeremy Dawesd7b8d531e083
diff --git a/plugins/dev-tools/skills/ux-audit/SKILL.md b/plugins/dev-tools/skills/ux-audit/SKILL.md
index bb20b803..bd9ef573 100644
--- a/plugins/dev-tools/skills/ux-audit/SKILL.md
+++ b/plugins/dev-tools/skills/ux-audit/SKILL.md
@@ -1,83 +1,152 @@
---
name: ux-audit
-description: "Exhaustive UX audit of a web app. Walks every thread a real user would follow, tests every interactive element, runs visual polish sweep (AI-tells, optical centring, design-token discipline, animation timings) and scenario battery (keyboard-only, heavy data, destructive actions, second user, interrupted workflow, wrong turn, returning user, first contact), produces ranked findings with screenshots, then offers a fix-and-verify loop. Requires a persona. Trigger with 'ux audit', 'dogfood this', 'audit the app', 'qa sweep', 'exhaustive test', 'check all pages'."
+description: "Walk through a live web app AS a real user to find usability + behavioural bugs that static reviews miss. REQUIRES proof of interaction (typing, clicking, sending, observing) before any verdict — a sweep that didn't interact terminates with verdict 'Incomplete'. Walks threads, exercises every element, runs the multi-pane stress matrix, visual polish sweep, component perfection checklist, scenario battery (9 scenarios), and stress recipes. Hard gates: console errors/warnings = 0, network 5xx = 0, layout collapse = 0. Each finding has reproduction steps, evidence path, and suspected code location. Trigger with 'ux audit', 'walkthrough', 'qa sweep', 'audit the app', 'dogfood this', 'check all pages', 'find what's broken', 'stress the UI'."
compatibility: claude-code-only
---
-# UX Audit
+# UX Audit (v2)
-Exhaustively audit a web app from the perspective of a real user. Two lenses, combined:
+Walk through a live web app AS a real user. The audit is **interaction-first** — typing, clicking, sending, watching, screenshotting. A static DOM sweep cannot produce a verdict.
-- **Flow lens** — walk the 3–5 real tasks a user would do ("threads"). Count clicks, mark dead ends, screenshot every state change.
-- **Element lens** — after threads, sweep every interactive element not already hit. Forms, menus, toggles, edge data volumes.
-- **Polish lens** — page-by-page visual polish sweep covering optical centring, design-token discipline, off-scale spacing, animation timings, and the other patterns that mark UIs as machine-generated.
+## Why this skill exists in v2
-Then run an eight-scenario battery (first contact, interrupted workflow, wrong turn recovery, returning user, keyboard only, heavy data, destructive confidence, second user) and close with a fix-and-verify loop for critical findings.
+Most catastrophic UX bugs only surface under interaction:
-This is the thorough one. There is no quick mode. If the user wants a targeted check ("audit the dashboard"), scope the audit to that area — but within that area, still go exhaustive. Runtime is unbounded: assume a long-running session, write findings to the report incrementally, don't batch.
+- The Send button that doesn't clear the input
+- The @-mention picker that double-inserts the handle
+- The thread pane that breaks layout when the sidebar is also open at 1280px
+- The form submit that disables the button but silently 5xx's
+- The console warning that's been logging for weeks but no audit ever flagged
-## Setup
+A DOM probe sees none of these. They require: type → wait → screenshot → diff → console-read → repeat. The previous audit method drifted toward sweep mode (faster, feels productive, blind to behaviour). v2 makes that drift impossible — the agent cannot output "Pass" without an Interaction Manifest that proves real clicks happened.
-Four things before any browsing. Stop if any fail.
+## Verdict states
-### 1. Browser tool
+The audit ends in exactly one of:
-| Target | Tool | Why |
-|--------|------|-----|
-| **Authenticated app** (internal tools, client apps) | Chrome MCP | Uses your real logged-in Chrome session — OAuth, cookies, RBAC just work |
-| **Public site** (marketing, competitor, unauthed) | Playwright MCP | No login needed |
-| **Neither available** | **Stop** | Ask the user to connect Chrome MCP or install Playwright |
+- **Pass** — Critical = 0, High = 0, all hard gates green, Interaction Manifest complete.
+- **Conditional Pass** — Critical = 0, High = 0, all hard gates green, but Medium/Low present.
+- **Fail** — at least one Critical or High finding, OR a hard gate red.
+- **Incomplete** — Interaction Manifest missing required entries, or a phase wasn't run. Not legal to upgrade to Pass even if everything observed looked fine.
-Do **not** silently fall back to a fresh Playwright session for an authenticated app — the audit is worthless if you can't log in. If Chrome MCP isn't connected, stop and say: *"Open Chrome, click Connect in the Claude extension, then rerun."*
+If the work doesn't include a complete Interaction Manifest, the only legal verdict is **Incomplete**. "It looked OK" is not Pass.
-See [references/browser-tools.md](references/browser-tools.md) for commands.
+## Hard gates
-### 2. URL
+These auto-fail the audit. They cannot be downgraded.
-Prefer the deployed/live version — that's what real users see.
+| Gate | Threshold | Severity if violated |
+|------|-----------|----------------------|
+| Console errors during walkthrough | > 0 | Critical |
+| Console warnings during walkthrough | > 0 | High |
+| Network 5xx | > 0 | Critical |
+| Network 403 / 404 on authenticated pages | > 0 | High |
+| Layout collapse at any tested viewport / pane combo | > 0 | High |
+| Required Interaction Manifest entry missing | n/a | Incomplete |
-1. Check `wrangler.jsonc` for `pattern` or `custom_domain`
-2. Check CLAUDE.md, README, `package.json` `homepage` field
-3. Fall back to `lsof -i :5173 -i :3000 -i :8787 -t` for a running dev server
-4. Ask the user
+A console warning is High *minimum*. A 5xx is Critical *automatically*. There is no "Medium console error" — that category does not exist in this skill.
-Live site has real auth, real latency, real CDN and CORS behaviour. Local misses deployment-specific bugs (missing env vars, broken asset paths, CORS, slow APIs). Only use local if the user asks or the feature isn't deployed.
+### Allowlist for known noise
-### 3. Viewport
+Some apps have known-noisy console / network categories that aren't bugs — Sentry info logs in dev, third-party CDN deprecation chatter the team can't fix, expected 401s on auth-check probes. Without an escape hatch the skill drowns the report in non-findings.
-Pin the window at the start:
+If the project ships an audit-config file at any of these paths, read it before Phase 3 and apply the allowlist when classifying findings:
-```
-width: 1440, height: 900
+```yaml
+# .jez/audit-config.yml (or audit-config.json — first match wins)
+console_allow:
+ - "[Sentry] DSN not configured" # dev-only info log
+ - "Lighthouse Tools is loaded" # browser extension chatter
+ - "/^Download the React DevTools/" # leading + trailing slash = regex
+network_allow:
+ - "GET https://o*.ingest.sentry.io" # Sentry probe — 401 expected when DSN missing
+ - "GET /api/auth/get-session 401" # unauth-on-load probe pattern
```
-This is the standard MacBook resolution and the audit's baseline. Responsive sweep (below) also tests 1280, 1024, 768, 375. **Do not go above 2000px wide** — it breaks the harness.
+Allowlist semantics:
-### 4. Persona
+- Plain string — substring match against the message / URL
+- `/regex/` — full regex match
+- Allowlisted entries are still recorded in the Interaction Manifest (transparency) but suppressed from the findings count.
+- The Verdict block always shows raw counts AND allowlisted counts — `Console warnings: 3 (1 allowlisted, 2 reportable)`.
-The audit needs a persona. Without one, findings drift toward generic "looks fine". Source in order:
+If no audit-config exists, default behaviour: every console error / warning is a finding. The allowlist is opt-in per project, not a global escape hatch.
+
+When you find yourself wanting to allowlist something for the first time on a project, add it to the file with a one-line comment explaining *why* it's allowed — future audits should be able to re-justify each entry.
+
+## Phases (in order)
+
+1. **Pre-flight** — Persona Lock, browser tool, URL, viewport, capability tests
+2. **Discovery** — sitemap, thread inventory, element inventory
+3. **Walkthrough** — Interaction Manifest, threads, element exhaustion, multi-pane stress, first-time-user lens, live interaction smoke
+4. **Polish** — visual polish sweep, component perfection checklist
+5. **Stress** — scenario battery (9 scenarios) + extended stress recipes
+6. **Verdict** — verdict state, hard-gate scorecard, perfection roadmap, findings with reproduction
+7. **Fix-and-verify** — patch findings, re-walk affected slices, update report
+
+This is the thorough audit. There is no quick mode. For a 30-second pre-deploy check, use the dogfood drill at the bottom of this file — it's a project-level rule, not a skill invocation.
+
+## Phase 1 — Pre-flight
+
+Five gates. Stop if any fail.
+
+### 1. Persona Lock
+
+The audit needs a persona before anything else. Without a locked persona, findings drift toward generic "looks fine".
+
+Source the persona in this order:
1. **Argument** — if the user provided one ("ux audit as a busy insurance broker")
-2. **Project personas** — read `.jez/personas/default.md` and `.jez/personas/<app-name>.md` if they exist
-3. **Ask** — if neither, ask one question: *"Who uses this app and what are they trying to get done?"*
+2. **Project personas** — read `.jez/audit-personas/<slug>.md`, `.jez/personas/default.md`, or `.jez/personas/<app-name>.md` if they exist
+3. **Ask once** — *"Who uses this app and what are they trying to get done?"*
Capture: role, tech comfort, time pressure, emotional state, device context. A good persona predicts what they'd miss ("A receptionist between phone calls won't scroll below the fold").
-**Always also run the first-time-user lens** (see below) on every multi-page feature, even when the explicit persona is something else. It's the single biggest blind spot for AI / internal tooling — engineers writing the screen know what every field means, brand-new users don't.
+Lock the persona by writing the chosen persona at the top of the audit report. Every finding must be defensible from this persona's perspective. If you catch yourself thinking *"a developer would know..."* — stop. Your persona doesn't.
-### 5. Screenshot post-processing
+**Always also run the first-time-user lens** (mandatory, see Phase 3) on every multi-page feature, even when the explicit persona is something else. It's the single biggest blind spot for AI / internal tooling.
-On Retina Macs, Chrome captures screenshots at 2× the logical viewport — a 1440×900 window produces a 2880×1800 PNG. That's larger than the vision pipeline needs and wastes context. Downsize screenshots after each capture phase:
+See [references/persona-lock.md](references/persona-lock.md) for the persona library and writing protocol.
-```bash
-img-process batch ./screenshots --action optimise --max-width 1440
-```
+### 2. Browser tool
+
+| Target | Tool | Why |
+|--------|------|-----|
+| **Authenticated app** | Chrome MCP | Uses your real logged-in Chrome session — OAuth, cookies, RBAC just work |
+| **Public site** | Playwright MCP | No login needed |
+| **Neither available** | **Stop** | Ask the user to connect Chrome MCP or install Playwright |
+
+Do **not** silently fall back to a fresh Playwright session for an authenticated app — the audit is worthless if you can't log in. If Chrome MCP isn't connected, stop and say: *"Open Chrome, click Connect in the Claude extension, then rerun."*
+
+See [references/browser-tools.md](references/browser-tools.md) for commands.
+
+### 3. URL
+
+Prefer the deployed/live version — that's what real users see.
+
+1. Check `wrangler.jsonc` for `pattern` or `custom_domain`
+2. Check CLAUDE.md, README, `package.json` `homepage` field
+3. Fall back to `lsof -i :5173 -i :3000 -i :8787 -t` for a running dev server
+4. Ask the user
+
+Live site has real auth, real latency, real CDN and CORS behaviour. Local misses deployment-specific bugs. Only use local if the user asks or the feature isn't deployed.
+
+### 4. Viewport
-The `optimise` action is idempotent — no-op if already ≤ 1440px, downsize otherwise. Safe to run unconditionally, on every folder, at any point. At minimum, run it after each thread traversal and after the responsive sweep.
+Pin the window at 1440×900 to start. Phase 3 multi-pane stress tests 375 / 768 / 1024 / 1280 / 1440 / 1920. **Do not go above 2000px** — it breaks the harness.
-Playwright MCP users can set `deviceScaleFactor: 1` in the browser context to sidestep this entirely — screenshots match viewport 1:1. Chrome MCP has no equivalent flag, so post-process instead.
+### 5. Capability tests
-## Discovery
+Before any walkthrough, prove the tools work — one call each:
+
+- One screenshot
+- One console read
+- One network request inventory
+- One element selector query
+
+If any fail, stop and fix the connection before starting the audit. An audit blind to console output is worthless.
+
+## Phase 2 — Discovery
### Sitemap crawl
@@ -93,342 +162,348 @@ One line per route, with purpose: `/app/clients — list of clients, search, add
Identify 3–5 real tasks that make up a user's day. These are the spines of the audit.
-Examples:
-- **Insurance broker app**: renew a policy, create a new client, work through today's queue
-- **Project management**: morning triage, update a task, send a client summary
-- **SEO tool**: check latest crawl, diagnose a regression, export a report
+How to find them: ask the user, read CLAUDE.md / README, infer from top-level nav. Examples: insurance broker → renew a policy, create a client, work today's queue. Project management → morning triage, update a task, send a client summary. Spaces / chat app → create a space, send a message, open a thread.
-How to find them:
-- Ask the user if they know the app's use cases
-- Read CLAUDE.md / README for "what this app does"
-- Infer from top-level nav — each major section usually maps to a thread
+### Element inventory
-Write them down. They structure the traversal phase.
+For each route as you reach it, list every interactive element. Build inventories lazily — per-page as you traverse, not all up-front. This drives the coverage metric: *"tested 29 of 31 elements on /app/clients"*.
-### Element inventory
+## Phase 3 — Walkthrough (the audit itself)
-For each route as you reach it, list every interactive element:
+### Interaction Manifest (MANDATORY)
+
+Every walkthrough produces a manifest. Without it, verdict = Incomplete.
```
-/app/clients — 31 elements
- Buttons: Add Client, Import, Export, Filter, Sort (5)
- Inputs: Search
- Table: row-click ×N, star toggle ×N, action menu ×N
- Pagination: Next, Prev, page numbers, items-per-page
+INTERACTION MANIFEST — /dashboard/spaces/marketing-pod
+ Persona: SME owner, time-pressed, low tech comfort
+ [✓] 14:32:01 Typed "@assistant test" into message input (textarea[placeholder*="message"])
+ [✓] 14:32:03 Picked @assistant from autocomplete (li[data-mention-id="assistant"])
+ [✓] 14:32:05 Clicked Send (button[aria-label="Send"])
+ [✓] 14:32:06 Verified input cleared within 1000ms (textarea.value === "")
+ [✓] 14:32:08 Verified message appeared in transcript ([data-message-id] count +1)
+ [✓] 14:32:12 Opened thread on the message ([data-thread-trigger])
+ [✓] 14:32:13 Verified main column width ≥ 200px after thread open (getBoundingClientRect().width)
+ [✓] Console read after each step (0 warnings, 0 errors)
+ [✓] Screenshot before + after each step
+ [✓] Network requests inventoried (0 5xx, 0 403/404 on auth pages)
```
-This inventory powers the coverage metric. After the audit you can say *"tested 29 of 31 elements on /app/clients; 2 pagination controls not reached due to data volume"*. Coverage becomes arithmetic, not a vibe.
+Every checkbox needs a tool call (a click, a screenshot, a console read) and the timestamps + selectors are logged. The agent cannot produce a "Pass" report without a complete manifest.
-Build inventories lazily — per-page as you traverse, not all up-front.
+**Required entries per page audited**:
-## First-time-user lens (mandatory)
+- ≥ 1 input typed into (real text, not just clicked)
+- ≥ 1 primary action triggered (Send / Save / Submit / Create / Publish — whichever fits)
+- ≥ 1 modal or detail pane opened
+- ≥ 1 console read after the primary action
+- ≥ 1 screenshot before AND after the primary action
+- Verification of expected post-action state (input cleared, success toast, route change, list updated)
-Every multi-page feature the audit covers must pass the **first-time
-user** check. This catches the single biggest UX failure mode in
-internal/AI tooling: features built by the people who designed them
-work *for them*, but a brand-new user landing on the same screen has
-no idea what any of the controls mean, what to type into the inputs,
-or what defaults to keep.
+Full template + replay protocol in [references/interaction-manifest.md](references/interaction-manifest.md).
-Run the lens like this. Adopt the persona of *someone signing in to
-this app for the very first time, with no prior context, no source
-access, no internal documentation*. Before each screen you audit, ask:
+### Thread Traversal
-| Question | What it catches |
-|---|---|
-| Could I complete the task without reading the code or docs? | Hidden technical knowledge baked into the form |
-| Are the field labels in plain language, not internal vocabulary? | `agentClass`, `slug`, `agentName`, `webhook_id`, `instance_id` leaking into UI |
-| Do dropdowns / pickers show **what each option does**, not just an ID? | Snake_case enums, raw class names, opaque slugs |
-| Are defaults sensible enough that I can keep them and move on? | Required fields with no defaults, mandatory ID inputs |
-| When I'm asked to enter something, is there a discoverable list of valid values? | Free-text inputs where a combobox / picker should be |
-| If I'd say "click Skip" because I don't understand a setting, that's a UX bug. | Optional-but-confusing settings exposed as primary inputs |
+For each thread:
-When the lens fires, log a finding even if the screen technically
-works. The fix is usually one of:
+1. **Start from the app entry point** — not mid-thread. Real users land at `/` or `/dashboard`.
+2. **Walk as the persona** — if they'd skim, skim. If they'd misread a label, misread it. Note hesitations.
+3. **Screenshot every state change** — default → hover/focus → active → after click → after load → confirmation. The filmstrip is the evidence.
+4. **Track the cost** — click count, decision points, dead ends, interrupt recovery (close tab at step 3, return at step 4 — did state survive?)
+5. **Hand screenshots to a sub-agent for review** at the end of each thread.
-- **Replace text inputs with pickers** that read from a discovery
- endpoint and show display names + descriptions
-- **Surface metadata** on every primitive (agent / tool / skill /
- channel / role / outcome) so UIs never fall back to raw IDs
-- **Auto-derive** values that the user shouldn't have to invent
- (instance names, slugs, IDs)
-- **Hide internal IDs** under an "Advanced" disclosure so they're
- available for debugging but invisible by default
-- **Add inline guidance** ("Use this when…", "Pick the routine that…")
- next to each control rather than gating users on tribal knowledge
+At the end of each thread, answer (as the persona): *Did it end clearly? Would I come back? One thing to make this twice as easy?*
-The lens applies to both new screens being audited and existing screens
-being polished. A screen passes the lens when a brand-new persona could
-complete the screen's task without back-channel help.
+See [references/walkthrough-checklist.md](references/walkthrough-checklist.md) and [references/workflow-comprehension.md](references/workflow-comprehension.md).
-## Thread Traversal (primary phase)
+### Element Exhaustion
-For each thread:
+For each route, work the inventory. Skip elements already exercised by thread traversal. Detail in [references/walkthrough-checklist.md](references/walkthrough-checklist.md).
-1. **Start from the app entry point** — not mid-thread. Real users land at `/` or `/dashboard`.
-2. **Walk as the persona** — if they'd skim, skim. If they'd misread a label, misread it. Note the hesitations.
-3. **Screenshot every state change** — default → hover/focus → active → after click → after load → confirmation. Meaningful transitions, not every pixel movement. With modern context windows and sub-agent review, don't scrimp — the filmstrip is the evidence.
-4. **Track the cost**:
- - Click count from entry to completion
- - Decision points (moments you stopped to think)
- - Dead ends (wrong paths and backtracks)
- - Interrupt recovery (close the tab at step 3, return at step 4 — did state survive?)
-5. **Hand screenshots to a sub-agent for review** — at the end of each thread, dispatch: *"Here are 42 screenshots from Thread 2 (Create Client). Flag every moment of: unclear next action, broken visual hierarchy, lost context, confusing copy, missing feedback, anxiety, or 'did that work?'. Return structured findings."* The sub-agent returns a list; you stay focused on driving the browser.
+For **every list/table**, test at volumes 0 / 1 / 100 / 1000+ if data permits.
+
+### Multi-Pane Stress (mandatory for apps with collapsible UI)
-At the end of each thread, answer three questions (as the persona):
-- **Did it end clearly?** Did I know the task was done?
-- **Would I come back?** Confidence, trust, momentum.
-- **One thing to make this twice as easy?** Often the most actionable insight in the report.
+Pane combinations are where the worst layout bugs hide — including the 2026-04-29 vertical-text-in-spaces bug, which only manifested at 1024-1280px with all three panes open. Skipping this phase means missing this class of bug entirely.
-See [references/walkthrough-checklist.md](references/walkthrough-checklist.md) for per-screen evaluation prompts and [references/workflow-comprehension.md](references/workflow-comprehension.md) for wayfinding, mental model, and page-to-page continuity.
+For apps with sidebars, members panels, threads, drawers, sheets:
-## Element Exhaustion (completeness phase)
+| Viewport | Panes | What to capture |
+|----------|-------|-----------------|
+| 1920 | All open | Baseline — should always work |
+| 1440 | All open | Common dev resolution |
+| 1280 | All open | Where layout collapses start |
+| 1024 | All open | Tablet landscape — high-bug zone |
+| 1024 | 2-pane (drop one) | Verify graceful degradation |
+| 1024 | 1-pane (mobile-style) | Should fold cleanly |
+| 768 | All collapsible closed | Tablet portrait |
+| 375 | Mobile baseline | Mobile |
-For each route, work the inventory. Skip elements already exercised by thread traversal.
+For each combination: scroll the longest content, capture a screenshot, run the layout-detection JS to flag overflow / clipping / vertical-text-stacks (every character on its own line), and verify min-content widths.
-| Element type | Test |
-|--------------|------|
-| Button | Click, screenshot result. If it opens a modal → test the modal. If it triggers an action → verify feedback. |
-| Link | Follow it. Destination matches the label? |
-| Input | Valid, invalid, empty, very long, special characters (`O'Brien`, `café`, emoji, `<script>`). |
-| Select / dropdown | Every option. Verify behaviour per option. |
-| Toggle / checkbox | On, off. Persistence on refresh? |
-| Tab | Every tab. URL updates? Back button works? |
-| Accordion | Expand, collapse. State saves? |
-| Menu / context menu | Every item. Right-click for context menus. |
-| Drag handle | Drag to new position. Drag to invalid target. |
-| Pagination | Next, prev, jump, items-per-page. |
+Detail + automation snippets in [references/multi-pane-stress.md](references/multi-pane-stress.md).
-For **every form**:
-- Valid data → verify creation/update/confirmation
-- Invalid data → field-level error, form state preserved
-- Empty submit → required-field marking
-- Tab through fields → focus order logical
+### First-time-user lens (mandatory)
-For **every list/table**, test at these volumes if data permits:
-- 0 items (empty state)
-- 1 item (pluralisation edge case)
-- 100 items (pagination)
-- 1000+ items (virtualisation, search, filter performance)
+Beyond the locked persona, every multi-page feature must pass the **first-time user** check. This catches the single biggest UX failure mode in internal/AI tooling: features built by the people who designed them work *for them*, but a brand-new user landing on the same screen has no idea what any of the controls mean.
-Write findings to the report as you go. Don't hold them in memory.
+Adopt the persona of *someone signing in to this app for the very first time, with no prior context, no source access, no internal documentation*. For each screen ask:
-## Responsive Sweep
+| Question | What it catches |
+|---|---|
+| Could I complete the task without reading the code or docs? | Hidden technical knowledge baked into the form |
+| Are field labels in plain language, not internal vocabulary? | `agentClass`, `slug`, `webhook_id` leaking into UI |
+| Do dropdowns / pickers show **what each option does**, not just an ID? | Snake_case enums, raw class names, opaque slugs |
+| Are defaults sensible enough to keep them and move on? | Required fields with no defaults, mandatory ID inputs |
+| Is there a discoverable list of valid values when something needs to be entered? | Free-text inputs where a combobox should be |
+| If I'd say "click Skip" because I don't understand a setting, that's a UX bug. | Optional-but-confusing settings exposed as primary inputs |
-For each route:
+When the lens fires, log a finding even if the screen technically works. Common fixes: replace text inputs with pickers, surface metadata, auto-derive values, hide internal IDs under "Advanced", add inline guidance.
-| Width | Mode | Why |
-|-------|------|-----|
-| 1440px | light | Baseline (matches audit viewport) |
-| 1280px | light | Standard desktop |
-| 1024px | light | Tablet landscape / nav collapse point |
-| 768px | light | Tablet portrait / stacked layout |
-| 375px | light | Mobile / touch targets |
-| 1440px | dark | Dark mode baseline |
-| 375px | dark | Dark mode mobile |
+A screen passes the lens when a brand-new persona could complete the task without back-channel help.
-On any page that breaks at an intermediate width, screenshot the transition point.
+### Live Interaction Smoke
-Run the automated layout-detection JS (overflow, clipping, invisible text) at each width — snippets in [references/walkthrough-checklist.md](references/walkthrough-checklist.md). Read console output after injection; every warning is a potential finding.
+Code reading verifies a button exists and has an `onClick`. It does not verify clicking actually does something observable. For every interactive control on every page:
-## Visual Polish Sweep
+1. **Click it.** Pointer moves, element highlights, click lands.
+2. **Watch the Network tab.** Did a request fire? To the right URL? Correct method + body?
+3. **Watch the DOM.** Did something visibly change — new element, removed element, state transition?
+4. **If nothing changed in (2) or (3), that's a bug.**
-A page-by-page micro-polish pass that catches the patterns separating *technically correct* UIs from *visibly considered* ones — and the patterns that mark a UI as machine-generated. Run after the Responsive Sweep, before the Scenario Battery.
+Known silent-failure controls (Approve/Deny on tool-call cards, OAuth-in-dialog popup-blocked, async-validation forms, optimistic-UI delete, off-by-one pagination, filter chips with stale TanStack Query, Reply/Forward without Message-ID): see [references/live-interaction-smoke.md](references/live-interaction-smoke.md) for the full silent-failure catalogue and SDK contract checks (`@ai-sdk/react`, better-auth, TanStack Query, React Router v7, Radix Dialog, zodResolver).
-Cover this even if a separate design-review didn't run. The visual-polish concern lives in this phase by default.
+### Responsive Sweep
-For each major page, walk the **AI-tell catalogue** in `references/visual-polish.md`. The ten checks:
+Layout-detection JS at every width (overflow, clipping, invisible text). Capture transition points. Combined with multi-pane stress above for full coverage.
-1. **Optical vs mathematical centring** — text in buttons, icons next to labels, numbers in badges. `align-items: center` is not optical centring.
-2. **Nested border-radius rule** — `inner radius = outer radius - padding`. Concentric arcs, not pinched corners.
-3. **Off-scale spacing** — every margin / padding / gap should land on the design system's scale. 22px where 24px belongs is the AI tell.
-4. **Vibe greys** — body text and borders trace to design tokens (`var(--*)`), not raw hex / Tailwind greys. Eyedropper every grey.
-5. **Border-weight drift** — 1px / 1.5px / 2px mixed in same logical category.
-6. **Drop shadow direction** — light source consistent across the app (all shadows point the same direction).
-7. **Animation timings off canonical** — durations on 150 / 200 / 300 / 500ms. Arbitrary values like 187ms are tells.
-8. **Hover-delta calibration** — perceptible state change (~10% brightness shift), not 5% imperceptible or 20% jarring.
-9. **Underline offset / uppercase letter-spacing** — set deliberately, not browser default.
-10. **Symmetry vs editorial pacing** — composed pages vs templated layouts. App shells generated by AI tend toward perfect mathematical symmetry.
+### Auth-expired mid-audit
-Plus a **per-component optical pass** for buttons, badges, inputs, dropdowns, cards, tabs, avatars, toasts. Each verified against the four-point check (text optically centred, icons on cap-height baseline, hover delta perceptible, nested radii correct).
+A long audit (30+ min) can outlast the session expiry. If during the walkthrough a navigation OR an API call returns 401/403 on a route that previously authenticated, the session has dropped.
-**Tools**: DevTools eyedropper for greys/colours, Computed styles tab for spacing/borders/timings, Layout overlay for grid/padding visualisation. Take screenshots of every finding *with the inspector overlay visible* — the overlay is the proof.
+**Don't try to silently re-auth.** From this point onward, every observation is potentially corrupted (signed-out user sees different surfaces, hits different gates, gets different copy).
-**Severity**: stacked AI-tells on one component (off-centre text + arbitrary radius + raw grey) is **High**. Pattern-level violation across components (raw greys app-wide) is **High**. Single instance, single tell is **Low**.
+Protocol:
-Full protocol, expected values, and findings shapes in [references/visual-polish.md](references/visual-polish.md).
+1. **Stop** immediately on the first unexpected 401/403 in the manifest.
+2. **Capture** the exact step that broke (network log + screenshot) — that itself is evidence for a possible "session expired without warning" finding.
+3. **Terminate the audit** with verdict `Incomplete`, cause = `auth expired mid-audit at <step>`.
+4. **Note in the Verdict block** how far the audit got: which pages had complete manifest, which were mid-flight.
+5. **Recommend next steps**: re-auth in Chrome (or re-run test-auth `/cookies` if headless) and resume from the point of failure with a fresh session.
-## Scenario Battery
+This is intentional: silently re-authenticating mid-audit hides session-expiry bugs (the very thing the user might want to know about) AND mixes pre-expiry and post-expiry observations into one report.
-Eight scenarios. All eight, always. They catch what screen-by-screen testing misses. Full protocols in [references/scenario-tests.md](references/scenario-tests.md).
+If the audit is running headless via test-auth cookies and the cookies expire mid-walkthrough, the same protocol applies — re-mint cookies, restart the audit. Do not stitch two halves together.
-1. **First Contact** — figure out the app with zero prior knowledge, then write a 2-minute plain-English guide to each thread. Gaps in the guide are UX gaps.
-2. **Interrupted Workflow** — start a task, close the tab, refresh, navigate away mid-form. Does state survive?
-3. **Wrong Turn Recovery** — deliberately click the wrong thing. How many clicks to get back on track? What context is lost?
-4. **Returning User** — repeat a thread already done. Faster the second time? Shortcuts available? On the dashboard, can you tell what changed since last visit?
-5. **Keyboard Only** — unplug the mouse. Can every thread complete keyboard-only? Focus visible? Tab order logical? Escape closes?
-6. **Heavy Data** — seed with 500+ records. Lists virtualise? Search returns the right thing? Filters narrow meaningfully?
-7. **Destructive Confidence** — for every delete, send, publish, pay, share: is consent clear? Does confirm copy tell you what's about to happen? Undo available?
-8. **Second User** — log in as a restricted role (viewer not editor, client not staff). Read-only views coherent? Permissions errors make sense?
+## Phase 4 — Polish
-## Live Interaction Smoke
+### Visual Polish Sweep
-Code reading verifies a button exists and has an `onClick`. It does not
-verify that clicking the button actually **does something observable**.
-Bugs of this shape — "the handler runs, fires a call into an SDK, but
-the flow never completes" — are invisible to static analysis and
-require a live click + network check.
+A page-by-page micro-polish pass covering ten AI-tell categories: optical centring, nested border-radius rule, off-scale spacing, vibe greys, border-weight drift, drop-shadow direction, animation timings off canonical, hover-delta calibration, underline / uppercase letter-spacing, symmetry vs editorial pacing.
-Run these for every **interactive control** on every page:
+Plus a per-component optical pass for buttons, badges, inputs, dropdowns, cards, tabs, avatars, toasts.
-1. **Click it.** Pointer moves, element highlights, click lands.
-2. **Watch the Network tab.** Did a request fire? To the right URL?
- Correct method + body shape?
-3. **Watch the DOM.** Did something visibly change — new element,
- removed element, state transition (loading spinner, toast, route
- change)?
-4. **If nothing changed in (2) or (3), that's a bug.** The control
- LOOKS alive but isn't doing its job. Log it.
+Full protocol with DevTools workflow, severity guide, and reference apps for calibration in [references/visual-polish.md](references/visual-polish.md).
-### Known control categories that silently fail
+### Component Perfection Checklist
-| Control category | Silent-failure mode to watch for |
-|---|---|
-| Approve / Deny buttons on tool-call cards | Handler fires but server never hears about it (SDK needs a separate "send on state change" callback). See `rules/ai-sdk-tool-approval-autosubmit.md`. |
-| "Connect X" OAuth buttons inside dialogs | `window.open()` silently popup-blocked when click originates in a modal. Must use `window.location.href`. See `rules/oauth-popup-blocked-in-dialogs.md`. |
-| Save / update buttons on forms with async validation | Button disables during mutation but the mutation itself silently 5xx'd. No toast, no error state, form just sits there. |
-| Delete / archive actions | Optimistic UI removes the row but server rejected — after refresh, the row is back. |
-| Pagination / "Load more" buttons | Fires request but response empty due to off-by-one offset. |
-| Filter chips on list views | Query param updates but query key doesn't — TanStack Query serves stale cached results. |
-| "Reply" / "Forward" in email-style UIs | Opens compose pane but Message-ID headers not set — reply threads orphan in recipient's inbox. |
+Component-level granularity that page-level audits miss. Six categories, each with concrete yes/no checks that need proof artefacts:
-### SDK contract check
+1. **Buttons & Triggers** — state clarity, intent matching, micro-copy, loading state, hierarchy
+2. **Inputs & Forms** — persistent labels, masks, inline validation, error clarity, defaulting
+3. **Navigation & Hierarchy** — Where am I?, click depth, search logic, sticky headers
+4. **Visual Coherence** — icon consistency, empty states, border radii, contrast ratio
+5. **Mobile & Touch** — tappable surface (≥ 48×48), keyboard optimisation, swipe gestures
+6. **Performance & Feedback** — skeleton screens, success toasts, confirmation modals only for high-stakes
-When the page uses a third-party SDK with its own state model, verify
-the SDK's required options are passed. Silent failures usually trace
-to an undocumented-but-required option.
+Plus six visual states per major component (default, skeleton, empty, partial, error, disabled) — skeleton-on-blank is not a skeleton.
-Common SDK contracts to verify:
+Each checkbox in the report cites a proof artefact (screenshot, console line, DOM selector, code reference). No proof = doesn't count.
-| SDK | Option that silently breaks behaviour if missing |
-|---|---|
-| `@ai-sdk/react` useChat with `needsApproval: true` tools | `sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithApprovalResponses` |
-| `@ai-sdk/react` useChat with custom transport | `prepareSendMessagesRequest` reading latest refs (otherwise pinned to initial values) |
-| better-auth `createAuthClient` | `sessionOptions.refetchOnWindowFocus: false` for SPAs that route on session state |
-| TanStack Query `QueryClient` | `refetchOnWindowFocus: false` if your app redirects on empty query results |
-| React Router v7 `createBrowserRouter` | `loader` / `action` defined for routes that need data (not just component) |
-| Radix Dialog | `modal: true` + `onEscapeKeyDown` handler if Escape should do more than close |
-| zodResolver | `as any` around schema if using Zod v4 and resolver is older — silent validation miss |
+Full checklist in [references/perfection-checklist.md](references/perfection-checklist.md).
+
+## Phase 5 — Stress
-**If the page uses an SDK not on this list**, spend 2 minutes reading
-its "useX" export's options. Anything named `*On*Change`, `*On*Finish`,
-`*SendAutomatically*`, `*RefetchOn*`, or `*Configure*` is a prime
-suspect for "silent failure because it's undefined."
+### Scenario Battery (9 scenarios)
-## Passive Error Sweeps
+All nine, always. They catch what screen-by-screen testing misses. Full protocols in [references/scenario-tests.md](references/scenario-tests.md).
-Run these throughout, not as a dedicated phase.
+1. **First Contact** — figure out the app with zero prior knowledge, write a 2-min plain-English guide to each thread.
+2. **Interrupted Workflow** — start a task, close the tab, refresh, navigate away mid-form. Does state survive?
+3. **Wrong Turn Recovery** — deliberately click wrong. How many clicks to recover?
+4. **Returning User** — repeat a thread. Faster? Shortcuts? Can you tell what changed since last visit?
+5. **Keyboard Only** — every thread keyboard-only. Focus visible, tab order logical, Escape closes.
+6. **Heavy Data** — seed 500+ records. Lists virtualise, search returns the right thing, filters narrow.
+7. **Destructive Confidence** — every delete/send/publish/pay/share: consent clear, copy specific, undo available.
+8. **Second User (Role)** — restricted role (viewer not editor, client not staff). Read-only views, permission errors.
+9. **Lifecycle Position** — same role at user #1 (founder), #2 (first invitee, partial state), #N (later joiner, populated workspace). Each sees a different reality.
+
+### Extended Stress Recipes
-### Console errors
+Beyond scenarios, run every relevant recipe in [references/stress-test-recipes.md](references/stress-test-recipes.md):
-On every page load, check the browser console:
-- JS errors (TypeError, ReferenceError) — **High**
-- Framework warnings (key props, deprecated APIs) — **Medium**
-- CSP violations — **Medium**
-- Deprecation warnings — **Low**
+| Stress | What it catches |
+|--------|-----------------|
+| Empty / saturated / long content | Edge layouts AI rarely sees during dev |
+| Race conditions (double-click, fast-type-then-blur, slow network) | Optimistic UI bugs, debounce failures |
+| Slow network (3G throttle) | Loading states, skeleton rhythm, timeout UX |
+| Reduced motion (`prefers-reduced-motion: reduce`) | Animations that ignore the preference |
+| i18n (long German, RTL Arabic, CJK widths) | Layout assumptions about text length |
+| Offline mode | Retry / queue / dirty-state UX |
+| Print stylesheet | Forgotten media query |
+| High-contrast mode | Forced-colors media query handling |
-### Network errors
+## Phase 6 — Verdict
-Monitor network responses across the entire session. Visual browsing misses API failures — TanStack Query and SWR swallow errors and show empty/loading states instead. A "No results found" might actually be a 403.
+### Verdict block (mandatory at the top of the report)
-| Status | Severity | Usual cause |
-|--------|----------|-------------|
-| 500+ | **Critical** | Server error |
-| 403 | **High** | Permissions or route collision (static shadowed by `/:param`) |
-| 404 | **Medium** | Missing endpoint |
-| 401 | **Low** | Expected unauthenticated; flag on authenticated pages |
-| CORS | **High** | Missing headers — production-only failure |
+```
+═══════════════════════════════════════════════════════════
+VERDICT: [Pass / Conditional Pass / Fail / Incomplete]
+
+Persona: [locked persona slug]
+Surfaces audited: N / M routes
+Interaction Manifest: complete / incomplete (X of Y required entries)
+
+Hard Gates:
+ Console errors: [count] [GREEN/RED] ([N] allowlisted)
+ Console warnings: [count] [GREEN/RED] ([N] allowlisted)
+ Network 5xx: [count] [GREEN/RED]
+ Network 403/404 auth: [count] [GREEN/RED] ([N] allowlisted)
+ Layout collapse: [count] [GREEN/RED]
+
+Findings:
+ Critical: [count]
+ High: [count]
+ Medium: [count]
+ Low: [count]
+═══════════════════════════════════════════════════════════
+```
-Chrome MCP: use `read_network_requests` after each page. Playwright: attach `page.on('response')` before browsing starts.
+### Findings format (mandatory per finding)
-## Report
+Every finding must include:
-Write to `docs/ux-audit-YYYY-MM-DD.md` as you go. If `.jez/artifacts/` exists, use `.jez/artifacts/ux-audit-YYYY-MM-DD.md` instead.
+```
+ID: H-2
+Layer: Interaction
+Severity: High
+Surface: /dashboard/spaces/:id (lg viewport, all 3 panes open)
+Persona: SME owner
+
+Reproduce:
+ 1. Sign in
+ 2. Open any existing space
+ 3. Open the members panel (md+ default)
+ 4. Click any message → opens thread aside
+ 5. Look at the timeline column
+
+Observed: message text wraps one character per line (vertical column).
+Expected: message text wraps at word boundaries within the available column width.
+Evidence: .jez/audit-evidence/2026-04-29/spaces-vertical-text.png
+ .jez/audit-evidence/2026-04-29/spaces-vertical-text-devtools.png
+Suspected location: src/client/modules/spaces/pages/SpacePage.tsx:200 (main flex-1 min-w-0)
+Suggested fix: add min-w-[260px] to prevent the catastrophic squeeze, or hide one pane at lg.
+```
-Structure in [references/report-template.md](references/report-template.md):
-- Summary
-- Coverage metrics (threads walked, elements tested, inventoried coverage %)
-- Findings by severity (Critical → Low) with screenshot refs
-- Per-thread results
-- Scenario battery results
-- Network + console error inventory
-- What works well
-- Priority recommendations
+A finding without reproduction + evidence + suspected location is rejected. Forces real pinning, not gestures. Layer is one of: Architecture / Interaction / Visual / Feedback / Delight (see Five-Layer Hierarchy in [references/perfection-checklist.md](references/perfection-checklist.md)).
-**Severity:**
-- **Critical** — user cannot complete the task
-- **High** — confusion, friction, trust damage
-- **Medium** — suboptimal, workable
-- **Low** — polish
+### Perfection Roadmap (mandatory)
-## Fix-and-Verify Loop
+Group findings into:
-After writing the report, offer the loop:
+- **Quick Wins (24-48h)** — micro-copy, hover states, contrast fixes, single-line CSS adjustments
+- **Structural (1-2 weeks)** — primitive replacements, route restructures, multi-pane refactors
+- **Advanced Polish (post-launch)** — micro-animations, skeleton variations, personalised empty states
-*"Found N critical and M high issues. Fix them now and re-verify?"*
+Full report structure in [references/report-template.md](references/report-template.md).
+
+## Phase 7 — Fix-and-verify
+
+After the report, offer the loop:
+
+> *"Found N Critical and M High issues. Fix them now and re-verify?"*
If yes:
1. Group findings by file/area
2. Patch each one
-3. Re-walk just the affected slice (not the whole app)
-4. Update the report: mark finding `✓ fixed`, `✗ still present`, or `⚠ new issue found`
+3. **Re-walk just the affected slice** (not the whole app) — including the original interaction that surfaced the bug, with a fresh screenshot
+4. Update the report: mark `✓ fixed`, `✗ still present`, or `⚠ new issue found`
5. Close with a "fixed in this session" summary
-Closes the loop inside one session instead of waiting for a second audit pass tomorrow.
+Closes the loop in one session instead of waiting for tomorrow's audit.
-## Cross-reference with ux-extract
+## Cross-reference with ux-extract and brains-trust
-If a pattern library exists at `.jez/artifacts/ux-extracts/<ref>.md` or `docs/ux-extracts/<ref>.md`, read it before starting and use it as the bar. Findings can then say:
+If a pattern library exists at `.jez/artifacts/ux-extracts/<ref>.md` or `docs/ux-extracts/<ref>.md`, read it before starting and use it as the bar for findings.
-> *"Empty state on /app/clients shows no CTA. Reference (claude.ai) shows 3 keyboard shortcuts + 'New chat' button in the same position."*
+After v2 produces a verdict, consider running `dev-tools:brains-trust` to get a second-opinion review from a different model. v2 catches a class; brains-trust catches what your specific model habit misses. Recommended cadence: every 4-6 weeks.
-Graceful if absent — the audit still works without a reference.
+When merging brains-trust findings back into the audit report, **dedup by `(reproduction-steps, suspected-location)`**. Same bug surfaced by a second model is one finding with two confirmations, not two findings. The merged finding gets a `Confirmed by:` line listing the models that flagged it — useful signal for prioritising fixes (a bug both models found is high-confidence).
-## Autonomy
+Anti-pattern: appending the second model's report verbatim to the first. Produces a noisy report with the same Critical bug listed twice and inflates the perceived severity.
-- **Just do it**: Navigate, screenshot, read pages, inject layout-detection JS, submit forms with obviously-fake test data, write the report file, dispatch screenshot-review sub-agents
-- **Ask first**: Destructive actions (delete, send, publish, pay). For Destructive Confidence testing, ask once before running that scenario
-- **Stop and confirm**: Anything that emails/notifies external people
+## The 30-Second Dogfood Drill (project-level rule)
-## Execution discipline
+The audit is heavy. For per-change pre-deploy checks, recommend a project rule in CLAUDE.md:
-Three principles for audit runs that catch the most bugs:
+> **Before declaring any UI change "done", run the 30-second dogfood drill:**
+> 1. Open the affected page
+> 2. Type into any input
+> 3. Click the primary action
+> 4. Watch the next state for 2 seconds
+> 5. Open a related view (thread, modal, detail)
+> 6. Read the console
+> If any step shows unexpected behaviour, the change isn't done.
-1. **Drive the audit from the main session, not a sub-agent.** Sub-agents are fine for bounded analysis tasks (reviewing a batch of captured screenshots, summarising a thread). But the audit *itself* — the navigation, the noticing, the "this button looks off after the previous interaction" kind of judgement — must happen in the session that's been watching the app. Cross-interaction state lives in that session's working memory; a fresh sub-agent starts cold and misses second-order findings.
+Six steps, ~30 seconds. Catches behavioural bugs that surface immediately. Pair with the full ux-audit weekly.
-2. **Use the browser tool directly.** Chrome MCP or Playwright MCP via the main session's tool calls. Don't hand screenshots to a fresh agent and ask for opinions — that loses the state-dependence that makes audits catch logic errors, business-logic issues, and odd edge cases.
-3. **Loop to exhaustion with variations.** Don't stop after one pass through the checklist. After each pass, generate a new angle — different persona, different workflow, different input volume, different starting point, different validation lens — and re-walk. Stop only when a full pass produces no new findings. Single-pass audits by definition miss the second-order issues.
+## Playwright killer-flow tests
-For audits expected to run longer than 30 minutes, set up a 15-min `/loop` check-in alongside the main session — it journals findings, grounds the session, and provides a natural termination signal. See [references/long-running-check-in-pattern.md](references/long-running-check-in-pattern.md).
+Audits find what's broken now. Tests prevent regressions. Recommend writing 10-15 Playwright tests for the killer flows — see [references/playwright-killer-flows.md](references/playwright-killer-flows.md) for starter examples (input clears after send, no console warnings on mount, message column width ≥ 200px after thread open, @-mention exactly one pill, etc.). Run on every deploy via CI.
+
+## Autonomy
+
+- **Just do it**: Navigate, screenshot, read pages, inject layout-detection JS, submit forms with fake test data, write the report file, dispatch screenshot-review sub-agents.
+- **Ask first**: Destructive actions (delete, send, publish, pay). For Destructive Confidence testing, ask once before running that scenario.
+- **Stop and confirm**: Anything that emails / notifies external people.
+
+## Execution discipline
+
+1. **Drive the audit from the main session, not a sub-agent.** Cross-interaction state lives in the session that's been watching. A fresh sub-agent starts cold and misses second-order findings.
+2. **Use the browser tool directly.** Chrome MCP or Playwright MCP from the main session. Don't hand screenshots to a fresh agent for opinions.
+3. **Loop to exhaustion with variations.** After each pass, generate a new angle (different persona, different workflow, different input volume, different starting point). Stop only when a full pass produces no new findings.
+
+For audits expected to run > 30 minutes, set up a 15-min `/loop` check-in alongside the main session — it journals findings, grounds the session, and provides a natural termination signal. See [references/long-running-check-in-pattern.md](references/long-running-check-in-pattern.md).
## Reference files
| When | Read |
|------|------|
-| Per-screen evaluation questions | [references/walkthrough-checklist.md](references/walkthrough-checklist.md) |
-| Workflow threads, wayfinding, mental model alignment, page-to-page continuity | [references/workflow-comprehension.md](references/workflow-comprehension.md) |
-| Full protocol for each of the 8 scenarios | [references/scenario-tests.md](references/scenario-tests.md) |
-| AI-tell catalogue, optical centring, design-token discipline, per-component pass | [references/visual-polish.md](references/visual-polish.md) |
-| Report format and severity rubrics | [references/report-template.md](references/report-template.md) |
+| Persona library + writing protocol | [references/persona-lock.md](references/persona-lock.md) |
+| Interaction Manifest template + replay protocol | [references/interaction-manifest.md](references/interaction-manifest.md) |
+| Multi-pane stress matrix + automation snippets | [references/multi-pane-stress.md](references/multi-pane-stress.md) |
+| Per-screen evaluation questions, layout-detection JS | [references/walkthrough-checklist.md](references/walkthrough-checklist.md) |
+| Wayfinding, mental model, page-to-page continuity | [references/workflow-comprehension.md](references/workflow-comprehension.md) |
+| Full protocol for each of the 9 scenarios | [references/scenario-tests.md](references/scenario-tests.md) |
+| Extended stress recipes (race, slow network, reduced motion, i18n) | [references/stress-test-recipes.md](references/stress-test-recipes.md) |
+| Component-level perfection checklist (6 categories + 6 states) | [references/perfection-checklist.md](references/perfection-checklist.md) |
+| AI-tell catalogue, optical centring, design-token discipline | [references/visual-polish.md](references/visual-polish.md) |
+| Silent-failure controls + SDK contract checks | [references/live-interaction-smoke.md](references/live-interaction-smoke.md) |
+| Playwright killer-flow test starters | [references/playwright-killer-flows.md](references/playwright-killer-flows.md) |
+| Report format, verdict block, severity rubric, reproduction-step format | [references/report-template.md](references/report-template.md) |
| Browser tool commands and viewport notes | [references/browser-tools.md](references/browser-tools.md) |
-| Long-running audit supervision via 15-min `/loop` check-in | [references/long-running-check-in-pattern.md](references/long-running-check-in-pattern.md) |
+| Long-running audit supervision via 15-min `/loop` | [references/long-running-check-in-pattern.md](references/long-running-check-in-pattern.md) |
## Tips
-- **Thread first, elements second.** If time is short, threads tell you more.
-- **Sub-agents for screenshot review.** Don't drive the browser and analyse 200 screenshots in one loop.
-- **Write findings incrementally.** The report file is cheaper memory than your context.
-- **Stay in persona.** If you catch yourself thinking "a developer would know…" stop. Your persona doesn't.
+- **Interaction first, sweep last.** A sweep without prior interaction is Incomplete.
+- **Type into something on every page.** Real text. The single most-effective change for catching behaviour bugs.
+- **Read the console after every primary action.** Most regressions surface as warnings before they become bugs.
+- **Multi-pane stress is not optional.** If the app has collapsible UI, the worst bugs live in pane-overlap zones.
+- **Stay in persona.** If you catch yourself thinking "a developer would know..." — stop. Your persona doesn't.
- **Every hesitation is a finding.** If you paused to figure out what to click, that's friction worth reporting.
-- **Use the eyedropper liberally.** Single fastest way to find vibe greys, off-token colours, and design-system drift.
+- **Use the eyedropper liberally.** Single fastest way to find vibe greys, off-token colours, design-system drift.
- **Coverage is arithmetic.** Inventoried ÷ tested. Publish the ratio in the report.
+- **Sub-agents for screenshot review.** Don't drive the browser and analyse 200 screenshots in one loop.
+- **Write findings incrementally.** The report file is cheaper memory than your context.
diff --git a/plugins/dev-tools/skills/ux-audit/references/browser-tools.md b/plugins/dev-tools/skills/ux-audit/references/browser-tools.md
index 23ea829c..7ac7b9c7 100644
--- a/plugins/dev-tools/skills/ux-audit/references/browser-tools.md
+++ b/plugins/dev-tools/skills/ux-audit/references/browser-tools.md
@@ -4,14 +4,72 @@
| Tool | Use for | Auth | Setup |
|------|---------|------|-------|
-| **Chrome MCP** | Authenticated apps — **required** for anything requiring login | Full — uses your logged-in Chrome session | Claude Code extension in Chrome |
-| **Playwright MCP** | Public / unauthenticated sites | None | MCP plugin |
-| **playwright-cli** | Scripted flows, sub-agent tasks | Persistent session state | npm package |
+| **Chrome MCP** | Authenticated apps with a human at the keyboard — uses real logged-in Chrome session | Full — uses your logged-in Chrome session | Claude Code extension in Chrome |
+| **Playwright MCP / `playwright-cli`** | Public / unauthenticated sites, OR authenticated apps via test-auth cookie injection (see below) | None / scripted | MCP plugin / npm package |
-**Rule**: For authenticated apps, Chrome MCP is the only viable tool — Playwright opens a fresh unauthed browser and the audit becomes meaningless. If Chrome MCP isn't connected, **stop and ask the user to open Chrome and click Connect in the Claude extension**. Do not silently fall back.
+**Rule**: For authenticated apps, prefer Chrome MCP when a human is at the keyboard. For headless / autonomous runs (cron, CI, sub-agent, no human), use the test-auth cookie-injection path below. **Don't silently fall back to a fresh unauthed Playwright session for an authenticated app — the audit becomes worthless.**
For public sites with no login, Playwright MCP is fine (and can run in parallel sessions if needed).
+### Headless authentication via project test-auth endpoint
+
+If the project exposes a `/api/test-auth/cookies`-style endpoint (gated on a server-side `TEST_AUTH_TOKEN` secret), a headless agent can mint real session cookies and inject them into Playwright. This unlocks autonomous audits without requiring Chrome MCP.
+
+Pattern (project-agnostic — any better-auth project can expose this):
+
+```bash
+# 1. Mint session cookies for a test user (creates if needed)
+curl -sX POST "$URL/api/test-auth/cookies" \
+ -H "X-Test-Auth: $TEST_AUTH_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"email":"alice@test.<app>.local"}' > /tmp/cookies.json
+
+# 2. Inject into Playwright via context.addCookies()
+# or pass to playwright-cli state-load
+```
+
+Implementation pattern (better-auth's `testUtils()` plugin loaded conditionally on the secret env var) is documented in the project's `CLAUDE.md` under "Test-auth (headless agent login)" if present.
+
+Email is locked to `*@test.<anything>.local` so the endpoint can never accidentally take over a real user account. Different email per call → different test user (multi-user friendly).
+
+**When to use which**:
+
+| Scenario | Use |
+|---|---|
+| Human is at the keyboard, Chrome already signed in | Chrome MCP |
+| Headless / cron / CI / sub-agent, project has `/api/test-auth/*` | Playwright + cookie injection |
+| Headless and project has no test-auth endpoint | Stop. Ask the user to add one (it's ~80 lines), or run on an authenticated dev server with the user signed in |
+| Public / unauth sites | Playwright MCP or playwright-cli |
+
+## Screenshot sizing — Retina 2x trap
+
+Most browser MCP tools capture at the OS device-pixel ratio. On Retina Macs that's 2x → a 1440×900 viewport screenshot is actually 2880×1800 pixels (~3 MB), and full-page captures of long timelines hit ~3000-4000px tall. This bloats the audit context fast and can hit Claude's image-input limit (~2000px per side).
+
+**Always resize captures to ≤ 1440 longest side before referencing or committing them**:
+
+```bash
+sips -Z 1440 path/to/screenshot.png --out path/to/screenshot.png
+```
+
+Or batch:
+
+```bash
+for f in .jez/audit-evidence/2026-04-29/*.png; do
+ sips -Z 1440 "$f" --out "$f"
+done
+```
+
+Capture-time prevention (preferred):
+
+| Tool | Default DPR | Note |
+|---|---|---|
+| chrome-devtools-mcp `take_screenshot` | 2x | Resize after, OR use `fullPage: false` to bound height |
+| `mcp__claude-in-chrome__computer` action=screenshot | 2x | Follows OS DPR |
+| `mcp__claude-in-chrome__gif_creator` | 2x frames | Encoder downsamples but still heavy |
+| `playwright-cli` / Playwright MCP | 1x (CSS pixels) | **Prefer this when a reference screenshot is the goal** |
+
+The user-global `~/.claude/rules/screenshot-sizing.md` covers the full pattern. There's also a `PreToolUse` hook on `Read` that auto-resizes oversized images — it's a safety net, not a substitute for capture-time discipline.
+
## Viewport
Pin the window at the start of every audit:
diff --git a/plugins/dev-tools/skills/ux-audit/references/report-template.md b/plugins/dev-tools/skills/ux-audit/references/report-template.md
index 452b592a..41a08445 100644
--- a/plugins/dev-tools/skills/ux-audit/references/report-template.md
+++ b/plugins/dev-tools/skills/ux-audit/references/report-template.md
@@ -1,32 +1,61 @@
-# UX Audit Report Template
+# UX Audit Report Template (v2)
Write the report to `docs/ux-audit-YYYY-MM-DD.md`. If `.jez/artifacts/` exists in the project, write to `.jez/artifacts/ux-audit-YYYY-MM-DD.md` instead.
Write incrementally — open the file at the start of the audit, append as you go. Don't batch at the end.
+The report MUST include the verdict block at the top. If any required section is missing, the report is "Incomplete" not "Pass" — even if every observation looked fine.
+
+## Required structure
+
```markdown
# UX Audit: [App Name]
+═══════════════════════════════════════════════════════════
+VERDICT: [Pass / Conditional Pass / Fail / Incomplete]
+
+Persona Lock: [persona slug + path to persona file]
+Locked at: YYYY-MM-DD HH:MM TZ
+Surfaces audited: N / M routes
+Interaction Manifest: [complete / incomplete: X of Y required entries]
+
+Hard Gates:
+ Console errors: [count] [GREEN ✓ / RED ✗] ([N] allowlisted)
+ Console warnings: [count] [GREEN ✓ / RED ✗] ([N] allowlisted)
+ Network 5xx: [count] [GREEN ✓ / RED ✗]
+ Network 403/404 auth: [count] [GREEN ✓ / RED ✗] ([N] allowlisted)
+ Layout collapse: [count] [GREEN ✓ / RED ✗]
+
+Findings:
+ Critical: [count]
+ High: [count]
+ Medium: [count]
+ Low: [count]
+═══════════════════════════════════════════════════════════
+
**Date**: YYYY-MM-DD
**URL**: https://app.example.com
-**Persona**: "[role, context, tech comfort, time pressure, device]"
+**Persona**: [persona name + 1-line summary]
**Browser**: Chrome MCP / Playwright MCP
-**Viewport**: 1440×900 (baseline) + responsive sweep + dark mode
+**Viewport**: 1440×900 baseline + multi-pane stress + dark mode
**Reference extract used**: [path or "none"]
-## Summary
+## Executive Summary
-[2–3 sentences: overall impression, biggest concerns, what works well]
+[2–3 sentences: overall impression, biggest concerns, the North Star fix]
## Coverage
-| Dimension | Tested | Total | % |
-|-----------|--------|-------|---|
-| Routes | 14 | 14 | 100% |
-| Interactive elements | 187 | 203 | 92% |
-| Threads walked | 4 | 4 | 100% |
-| Scenarios completed | 7 | 8 | 88% (Destructive Confidence skipped — no test account) |
-| Pages with visual polish sweep | 11 | 14 | 79% (3 modal-only pages folded into parent route reviews) |
+| Dimension | Tested | Total | % | Notes |
+|-----------|--------|-------|---|-------|
+| Routes | 14 | 14 | 100% | |
+| Interactive elements | 187 | 203 | 92% | 16 untested on /app/billing |
+| Threads walked | 4 | 4 | 100% | |
+| Scenarios completed (of 9) | 8 | 9 | 89% | Destructive Confidence skipped — no test account |
+| Multi-pane stress combos | 24 | 24 | 100% | 6 viewports × 4 pane combos |
+| Component states sampled (of 6) | 4 | 6 | 67% | Partial loaded + Disabled not reproducible on all components |
+| Stress recipes | 13 | 15 | 87% | RTL + Print skipped (don't apply) |
+| Live Interaction Smoke controls | 47 | 47 | 100% | |
**Elements not tested** (and why):
- /app/billing — 16 elements — requires paid plan, not available on test account
@@ -34,33 +63,89 @@ Write incrementally — open the file at the start of the audit, append as you g
## Findings
-### Critical (blocks user task)
+Each finding follows this format. **A finding without reproduction + evidence + suspected location is rejected.**
+
+### Critical (blocks user task; data loss; security)
+
+#### [C-1] Vertical-stacking message text in spaces makes Spaces unusable
+
+- **Layer**: Visual / Interaction
+- **Severity**: Critical
+- **Surface**: /dashboard/spaces/:id
+- **Viewport**: 1280×800, all 3 panes open (sidebar + members + thread aside)
+- **Persona**: SME owner
+
+**Reproduce**:
+1. Sign in
+2. Open any existing space
+3. Open the members panel (👥 icon top-right, default on md+)
+4. Click any message → opens thread aside
+5. Look at the message timeline column
+
+**Observed**: message text wraps one character per line — vertical column ~24px wide.
+**Expected**: text wraps at word boundaries within the available column width (≥ 260px).
+
+**Evidence**:
+- `.jez/audit-evidence/2026-04-29/spaces-1280-3panes.png`
+- `.jez/audit-evidence/2026-04-29/spaces-1280-3panes-devtools.png`
+- Console: 0 errors at point of capture
+- Layout-detection JS output: `[{ selector: "main.flex-1.min-w-0", width: "184.5", height: "612.0", textPreview: "h\ne\nl\nl\no\n…" }]`
+
+**Suspected location**: `src/client/modules/spaces/pages/SpacePage.tsx:200` — `<main className="flex-1 min-w-0">`
+
+**Suggested fix**: Replace `min-w-0` with `min-w-[260px]` to enforce minimum readable width, OR auto-fold the members pane at lg breakpoint.
+
+---
+
+### High (confusion, friction, trust damage; console warning; layout collapse)
-- **[Short title]**: [What happened vs expected]
- - *Where*: [page/component]
- - *Screenshot*: [filename]
- - *Thread/scenario*: [which discovered it]
- - *Fix*: [concrete recommendation]
+#### [H-1] VoiceClient protocol-mismatch warning logs on every chat-page mount
-### High (confusion, friction, trust damage)
+- **Layer**: Feedback
+- **Severity**: High (auto via console budget Hard Gate)
+- **Surface**: any /dashboard/chat/* route
+- **Persona**: any
-- **[Short title]**: [description]
- - *Where*: [page/component]
- - *Screenshot*: [filename]
- - *Fix*: [recommendation]
+**Reproduce**:
+1. Sign in
+2. Navigate to /dashboard/chat
+3. Open browser console
-### Medium (suboptimal, workable)
+**Observed**: `VoiceClient: protocol mismatch (1.2 vs 1.4)` warning logs on every mount.
+**Expected**: clean console.
-- **[Short title]**: [description]
- - *Fix*: [recommendation]
+**Evidence**: `.jez/audit-evidence/2026-04-29/chat-console.txt` (12 occurrences in 2 page loads)
+
+**Suspected location**: `src/client/modules/voice/voiceClient.ts:42`
+**Suggested fix**: bump VoiceClient SDK to 1.4-compatible version OR pin protocol to 1.2 in init.
+
+---
+
+### Medium (suboptimal but workable)
+
+#### [M-1] [Short title]
+
+- **Layer**: [Architecture / Interaction / Visual / Feedback / Delight]
+- **Severity**: Medium
+- **Surface**: [page]
+- **Persona**: [persona]
+- **Reproduce**: [steps]
+- **Observed**: [what happened]
+- **Expected**: [what should happen]
+- **Evidence**: [paths]
+- **Suspected location**: [file:line]
+- **Suggested fix**: [recommendation]
+
+---
### Low (polish)
-- **[Short title]**: [description]
+#### [L-1] [Short title]
+[Same format as above, abbreviated for polish-class findings]
## Thread Results
-### Thread 1: [e.g. "Create a new client and add their first policy"]
+### Thread 1: [e.g. "Send a message in a space"]
- **Completable end-to-end**: Yes / No / Partially — [detail]
- **Click count**: [N] (estimated optimal: [N])
@@ -76,20 +161,40 @@ Write incrementally — open the file at the start of the audit, append as you g
[repeat]
-## Scenario Results
+## Interaction Manifest summary
+
+```
+INTERACTION MANIFEST — Coverage
+ Total entries logged: 84
+ Required minimum: 84 (14 pages × 6 entries)
+ Pages with complete manifest: 14 / 14
+ Pages with incomplete manifest: 0
+```
+
+Detailed manifest per page is at `.jez/audit-evidence/2026-04-29/manifests/`. Verdict cannot be Pass without complete coverage.
+
+## Multi-Pane Stress Matrix
+
+| Route | 1920 all open | 1440 all | 1280 all | 1024 all | 1024 2-pane | 1024 1-pane | 768 default | 375 mobile |
+|-------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
+| / | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| /dashboard/spaces/:id | ✓ | ✓ | ✗ (C-1 vertical text) | ✗ (C-1) | ✓ | ✓ | ✓ | ✓ |
+| /dashboard/inbox | ✓ | ✓ | ✓ | ✓ | n/a | n/a | ✓ | ✓ |
-### First Contact
+## Scenario Battery Results
+
+### Scenario 1 — First Contact
- Time to first value: [clicks/pages]
- Self-explanatory score: [1–5]
- Terminology barriers: [list]
- Threads easy to explain: [list]
- Threads requiring caveats: [list + the caveats]
- Threads unexplainable: [list]
-- **2-minute guides written**:
+- 2-minute guides written:
- *Thread 1*: "[actual guide written during the test]"
- *Thread 2*: "[...]"
-### Interrupted Workflow
+### Scenario 2 — Interrupted Workflow
| Interruption | Data preserved? | Could resume? | Notes |
|-------------|----------------|---------------|-------|
@@ -98,7 +203,7 @@ Write incrementally — open the file at the start of the audit, append as you g
| Page refresh | Y/N | Y/N | |
| Back button | Y/N | Y/N | |
-### Wrong Turn Recovery
+### Scenario 3 — Wrong Turn Recovery
| Wrong turn | Recovery method | Steps | Context lost? |
|-----------|----------------|-------|---------------|
@@ -106,7 +211,7 @@ Write incrementally — open the file at the start of the audit, append as you g
| Wrong record | [method] | [N] | [what] |
| Wrong filter | [method] | [N] | [what] |
-### Returning User
+### Scenario 4 — Returning User
| Thread | First time | Second time | Improvement | Shortcuts found |
|--------|-----------|-------------|-------------|-----------------|
@@ -116,7 +221,7 @@ Write incrementally — open the file at the start of the audit, append as you g
- Notification quality: [assessment]
- Missing "what's new" signals: [list]
-### Keyboard Only
+### Scenario 5 — Keyboard Only
| Thread | Completable keyboard-only? | Blockers |
|--------|---------------------------|----------|
@@ -127,7 +232,7 @@ Write incrementally — open the file at the start of the audit, append as you g
- Focus traps: [work correctly / broken on modal X]
- Documented shortcuts: [list or "none"]
-### Heavy Data
+### Scenario 6 — Heavy Data
| Area | At 500 records | At 1000+ |
|------|----------------|----------|
@@ -137,48 +242,68 @@ Write incrementally — open the file at the start of the audit, append as you g
| Filter | Useful/Overwhelming | |
| Pagination | Works/Slow/Broken | |
-### Destructive Confidence
+### Scenario 7 — Destructive Confidence
| Action | Confirmation | Destructive styling | Undo | Severity |
|--------|-------------|---------------------|------|----------|
| Delete client | [copy quality] | Y/N | Y/N | |
| Send invoice | [copy] | Y/N | Y/N | |
-### Second User ([role tested])
+### Scenario 8 — Second User (Role)
| Thread | Completable as [role] | Broken pages | Leaked data | Error quality |
|--------|----------------------|--------------|-------------|--------------|
| Thread 1 | Y/N | [list] | [list] | [assessment] |
-## Network Errors (detected during browsing)
-
-| Endpoint | Status | Page | Severity | Notes |
-|----------|--------|------|----------|-------|
-| `GET /api/boards/users` | 403 | /app/boards/123 | High | Likely route collision with /:boardId |
-| `POST /api/settings/theme` | 403 | /app/settings | High | Permission check failing |
-| `GET /api/reports/summary` | 500 | /app/dashboard | Critical | Server error |
-
-## Console Errors
-
-| Error | Page | Severity | Notes |
-|-------|------|----------|-------|
-| TypeError: Cannot read property 'id' of undefined | /app/clients/123 | High | on edit modal open |
-
-## Responsive / Dark Mode
-
-| Route | 1280 | 1024 | 768 | 375 | Dark (1440) | Dark (375) | Notes |
-|-------|------|------|-----|-----|------------|-----------|-------|
-| / | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ (text invisible) | |
-| /app/clients | ✓ | ✓ | ✗ (overflow) | ✗ | ✓ | ✓ | |
+### Scenario 9 — Lifecycle Position
+
+| Position | Setup flow shown? | Onboarding gap | Wayfinding works? | Empty/partial UI helpful? |
+|----------|-------------------|----------------|-------------------|--------------------------|
+| User #1 (founder) | Y/N + quality | [list] | Y/N + detail | Y/N + detail |
+| User #2 (first invitee) | Y/N + quality | [list] | Y/N + detail | Y/N + detail |
+| User #N (later joiner) | Y/N + quality | [list] | Y/N + detail | Y/N + detail |
+
+- **Same-screen-three-faces coherence**: [pages where empty / partial / full all looked considered]
+- **Onboarding scope creep**: [setup UI bleeding into screens it shouldn't]
+- **Peer-feature dignity** (mentions, assignments, activity feeds with 1 / 2 / 50 users): [findings]
+
+## Stress Recipe Results
+
+| Recipe | Run? | Findings | Severity |
+|--------|------|----------|----------|
+| Race conditions (double-click submit) | ✓ | 0 | — |
+| Slow network (3G throttle) | ✓ | 1 | M-2 missing skeleton |
+| Reduced motion | ✓ | 0 | — |
+| i18n long German | ✓ | 1 | H-3 button overflow |
+| RTL Arabic | n/a | — | (no i18n yet) |
+| CJK widths | n/a | — | (no i18n yet) |
+| Empty / saturated states | ✓ | 2 | M-3 + L-1 |
+| Offline mode | ✓ | 1 | C-2 silent data loss |
+| Print stylesheet | n/a | — | (chat app) |
+| Forced colors / high contrast | ✓ | 1 | H-4 buttons disappear |
+| Keyboard only | ✓ | 0 | — |
+| Screen reader | partial | 2 | H-5 + M-4 |
+| Long-press / right-click | ✓ | 0 | — |
+| Browser-back during in-flight | ✓ | 0 | — |
+| Tab-restore | ✓ | 0 | — |
+
+## Component States Coverage
+
+For each major component sampled, capture which of the six states were verified:
+
+| Component | Default | Skeleton | Empty | Partial | Error | Disabled | Notes |
+|-----------|:---:|:---:|:---:|:---:|:---:|:---:|-------|
+| Spaces list | ✓ | ✓ | ✓ | n/a | ✓ | n/a | |
+| Message list (in space) | ✓ | ✗ (spinner) | ✗ (blank) | ✗ | ✗ | n/a | Skeleton + Empty + Partial + Error all missing |
+| Send button | ✓ | n/a | n/a | n/a | ✓ | ✓ (no tooltip) | Disabled state has no "why" |
+| Settings form | ✓ | n/a | n/a | n/a | ✓ | ✓ | |
## Visual Polish (AI-tell sweep)
-For each page audited, mark which AI-tells were found:
-
| Route | Optical centring | Nested radius | Off-scale spacing | Vibe greys | Border drift | Shadow direction | Anim timings | Hover delta | Underline / uppercase | Symmetry / pacing |
|-------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
| / | ✓ | ✓ | ✗ (22px gap) | ✗ (#5a6168 raw) | ✓ | ✓ | ✗ (187ms drop) | ✓ | ✓ | ✓ |
-| /app/clients | ✗ (button text 2px high) | ✓ | ✓ | ✗ (3 raw greys) | ✓ | ✓ | ✓ | ✗ (3% delta) | ✓ | ✓ |
+| /dashboard/spaces/:id | ✗ (button text 2px high) | ✓ | ✓ | ✗ (3 raw greys) | ✓ | ✓ | ✓ | ✗ (3% delta) | ✓ | ✓ |
**Per-component findings**:
@@ -190,9 +315,33 @@ For each page audited, mark which AI-tells were found:
| Severity | Count | Pattern type |
|----------|-------|-------------|
-| High | 2 | Stacked AI-tells on primary CTA component (text + radius + grey + spacing) |
+| High | 2 | Stacked AI-tells on primary CTA component |
| Medium | 4 | Pattern-level (raw greys app-wide, animation timings off canonical) |
-| Low | 7 | Single-instance (one-off underline offset, single off-scale value) |
+| Low | 7 | Single-instance |
+
+## Component Perfection Checklist (Phase 4)
+
+- [x] Buttons & Triggers — see [perfection-checklist.md](perfection-checklist.md) for the 7 checks per category
+- [x] Inputs & Forms — proof: ../audit-evidence/inputs-2026-04-29/
+- [ ] Navigation & Hierarchy — incomplete (didn't test mobile sticky behaviour)
+- [x] Visual Coherence — proof captured
+- [x] Mobile & Touch — proof: 375px walkthrough
+- [x] Performance & Feedback — proof: throttled-3G recordings
+
+## Network Errors (detected during browsing)
+
+| Endpoint | Status | Page | Severity | Notes |
+|----------|--------|------|----------|-------|
+| `GET /api/boards/users` | 403 | /app/boards/123 | High | Likely route collision with /:boardId |
+| `POST /api/settings/theme` | 403 | /app/settings | High | Permission check failing |
+| `GET /api/reports/summary` | 500 | /app/dashboard | Critical | Server error |
+
+## Console Errors
+
+| Type | Count | Page | Severity | Notes |
+|------|------|------|----------|-------|
+| `VoiceClient: protocol mismatch` warning | 12 | /dashboard/chat | High | See H-1 |
+| `Warning: Each child in a list should have a unique "key" prop.` | 3 | /dashboard/spaces | High | React key warning |
## What Works Well
@@ -202,31 +351,63 @@ Positive findings — patterns to preserve and replicate:
- [e.g. "Create flow lands on the new record, not back at the list"]
- [e.g. "Keyboard shortcut palette (Cmd+K) works from every page"]
-## Priority Recommendations
+## Perfection Roadmap
+
+### Quick Wins (24-48 hours)
+1. **Fix VoiceClient warning** — addresses H-1. Bump SDK or pin protocol. Est. effort: S.
+2. **Standardise sidebar grey to `--border` token** — addresses M-1. Single CSS var change. Est. effort: S.
+3. **Add aria-label to dismiss buttons** — addresses M-4 screen reader. Est. effort: S.
-Ranked by impact:
+### Structural Updates (1-2 weeks)
+4. **Add `min-w-[260px]` to spaces main column** — addresses C-1 vertical text. Refactor SpacePage layout. Est. effort: M.
+5. **Add error toast on settings save 5xx** — addresses C-2 offline silent loss. Wire up `onError` to toast layer. Est. effort: M.
+6. **Migrate to design-token greys app-wide** — addresses M-1 + 4 other pattern findings. Touches ~30 files. Est. effort: L.
-1. **[Highest-impact fix]** — addresses [Critical finding]. Est. effort: [S/M/L].
-2. **[Second priority]** — [...].
-3. **[Third]** — [...].
+### Advanced Polish (post-launch)
+7. **Add skeleton screens to message list, spaces list, inbox** — addresses Component States gap.
+8. **Animation timings to canonical 150/200/300/500ms across the app**.
+9. **Visual regression baselines via Playwright + git LFS**.
## Fix-and-Verify (if run)
| Finding | Severity | Fix applied | Verified |
|---------|----------|------------|----------|
-| Submit button doesn't respond on /signup | Critical | [commit/branch] | ✓ |
-| Cascading delete has no warning | High | [commit] | ✓ |
-| Pagination resets selection | Medium | — | ⏳ deferred |
+| C-1 Vertical text in spaces | Critical | commit 987525f | ✓ |
+| H-1 VoiceClient warning | High | commit a1b2c3d | ✓ |
+| M-1 Raw grey divider | Medium | — | ⏳ deferred |
-**Summary of this session's fixes**: [N critical + M high fixed and verified. K deferred.]
+**Summary of this session's fixes**: 2 Critical + 1 High fixed and verified. 4 deferred to next sprint.
+
+## Killer-flow tests recommended
+
+After this audit, write these Playwright tests to prevent regression:
+
+1. `spaces: send clears input within 1s` — covers send-button-doesn't-clear regressions
+2. `spaces: thread keeps timeline width ≥ 200px at 1024-1280` — covers C-1 class
+3. `chat: console emits no warnings on mount` — covers H-1 class
+4. `spaces: @-mention does not duplicate` — covers any picker-double-insert
+5. `auth: error toast appears on settings save 5xx` — covers C-2 class
+
+See [playwright-killer-flows.md](playwright-killer-flows.md) for starter test code.
```
## Guidelines
-- **Keep findings concrete** — "Submit button doesn't respond on /signup" not "form is broken"
-- **Include location** — page + component for every finding, so developers can locate it
-- **Include screenshot refs** for every critical/high finding — they make the report actionable
-- **"What Works Well" matters** — prevents the report reading as pure criticism, preserves good patterns
-- **Priority recommendations** should be actionable in one sprint — not a wish list
-- **Coverage arithmetic** goes at the top so readers see the denominator — a report that found 5 bugs across 200 elements reads very differently from 5 bugs across 20 elements
-- **Append as you go** — the file is cheaper memory than your context; don't try to remember findings for the end
+- **Verdict block goes at the top.** First thing the reader sees. No exceptions.
+- **Hard gates can't be downgraded.** A console warning is High minimum. A 5xx is Critical automatically.
+- **Every finding cites proof.** Screenshot path + console line / DOM selector / network response. No proof = rejected.
+- **Reproduction steps are mandatory.** A finding without "1. Sign in 2. Click X 3. Observe Y" is rejected.
+- **Suspected location** must be `file:line` not "the chat module somewhere".
+- **Coverage publishes ratios.** Inventoried ÷ tested. Readers can see what wasn't tested.
+- **Roadmap groups by effort + impact.** Not one ranked list — three buckets.
+- **What Works Well matters.** Prevents the report reading as pure criticism. Preserves good patterns.
+- **Append as you go.** Don't try to remember findings to write them at the end.
+
+## Severity definitions (sharper)
+
+- **Critical** — User CANNOT complete a primary task. OR data loss. OR security exposure. OR Network 5xx that the user doesn't see. OR optimistic UI commits and silently fails to roll back.
+- **High** — User gets confused or takes the wrong path. OR console error / warning during walkthrough. OR layout collapse at any tested viewport. OR network 403/404 on authenticated pages. OR placeholder-as-label. OR loading state that never ends.
+- **Medium** — Friction; user succeeds with extra effort. OR weak hover delta. OR inconsistent border radii / icon families. OR pattern-level token violations.
+- **Low** — Polish. 1-2px alignment. Single-instance off-scale spacing. Letter-spacing on uppercase missing.
+
+A console error or layout collapse is automatically High *minimum*. The category "Medium console warning" does not exist in this skill.