PABCD Initiative Documentation Hub pabcd_initiative codexclaw cli-jaw

dev-frontend

Source: skills/dev-frontend/SKILL.md

Frontend implementation with responsive, accessible, anti-slop UI guidance.

왜 별도 모듈인가
프론트엔드는 '동작'과 '보이는 것' 두 축이 모두 중요하다. 에이전트는 기능적으로 동작하는 코드는 잘 만들지만, 안티슬롭(AI가 만든 티가 나는 UI), 반응형 깨짐, 접근성 누락 같은 시각적/사용성 문제를 놓친다. 이 스킬은 dev-uiux-design이 결정한 디자인 방향을 실제 코드로 구현할 때 필요한 기계적 체크리스트를 제공한다.
LLM 단독 사용 시 발생하는 문제

프론트엔드는 LLM의 구조적 한계가 가장 극명하게 드러나는 영역이다. LLM은 코드를 텍스트 토큰으로 생성하지만, UI는 시각적 결과물이다. LLM은 자기가 생성한 HTML/CSS가 실제로 어떻게 보이는지 '볼 수 없다.' 이건 근본적인 gap이다 — 텍스트가 겹치는지, 이미지가 안 보이는지, 모바일에서 깨지는지 알 수 없다. visual-verification.md가 헤드리스 브라우저 스크린샷을 강제하는 이유가 이것이다.

두 번째 문제는 통계적 수렴(convergence)이다. LLM은 학습 데이터의 통계적 중심으로 수렴하기 때문에, 어떤 프로젝트를 만들든 비슷한 디자인이 나온다. iterative-design.md는 이걸 'The Convergence Problem'이라고 명명한다: '모든 디자인 선택이 학습 데이터의 통계적 중심으로 끌린다. 이 결과로 역량 있고 세련된 결과물이 나오지만, 다른 모든 역량 있고 세련된 결과물과 똑같다.' Diverge-Kill-Mutate 프로세스는 이 수렴을 의도적으로 깨뜨리기 위한 것이다.

세 번째는 anti-slop이다. LLM이 생성하는 UI에는 특정 패턴이 반복된다 — 이걸 업계에서 'AI slop'이라고 부른다. 2024년에는 보라색 그라데이션이었고, 2026년에는 겹겹이 쌓인 그라데이션 워시, 이모지를 아이콘으로 사용, 모든 곳에 둥근 카드, section-number eyebrows (001 Capabilities), em-dash 남용, 'Elevate/Seamless/Unleash' 같은 AI 카피가 새로운 신호다. 이 패턴들은 LLM의 학습 데이터 분포에서 직접 나오는 것이므로 명시적으로 금지하지 않으면 계속 생성된다.

이 스킬이 해결하는 실제 문제

2026 그라데이션 수프 — AI 생성 UI의 1번 신호

보라색-파란색 그라데이션은 2024년의 AI 신호였지만, 2026년에는 '겹겹이 쌓인 그라데이션 워시'가 새로운 1번 AI 신호가 되었다. FE-GRADIENT-01은 뷰포트당 최대 1개의 앰비언트 그라데이션만 허용하고, 카드 3개 이상에 그라데이션이 있으면 플랫 서피스로 교체하게 한다. 모든 그라데이션은 깊이/빛/상태/브랜드 중 하나를 인코딩해야 하며, '빈 영역에 텍스처가 필요해서'는 이유가 되지 않는다.

원노트 팔레트 — 단일 색조 지배

FE-ONENOTE-01: 다크 터미널 그린(매트릭스 해커 테마)은 AI/개발자 도구의 1번 다크모드 AI 신호다. 사이버 시안, 레트로 CRT 앰버, 신스웨이브 마젠타 풀페이지 워시도 같은 실패 패턴이다. UI 요소 5개 중 4개 이상이 같은 색조(±30도)면 원노트다.

AI가 만든 가짜 에셋과 메타 카피

에이전트가 실제 스크린샷 대신 styled div로 만든 가짜 대시보드, 실제 제품 이미지 대신 추상적 그라데이션/블롭을 넣는다. FE-METACOPY-01: UI 카피가 레이아웃이나 반응형 동작을 설명하면(예: '벤토 보드에 겹쳐 보여주는 목업입니다') 그건 메타 카피다. 사용자가 이 요소가 자기에게 뭘 해주는지 말할 수 없으면 잘못된 카피다.

Serif Tasteslop — 세리프를 AI 프리미엄 숏컷으로 남용

