D88 · The design system ships shadcn components, and an FE session imports them straight from its artifact
Proposed · 2026-11-04 · zuki, in a CTO session: revamp the design system in Claude Design so it exports shadcn-first components, and make the import a Claude Code FE session that reads the artifact itself; it binds when this page's pull request is merged · Partly supersedes D35 (no Tailwind reset; a component's look only from op-* classes) and D8 (design/opleet and components/opleet as the design system's home)
Decision: The Opleet Design System, made in Claude Design, is revamped so that it publishes shadcn components: React components built on Radix primitives and styled with Tailwind CSS v4 utilities that read the Opleet tokens. apps/web takes them as they are published. The op-* stylesheet and the twelve components ported from it are retired once the shell and every page use the new ones.
- What the artifact publishes, as published files of the artifact:
- the tokens, light and dark, as shadcn's variables (
--background,--foreground,--primary,--primary-foreground,--muted,--accent,--destructive,--border,--input,--ring,--radius, the chart and sidebar sets) mapped from the Opleet tokens, with the Opleet names kept beside them; - one stylesheet in Tailwind v4's CSS form (
@import "tailwindcss",@theme inline), with no tailwind.config file; - dark mode on
[data-theme="dark"], through@custom-variant dark, because the shell's theme cookie already sets that attribute; never a.darkclass; - a shadcn registry:
registry.jsonand one.tsxfile per component, importing only@/lib/utils(cn()), Radix packages,class-variance-authorityandlucide-react; - a preview page of every component in both themes, and a
CHANGELOGwith the artifact's version.
- the tokens, light and dark, as shadcn's variables (
- Where it lands in apps/web: the stylesheet and tokens in
design/opleet/, the components incomponents/ui/(shadcn's own place,@/components/ui/<name>),cn()inlib/utils.ts, andcomponents.jsonat apps/web's root.@ui/keeps pointing at the design system's components until the last op-* import is gone, then it points atcomponents/ui/. - Nobody edits
components/ui/ordesign/opleet/by hand, as with the generated database types (D22). A missing component or variant is an issue for zuki, who changes the design system in Claude Design; the next import brings it. A page composes components and lays them out with utilities; it never restyles one. - Tailwind's reset (preflight) is on, and Tailwind's default theme stays off: every value comes from the tokens. The cascade layers of D35 stay, so a page's utilities still never override a component's own classes by accident.
- The import is a Claude Code FE session reading the artifact, nothing else. zuki starts a Frontend Engineer session in Claude Code, locally or in the cloud, and names the artifact's link. The session reads the artifact with its Artifact tool (the file listing, then each published file by its path), writes the files into apps/web exactly as published, records the artifact's version and each file's SHA-256 in
design/opleet/SOURCE.md, installs the packages the components import, runs the checks and opens a pull request intointegration(D81). There is no zip, no copy by hand, and no file written from memory: a file the session can't read from the artifact is not imported, and the pull request says so. - zuki runs it at L0 on his Mac:
pnpm install,pnpm check, the Playwright specs on the local stack, and a look at/design-previewin both themes. Then he reviews and squash-merges the pull request.
Why: zuki, 2026-11-04. M1 to M7 need dialogs, sheets, menus, tabs, popovers and form controls with the right keyboard and focus behaviour. opleet.css has their looks but only twelve of them exist as React components, and none has that behaviour. Taking the components from the design system, built on Radix, gives both at once, and keeps the design system the single source of the look (D8's point) without a second, hand-written component set beside it. Doing it before M1 is cheapest: today only the shell, the error pages, the design preview and the twelve components use the design system.
Options:
- (a) Radix primitives wrapped by hand in op-* components. Keeps D35 as it is, but every component's behaviour is written and kept in this repository, and the design system can't show it.
- (b) shadcn from its public registry, restyled in apps/web. Fast to start, but the look would be decided in code, not in the design system, and drift from it.
- (c) shadcn components published by the design system itself (chosen). One source for the look and the components; the import is mechanical and repeatable.
Consequences:
- The timeline: a new M0-tail row, FE pack H, the first import and the move of the shell, the error pages and the twelve components onto the new components. It waits for the revamped artifact and for this decision. M1's first slices that need a dialog or a sheet wait for pack H.
- D35: partly superseded. Tailwind stays the way apps/web lays pages out, configured in CSS, with values from the tokens. Its "no reset" and "a component's look comes only from its op-* classes" no longer apply once pack H is merged.
- D8: partly superseded. The design system still stays inside apps/web and becomes a package only when a second app needs it; its home is
design/opleet/andcomponents/ui/, andcomponents/opleet/is removed by pack H. - The design-system guide (Frontend Engineer) is rewritten by pack H: where things live, the import, the no-hand-edit rule, and FE-M0-10's restyling check, which moves from op-* classes to
components/ui/. - Unchanged: Indonesian first (D7, D29); every page's rules before its tests before its code (D27); the design preview off unless
NEXT_PUBLIC_DESIGN_PREVIEW=1(R-APP-06); the error pages' rules (R-APP-07 to R-APP-10), which pack H's specs must still pass. - Revisit when a second app needs the components: then they become a package, as D8 says.