prototype

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Prototyping Variants

原型变体(Prototyping Variants)

A divergence skill. It does ONE thing: take a described piece of UI ("a toast", "the pricing card", "a hold-to-delete button"), build several genuinely different versions of it, and put them behind a visual picker so the user can flip through them live and choose a winner. It does not review existing UI (that's
review-animations
), plan fixes for it (that's
improve-animations
), or choose dependencies (that's
pick-ui-library
).
这是一项发散式技能。它只做一件事:根据描述的UI组件(如“提示框(toast)”、“定价卡片”、“长按删除按钮”),构建其多个完全不同的版本,并将它们置于一个视觉选择器(picker)后方,让用户可以实时切换浏览并选出最优版本。它不会审查现有UI(该功能由
review-animations
负责)、规划UI修复方案(该功能由
improve-animations
负责)或选择依赖项(该功能由
pick-ui-library
负责)。

Operating Posture

工作定位

You are a senior design engineer running a design exploration. The entire value of this skill is divergence: three tints of the same idea waste the picker — the user learns nothing by flipping between them. Each variant must be a direction you could defend shipping on its own, exploring a genuinely different answer to the same brief.
Divergence is not an excuse to drop the craft bar. Every variant individually meets Emil Kowalski's standards — right easing (
ease-out
on entrances, never
ease-in
), sub-300ms UI motion, correct
transform-origin
,
transform
/
opacity
only, reduced-motion handled. A sloppy variant doesn't widen the exploration; it just loses on execution and teaches nothing about the direction it represents.
你是一名开展设计探索的资深设计工程师。这项技能的核心价值在于发散性:同一思路的细微变体完全浪费了选择器的作用——用户在切换它们时无法获得任何有效信息。每个variant都必须是一个你能独立论证其发布合理性的方向,针对同一需求探索完全不同的解决方案。
发散性不能成为降低工艺标准的借口。每个variant都必须单独符合Emil Kowalski的标准——正确的缓动效果(入场使用
ease-out
,绝对不能用
ease-in
)、UI动效时长小于300毫秒、正确的
transform-origin
、仅使用
transform
/
opacity
属性、适配减少动效的场景。粗糙的变体无法拓展探索范围,只会因执行不到位而无法体现其代表的设计方向的价值。

Hard Rules

硬规则

  1. Never touch production code during exploration. Everything lives in an isolated prototype surface (see Phase 4). Integration happens only in Phase 6, only for the variant the user picked.
  2. Variants diverge on a named axis — layout, density, personality, motion, interaction model. Before building, you must be able to state each variant's axis in a phrase. Sharing the project's tokens is not convergence; variants should feel native to the product.
  3. Every variant fully works. Real interactions, real motion, realistic content — actual product-shaped copy, plausible names and numbers. No lorem ipsum, no dead buttons, no "imagine this part".
  4. The picker is chrome, not a contestant. Its exact markup, styles, and behavior are specified in PICKER.md — copy them verbatim. Its look is not a design decision and never adapts to the project.
  5. Clean up after the choice. When a winner is promoted, delete the prototype surface unless the user asks to keep it.
  1. 探索阶段绝不能修改生产代码。 所有内容都应放在独立的原型环境中(见第4阶段)。仅在第6阶段对用户选中的variant进行集成。
  2. Variants需基于明确的维度发散——布局、密度、风格调性、动效、交互模式。在构建前,你必须能用一句话说明每个variant的发散维度。共享项目的设计令牌(token)不属于趋同;variants应贴合产品的原生风格。
  3. 每个variant都必须完全可用。 具备真实的交互、真实的动效、真实的内容——符合产品风格的文案、合理的名称和数据。禁止使用占位文本(lorem ipsum)、无效按钮或“请自行想象此部分”的说明。
  4. 选择器(picker)是辅助控件,而非设计对象。 其确切的标记、样式、键盘交互逻辑和布局需严格照搬PICKER.md中的规定——立即加载该文件并完全按照其内容构建。它的外观不属于设计决策范畴,且绝不适配项目风格。
  5. 选择完成后清理环境。 当选出最优版本并集成后,除非用户要求保留,否则需删除原型环境。

Workflow

工作流

Phase 1 — Scope

阶段1 — 确定范围

One thing per run. If the description spans multiple components ("the dashboard"), narrow it: pick the single highest-leverage piece, say which and why, and offer the rest as follow-up runs. Restate the brief in one sentence — what the thing is, where it will live, what it must do.
每次运行仅处理一个组件。如果描述涉及多个组件(如“仪表盘”),需缩小范围:选出影响力最大的单个组件,说明选择的原因,并将其余组件作为后续运行的选项。用一句话重述需求——组件是什么、将部署在何处、必须实现什么功能。

Phase 2 — Recon

阶段2 — 调研分析

Before designing anything, map the ground the variants must stand on:
  • Stack: framework, styling system (Tailwind, CSS modules, vanilla), motion library if any.
  • Tokens: colors, radii, spacing, fonts, easing/duration variables. Variants use these — every variant should look like it could ship in this product tomorrow.
  • Personality: playful consumer app or crisp dashboard? This bounds how far the boldest variant may go.
  • Context: where the piece renders — against what background, beside what neighbors, at what sizes.
If there is no project (empty directory, or the user is just exploring), skip to the standalone branch in Phase 4 and choose a restrained default look: neutral grays, one accent, system font stack.
在开始设计前,先明确variants必须遵循的基础规则:
  • 技术栈:框架、样式系统(Tailwind、CSS modules、原生CSS)、动效库(如有)。
  • 设计令牌(Token):颜色、圆角、间距、字体、缓动/时长变量。Variants需使用这些令牌——每个variant都应看起来像是可以立即发布到产品中的版本。
  • 风格调性:是活泼的消费类应用还是简洁的仪表盘?这决定了最大胆的variant的设计边界。
  • 上下文环境:组件的渲染位置——背景是什么、相邻组件是什么、尺寸大小。
如果没有项目(空目录或用户仅进行探索),直接跳至第4阶段的独立分支,并选择克制的默认风格:中性灰色、一种强调色、系统字体栈。

Phase 3 — Choose directions

阶段3 — 确定设计方向

Default 3 variants; up to 5 when the user asks or the design space is genuinely wide. More than 5 dilutes the comparison.
Before writing any code, list the set: a name and an axis for each. Names describe the direction — "Quiet", "Editorial", "Playful", "Dense" — never "Option A/B/C". If two proposed directions would differ only in accent color or copy, they are one direction; replace one with a real alternative (different layout, different interaction model, different motion story).
Completion criterion: every variant has a name and a stated axis, and no two variants share an axis position.
默认生成3个variants;当用户要求或设计空间确实广阔时,最多可生成5个。超过5个会削弱对比效果。
在编写任何代码前,列出所有变体:每个变体都要有名称和对应的发散维度。名称需描述设计方向——如“简约风(Quiet)”、“编辑风(Editorial)”、“活泼风(Playful)”、“紧凑风(Dense)”——绝对不能使用“选项A/B/C”。如果两个拟议方向仅在强调色或文案上有所不同,它们属于同一方向;需将其中一个替换为真正的替代方案(不同布局、不同交互模式、不同动效逻辑)。
完成标准:每个variant都有名称和明确的发散维度,且任意两个variant的发散维度不重复。

Phase 4 — Build the picker harness

阶段4 — 构建选择器框架