2024-2026년 세리프 르네상스(Anthropic, Perplexity의 Editorial New, Medium의 GT Super)가 실재하지만, 에이전트는 이걸 '아무 SaaS에나 세리프를 넣으면 프리미엄'으로 오해한다. aesthetics.md는 세리프가 허용되는 조건(에디토리얼/럭셔리/AI 신뢰 브랜드)과 금지되는 조건(대시보드, 어드민, SaaS)을 명시한다. WIRED가 2026-06-05에 이미 'tasteslop'이라고 이름 붙였다.

Inter/Space Grotesk 관성과 한국어 타이포 무시

에이전트의 기본 폰트 선택이 Inter에 수렴하거나, 'Inter 말고 다른 거'로 Space Grotesk에 수렴한다. 한국어 UI에서는 CJK 리듬, line-height, fallback 동작을 먼저 테스트해야 하는데 Latin-first 폰트를 그대로 적용한다. korea-2026.md와 anti-slop.md가 이 문제를 다룬다.

렌더 아티팩트를 실제 확인하지 않는 문제

에이전트가 HTML을 작성하고 '잘 됐다'고 보고하지만 실제로 브라우저에서 렌더링하면 텍스트가 겹치거나, 이미지가 안 보이거나, 모바일에서 깨진다. visual-verification.md는 헤드리스 브라우저 스크린샷으로 실제 렌더링을 확인한 뒤에만 완료로 판정하게 한다.

이모지를 아이콘으로 사용 — 2026년 가장 강한 AI 신호

인간 디자이너는 프로덕션 UI에서 이모지를 기능 아이콘, 섹션 마커, 장식 요소로 절대 쓰지 않는다. 이모지는 OS별 렌더링이 다르고, 브랜드 정합성이 없고, 크기 조절이 안 되고, 크로스 플랫폼 일관성이 없다. LLM은 이모지가 텍스트 토큰으로 쉽게 생성 가능하기 때문에 아이콘 대신 이모지를 넣는다.

통계적 수렴(Convergence) — 모든 디자인이 같아지는 문제

LLM은 시각적 피드백 루프가 없고(코드를 텍스트로 생성), 일관성을 보상받도록 학습되었고, 긴장감을 느낄 수 없고, 취향이 없다. 10개의 구조적으로 다른 레이아웃을 생성할 수는 있지만, 어느 것이 '놀랍고 동시에 올바른지' 진정으로 판단할 수 없다. iterative-design.md의 Diverge-Kill-Mutate는 이 수렴을 깨뜨리는 프로세스다.

Triggers: frontend, UI, component, CSS, responsive, animation, React, Tailwind, layout

Key Concepts

  • Anti-Slop Enforcement
  • Responsive Viewport Discipline
  • Visual Verification (headless browser)
  • Component Architecture
  • Performance Budget (CWV)
  • Accessibility Patterns (ARIA)

Sections Overview

SectionSummary
Anti-SlopAI가 생성한 티가 나는 패턴을 감지하고 제거한다. 그라데이션, 원노트, 가짜 에셋, 메타 카피.
Responsive Design표준 브레이크포인트와 컨테이너 쿼리 기반 반응형 구현. 100dvh, safe area.
Visual Verification헤드리스 브라우저로 실제 렌더링을 확인한 뒤 완료 판정. 정적 파싱은 증거 아님.
Component Architecture관심사 분리, 상태 관리, 재사용 가능한 컴포넌트 설계.
PerformanceCWV 타겟, 번들 예산, 폰트 로딩, 이미지 최적화.
AccessibilityARIA 패턴, 포커스 관리, 키보드 내비게이션, 스크린 리더 테스트.

Academic References

