feat(create): add AI-native Studio builder experiment#288
Conversation
Add a third, opt-in /create experience gated behind ?studio=true,
alongside the shipped builder and the ?lab panel experiment (both left
untouched). Studio is a canvas-first, AI-native rethink of the design-
system builder.
What's new:
- Canvas-first shell: thin domain dock + collapsible inspector on the
left, the live preview as the hero, an AI copilot on the right, and a
system-health status bar. The inspector reuses the panel-lab control
widgets (already wired to the live design system) with its own row
chrome, and stays mounted across domain switches (content swaps in
place).
- AI copilot + omnipresent ⌘K command field: natural-language prompts
("warmer", "feel like Linear", "teal brand") mutate the SAME live
design-system state the manual controls edit, so the preview re-themes
instantly. Each turn is undoable. The engine is a local, simulated
intent parser (UI-only, no network) returning an Action[] shape a real
model call can later produce. Includes live WCAG contrast insight and
"generate from" image/URL/screenshot demos.
- New experimental axes (Brand expression, Surface & texture,
Accessibility, Interaction states) authored as honest --ds-* stub
tokens (hollow binding dot) like the existing lab, extending the
builder toward "recreate anything".
Isolated and previewable: www-side only, no registry/publisher changes.
Extends the Domain union with four studio-only domains. typecheck +
check pass.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_8684d772-ee60-4cc5-949c-ec59e7f2db75) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_803003ff-f798-442c-ac36-01301b7be285) |
What & why
The shipped
/createis a fixed ~288px control panel beside a preview. Studio inverts that into a canvas-first layout where the live preview is the hero and everything else is contextual, and adds an AI copilot as a first-class input method — the direction the product wants (the builder should let you "make anything", and AI is the fastest path there).Try it:
pnpm dev:www→/create?studio=true.Highlights
warmer,feel like Linear,teal brand, more contrast,surprise me) mutate the same live design-system state the manual controls edit, so the preview re-themes instantly. Each turn is undoable. Also: proactive WCAG contrast insight on the generated palette, and "generate from" image / URL / screenshot demos.--ds-*stub tokens (hollow binding dot = "UI only for now"), exactly like the existing lab. They prove the shape of a complete builder.Notes for reviewers
studio/ai/engine.ts) — no network, no keys — that returns anAction[]shape a real model call can later produce. The mutations it makes are real and live, though.?studio=truewith the same contract as?lab. The only edits outside the newstudio/module are thestudioflag inroutes/_app/create.tsxand four studio-only members added to theDomainunion inpanel/types.ts.pnpm typecheckandpnpm checkpass.?lab) has a latenttext-primary-fgtypo (no backing token → invisible active sidebar icon + personality pill); not fixed here to keep this diff focused.Verified
feel like Linear→ indigo brand#5E6AD2+ radius 0.5 + compact, with reply + undo.warmer→ hue shifted toward magenta and the live preview's selected date turned violet. Domain switching (Color → Surface) renders the new tweaks cleanly.Note
Low Risk
WWW-only, feature-flagged behind
?studio=true, with no registry/publisher changes; AI edits use the same preset path as existing controls, with per-turn undo.Overview
Adds an opt-in
/create?studio=trueexperiment: a canvas-first builder shell that leaves the shipped/createand?labflows unchanged.Studio layout centers the existing live
PreviewPanel, with a domain dock, slide-in inspector (reuses panel-lab control widgets + new row chrome), top bar (identity, ⌘K AI field, inspect, theme, export), status bar (WCAG pass rate, radius, density, customization count), and a collapsible AI copilot. Inspect mode overlays hotspot pins on the canvas to jump to token domains without iframe coupling.AI layer is fully local:
interpret()maps prompts toAction[]mutations on the sameDesignSystemas manual controls (named looks, adjectives, color words, “surprise me”), plus rotating “generate from” image/URL/screenshot demos. Copilot turns are undoable via URLpresetsnapshots. WCAG contrast insight can switch the color algorithm to contrast.New experimental domains (
brand,surface,a11y,states) extend theDomainunion and add ~18 stub--ds-*controls intweaks.tsx, merged into studio-only section ordering.Routing:
studiocoerced boolean on create search; app layout hides the global header on studio create so Studio’s top bar owns the viewport.Reviewed by Cursor Bugbot for commit c3d1eef. Bugbot is set up for automated code reviews on this repo. Configure here.