Skip to content

Add design specifics and a self-critique rubric to frontend-design#5

Merged
waybarrios merged 3 commits into
mainfrom
frontend-design-self-critique
May 27, 2026
Merged

Add design specifics and a self-critique rubric to frontend-design#5
waybarrios merged 3 commits into
mainfrom
frontend-design-self-critique

Conversation

@waybarrios

@waybarrios waybarrios commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • frontend-design was pure aesthetic prose with no self-review. This adds four things (reworded from cited sources, still < 500 lines):
    • Concrete anti-default moves — font-by-vibe picks (expanded "avoid" list incl. Space Grotesk), layout archetypes (bento/split/asymmetric), extreme type contrast, semantic CSS-variable tokens + dark-mode-as-token-swap, one orchestrated page-load.
    • An objective self-critique rubric the model runs before returning — WCAG 2.2 AA contrast, native semantics, alt, first-rule-of-ARIA, visible focus + keyboard operability, 320px reflow, plus craft checks (type scale, line-height >= 1.5, spacing scale, prefers-reduced-motion). Concrete pass/fail checks, since models over-praise their own work.
    • A "vary across generations" rule + a self-critique check against template sameness — the font/layout lists are seeds to rotate, not a fixed menu (so they don't become the next Space Grotesk); two different products must not ship as the same template.
    • Optional, cross-platform validationhtml-validate (static), pa11y/axe (rendered DOM), and an opt-in, vision-only Playwright screenshot->critique loop (text-only models skip it).
  • New tests/frontend-design.test.mjs (5 checks) guards the additions; the command is regenerated from the skill and stays in sync.

Validation

  • Deterministic: npm test -> 60/60 pass (skill-lint + frontend-design content guards). Skill 89 lines / command 91 (< 500); descriptions identical, command inlines the body.
  • Sources: synthesized from Anthropic's frontend-aesthetics cookbook and "Harness design for long-running apps" (2026-03-24), Vercel v0, shadcn/ui, and WCAG 2.2 / MDN (verified 2026-05-27).

Real run — /frontend-design on a NEBULA sci-fi magazine brief

Generated in OpenCode. The skill produced a distinctive, on-brief UI — a dark editorial aesthetic with an acid-green accent, a condensed display face (not Inter/Roboto), an ISSUE 001 detail card, and three differentiated pricing tiers — i.e. non-generic output, exactly what the rewrite targets.

NEBULA — hero

NEBULA — pricing tiers

The skill was pure aesthetic prose with no self-review. This adds three
sections, reworded from cited sources and kept under 500 lines:

- Concrete anti-default moves: font-by-vibe picks, layout archetypes, type
  contrast, semantic CSS-variable tokens, one orchestrated page-load.
- An objective self-critique rubric the model runs before returning (WCAG 2.2
  AA contrast/semantics/alt/focus/reflow plus craft checks), framed honestly
  since models tend to over-praise their own output.
- An optional, cross-platform validation note (html-validate static; pa11y or
  axe for rendered DOM), including an opt-in vision-only Playwright screenshot
  loop that text-only models skip.

Adds tests/frontend-design.test.mjs to guard the additions. The command is
regenerated from the skill and stays in sync.
The skill already warned against converging on common choices, but the new
font and layout lists risk becoming the next default the way Space Grotesk
did. This adds an explicit "vary across generations" rule — treat the lists
as seeds to rotate, deliberately diverge when a brief resembles a prior one,
and never ship two different products as the same template. A matching
self-critique check rejects output that reads as a default pattern or a
previous generation. A test guards the rule; the command is regenerated from
the skill.
Output of running the rewritten frontend-design skill in OpenCode on a NEBULA
sci-fi magazine brief: a dark editorial aesthetic with an acid-green accent, a
condensed display face (not Inter/Roboto), and three distinct pricing tiers.
Concrete evidence the skill produces distinctive, non-generic UI. Linked from
the PR's Validation section.
@waybarrios waybarrios merged commit e0d54b1 into main May 27, 2026
1 check passed
@waybarrios waybarrios deleted the frontend-design-self-critique branch May 27, 2026 19:53
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