PaperYearRelevance
Co-Constructed or Constrained? How AI Collaboration Tools Reshape UI Design Practice
CHI 2026
2026AI 도구가 디자이너를 수렴적, 동질적 UI 출력으로 밀어내는 현상을 실증 — 'UI slop'의 학술적 근거.
We're Different, We're the Same: Creative Homogeneity Across LLMs
arXiv:2501.19361
2025서로 다른 LLM들이 비슷한 창작물을 생성하는 현상의 실증. 디자인 수렴의 광범위한 근거.
The Curse of Recursion: Training on Generated Data Makes Models Forget
arXiv:2305.17493
2023LLM이 자기 출력으로 학습하면 꼬리 분포 다양성을 잃는 모델 붕괴 현상.
Does Writing with Language Models Reduce Content Diversity?
arXiv:2309.05196
2023LLM 공동 작문이 어휘적, 아이디어적 다양성을 줄인다는 실증.
Generative AI Enhances Individual Creativity but Reduces Collective Diversity
Science Advances 2024
2024LLM 지원 창작물이 개별적으로는 낫지만 집단적으로는 더 비슷해지는 통계적 모드 붕괴.
An Endless Stream of AI Slop: The Growing Burden of AI-Assisted Software Development
arXiv:2603.27249
2026코드, PR, 문서, 버그 리포트에서 인지되는 AI 슬롭의 실증적 정성 연구.
AI Slop and the Software Commons
arXiv:2604.16754
2026저품질 AI 생성 소프트웨어 콘텐츠의 리뷰, 유지보수, 신뢰, 지식 자원 비용 분석.
On AI-Inspired UI-Design
arXiv:2406.13631
2024LLM/비전/확산 모델의 UI 생성 서베이와 다양성/동질성 트레이드오프.

Official Guides

Full Specification

Show full SKILL.md content

Dev-Frontend — Domain-Correct Frontend Engineering

Build distinctive, production-grade interfaces that fit the product domain, locale, interaction model, and real visual evidence.

This skill has modular references for specialized guidance — read the relevant ones before coding.

It activates by change surface whenever the work is primarily frontend, UI, styling, responsive layout, or animation.

> Role separation: For design judgment — typography/color/layout direction, UX decision

> gates, product personalities, or vague visual briefs — load dev-uiux-design first. This

> skill implements the chosen direction; dev-uiux-design makes the design decisions.

> Implementation anti-slop enforcement stays here; design taste/pattern judgment lives there.

> C0/C1 work (small local patches): See dev §0.0 Work Classifier + §0.1 Patch Fast-Path before reading references.

Modular References

FileWhen to ReadWhat It Covers
references/core/crud-ui.mdC2 list/detail/form product screensState coverage (loading/empty/error/permission), forms, objective UX gates
references/core/anti-slop.mdNew components or UI redesign2026 AI slop patterns, Korean slop, oversized text, fake assets, default UI smells
references/core/aesthetics.mdVisual design decisionsDomain-correct visual direction, typography, color, composition, serif three-role system, expressive/functional layers, AI-brand grammar
references/core/product-density.mdApps, tools, dashboardsDensity profiles for landing, consumer app, SaaS, ops, finance, devtools
references/core/asset-requirements.mdAny public/product/visual surfaceRequired screenshots, images, diagrams, charts, generated bitmaps, or 3D assets, mockup production pipeline
references/core/visual-verification.mdChanges affecting rendered layoutScreenshot, viewport, text fit, state, asset, and motion verification
references/core/korea-2026.mdKorean-first or Korea-facing UIKorean service patterns, CJK typography, formats, mobile flows, Korean serif/myeongjo display
references/core/ux-writing-ko.mdKorean UI copyNatural Korean labels, error messages, tone, spacing, punctuation
references/core/soft-3d-asset-gates.md3D/miniature/character-like visualsToss-style soft 3D vs generic cute asset slop, domain gates
references/core/motion.mdMotion/animation neededCSS animations, Framer Motion, scroll-driven, View Transitions, domain gates, organic bg + capsule label, product-led hero motion
references/core/liquid-glass.mdTranslucent materials, glass chrome, pill-chip surfacesLiquid Glass layer discipline, regular/clear recipes, blur-free pill alternative, perf + a11y gates (verified 2026-07-07)
references/core/iterative-design.mdMulti-round designLLM convergence problem, Diverge→Kill→Mutate process, upgrade techniques
references/core/prototype-variants.mdRunnable design variants?variant= switchers, structurally distinct options, cleanup after winner selection
references/core/typography-wrapping.mdHeading/descriptor text changestext-wrap: balance/pretty, short descriptor category (balance not pretty for 1-3 line text), ch units, rag control, Korean orphan prevention, -webkit-line-clamp conflict
references/core/logo-sections.mdIntegration/partner logo displayMarquee CSS, static grid, orphan cell fix, grayscale treatment, no individual hover
references/core/brand-asset-sourcing.mdBrand logos in UISimple Icons/SVGL sourcing, AI agent strategy, placeholder hierarchy, legal guide
references/core/layout-discipline.mdLanding/marketing pagesHero, eyebrow, section repetition, bento, zigzag, per-section responsive transforms, hero composition grammar (2026)
references/core/consistency-locks.mdAny multi-section pageColor, shape, theme consistency per page
references/core/responsive-viewport.mdLayout or breakpoint changesCanonical breakpoints, page containment, container queries, responsive images, safe area, split-screen
references/core/mobile-ux.mdConsumer/landing pages with mobile trafficThumb zone, touch targets, sticky CTA, mobile section composition, bottom sheet, portrait media
references/core/seo-baseline.mdPublic-facing sites, SSR/SSGSEO meta, JSON-LD, robots.txt, GEO strategies, OG/Twitter cards
references/core/a11y-patterns.mdInteractive widgets, modals, formsARIA patterns, focus management, keyboard nav, screen reader testing
references/core/performance-budget.mdLaunch / auditCWV targets, bundle budgets, font loading, image optimization, build gates, browser connection budgets
references/core/preflight-full.mdLaunch / auditFull ~40-item pre-flight checklist (router §14 keeps only blocking gates)
references/core/theme-switching.mdDark mode / themeCSS custom properties toggle, FOWT prevention, transition, component checklist
references/core/color-system.mdColor tokens, palettes wiring, theme-ready CSSToken layering, oklch() + fallback discipline, color-mix(), light-dark(), Tailwind v4/shadcn wiring, contrast gates (verified 2026-07-07)
references/core/i18n-global.mdMulti-language / RTLRTL layout, pluralization, Intl API, locale switching, content expansion
See also: dev-uiux-design skillVague requests, onboarding, UX statesIntent discovery, design isms, product personalities, onboarding/empty/error patterns
references/stacks/react.mdReact projectsServer Components, hooks, state, TanStack Query, shadcn/ui, performance
references/stacks/nextjs.mdNext.js projectsApp Router, RSC, image optimization, data fetching, middleware
references/stacks/vanilla.mdHTML+CSS+JS (no framework)Zero-dependency, viewport fitting, responsive CSS, progressive enhancement
references/stacks/svelte.mdSvelte/SvelteKit projectsSvelte 5 Runes, SvelteKit 2 routing/actions, snippets, migration from Svelte 4
references/stacks/mobile-native.mdNative mobile app developmentRN/Expo current pairing, Flutter 3.44, KMP, Swift 6, framework selection
references/stacks/astro.mdAstro projectsIslands architecture, multi-framework shell, content collections, SSG/SSR/hybrid

Start with anti-slop.md, aesthetics.md, responsive-viewport.md, and visual-verification.md. Add domain/locale/stack references only when relevant.

For C2 ordinary app screens (form/table/list/detail), crud-ui.md alone suffices; add the style references above for marketing/visual surfaces or C3+ work.

When frontend choices depend on current framework, design-system, browser API,

library behavior, browser-rendered source evidence, or package/source freshness,

read the active search skill and follow its source-fetch and evidence-status

rules before treating external material as proof.

Verification grounding

STRICT: For render/executable artifacts (HTML, SVG, games, UI, charts),

run the real renderer: headless browser, screenshot, canvas check, or equivalent.

Observe the actual output yourself, fix what observation reveals, then re-run.

Static parsing confirms well-formed files; it does not prove the artifact is

visually or interactively correct. One clean observation is enough for unchanged

state; do not re-render unchanged output just to repeat evidence.

---

0. Frontend Routing

Before designing or coding, classify the work:

DecisionOptionsWhy It Matters
Product surfacelanding, app, dashboard, AI tool, public service, education, game, creativeSets density, typography scale, asset requirements
LocaleKorean-first, global/i18n, English-onlySets CJK typography, copy, date/number formats
Densitycampaign, consumer app, productivity, SaaS, ops, finance, developer consolePrevents landing-page composition inside repeated-work tools
Asset neednone, screenshot, product photo, diagram, chart, illustration, soft 3D, game assetPrevents asset-free gradient/card UI
Soft 3D/character gatenot allowed, subtle, primaryPrevents generic cute 3D/mascot slop
Motion intensitystatic, feedback-only, expressive, cinematicPrevents cinematic motion in utility workflows

Default rules:

  • For apps/tools/dashboards, build the actual working surface first, not a marketing hero.
  • For Korean-first work, read korea-2026.md and ux-writing-ko.md.
  • For any soft 3D miniature, mascot, chibi, toy-like object, or character-like asset, read soft-3d-asset-gates.md.
  • For product/brand/object/place/person pages, use concrete visual assets in the first viewport.
  • For finance, government, B2B, admin, auth, security, and developer tools, keep visual warmth restrained and subordinate to clarity.
  • Every user-facing decision point must justify its existence — defaults first, one primary action per screen, choices demoted to progressive disclosure; surface-conditional per density profile (dev-uiux-design UX-LAZY-01 owns the gate).
  • For text-heavy surfaces (landing, marketing, editorial, public service), apply typography wrapping defaults — see typography-wrapping.md. Dashboard table cells are excluded.