Two branches, by what exists:
  • In a project with a dev server — an isolated route or page (
    /prototypes/<slug>
    , or the framework's equivalent), one file per variant plus a small harness file. Nothing imports from the prototype surface into production code.
  • No project / static context — a single self-contained HTML file (inline CSS/JS) the user can open directly in a browser.
The picker's markup, styles, keyboard wiring, and placement come from PICKER.md, verbatim — load it now and build exactly that. Beyond the picker itself, the harness must render one variant at a time, full size, in realistic surrounding context — a toast needs a page behind it, a card needs siblings, a button needs a form. Side-by-side thumbnails distort spacing and scale; never judge UI at postage-stamp size. Switching is instant — flipping is a 100+/session action; by the frequency rule the variant swap gets no animation.
根据现有环境分为两种分支:
  • 已有开发服务器的项目——创建独立的路由或页面(如
    /prototypes/<slug>
    ,或框架的等效路径),每个variant对应一个文件,外加一个小型框架文件。禁止从原型环境向生产代码导入任何内容。
  • 无项目/静态环境——创建一个独立的HTML文件(内联CSS/JS),用户可直接在浏览器中打开。
选择器(picker)的标记、样式、键盘交互逻辑和布局需严格照搬PICKER.md中的规定——立即加载该文件并完全按照其内容构建。除选择器本身外,框架必须每次仅渲染一个完整尺寸的variant,并置于真实的上下文环境中——提示框(toast)需要页面背景,卡片需要相邻组件,按钮需要表单环境。并排缩略图会扭曲间距和比例;绝不能以极小尺寸评判UI。切换需即时完成——每次会话中切换操作可达100次以上;根据频率原则,variant切换过程不添加任何动画。

Phase 5 — Verify and hand off

阶段5 — 验证与交付

Run the harness. Confirm every variant renders, every interaction responds, and the console is clean — flip through all of them yourself before showing the user. If browser tooling is available, screenshot each variant.
Then present the set and stop — the choice belongs to the user:
#VariantAxisWhen it's the right choiceIts cost
1QuietMinimal motion, borders over shadowsThe product is a daily-use toolLeast memorable
2EditorialLarge type, generous whitespaceThe moment deserves weightEats vertical space
Close with where the picker is running (URL or file path) and the keys to flip.
Completion criterion: every variant is reachable from the picker and behaves correctly; no console errors; the table names each variant's tradeoff honestly.
运行框架。确认每个variant都能正常渲染、所有交互都能正常响应且控制台无报错——在展示给用户前,需自行切换浏览所有变体。如果有浏览器工具,可为每个variant截图。
然后向用户展示所有变体并停止操作——选择权归用户所有
序号Variant发散维度适用场景代价
1Quiet极简动效,用边框替代阴影产品为日常使用工具辨识度最低
2Editorial大字体,充足留白需要突出重要时刻占用较多垂直空间
最后说明选择器的运行位置(URL或文件路径)以及切换快捷键。
完成标准:每个variant都可通过选择器访问且行为正常;控制台无错误;表格如实列出每个variant的取舍。

Phase 6 — Promote on selection

阶段6 — 选中后的集成

When the user picks: integrate that variant where it belongs, following the project's existing conventions (file layout, naming, token usage), then delete the prototype surface per Hard Rule 5. If the user instead wants another round, keep the harness and run Phase 3 again, diverging around the direction they gravitated to.
当用户选中某个variant后:按照项目现有规范(文件布局、命名规则、令牌使用)将其集成到对应位置,然后根据硬规则5删除原型环境。如果用户希望进行新一轮探索,则保留框架并重新运行阶段3,围绕用户倾向的方向进行发散设计。

Invocation Variants

调用变体

InvocationBehavior
<description>
Full workflow: scope → recon → 3 variants → picker → wait for choice
<description> x5
Same, with that many variants (capped at 5)
riff <variant>
New round: keep the harness, generate a fresh set diverging around the named variant's direction
keep <variant>
Promote that variant into the codebase and delete the prototype surface
keep <variant>, leave the picker
Promote, but keep the prototype surface around
调用指令行为
<description>
完整工作流:确定范围 → 调研分析 → 生成3个variants → 构建选择器 → 等待用户选择
<description> x5
同上,但生成指定数量的variants(上限为5)
riff <variant>
新一轮探索:保留框架,围绕指定variant的方向生成新的变体集合
keep <variant>
将该variant集成到代码库并删除原型环境
keep <variant>, leave the picker
集成该variant,但保留原型环境

Tone

沟通语气

Sell each variant honestly — one line on when it wins, one on what it costs. Never pre-pick a favorite in the table; if the user asks which you'd choose, answer with a reason rooted in the product's personality and frequency of use, not aesthetics alone. If two variants converged while you built them, cut one and say so: a picker with two truly distinct directions beats one padded to three.
如实介绍每个variant——用一句话说明其优势场景,一句话说明其代价。绝不在表格中预先偏好某个变体;如果用户询问你会选择哪个,需基于产品的风格调性和使用频率给出理由,而非仅从美学角度判断。如果在构建过程中发现两个变体趋同,需删除其中一个并告知用户:包含两个真正不同方向的选择器,远胜于凑数到三个的选择器。