Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use on every UI change - Atomic Design levels, reuse-before-build, correct placement, and import direction through the shared component library.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
All web UI follows Atomic Design on top of a shared component library. The quality bar is reuse and correct placement: a new screen is assembled from existing atoms and molecules, and anything genuinely new is added at the right level so the next screen reuses it too.
Core principle: Reuse before you build, and place new components at the level the import-direction rule expects — ui → atoms → molecules → organisms → templates → pages.
No design system yet in this repo (no tokens, no components/ levels, no INVENTORY.md)? Lay the foundation with web-design-system-foundation first — this skill assumes it already exists.
| Level | What | Web examples |
|---|---|---|
ui/ | Vendor layer: generated/wrapped Radix-shadcn primitives | Dialog, Popover, Tabs, Tooltip |
| Atom | Smallest reusable UI, no app logic, variants only | Button, Input, Label, Badge, Icon, Heading, Text, Container, Stack, Link |
| Molecule | A few atoms as one reusable unit | FormField (label+input+error), NavLink, PriceTag, Rating, SearchBar |
| Organism | A page section composed of molecules/atoms (may contain another organism) | SiteHeader, MobileNav, PricingTable, ContactForm, SiteFooter |
| Template | Page skeleton: owns the grid + breakpoints, no data | MarketingLayout, DashboardLayout |
| Page | Route component: data + state wiring, composes templates/organisms | PricingPage, ProjectBoardPage |
src/components/INVENTORY.md.grep -ri button src/components).cva variant, don't change an existing one's output).INVENTORY.md line in the same commit.ui/.ui ← atoms ← molecules ← organisms ← templates ← pages. A level imports only from levels to its left, plus lib/. Same-level imports are allowed ONLY for organisms (an organism may contain another organism). hooks/ and api/ are imported only by pages/. Where the repo runs ui-guard (from web-design-system-foundation), it enforces this on every build — a violation fails npm run build, it isn't a style note.
gap-*; an atom that sets its own margin breaks every layout that reuses it.cva, never a pile of boolean props; className is merged last via cn() and callers use it for layout only (width, grid placement, alignment) — never to restyle the atom; a new look is a new variant.focus-visible, active, disabled, aria-invalid, loading where relevant.ref as a plain prop (React 19) or forwardRef (React 18) — a shared atom that can't take a ref breaks the first caller that needs to measure or focus it.Three or more isX booleans on one component is a sign it's actually two components, or that it needs children/named slots instead. Prefer:
// ❌ boolean-prop explosion
<Card isHighlighted isCompact hasFooter footerText="Save" />
// ✅ composition: the variant is a real prop, content is children/slots
<Card variant="highlighted" size="compact">
<Card.Footer>Save</Card.Footer>
</Card>
An explicit variant component (PrimaryCard vs <Card variant="primary">) is fine when the two really don't share markup — don't force one component to branch internally just to avoid two small ones.
A template owns the grid and the breakpoints (sm:/md:/lg: live here) — organisms placed inside it should not assume a specific viewport width. Where an organism's internal layout depends on the space it's given rather than the screen, use a @container query or let the parent grid/flex sizing drive it, so the same organism works in a full-width template and a narrower sidebar slot.
Map the repo's own folders onto these levels (e.g. components/common/ ≈ atoms+molecules) and follow them as found. Never restructure an existing repo's component layout inside a feature task — if the mapping is genuinely broken, propose a follow-up task instead of doing it inline.
Grep every caller first (grep -r "from '@/components/atoms/Button'" src). Keep the change backward-compatible (new optional prop, new variant) or update every caller in the same task — never leave some callers on an old, incompatible shape. Update INVENTORY.md if the component's variants/props changed. npm run build must stay green.
Task: "add a pricing section to the marketing site."
INVENTORY.md, grep components/atoms → Button, Badge, Heading already exist. Reuse them.molecules/ prices a plan → new molecule PriceTag (amount + interval) and molecule PlanCard (Heading + PriceTag + Text + Button, props in, onSelect callback out).organisms/ lists several plans → new organism PricingTable (grid of PlanCard, grid-cols-1 sm:grid-cols-2 lg:grid-cols-3, container-aware, no data fetching).PricingPage (page) loads the plan list, wires onSelectPlan, and composes MarketingLayout (template, already exists) around PricingTable.INVENTORY.md lines (PriceTag, PlanCard, PricingTable) in the same commit, each with a co-located RTL test (see component-testing).Only PriceTag, PlanCard, and PricingTable are new; Button, Badge, Heading, and MarketingLayout are pure reuse.
margin-* or position: absolute.isX, isY, isZ) instead of a variant prop or composition.md:/lg: assuming it's always full-width — breaks the day it's reused in a sidebar.bg-blue-500) inside a component — ui-guard, where it runs, fails the build on this.hooks/ or a client from api/.INVENTORY.md line.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when the diff adds or changes an endpoint, resolver, RPC, job or query that takes an object id, a role check, a request binding or a tenant filter - BOLA/IDOR, function-level authorization, mass assignment and tenant scoping
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use on every UI change - semantic HTML, labels for controls, keyboard-navigable dialogs/menus, visible focus, and never color as the only signal
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
How to work a task returned with review, QA or UAT findings. Use when a task is in need_revision or PR review comments are in your context.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when the repository keeps its alerting in code, or a person asks for alerts outside TaskTrooper - PrometheusRule YAML, a Cloud Monitoring alert policy in Terraform, a Datadog monitor, each routed to TaskTrooper's alert ingest URL so it opens an incident here
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.