Skip to content

feat: add seven UX-laws lenses (complete the /ux-laws-review roster)#4

Open
vigneshsubbiah16 wants to merge 1 commit into
mainfrom
feat/ux-laws-seven-lenses
Open

feat: add seven UX-laws lenses (complete the /ux-laws-review roster)#4
vigneshsubbiah16 wants to merge 1 commit into
mainfrom
feat/ux-laws-seven-lenses

Conversation

@vigneshsubbiah16
Copy link
Copy Markdown
Contributor

Summary

  • Adds the seven remaining UX-laws lenses to complete the /ux-laws-review roster. Combined with trust-and-honesty (shipped in PR feat: add /ux-laws-review parent + trust-and-honesty lens #2), every law in the 30 Laws of UX (re-weighted for 2026 AI-native development) now lives in exactly one canonical lens.
  • All 10 S-tier laws are accounted for with zero double-coverage; the parent skill's surface-aware preset routing resolves cleanly for all 5 surface presets.
  • Each lens file mirrors the canonical trust-and-honesty.md template; identical JSON output contract across all 8 lenses so the parent skill assembles a unified scorecard at /build Step 4.2 without per-lens schema awareness.

The seven lenses

Lens Laws (⭐ = S-tier) Evidence vocabulary Routes to
speed-and-flow Doherty ⭐, Flow ⭐, Goal-Gradient, Zeigarnik, Parkinson Quantitative — INP/LCP p75, waterfalls, progress affordances checkout, AI chat, full
cognition Cognitive Load ⭐, Working Memory ⭐, Miller, Chunking, Serial Position Structural — decision counts, chunk-boundary analysis onboarding, dashboard, settings, chat
decision-architecture Choice Overload ⭐, Hick, Occam ⭐, Pareto Structural + behavioral — choice counts, default presence checkout, settings, full
attention Selective Attention, Von Restorff, Paradox of the Active User ⭐ Visual + behavioral — heat-map analysis, power-user-vs-first-timer onboarding
familiarity Jakob, Mental Model ⭐ Conceptual — convention adherence, comparison-vs-leaders onboarding, settings
gestalt-visual Common Region, Proximity, Similarity, Uniform Connectedness, Prägnanz Visual — annotated screenshots, grouping violations dashboard
targeting Fitts Quantitative + visual — target size in px/tap area, thumb-reach zones dashboard

S-tier coverage (10/10, no duplicates)

  • speed-and-flow → Doherty Threshold, Flow
  • cognition → Cognitive Load, Working Memory
  • decision-architecture → Choice Overload, Occam's Razor
  • attention → Paradox of the Active User
  • familiarity → Mental Model
  • trust-and-honesty (already merged) → Tesler's Law, Peak-End Rule

Decisions taken (with council weigh-in)

Reviewed by principal-architectprincipal-engineercode-simplifierelite-pr-reviewerprincipal-architect (final sign-off):

  1. Cross-lens law overlap: Hybrid — one canonical lens per law, with italicized read-only *Related law:* cross-references elsewhere. Never re-score a law in a non-canonical lens.
  2. Lens size asymmetry: Kept targeting as an intentional one-law lens (~91 lines). Parent routing already wires it as a peer.
  3. Template fidelity: Six-section skeleton fixed across all 8 lenses; section contents adapt to lens nature (quantitative / visual / conceptual).
  4. Gating thresholds: Uniform across lenses (lens avg < 6 = WARN, < 4 = FAIL). S-tier flag mechanism in the parent — not custom thresholds — handles per-law calibration.
  5. Output JSON contract: Identical across all 8 lens files. Non-negotiable for parent-skill consumption.

Cross-references (today, both → Tesler's Law)

  • decision-architecture.md Choice Overload row → italicized one-liner pointing readers to Tesler's Law in trust-and-honesty (smart defaults are where the irreducible complexity lives architecturally)
  • familiarity.md Mental Model row → italicized one-liner pointing readers to Tesler's Law in trust-and-honesty (pretending the agent's complexity is gone breaks the user's mental model fastest)

Surface-preset routing now resolves cleanly

Preset Lenses run
checkout trust-and-honesty + decision-architecture + speed-and-flow
onboarding familiarity + attention + cognition
dashboard cognition + gestalt-visual + targeting
settings cognition + decision-architecture + familiarity
AI chat trust-and-honesty + speed-and-flow + cognition

All eight referenced lens files exist on disk after this PR lands.

Review findings addressed

elite-pr-reviewer pass 1: 0 CRITICAL, 1 WARNING (self-downgraded as the pattern was consistent across all 3 multi-S-tier files), 11 INFOs (10 confirming-clean observations + 1 actionable).

Action taken: renamed snake_case key paradox_active_userparadox_of_the_active_user in attention.md to match the architect's plan (3 occurrences). All other observations were confirming the implementation matches the plan.

principal-architect post-fix sign-off: READY TO MERGE — 7 files scoped, paradox rename consistent across all 3 usage sites, S-tier coverage 10/10 with no duplication.

Out of scope (separate follow-up PRs)

  • /eng-blocker-council and /ux-blocker-council skills — referenced as forward-references in commands/build.md Step 5 (shipped in PR feat: fan out three reviewers in parallel at /build Step 4 #3); now genuinely the next thing to build
  • Modifications to the parent commands/ux-laws-review.md — already stable, governs lens routing

Test plan

Markdown skill library, no automated test framework. Verification by inspection (architect's 7-check plan):

  • markdownlint baseline holds: per-file warning count for the 7 new files matches trust-and-honesty.md baseline (same conventions, same long-line / bare-fence style)
  • install.sh --force installs all 7 new lenses as namespaced commands (/ux-laws-review:speed-and-flow, etc.)
  • Structural consistency: all 8 lens files have exactly 8 H2 headings each
  • JSON output contract: identical top-level keys and per-law sub-keys across all 8 files
  • Surface-preset routing: all 5 presets in the parent's table resolve to lens files that exist on disk
  • S-tier flag accounting: 10/10 S-tier laws covered, each in exactly one lens, no double-coverage
  • Single-PR diff sanity: exactly 7 new files under commands/ux-laws-review/, nothing else changed
  • Manual smoke: invoke /ux-laws-review against a real PR after merge to confirm fan-out behavior across all eight lenses

🤖 Generated with Claude Code

…rchitecture, attention, familiarity, gestalt-visual, targeting)

Completes the 8-lens roster for /ux-laws-review. With trust-and-honesty
(shipped in PR #2) plus these seven, every law from the 30 Laws of UX
re-weighted for 2026 AI-native development now lives in exactly one
canonical lens, and the parent skill's surface-aware preset routing
resolves cleanly for all five surfaces (checkout, onboarding, dashboard,
settings, AI chat).

S-tier law distribution (10 unanimous-high laws, each in exactly one lens):
- speed-and-flow:        Doherty Threshold, Flow
- cognition:             Cognitive Load, Working Memory
- decision-architecture: Choice Overload, Occam's Razor
- attention:             Paradox of the Active User
- familiarity:           Mental Model
- trust-and-honesty:     Tesler's Law, Peak-End Rule (existing)

Each lens file mirrors the canonical trust-and-honesty.md template:
H1 framing > How to use me > Laws covered > What I check > Scoring rubric
> Evidence I collect > Output > Gating behavior > Key principles.
All eight lens files share the same JSON output contract so the parent
skill assembles a unified scorecard at /build Step 4.2 without per-lens
schema awareness.

Evidence vocabularies adapt per lens:
- speed-and-flow:        quantitative (INP/LCP p75, waterfalls, progress affordances)
- cognition:             structural (decision counts, chunk-boundary analysis)
- decision-architecture: structural + behavioral (choice counts, default presence)
- attention:             visual + behavioral (heat-map, power-user-vs-first-timer)
- familiarity:           conceptual (convention adherence, comparison-vs-leaders)
- gestalt-visual:        visual (annotated screenshots, grouping violations)
- targeting:             quantitative + visual (target size, thumb-reach zones)

Gating is uniform across all eight lenses: lens avg < 6 = WARN, < 4 = FAIL.
S-tier laws on critical-flow surfaces (signup, checkout, payment, AI chat)
scoring < 5 escalate to FAIL via the parent's s_tier_flags consumption.
Lenses without S-tier laws (gestalt-visual, targeting) cannot FAIL via
the S-tier path by design.

Cross-references between lenses are italicized read-only rows at the
bottom of relevant check tables, never scoring rows; each law is scored
exactly once. Two cross-references exist today, both pointing to Tesler's
Law in trust-and-honesty (from decision-architecture's Choice Overload row
and familiarity's Mental Model row).

Reviewed by principal-architect (plan), principal-engineer (implementation),
code-simplifier (consistency), elite-pr-reviewer (0 CRITICAL, 1 self-downgraded
WARNING, 11 confirming-clean INFOs). The one actionable INFO (Paradox key
naming) was addressed before commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant