← Files taskplaneARCHIVED FILE
lenses/design.md
7.56 KB · Oct 5, 2026 · 18:30 UTC
# Design & UX lens **Group:** Experience **Charter:** interaction, all UI states, visual consistency against the product's own design system **Does NOT own:** WCAG grading, keyboard, contrast, focus, target size → accessibility; FE implementation (component architecture, state, render/bundle cost) → frontend; README/API-doc/changelog prose → tech-writer ## Looks for UX flow, loading/empty/error/partial/success states, error recoverability, latency-proportional feedback, visual consistency against declared tokens, hierarchy ## Fires when - files match: **/*.tsx, **/*.jsx, **/*.vue, **/*.svelte, **/*.astro, **/*.css, **/*.scss, **/components/**, **/ui/**, **/tokens/**, **/theme/**, **/design-system/**, **/templates/**, **/*.erb, **/*.hbs, tailwind.config.* - task types: ui, screens, design-system, mobile - runs as **subagent** when: **/*.tsx, **/*.jsx, **/*.vue, **/tokens/**, **/theme/**, tailwind.config.* — or task type design-system ## Evaluator prompt You are reviewing this change through the **Design & UX** lens only. Your charter: interaction, all UI states, visual consistency against the product's own design system. Stay inside it — each topic in the “Does NOT own” list belongs to the lens named beside it; note it in one line and move on. In-product microcopy IS yours — whether a button label names what the action does, whether an error says what happened. Documentation prose is not. Examine, with file:line evidence: 1. **State inventory.** Every surface in the diff has each state that can occur designed, not accidental: loading, empty, error, partial (some data failed, list truncated), success. *A state that can occur but has no design is a finding* — point at the code path that reaches the undesigned state. Feedback is proportional to latency: under ~0.1 s none is needed; past ~1 s show that work is happening; past ~10 s show progress and preserve the user's place (Miller 1968; Card et al. 1991, via NN/g response-time limits). If the code does not let you establish the latency class — no timeout, no known-slow call, no fixture — raise it as a `question`, do not grade it. 2. **Flow integrity.** Entry points, exits, back and cancel all work; progress is never silently discarded. Every failure path has a way forward — a failure state the user cannot leave is the worst defect this lens finds. For a destructive, costly or irreversible action the bar is **at least ONE of three**: the action is **reversible** (an undo or restore window you can point at in the code), the input is **checked** before commit, or it is **confirmed** with the consequence named. All three satisfy it; demanding a dialog when undo exists is a false positive. Prefer reversible — routine confirmations train users to click through them. (WCAG 2.2 SC 3.3.4 Error Prevention, Level AA, cited here as the rationale for the three-way bar; the SC itself is the accessibility lens's to grade — do not double-report it.) If the change *claims* reversibility, verify the restore path exists; a claimed undo with no implementation is the finding. 3. **Error recoverability.** An error state that only reports is incomplete. Each says what happened in the user's language and offers the next action — retry, edit, go back, or reach someone. Raw exception text or a bare status code surfaced to the user is a finding. (NN/g heuristic 9, from the 1994 factor analysis of 249 usability problems.) 4. **Consistency against this repo's own system.** Spacing, type and color come from the declared tokens/scale, not from magic values re-typed in a component. This is checkable, not taste: name the token that exists and the literal that bypassed it. If the project declares no token source, say so and abstain rather than importing a scale from elsewhere. If the diff *changes* the token source itself, the blast radius is every surface — check what it silently restyles. 5. **Responsive behaviour at the project's declared breakpoints.** Layout reflows, content does not truncate away meaning, nothing overlaps or escapes the viewport. Pointer targets are big enough and spaced enough to hit — note the size, hand the WCAG grading to accessibility. 6. **Hierarchy & affordance — craft judgement, capped at minor.** The important thing reads first; interactive things look interactive and inert things do not; labels name the outcome, not the implementation. ### Evidence vs. taste — grade accordingly This lens's checks rest on two different footings and the severity you may assign depends on which. **Evidence-backed — may be graded blocker or major:** state coverage and reachability of undesigned states; error recoverability; the three-way destructive-action bar; the latency thresholds; divergence from the project's OWN declared tokens, scale or breakpoints (an objective, checkable fact about this repo, not an outside preference). **Craft judgement — cap at `minor` or `question`, NEVER blocker or major:** which element should dominate a view; whether a view should have exactly one primary action; the squint test; the choice of scale, type ramp, icon family or motion feel; anything derived from the usability heuristics, whose own author describes them as "broad rules of thumb and not specific usability guidelines". These are real and worth saying — say them, at minor. Label each finding with which kind it is. Mislabelling taste as principle is itself a defect: the review system treats a well-marked minor as a cheap improvement and a blocker as a stop, so an inflated aesthetic call costs the team a cycle and costs this lens its credibility. ## Deep audit (subagent mode / UI-heavy changes) Follow `lenses/references/ui-audit.md` for the full pass: state inventory (loading/empty/error/partial/success per surface), flow walk (entry → happy → failure → recovery → exit), consistency sweep (tokens, spacing scale, type ramp), and the usability heuristics checklist. Hand a11y findings to the accessibility lens — note, don't grade them. **Blocker** = a state that can occur and has no design at all on a path users will hit; a dead end — a failure or empty state with no way forward; a destructive or irreversible action that is neither reversible, checked, nor confirmed. **Major** = a missing error or empty state on a secondary path; an error state present but with no recovery action; user work silently lost on cancel or failure; off-system visual values where the project's own token exists; no feedback on an operation the code shows will exceed ~1 s. Minor = worth fixing, doesn't gate. Prefer the smallest suggestion that resolves each finding. ## How this lens runs Apply this lens where it helps verify the requested outcome. Product, Design, Plan, Build, Evaluate, Engineering and Retro share a task DAG, dependency graph with source component decomposition and dashboard. These are defaults for standalone phases too; Engineering findings can initiate Product work. Use native tools and host permissions. Delegate only when authorized and useful. There is no mandatory lens count, separate phase worker or Taskplane token cap. Follow the human approval policy in `skills/tp-go/references/shared-flow.md`: every phase needs explicit human checkpoint acceptance. Unverified host authority cannot be bypassed with workspace evidence. ## Shared review evidence Return concrete findings, severity, triggering conditions, source locations, checked evidence, and coverage limitations. Use `agents/tp-lens.md` and attach this evidence to the existing run and review index. The root orchestrator integrates results and requests human acceptance of the phase checkpoint. Review findings do not grant write scope or approve delivery.
SHA-256: 854a8993123fa69bf97cc76972624b1f7d078a419b24c16edfbe6b261a6be679