---

1. Component Identification

When the user describes UI in vague terms (e.g. "접히는 거", "팝업 같은 거"):

  1. Recommend the best-fit component with reasoning: <Name> — <what it does, why it fits>
  2. Confirm, then proceed

If the user already names a specific component, skip this step.

Reference: component.gallery/components

For new React/Vue/Svelte/Next UI source files, prefer .tsx or typed component files when the repo supports TypeScript. Inherit dev TypeScript strict-compatibility rules.

If frontend structure is unclear, read existing source-of-truth docs/logs first, then document pages, components, routes, state stores, and build commands in the repo's existing SOT before broad implementation.

---

1.5 Objective Gates vs Style Samples

Two different kinds of rules live in this skill (see dev §0.2):

  • Objective UX gates (STRICT/DEFAULT) — accessibility baseline (§7, §11), state coverage

(loading/empty/error/permission), keyboard operability, visible focus, contrast. Missing

these are review findings.

  • Style direction (STYLE_SAMPLE) — design thinking (§2), aesthetics, density profiles,

product personalities, preset tokens, and the concrete values in §4-§5 (palettes, font

choices, pixel max-widths). These illustrate acceptable choices; they are NOT

requirements, must not override an existing design system (Design System Detection stays

MANDATORY), and must never be enforced as universal taste (UX-STYLE-01).

2. Design Thinking

Before coding, commit to a domain-correct direction:

  • Purpose: What problem does this interface solve? Who uses it?
  • Surface: Is this a working tool, dashboard, public service, AI workflow, game, landing page, or editorial surface?
  • Tone: Pick a specific direction. For product tools this often means quiet, dense, trustworthy, and fast rather than loud.
  • Constraints: Framework, performance budget, accessibility requirements.
  • Signature: What ONE thing will make this unforgettable?

When user intent is vague ("깔끔하게", "모던하게", "just make it look good"), read the dev-uiux-design skill and run the User Intent Discovery Protocol before making routing decisions.

If the user cannot answer these questions, use the dev-uiux-design skill's structured preference elicitation flow. Offer product references ("Notion 느낌? Linear 느낌?") and visual comparisons.

Intentionality over intensity. Bold maximalism, refined minimalism, dense utility, and friendly consumer UI can all work when they match the domain.

---

3. Baseline Configuration

Adjust these dials based on what's being built. Present to user if unclear.

DialDefaultRangeMeaning
DESIGN_VARIANCE51-101=symmetric utility, 10=asymmetric art
MOTION_INTENSITY41-101=static, 10=cinematic choreography
VISUAL_DENSITY51-101=art gallery airy, 10=cockpit dense

After Design Read, set dials per dev-uiux-design §2 Dial Setting.

Product density profile (D1-D8 in references/core/product-density.md) sets component class; VISUAL_DENSITY (1-10) sets spacing within that class. These are orthogonal axes.

Adapt dynamically based on user requests. Dashboard → density up. Portfolio → variance up. Data tool → motion down.

Korean app/tool surfaces usually need higher density and clearer hierarchy, not oversized hero text.

---

4. Implementation

Read references/core/aesthetics.md for full guidelines. Summary:

  • Typography: Use domain-appropriate typography. For Korean-first UIs, prioritize CJK-safe stacks before Latin display fonts. Apply text-wrap: balance on all headings AND short descriptors (hero subtitle, card description, caption — anything 1-3 lines). Use text-wrap: pretty only on body paragraphs (4+ lines). pretty has no effect on short text and will leave Korean orphans like "합니다." or "화." on a line alone. See typography-wrapping.md for full rules.
  • Color: Max 1 accent. Use neutral bases (Zinc/Slate) with singular high-contrast accent — avoid purple-on-white.
  • Layout: Match the product surface. Avoid centered-card/hero patterns in repeated-use tools.
  • Motion: See references/core/motion.md. One well-choreographed page load > 10 scattered effects.
  • Assets: Use screenshots, product images, diagrams, charts, illustrations, generated bitmaps, or soft 3D only when they add product meaning.

---

