Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
Python aianthropicautomationclaude-codeclaude-skillscloudflaredevtoolsproductivityreactskillstailwindvite
ux-audit: add Round-Trip Workflow Integrity check + 10th scenario
Jeremy Dawes87033e7d3967
diff --git a/plugins/dev-tools/skills/ux-audit/SKILL.md b/plugins/dev-tools/skills/ux-audit/SKILL.mdindex bd9ef573..a71a1ec3 100644--- a/plugins/dev-tools/skills/ux-audit/SKILL.md+++ b/plugins/dev-tools/skills/ux-audit/SKILL.md@@ -1,6 +1,6 @@---name: ux-audit-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'."+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 (10 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---@@ -48,31 +48,9 @@ A console warning is High *minimum*. A 5xx is Critical *automatically*. There is### Allowlist for known noise-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.+Some apps have known-noisy console / network categories that aren't bugs (Sentry info logs in dev, browser-extension chatter, expected 401 on auth-check probes). The audit reads `.jez/audit-config.yml` (or `.json`) before Phase 3 and applies the allowlist when classifying findings. Allowlisted entries stay in the Interaction Manifest (transparency) but suppress from the findings count. The verdict block always shows both raw and allowlisted counts — `Console warnings: 3 (1 allowlisted, 2 reportable)`.-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:--```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-```--Allowlist semantics:--- 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)`.--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.+Default without a config: every console error / warning is a finding. Allowlist is opt-in per project, not a global escape hatch. Full format, semantics, surface overrides, and quarterly-audit discipline in [references/audit-config.md](references/audit-config.md).## Phases (in order)@@ -80,7 +58,7 @@ When you find yourself wanting to allowlist something for the first time on a pr2. **Discovery** — sitemap, thread inventory, element inventory3. **Walkthrough** — Interaction Manifest, threads, element exhaustion, multi-pane stress, first-time-user lens, live interaction smoke4. **Polish** — visual polish sweep, component perfection checklist-5. **Stress** — scenario battery (9 scenarios) + extended stress recipes+5. **Stress** — scenario battery (10 scenarios) + extended stress recipes6. **Verdict** — verdict state, hard-gate scorecard, perfection roadmap, findings with reproduction7. **Fix-and-verify** — patch findings, re-walk affected slices, update report@@ -273,6 +251,25 @@ Code reading verifies a button exists and has an `onClick`. It does not verify cKnown 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).+### Round-trip Workflow Integrity (mandatory)++For every workflow that traverses pages — A → B → A — the audit must exercise the full round-trip. The bug pattern: a mutation on B creates data tied to A, but B's mutation only invalidates B's own query key. A is stale on return. User sees an empty list, thinks the action failed, retries or gives up.++For each cross-page workflow:++1. Capture A's state (count, latest timestamp, badges).+2. Trigger the action on A that navigates to B.+3. Complete the mutation on B.+4. Navigate back via the discoverable back affordance — NOT a hard reload.+5. Verify A reflects the new state (incremented count, new row, updated timestamp, decremented badge).+6. Verify the back affordance was discoverable: visible without hover, labelled with parent name, sized like a control, sidebar still shows parent context.++If A is stale OR the back affordance is hidden, log a finding (severity High — looks like data loss to the user). Reload that "fixes" the staleness is the smoking gun.++Build the round-trip surface inventory during Phase 2. For each mutation across the app, list every parent query key it should invalidate. Particular smells: header badges (notification bell, unread counts, pending pips) that depend on data multiple pages can mutate.++Full protocol, surface inventory format, detection heuristics, and findings template in [references/round-trip-workflows.md](references/round-trip-workflows.md).+### Responsive SweepLayout-detection JS at every width (overflow, clipping, invisible text). Capture transition points. Combined with multi-pane stress above for full coverage.@@ -324,9 +321,9 @@ Full checklist in [references/perfection-checklist.md](references/perfection-che## Phase 5 — Stress-### Scenario Battery (9 scenarios)+### Scenario Battery (10 scenarios)-All nine, always. They catch what screen-by-screen testing misses. Full protocols in [references/scenario-tests.md](references/scenario-tests.md).+All ten, always. They catch what screen-by-screen testing misses. Full protocols in [references/scenario-tests.md](references/scenario-tests.md).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?@@ -337,6 +334,7 @@ All nine, always. They catch what screen-by-screen testing misses. Full protocol7. **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.+10. **Round-Trip Workflow Integrity** — every A→B→A flow: complete mutation on B, verify A reflects new state on return without reload. Discoverable back affordance. Header badges update. The single biggest "the project is just empty when I go back" source.### Extended Stress Recipes@@ -481,11 +479,12 @@ For audits expected to run > 30 minutes, set up a 15-min `/loop` check-in alongs| When | Read ||------|------|| Persona library + writing protocol | [references/persona-lock.md](references/persona-lock.md) |+| Audit-config allowlist format + semantics + surface overrides | [references/audit-config.md](references/audit-config.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) |+| Full protocol for each of the 10 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) |@@ -493,6 +492,7 @@ For audits expected to run > 30 minutes, set up a 15-min `/loop` check-in alongs| 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) |+| Round-trip workflow integrity (A→B→A pattern) | [references/round-trip-workflows.md](references/round-trip-workflows.md) || Long-running audit supervision via 15-min `/loop` | [references/long-running-check-in-pattern.md](references/long-running-check-in-pattern.md) |## Tipsdiff --git a/plugins/dev-tools/skills/ux-audit/references/round-trip-workflows.md b/plugins/dev-tools/skills/ux-audit/references/round-trip-workflows.mdnew file mode 100644index 00000000..26a823b8--- /dev/null+++ b/plugins/dev-tools/skills/ux-audit/references/round-trip-workflows.md@@ -0,0 +1,207 @@+# Round-Trip Workflow Integrity++## Why this exists++Code reviews catch the *outbound* leg of a workflow — "click X on page A, navigate to page B, complete action". They miss the *return* leg — "go back to page A, did the new state appear?"++The bug pattern: a mutation on page B creates/changes data tied to a parent context A, but B's mutation only invalidates B's own query. A's cached state is stale on return. The user sees an empty list, thinks the action failed, retries, creates a duplicate (or worse — gives up and assumes the system is broken).++Static analysis can't catch this — it's a TanStack Query / SWR / Apollo cache-invalidation gap that only surfaces under interaction.++## The smoking-gun example (2026-04-30, vite-flare-starter)++```+1. Open project /dashboard/projects/X — empty conversation list+2. Type prompt + click "Start chat" — navigates to /dashboard/chat?projectId=X+3. Conversation creates, agent replies — works fine on the chat side+4. Click "Back to project" → /dashboard/projects/X+5. Conversation list STILL shows empty state+6. Hard reload → conversation appears+```++Server side was fine. Conversation persisted. But the project-detail TanStack query (`['projects', id]`) didn't refetch because the chat page only invalidated `['conversations']`.++User-facing symptom: "I'm not sure how I get back, the project is just empty if I go back, maybe I can stay in the project when I'm working in a project?" — three problems stacking (weak breadcrumb, sidebar disorientation, stale cache) that all compound the perception of a broken workflow.++## The protocol — required during Phase 3 walkthrough++For every workflow that traverses pages (A → B → A pattern), exercise the full round-trip:++```+1. Open page A. Capture: state, count of items, latest timestamp, current URL.+2. Trigger an action on A that navigates to B (a button, a link, a form-submit).+3. Complete a mutation on B (send a message, create a thing, approve an item).+4. Navigate back to A. Use the discoverable back affordance (breadcrumb,+ browser back, sidebar item) — NOT a hard reload.+5. Verify A's state reflects the new data:+ - Item count incremented?+ - New row visible?+ - Latest timestamp updated?+ - Unread badge updated?+6. ALSO verify the back affordance was discoverable:+ - Visible without hover at first paint+ - Labelled clearly ("Back to {parent}", not just "←")+ - Sized like a control, not decoration+ - Sidebar still highlights the parent context (or has a sub-state)+```++If A is stale or the back affordance is hidden, log a finding.++## Where this lives in the audit++This is **mandatory** for every multi-page workflow. The Interaction Manifest must include a round-trip entry for every cross-page mutation observed. Without it, the verdict is `Incomplete`.++```+ROUND-TRIP MANIFEST — project → chat → project+ [✓] 14:32:01 Open /dashboard/projects/X — capture: 0 conversations+ [✓] 14:32:05 Type prompt "Quote a bathroom reno" + click Start chat+ [✓] 14:32:06 Navigated to /dashboard/chat?projectId=X+ [✓] 14:32:08 Verify breadcrumb visible at first paint:+ "← Quoting / New chat" — yes, ~14em wide, font-medium+ [✓] 14:32:10 Wait for AI reply (Workers AI Kimi K2.6) — completed+ [✓] 14:32:14 Click breadcrumb back-link → /dashboard/projects/X+ [✓] 14:32:15 Verify conversation appears WITHOUT reload:+ expected 1 conversation, got 1 ("Quote a bathroom reno · just now")+ [✓] 14:32:15 Verify sidebar highlight:+ Projects highlighted (not "AI Chat"), no flicker+```++## Surface inventory — every round-trip in the app++Build this list during Phase 2 (Discovery). Each entry is a candidate for the Phase 3 round-trip protocol.++Examples for vite-flare-starter:++| Outbound (A → B) | Mutation on B | Inbound (B → A) | What A must reflect |+|---|---|---|---|+| Project page → Start chat | Conversation created with projectId | Breadcrumb back | New conversation in project's list |+| Spaces list → enter space → send message | Message persisted | Browser back | Last-message timestamp updated |+| Inbox → click finding (opens chat) | Finding marked read | Browser back | Unread count decreases on bell |+| Approvals → approve | Approval status → decided | Sidebar Approvals | Item gone from "Pending" tab |+| Approvals page approve | Approval status → decided | Sidebar Inbox | Item also gone from Inbox unified view |+| Inbox bulk-approve | Approval(s) status → decided | Header bell | Unread count decreases |+| Skills → save edit (with diff approval) | Skill body updated | Skills list page | Updated body shows on next select |+| Connections → connect Google | OAuth + connection persisted | Browser back to /connections | New connection appears in list |+| Routines /new → submit | Routine created | Sidebar Routines | New routine appears in list |+| Settings → API tokens → create | Token created | Same page | List updates without reload |++If any of these is NOT exercised in Phase 3, the audit is `Incomplete` for that surface.++## Detection heuristics++When you can't manually walk every workflow, these heuristics surface candidates fast:++### Heuristic 1 — Cross-key invalidation++Grep the codebase for `useMutation` and check what it invalidates. If the mutation can affect data shown on a *different* page that uses a *different* query key, the mutation MUST invalidate both.++```bash+# Find every mutation+grep -rn 'useMutation' src/client/modules/*/hooks/*.ts++# For each, check invalidations+grep -A 10 'useMutation' src/client/modules/X/hooks/Y.ts | grep invalidateQueries+```++For each mutation, ask:+- "What query keys consume the data this mutation affects?"+- "Are ALL of those keys invalidated?"++The classic miss: mutation invalidates `['inbox']` only, but the same data also appears under `['notifications']` (unread count) and `['approvals']` (approvals tab) — invalidating one leaves the others stale.++### Heuristic 2 — Header badges that depend on list state++Audit every UI badge / unread-count / pip indicator at the top of the layout. Each one is consumer of a query that ANY mutation across the app might invalidate.++Common badges that drift:+- Notification bell unread count+- Inbox unread tab count+- Approvals pending count+- Sidebar item dot ("you have something here")++For each badge, list every mutation that should affect it. Verify each mutation invalidates the badge's query key.++### Heuristic 3 — Breadcrumb size + placement++For every page reachable from a parent, the back-to-parent affordance must satisfy:++- Visible without hover at first paint (not opacity-0 or in an overflow menu)+- Labelled with the parent's name (not generic "Back")+- Sized like a primary control, not decoration+- In a consistent location across pages (top-left or in a breadcrumb row)+- Click target ≥ 32×32px (touch-friendly)++If the back affordance is a small pill near the page title, that's a smell — users don't read pills as wayfinding. Use breadcrumb-style links: `[← Parent name] / Current page`.++### Heuristic 4 — Sidebar context disorientation++When a workflow navigates from page A (sidebar item X highlighted) to page B (sidebar item Y highlighted), but A's context is still active (the user IS still working in X conceptually):++- Sidebar should ideally keep X highlighted (showing the parent context)+- OR the chrome should clearly show the parent context as a breadcrumb / pill / header strip+- WITHOUT one of those, the user feels like they switched apps++This is the single biggest source of "I'm not sure how I got there" UX feedback.++## Findings — how to log++A round-trip finding has two halves:++```+ID: H-N+Layer: Interaction+Severity: High+Surface: /dashboard/projects/:id (round-trip from /dashboard/chat)+Persona: SME owner++Reproduce:+ 1. Open project /dashboard/projects/X+ 2. Type a prompt, click Start chat+ 3. Wait for AI reply+ 4. Click "Back to project" breadcrumb (or browser back)++Observed: Project page shows empty conversations list — "Start a chat to keep+conversations organised and re-use project knowledge." User sees no evidence+the chat just happened.++Expected: Project page shows the new conversation as a row with title ++timestamp ("just now").++Reload-confirms-server-fine: hitting Cmd+R on the project page reveals+the conversation. Server-side persistence is fine. The bug is client-cache.++Evidence: .jez/audit-evidence/2026-04-30/01-project-stale.png+Suspected location: src/client/modules/chat/pages/ChatPage.tsx — the+useChat completion effect invalidates ['conversations'] but not+['projects', urlProjectId].+Suggested fix: when conversationId becomes set + urlProjectId is non-null,+invalidate ['projects', urlProjectId] alongside ['conversations'].+```++Keep severity `High` for round-trip cache misses — they look like data loss to the user.++## Companion checks++After fixing one round-trip bug, sweep for the same pattern across the codebase:++```bash+# Find every mutation that touches a child resource of a parent+grep -rn 'invalidateQueries' src/client/modules/ | grep -v 'queryKey:.*\[\(parent_key\)\]'+```++Then for each mutation that touches a relationship (e.g. conversation has projectId, finding has agentRunId, approval has conversationId, skill has agent), verify ALL parent query keys are invalidated.++## Anti-patterns++- **"Reload always works"** is not a fix. Users don't reload by reflex; they assume the system is broken.+- **`refetchOnWindowFocus: true` as a panacea** — relies on the user actually leaving the tab and coming back. Doesn't help when they navigate within the SPA.+- **Showing a stale list with a manual "Refresh" button** — the user has to know to click it. Better to invalidate on the mutation.+- **Polling intervals "every 30s"** — masks the bug, doesn't fix it. Wastes bandwidth + battery.++## Related skill rules++- `rules/api-client-alignment.md` — server-side returns the data correctly; the client just doesn't ask again.+- `rules/react-vite.md` — TanStack Query patterns + key alignment.+- `rules/think-in-contracts-not-code.md` — the right contract is "every mutation declares which parent query keys it affects". Implementations like `inbox-keys.ts` / `query-keys/index.ts` reduce drift by centralising the relationships.++**Last Updated**: 2026-04-30diff --git a/plugins/dev-tools/skills/ux-audit/references/scenario-tests.md b/plugins/dev-tools/skills/ux-audit/references/scenario-tests.mdindex 3c120112..5b61fbb7 100644--- a/plugins/dev-tools/skills/ux-audit/references/scenario-tests.md+++ b/plugins/dev-tools/skills/ux-audit/references/scenario-tests.md@@ -1,6 +1,6 @@# Scenario Tests-Eight structured tests that go beyond page-by-page evaluation. Each simulates a real-world situation that exposes problems traditional QA misses. Run all eight during an exhaustive audit.+Nine structured tests that go beyond page-by-page evaluation. Each simulates a real-world situation that exposes problems traditional QA misses. Run all nine during an exhaustive audit.---@@ -287,7 +287,7 @@ Plus:----## 8. Second User+## 8. Second User (Role)**Premise**: Most apps have roles — admin vs viewer, staff vs client, owner vs guest. The primary user experience is tested exhaustively. What about the others?@@ -319,6 +319,115 @@ Plus:---+## 9. Lifecycle Position++**Premise**: Same role can experience the app radically differently depending on *when* in the org's lifecycle the user joins. The primary user gets exhaustive testing from a fully-onboarded perspective. What about the founder on day one, the first invitee on day three, and the colleague who joined a workspace that already has a year of history?++These are different products to different users. Empty-state copy that says "Get started by adding your first user" is correct for user #1 and broken for user #2. Activity feeds that look great with 50 contributors may break or feel hollow with one. Defaults that filter to "your work" are great for user #N and meaningless for user #1.++**How to run**:++Test three lifecycle positions, each with the same role (e.g. admin):++### User #1 — Founder (fresh org)++1. Sign up a fresh account / create a new org / start a new workspace.+2. Walk the *initial setup* and *first meaningful task* as the persona.+3. Specifically check:+ - **Onboarding flow**: Was there one? Was it skippable? Did it explain the app's concepts or assume you knew them?+ - **Empty workspace**: Helpful or hostile? Did the dashboard guide the next action or just show "no data" everywhere?+ - **First-task time**: Could you complete one meaningful piece of work in 5 minutes?+ - **Concept introduction**: Did the app teach its own vocabulary as you encountered it, or did you have to figure it out?++### User #2 — First invitee (partial state)++1. From user #1's account, invite user #2 with the same role.+2. Accept the invite as user #2 and walk the same threads as user #1.+3. Specifically check:+ - **Invite welcome**: Did the welcome copy address you specifically, or did it dump you into the founder's setup wizard?+ - **Setup-wizard misfire**: Were you forced through "set up your org" UI when the org already exists?+ - **Wayfinding in partial state**: Could you find your way around an org someone else shaped, with limited data and one peer?+ - **Peer-feature edge cases**: Mentions, assignments, comments, activity feeds, sharing — do they work meaningfully when there's only one other user?+ - **Empty-with-context copy**: Does empty-state copy still say "Add your first user" when *you are* the first user being added?++### User #N — Later joiner (full workspace)++1. Either use a real workspace with established data, or seed a fresh org with rich state (50+ records, 5+ users, established saved views) before running this segment.+2. Join as user #N (or simulate by seeding then signing up).+3. Specifically check:+ - **Onboarding stays out of the way**: You're catching up, not setting up. Does the app skip founder-flavoured onboarding?+ - **Find your work**: Could you find what's *yours* amongst others' content? Defaults filtered to your context, or dumped into "all data"?+ - **Convention learning**: Did the app teach the org's saved views, custom fields, naming conventions — or did you have to ask a teammate?+ - **Joining-the-party UI**: Is there a "what you missed" / "what's relevant to you" affordance, or do you land in a generic dashboard?++**What to report**:++| Position | Setup flow shown? | Onboarding gap | Wayfinding works? | Empty/partial UI helpful? |+|----------|-------------------|----------------|-------------------|--------------------------|+| User #1 (founder) | Y/N + quality | [list gaps] | Y/N + detail | Y/N + detail |+| User #2 (first invitee) | Y/N + quality | [list gaps] | Y/N + detail | Y/N + detail |+| User #N (later joiner) | Y/N + quality | [list gaps] | Y/N + detail | Y/N + detail |++Plus:+- **Same-screen-three-faces inventory**: For each major page, is the empty / partial / full state coherent? Or does one of the three look unfinished?+- **Onboarding scope creep**: Does setup UI bleed into screens user #2 and #N see?+- **Activity feed dignity**: Does the app present activity sensibly when only one user has acted, or does it look hollow?+- **Assignment / mention UX**: Test mentioning user #1 → user #2 with two-user setup. Does the @mention picker work? Are assignment dropdowns useful with 1, 2, 50 users?+- **Default landing**: Does the default dashboard / home view differ usefully by lifecycle position, or is it identical-and-suboptimal-for-most?++**Severity guide**: User #2 force-routed through founder setup wizard is **High**. Empty-state copy that's wrong for the user's lifecycle position ("Add your first user" shown to user #2) is **High**. Activity feed that breaks or shows raw nulls when only one user has acted is **High**. User #N dumped into all-data with no filter / scoping hint is **Medium**. Concept vocabulary never introduced anywhere (must learn from a teammate) is **Medium**. Onboarding shown to user #N when they don't need it (and unskippable) is **Medium**.++**Why this beats the standard "second user" test**: Roles and lifecycle position are orthogonal axes. A viewer who joined on day one and a viewer who joined on day three hundred see different products. Scenario 8 covers the role axis. This covers the time axis.++---++## 10. Round-Trip Workflow Integrity++**Premise**: Real users navigate A → B → A constantly. Open a project, type a prompt, get dropped into chat, agent replies, back to project — does the project show what just happened? When mutations on B affect data shown on A, the cache invalidation often gets missed and A serves stale state. Looks like data loss.++**How to run**:++For every workflow that traverses pages:++1. Capture A's state — count of items, latest timestamp, badge values.+2. Trigger an action on A that navigates to B.+3. Complete a mutation on B (send a message, create a thing, approve an item, save a draft).+4. Navigate back to A using the discoverable back affordance — NOT a hard reload.+5. Verify A reflects the new state (incremented count, new row, updated timestamp, decremented badge).+6. Verify the back affordance was discoverable (visible without hover, labelled with parent name, sized like a control, sidebar still highlights parent).++If the round-trip leaves A stale, log a finding (severity High — looks like data loss). Reload that "fixes" the staleness is the smoking gun.++**Cross-page mutation surfaces to test**:++| Outbound (A → B) | Mutation on B | What A must reflect on return |+|---|---|---|+| Project page → Start chat | Conversation created | New conversation in project's list |+| Item list → detail page edit | Item updated | List shows new title / status |+| Bulk-action page → batch process | Items processed | List + count + header badge update |+| Inbox → click finding | Finding marked-read | Unread count on bell decrements |+| Approvals page → approve | Approval decided | Pending tab + Inbox unified view both update |+| Settings → API tokens → create | Token created | List populates |+| Connections → OAuth → callback | Connection persisted | Connection list shows new entry |+| Routines /new → submit | Routine created | Sidebar + routines list show new row |++**What to report**:++| Round-trip | Stale on return? | Reload reveals data? | Back affordance discoverable? |+|---|---|---|---|+| project → chat → project | Y/N | Y/N | Y/N — describe (size, label, location) |+| (etc) | | | |++**Severity guide**: Stale parent on return is **High** (looks like data loss). Missing/hidden back affordance is **Medium** (recoverable but disorienting). Header badge that doesn't update is **High** (lies to the user about pending work).++**Code-level companion check**: grep for every `useMutation` and check the keys it invalidates against the keys consumed by parent / sibling views. The classic miss: mutation invalidates `['inbox']` only, but the same data also appears under `['notifications']` (badge) + `['approvals']` (sibling tab). Audit each mutation: "what query keys consume the data this mutation affects?" — invalidate them all.++Full protocol, surface inventory, detection heuristics, and findings template in [round-trip-workflows.md](round-trip-workflows.md).++**Why this exists as its own scenario**: it doesn't fit "Wrong Turn Recovery" (user goes correctly, not wrongly), it doesn't fit "Returning User" (test runs in one sitting), and it's invisible to static analysis. It's the single biggest source of "I'm not sure how I got there / the project is just empty when I go back" UX feedback in real apps.++---+## Running the BatteryRecommended order:@@ -331,6 +440,8 @@ Recommended order:6. **Returning User** — repeat threads, measure improvement, check the dashboard.7. **Keyboard Only** — unplug the mouse, re-walk the threads.8. **Destructive Confidence** — ask the user before running. Use a test account if possible.-9. **Second User** — log out, log in as a restricted role.+9. **Second User (Role)** — log out, log in as a restricted role.+10. **Lifecycle Position** — fresh org as user #1, invited as user #2, joining a populated org as user #N.+11. **Round-Trip Workflow Integrity** — exercise every A → B → A flow. Verify A reflects new state on return without reload. The single biggest source of "I'm not sure how I got there / the project is just empty when I go back" feedback.-The First Contact output goes directly into the report and doubles as user documentation draft. The Destructive Confidence and Second User results often surface the highest-severity findings in the whole audit.+The First Contact output goes directly into the report and doubles as user documentation draft. The Destructive Confidence, Second User, Lifecycle Position, and Round-Trip Integrity results often surface the highest-severity findings in the whole audit.