5. Anti-Slop Enforcement

Rule classes (dev §0.2): items below are DEFAULT — deviate with a stated reason; concrete

values and palettes are STYLE_SAMPLE (§1.5); the emoji-as-UI-icon ban is the only STRICT item.

Read references/core/anti-slop.md for full rules. Key standards:

  • Treat unexamined default typography as a slop signal. Choose a domain-appropriate stack; Korean-first UI should use CJK-safe fonts and system fallbacks deliberately.
  • Gradient overuse is the #1 AI tell (2026) — audit gradients first. Budget: max 1 ambient gradient per viewport; gradients on 3+ sibling cards is gradient soup — see anti-slop.md § Gradient Budget
  • One-note theme ban: full-page single-hue washes (terminal green, cyber cyan, CRT amber) are the dark-mode purple-on-white — neutral dark base + accent on <10% of surface. See anti-slop.md § One-Note Theme Ban
  • Use neutral or intentional color palettes — purple gradients on white remain the legacy tell
  • No self-describing meta copy: UI text must sell the product, never narrate the mockup, layout, or responsive behavior ("벤토 보드", "다른 배율로 재사용", viewport pill rows) — see anti-slop.md § Self-Describing Meta Copy
  • Use asymmetric or purposeful layouts — centered-everything reads as template
  • Vary card sizes, spans, and groupings — equal 3-card grids read as generic
  • Bento grids must compose as one interlocking slab: aligned row edges, 1 dominant cell, span tracks content weight, no orphan tail — see layout-discipline.md § Bento Composition
  • Never reuse the same image twice on one page (hero + crop/zoom tile) — each slot earns distinct content
  • Avoid oversized bold hero text inside tools, dashboards, admin, finance flows, and public services
  • Hero composition: the split hero (left bold headline + right boxed screenshot/mockup card) is demoted to paid-conversion LPs; on brand/product homepages the product visual is the stage (full-width, background, or interactive demo), never a right-column card — see layout-discipline.md § Hero Composition Grammar
  • Avoid asset-free UI: abstract blobs/gradients do not replace real visual evidence
  • Avoid generic soft 3D icon packs; soft 3D must be semantic, brand-consistent, and restrained
  • NEVER use emoji as UI visual elements (feature icons, card icons, section markers, buttons) — emoji in production UI is the #1 AI slop signal. Use SVG icons (Lucide/Phosphor/Heroicons). See anti-slop.md § Emoji Slop
  • Warm beige/cream backgrounds with brass/clay accents are banned as defaults for premium-consumer briefs — see anti-slop.md § Premium-Consumer Palette Ban
  • Layout monotony (same family repeated, 3+ zigzag sections, overused eyebrows) — see references/core/layout-discipline.md
  • Color, shape, and theme must be locked per-page and audited before shipping — see references/core/consistency-locks.md
  • Use off-black (#0a0a0a, #111) — pure #000000 lacks depth
  • Responsive enforcement: every multi-column section must declare its mobile/tablet collapse behavior — "it'll work at mobile" is not a plan. See responsive-viewport.md
  • Page containment required: max-w-[1400px] mx-auto or equivalent wrapper. Content stretching to viewport edges on wide monitors is a layout bug
  • Mobile is a different product: section composition, CTA placement, and interaction model change on mobile — it is NOT just "desktop stacked vertically." See mobile-ux.md
  • Use realistic, specific names and brands in placeholder content
  • Write original copy — avoid "Elevate", "Seamless", "Next-Gen" and similar clichés
  • Treat uncontrolled heading line breaks (orphaned single word, no text-wrap, no max-width in ch) as a slop signal — see typography-wrapping.md
  • Treat short descriptors (hero subtitle, card description, caption) using text-wrap: pretty instead of balance as a slop signal — pretty does nothing on 1-3 line text, especially Korean
  • Treat Korean orphan fragments ("합니다.", "화.", "입니다." alone on a line) as a slop signal — always verify Korean text breaks at target viewports
  • Treat generic stroke icons as brand logo substitutes as a slop signal — use actual brand SVGs from Simple Icons, SVGL, or press kits. See brand-asset-sourcing.md

---

6. Performance Guardrails

  • Animate transform and opacity only — layout properties cause jank
  • Grain/noise filters → fixed pseudo-elements only, off scrolling containers
  • will-change sparingly (remove after animation); z-index only for systemic layers
  • Memoize perpetual animations in isolated components
  • Browser connection budgets (≤2 SSE/WS per origin per page, multiplex over

multiplying, no per-component polling): detail + limits table in

references/core/performance-budget.md (this skill owns browser-side budgets;

server connection lifecycle is owned by dev-backend §1)

---

7. Accessibility Baseline

  • Semantic HTML (<button>, <nav>, <main>); keyboard navigation for all interactive elements
  • WCAG AA minimum (4.5:1 normal text, 3:1 large text); visible focus indicators; prefers-reduced-motion
  • Skip link; focus never hidden by sticky headers/bars/sheets/overlays
  • Icon-only buttons need accessible names; charts/status/loading/AI-streaming states need labels or live regions
  • Do not encode meaning by color alone
  • Modals, menus, comboboxes, bottom sheets, command palettes: complete keyboard path —

trap focus, restore on close, Escape; arrow-key navigation; honest aria-expanded/

aria-haspopup/aria-activedescendant; tab order follows visual flow

  • Stress-test Korean long labels and screen-reader names; clipped Hangul is a failure
  • Pointer targets follow WCAG 2.2 AA target-size (24×24 CSS px minimum with exceptions);

44×44px is a conservative product baseline, not the legal minimum

  • Test with screen reader and keyboard-only navigation; deep patterns → a11y-patterns.md

---

8. React Behavior Rules (hooks · performance · forms)

Full guidance moved to references/stacks/react.md § Behavior Rules. Router decisions:

DecisionRule
New custom hookOnly when it owns reusable behavior (subscription lifecycle, async state machine, shared form-field behavior) — never a thin useState alias
MemoizationMeasure first; with React Compiler enabled, remove defensive memo/useMemo/useCallback unless semantics require identity
Perf strategyPure components, local state, correct state ownership (§12 table), split expensive client islands
FormsSimple → controlled + schema (Zod); complex/multi-step → react-hook-form + resolver; field errors with role="alert"

---

12. 2026 Frontend Platform Rules (verified 2026-07-02)

Use this section when modernizing or creating React/Next/Vite frontends. Prefer project

conventions first. Version-detail depth lives in references/stacks/react.md / nextjs.md.

React (19.2.x line)

  • <Activity> (stable): state-preserving hidden UI (tabs, drawers, route shells) — not for security hiding or active subscriptions.
  • useEffectEvent: non-reactive Effect logic needing latest props/state; never call during render or pass to children.
  • Partial Pre-rendering: static shell + explicit dynamic holes + Suspense; nothing request-specific in the shell.
  • React Compiler (stable, optional): measure before memoizing (§8).
  • Performance gate: inspect React Performance Tracks in Chrome DevTools before adding memoization or blaming rendering.

Next.js (16.x)

  • Turbopack is the default bundler (webpack is opt-in --webpack).
  • Cache Components (cacheComponents: true): dynamic by default; cache only explicit use cache + cacheLife + cacheTag; PPR is expressed through Cache Components (the old experimental.ppr flag is gone).
  • Never cache user/session data without a user-scoped cache key.
  • Server Actions: validate server-side, authorize against the resource, revalidate affected tags.

Modern CSS (Baseline check before shipping)

Prefer native CSS before JS layout observers/animation libraries: container queries,

:has(), subgrid (all Baseline widely-available), View Transitions (same-document,

Baseline 2025 newly-available — provide fallback for cautious audiences),

text-wrap: balance/pretty, dvh/svh/lvh units, logical properties, shallow CSS

nesting. Tailwind v4 (CSS-first config, theme variables). Record Baseline status

(widely/newly/caution) for each modern feature used and decide fallback per audience.

Build Tools

  • Vite 8: Rolldown/Oxc is the integrated default bundler (rolldown-vite is only a

Vite 7 migration bridge). Node 20.19+/22.12+; Baseline target Chrome/Edge 111,

Firefox 114, Safari 16.4.

  • Detect Vite 7 vs 8 before editing config — don't assume Rollup/esbuild-era plugins.
  • Do not introduce Webpack-era config unless the app is already Webpack-bound.

Agent-visible runtime diagnostics (DEFAULT)

Prefer dev servers that surface browser/runtime errors to the CLI/agent before relying

on static review: Vite 8 forwards browser console to the dev server (auto-activates for

coding agents); Next 16 ships DevTools MCP. Wire these before debugging rendered behavior.

State Classification

Before adding state, classify it:

State typeOwnerDefault tool
render-local UInearest componentuseState / useReducer
derivedrender calculationexpression / useMemo if expensive
form draftform boundarynative form, React Hook Form, TanStack Form
server/cacheserver/cache layerRSC, Next cache, TanStack Query, SWR
URL/navigationrouterpath params, search params
global client UIexternal storeZustand, Jotai, context
optimistic mutationmutation boundaryuseOptimistic, mutation library
AI streamconversation boundaryappend-only message model + stream status

Rules: Do not store derived state just to sync with Effect. Do not put server state in Zustand. Do not put URL-shareable state only in component state. Keep optimistic state reversible.

Design System Detection (MANDATORY — before creating tokens)

Before inventing design tokens, check:

  1. Does the project have an installed design system? (grep -r "material-ui\|@mui\|carbon-components\|@carbon\|@fluentui\|govuk-frontend\|uswds" package.json)
  2. Does the project have existing tokens? (find . -name "tokens.*" -o -name "theme.*" -o -name "design-system*")
  3. Does the brief name a specific design system?

If YES to any: use the official package. Do not recreate CSS by hand.

SystemPackageImport
Material@mui/materialimport { Button } from '@mui/material'
Carbon@carbon/reactimport { Button } from '@carbon/react'
Fluent@fluentui/reactimport { Button } from '@fluentui/react-components'
GOV.UKgovuk-frontendimport 'govuk-frontend/dist/govuk/all.scss'
USWDS@uswds/uswdsimport '@uswds/uswds/css/uswds.css'

If NO: proceed with dev-uiux-design/references/design-system-bootstrap.md.

shadcn/ui and AI-Assisted UI

  • Inspect existing installed components before adding new ones
  • Use project's components.json, aliases, tokens, and registry conventions
  • Do not hallucinate design-system components; verify against local source
  • Remove demo-only copy and unused variants

For AI-native interfaces (chat, agent, copilot), design explicit states: empty → prompt ready → submitted → streaming → tool call → result → complete → feedback. Never fake streaming, citations, or tool calls.

---

13. Error Boundaries

Wrap each major section (not the whole app); boundary renders friendly message + retry +

report link; log to monitoring in componentDidCatch; never show stack traces to users.

Error hierarchy: field-inline → form-summary → section Error Boundary → page error.tsx

→ root boundary (offline/crash page).

---

14. Pre-Flight Gates

Gates apply to production surfaces (dev §0.4 shared definition); prototypes and

internal demos are exempt unless production polish is requested.

Full ~40-item checklist: references/core/preflight-full.md — run it for launches

and audits. The blocking gates below are the minimum for every production delivery:

  • [ ] Design Read declared before code (dev-uiux-design §2); surface/locale/density/asset/motion classified (§0)
  • [ ] Anti-slop enforced (§5) — incl. emoji-as-icon ban (STRICT)
  • [ ] Loading, empty, and error states provided
  • [ ] Accessibility baseline (§7): keyboard path, focus management, contrast, reduced motion
  • [ ] Mobile collapse per section type + touch targets ≥44px + min-h-[100dvh] + page containment
  • [ ] State classified before adding store/Context/Effect/cache (§12 table)
  • [ ] Forms: schema validation + field-level errors (§8)
  • [ ] Korean-first UI: CJK typography + word-break: keep-all + orphan screenshot check
  • [ ] AI UI states honest: no fake streaming, citations, or tool calls
  • [ ] Core Web Vitals are the performance gate (INP ≤200ms field data); Lighthouse

Performance score is an advisory smoke signal, not the blocker — budgets in performance-budget.md

  • [ ] Rendered verification run (§ Verification grounding): screenshots at mobile/tablet/desktop
  • [ ] Error Boundaries wrap major sections (§13); stack-specific rules followed (references/stacks/)

---

15. Backend Contract & Security Alignment

ResponsibilityOwner
Response envelope shape (success, data, error, meta)dev-backend defines, dev-testing verifies
Consumer-side fixture alignmentFrontend — keep mocks in sync with fixtures/contracts/; payload changes update contract tests BEFORE merging (dev-testing §3.5)
Error display mappingFrontend maps error.code to messages; never parse error.message for logic
CSP/XSS/token storagePolicy: dev-security §5/§2. Frontend implements: no inline scripts/eval; sanitize dangerouslySetInnerHTML (DOMPurify) or avoid; httpOnly cookies over localStorage; never flash protected content

Playwright smoke validates rendered flows AFTER API + contract tests pass; frontend unit

tests mock the same envelope shape as dev-backend §5; error-code changes update

frontend error-mapping tests.