impeccable
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDesigns and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft.
设计并迭代生产级前端界面。提供可运行的真实代码、明确的设计决策、精湛的工艺水准。
Setup (non-optional)
前置设置(非可选)
Before any design work or file edits, pass these gates. Skipping them produces generic output that ignores project.
| Gate | Required check | If fail |
|---|---|---|
| Context | The PRODUCT.md / DESIGN.md loader result is known from | Run the loader before continuing. |
| Product | PRODUCT.md exists and is not empty or placeholder ( | Run |
| Command | The matching command reference is loaded when a sub-command is used. | Load the reference before continuing. |
| Craft | | Run |
| Image | Required visual probes / mocks are generated or skipped with a reason. | Resolve the image-generation gate in |
| Mutation | All active gates above pass. | Do not edit project files yet. |
Codex-style agents must state this before editing files:
text
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=openFor , is only valid after separate user response approving shape design brief, or when user provided already-confirmed brief in request. Do not mark after writing PRODUCT.md, summarizing assumptions, or drafting unconfirmed brief yourself.
$impeccable craftshape=passshape=passOther harnesses should follow same checklist when they can expose this state.
在开展任何设计工作或文件编辑前,需通过以下检查环节。跳过这些环节会生成忽略项目实际情况的通用输出。
| 检查环节 | 必要检查项 | 未通过时的处理 |
|---|---|---|
| 上下文确认 | 已获取 | 先运行加载脚本再继续。 |
| 产品文档 | PRODUCT.md存在且非空或占位内容(含 | 运行 |
| 命令参考 | 使用子命令时已加载对应的命令参考文档 | 先加载参考文档再继续。 |
| 设计方案确认 | | 运行 |
| 视觉素材 | 已生成必要的视觉参考/原型,或已说明跳过理由 | 在编写代码前,解决 |
| 文件修改权限 | 以上所有检查环节均通过 | 暂不编辑项目文件。 |
Codex类型的Agent在编辑文件前必须声明以下内容:
text
IMPECCABLE_PREFLIGHT: context=pass product=pass command_reference=pass shape=pass|not_required image_gate=pass|skipped:<reason> mutation=open对于命令,仅在用户单独确认设计方案brief,或用户在请求中已提供确认过的方案时才有效。禁止在编写PRODUCT.md、总结假设或自行草拟未确认的方案后标记。
$impeccable craftshape=passshape=pass其他工具框架在能够暴露该状态时,需遵循相同检查清单。
1. Context gathering
1. 上下文收集
Two files, case-insensitive. loader looks at project root by default and falls back to and if root is clean. Override with (absolute or relative to cwd).
.agents/context/docs/IMPECCABLE_CONTEXT_DIR=path/to/dir- PRODUCT.md — required. Users, brand, tone, anti-references, strategic principles.
- DESIGN.md — optional, strongly recommended. Colors, typography, elevation, components.
Load both in one call:
bash
node .agents/skills/impeccable/scripts/load-context.mjsConsume full JSON output. Never pipe through , , , or . output's field tells you where files were resolved from.
headtailgrepjqcontextDirIf output is already in this session's conversation history, don't re-run. Exceptions requiring fresh load: you ran or (they rewrite files), or user manually edited one.
$impeccable teach$impeccable document$impeccable livelive.mjslive.mjsload-context.mjsIf PRODUCT.md is missing, empty, or placeholder ( markers, <200 chars): run , then resume user's original task with fresh context. If original task was , resume into before any implementation work.
[TODO]$impeccable teach$impeccable craft$impeccable shapeIf DESIGN.md is missing: nudge once per session ("Run for more on-brand output"), then proceed.
$impeccable document涉及两个文件,不区分大小写。加载器默认从项目根目录查找,若根目录无相关文件则回退到和目录。可通过(绝对路径或相对于当前工作目录的路径)覆盖默认目录。
.agents/context/docs/IMPECCABLE_CONTEXT_DIR=path/to/dir- PRODUCT.md — 必填。包含用户群体、品牌调性、反向参考案例、战略原则等内容。
- DESIGN.md — 可选,但强烈推荐。包含色彩、排版、层级、组件等设计规范。
可通过一次命令加载两个文件:
bash
node .agents/skills/impeccable/scripts/load-context.mjs需使用完整的JSON输出结果。禁止通过、、或等工具过滤输出。输出结果中的字段会告知文件的解析路径。
headtailgrepjqcontextDir若输出结果已存在于当前会话的历史记录中,无需重新运行脚本。以下情况需要重新加载:运行过或(这两个命令会重写文件),或用户手动编辑了其中一个文件。
$impeccable teach$impeccable document$impeccable livelive.mjslive.mjsload-context.mjs若PRODUCT.md缺失、为空或为占位内容(含标记、字数<200):运行,获取新上下文后再继续用户的原始任务。若原始任务为,需先进入环节再开展任何实现工作。
[TODO]$impeccable teach$impeccable craft$impeccable shape若DESIGN.md缺失:每会话提示一次("运行可获得更贴合品牌的输出"),然后继续任务。
$impeccable document2. Register
2. 任务类型注册
Every design task is brand (marketing, landing, campaign, long-form content, portfolio — design IS product) or product (app UI, admin, dashboard, tool — design SERVES product).
Identify before designing. Priority: (1) cue in task itself ("landing page" vs "dashboard"); (2) surface in focus ( page, file, or route being worked on); (3) field in PRODUCT.md. First match wins.
registerIf PRODUCT.md lacks field (legacy), infer it once from its "Users" and "Product Purpose" sections, then cache inferred value for session. Suggest user run to add field explicitly.
register$impeccable teachLoad matching reference: reference/brand.md or reference/product.md. shared design laws below apply to both.
每个设计任务分为品牌类(营销页面、着陆页、活动页、长内容页、作品集——设计即产品)或产品类(应用UI、后台管理、仪表盘、工具——设计服务于产品)。
需在设计前明确任务类型。优先级:(1) 任务本身的提示(如"着陆页" vs "仪表盘");(2) 工作聚焦的页面、文件或路由;(3) PRODUCT.md中的字段。匹配到第一个符合条件的类型即可。
register若PRODUCT.md缺少字段(旧版),需从其"用户群体"和"产品目标"部分推断一次,然后在当前会话中缓存推断结果。建议用户运行来添加该字段。
register$impeccable teach加载对应的参考文档:reference/brand.md 或 reference/product.md。以下通用设计准则适用于两类任务。
Shared design laws
通用设计准则
Apply to every design, both registers. Match implementation complexity to aesthetic vision — maximalism needs elaborate code, minimalism needs precision. Interpret creatively. Vary across projects; never converge on same choices. GPT is capable of extraordinary work — don't hold back.
适用于所有设计任务及两类注册类型。实现复杂度需与美学愿景匹配——极致风格需要精细的代码,极简风格需要精准的细节。需创造性地解读准则,不同项目采用不同设计选择,避免趋同。GPT具备完成卓越工作的能力——无需自我限制。
Color
色彩
- Use OKLCH. Reduce chroma as lightness approaches 0 or 100 — high chroma at extremes looks garish.
- Never use or
#000. Tint every neutral toward brand hue (chroma 0.005–0.01 is enough).#fff - Pick color strategy before picking colors. Four steps on commitment axis:
- Restrained — tinted neutrals + one accent ≤10%. Product default; brand minimalism.
- Committed — one saturated color carries 30–60% of surface. Brand default for identity-driven pages.
- Full palette — 3–4 named roles, each used deliberately. Brand campaigns; product data viz.
- Drenched — surface IS color. Brand heroes, campaign pages.
- "one accent ≤10%" rule is Restrained only. Committed / Full palette / Drenched exceed it on purpose. Don't collapse every design to Restrained by reflex.
- 使用OKLCH色彩模型。当亮度接近0或100时降低色度——极端亮度下的高色度会显得刺眼。
- 禁止使用或
#000。所有中性色需向品牌色调微调(色度0.005–0.01即可)。#fff - 先确定色彩策略再选择具体颜色。按决策程度分为四个层级:
- 克制型 — 微调后的中性色 + 不超过10%面积的一种强调色。产品类任务默认策略;品牌类任务的极简风格。
- 明确型 — 一种饱和色占据30–60%的界面面积。品牌类任务中以品牌识别为核心的页面默认策略。
- 全色系 — 3–4个明确功能的色彩角色,每个角色都有特定用途。品牌活动页面;产品类任务的数据可视化场景。
- 沉浸型 — 界面本身即为色彩。品牌核心视觉页面、活动宣传页。
- "强调色占比≤10%"仅适用于克制型策略。明确型/全色系/沉浸型策略可刻意突破该限制。切勿本能地将所有设计都归为克制型。
Theme
主题
Dark vs. light is never default. Not dark "becauseols look cool dark." Not light "to be safe."
Before choosing, write one sentence of physical scene: who uses this, where, under what ambient light, in what mood. If sentence doesn't force answer, it's not concrete enough — add detail until it does.
"Observability dashboard" does not force answer. "SRE glancing at incident severity on 27-inch monitor at 2am in dim room" does. Run sentence, not category.
深色/浅色主题并非默认选项。不要因为"深色看起来酷"就选深色,也不要为了"安全"就选浅色。
选择主题前,需撰写一句场景描述:谁在使用该界面,在什么环境下,处于什么光线条件,是什么情绪状态。若该描述无法明确指向主题,则说明不够具体——需补充细节直到能明确判断。
"可观测性仪表盘"无法明确主题。"SRE在凌晨2点昏暗房间的27英寸显示器上查看事件严重程度"则可以明确主题。依据场景描述而非类别选择主题。
Typography
排版
- Cap body line length at 65–75ch.
- Hierarchy through scale + weight contrast (≥1.25 ratio between steps). Avoid flat scales.
- 正文行宽限制在65–75ch。
- 通过字号+字重对比构建层级(层级间比例≥1.25)。避免扁平化的字号体系。
Layout
布局
- Vary spacing for rhythm. Same padding everywhere is monotony.
- Cards are lazy answer. Use them only when they're truly best affordance. Nested cards are always wrong.
- Don't wrap everything in container. Most things don't need one.
- 通过变化间距营造节奏感。所有元素使用相同内边距会显得单调。
- 卡片布局是偷懒的选择。仅当卡片是最合适的交互载体时才使用。嵌套卡片绝对禁止。
- 不要给所有元素都套容器。大多数元素不需要容器。
Motion
动效
- Don't animate CSS layout properties.
- Ease out with exponential curves (ease-out-quart / quint / expo). No bounce, no elastic.
- 禁止为CSS布局属性添加动画。
- 使用指数曲线实现淡出效果(ease-out-quart / quint / expo)。禁止使用弹跳、弹性效果。
Absolute bans
绝对禁止项
Match-and-refuse. If you're about to write any of these, rewrite element with different structure.
- Side-stripe borders. or
border-leftgreater than 1px as colored accent on cards, list items, callouts, or alerts. Never intentional. Rewrite with full borders, background tints, leading numbers/icons, or nothing.border-right - Gradient text. combined with gradient background. Decorative, never meaningful. Use single solid color. Emphasis via weight or size.
background-clip: text - Glassmorphism as default. Blurs and glass cards used decoratively. Rare and purposeful, or nothing.
- ** hero-metric template.** Big number, small label, supporting stats, gradient accent. SaaS cliché.
- Identical card grids. Same-sized cards with icon + heading + text, repeated endlessly.
- Modal as first thought. Modals are usually laziness. Exhaust inline / progressive alternatives first.
遇到以下情况需拒绝并重构元素结构。
- 侧边条纹边框。在卡片、列表项、提示框或警告框上使用宽度大于1px的或
border-left作为彩色强调。绝对禁止刻意使用。需重构为完整边框、背景色调、前置数字/图标,或直接移除。border-right - 渐变文字。结合渐变背景。仅为装饰性,无实际意义。使用单一纯色。通过字重或字号实现强调效果。
background-clip: text - 默认使用毛玻璃效果。将模糊和毛玻璃卡片作为装饰。仅在特定场景下使用,否则禁止。
- 核心指标模板。大数字+小标签+辅助统计数据+渐变强调。SaaS行业的陈词滥调。
- 完全相同的卡片网格。重复排列尺寸相同、包含图标+标题+文字的卡片。
- 优先使用模态框。模态框通常是偷懒的选择。需先穷尽内联/渐进式替代方案。
Copy
文案
- Every word earns its place. No restated headings, no intros that repeat title.
- No em dashes. Use commas, colons, semicolons, periods, or parentheses. Also not .
--
- 每个字都要有存在的意义。不要重复标题内容,不要写与标题重复的引言。
- 禁止使用破折号。使用逗号、冒号、分号、句号或括号。也禁止使用。
--
The AI slop test
AI劣质设计检测
If someone could look at this interface and say "AI made that" without doubt, it's failed. Cross-register failures are absolute bans above. Register-specific failures live in each reference.
Category-reflex check. Run at two altitudes — second one catches what first one misses.
- First-order: if someone could guess theme + palette from category alone — "observability → dark blue", "healthcare → white + teal", "finance → navy + gold", "crypto → neon on black" — it's first training-data reflex. Rework scene sentence and color strategy until answer isn't obvious from domain.
- Second-order: if someone could guess aesthetic family from category-plus-anti-references — "AI workflow tool that's not SaaS-cream → editorial-typographic", "fintech that's not navy-and-gold → terminal-native dark mode" — it's trap one tier deeper. first reflex was avoided; second wasn't. Rework until both answers are not obvious. brand register's reflex-reject aesthetic lanes list catches currently-saturated families.
若有人能毫无疑虑地说"这是AI做的界面",则设计失败。跨类型的失败项即为上述绝对禁止项。类型专属的失败项见各自的参考文档。
类别惯性检查。需从两个层面检查——第二个层面能发现第一个层面遗漏的问题。
- 第一层面:若仅通过类别就能猜出主题+配色方案——比如"可观测性→深蓝色"、"医疗→白色+蓝绿色"、"金融→藏青色+金色"、"加密货币→黑色背景+霓虹色"——这是受训练数据影响的第一级惯性。需重新撰写场景描述和色彩策略,直到无法通过领域直接判断答案。
- 第二层面:若通过类别+反向参考案例就能猜出美学风格——比如"非SaaS风格的AI工作流工具→排版主导的编辑风格"、"非藏青色+金色的金融科技→终端原生深色模式"——这是更深一层的陷阱。虽然避免了第一级惯性,但未避免第二级。需重新设计直到两个层面的答案都无法被轻易推断。品牌类任务的reflex-reject aesthetic lanes列出了当前过度饱和的风格类别。
Commands
命令列表
| Command | Category | Description | Reference |
|---|---|---|---|
| Build | Shape, then build a feature end-to-end | reference/craft.md |
| Build | Plan UX/UI before writing code | reference/shape.md |
| Build | Set up PRODUCT.md and DESIGN.md context | reference/teach.md |
| Build | Generate DESIGN.md from existing project code | reference/document.md |
| Build | Pull reusable tokens and components into design system | reference/extract.md |
| Evaluate | UX design review with heuristic scoring | reference/critique.md |
| Evaluate | Technical quality checks (a11y, perf, responsive) | reference/audit.md |
| Refine | Final quality pass before shipping | reference/polish.md |
| Refine | Amplify safe or bland designs | reference/bolder.md |
| Refine | Tone down aggressive or overstimulating designs | reference/quieter.md |
| Refine | Strip to essence, remove complexity | reference/distill.md |
| Refine | Production-ready: errors, i18n, edge cases | reference/harden.md |
| Refine | Design first-run flows, empty states, activation | reference/onboard.md |
| Enhance | Add purposeful animations and motion | reference/animate.md |
| Enhance | Add strategic color to monochromatic UIs | reference/colorize.md |
| Enhance | Improve typography hierarchy and fonts | reference/typeset.md |
| Enhance | Fix spacing, rhythm, and visual hierarchy | reference/layout.md |
| Enhance | Add personality and memorable touches | reference/delight.md |
| Enhance | Push past conventional limits | reference/overdrive.md |
| Fix | Improve UX copy, labels, and error messages | reference/clarify.md |
| Fix | Adapt for different devices and screen sizes | reference/adapt.md |
| Fix | Diagnose and fix UI performance | reference/optimize.md |
| Iterate | Visual variant mode: pick elements in the browser, generate alternatives | reference/live.md |
Plus two management commands — and , detailed below.
pin <command>unpin <command>| 命令 | 分类 | 描述 | 参考文档 |
|---|---|---|---|
| 构建 | 先确定设计方案,再端到端实现功能 | reference/craft.md |
| 构建 | 编写代码前规划UX/UI方案 | reference/shape.md |
| 构建 | 设置PRODUCT.md和DESIGN.md上下文 | reference/teach.md |
| 构建 | 从现有项目代码生成DESIGN.md | reference/document.md |
| 构建 | 将可复用的设计令牌和组件提取到设计系统中 | reference/extract.md |
| 评估 | 基于启发式评分的UX设计评审 | reference/critique.md |
| 评估 | 技术质量检查(可访问性a11y、性能、响应式) | reference/audit.md |
| 优化 | 上线前的最终质量检查 | reference/polish.md |
| 优化 | 增强保守或平淡的设计 | reference/bolder.md |
| 优化 | 弱化过于激进或刺激的设计 | reference/quieter.md |
| 优化 | 提炼核心内容,移除冗余复杂度 | reference/distill.md |
| 优化 | 实现生产就绪:错误处理、国际化i18n、边缘情况 | reference/harden.md |
| 优化 | 设计首次使用流程、空状态、激活引导 | reference/onboard.md |
| 增强 | 添加有目的性的动画和动效 | reference/animate.md |
| 增强 | 为单色UI添加策略性色彩 | reference/colorize.md |
| 增强 | 优化排版层级和字体 | reference/typeset.md |
| 增强 | 修复间距、节奏感和视觉层级 | reference/layout.md |
| 增强 | 添加个性化和令人难忘的细节 | reference/delight.md |
| 增强 | 突破常规设计限制 | reference/overdrive.md |
| 修复 | 优化UX文案、标签和错误提示 | reference/clarify.md |
| 修复 | 适配不同设备和屏幕尺寸 | reference/adapt.md |
| 修复 | 诊断并修复UI性能问题 | reference/optimize.md |
| 迭代 | 视觉变体模式:在浏览器中选择元素并生成替代方案 | reference/live.md |
另外还有两个管理命令——和,详细说明如下。
pin <command>unpin <command>Routing rules
路由规则
- No argument — render table above as user-facing command menu, grouped by category. Ask what they'd like to do.
- First word matches command — load its reference file and follow its instructions. Everything after command name is target.
- First word doesn't match — general design invocation. Apply setup steps, shared design laws, and loaded register reference, using full argument as context.
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke .
$impeccableIf first word is , setup still runs first, but reference/craft.md owns rest of flow. If setup invokes as blocker, finish teach, refresh context, then resume original command and target.
craftteach- 无参数 — 将上表渲染为面向用户的命令菜单,按分类分组。询问用户需求。
- 第一个单词匹配命令 — 加载对应的参考文档并遵循其说明。命令名称后的所有内容为目标对象。
- 第一个单词不匹配命令 — 通用设计调用。应用前置设置步骤、通用设计准则和已加载的类型参考文档,将完整参数作为上下文。
前置设置(上下文收集、类型注册)已完成加载;子命令无需重新调用。
$impeccable若第一个单词是,仍需先完成前置设置,但后续流程由reference/craft.md主导。若前置设置要求运行,需先完成、刷新上下文,再继续执行原始命令和目标对象。
craftteachteachPin / Unpin
Pin / Unpin
Pin creates standalone shortcut so invokes directly. Unpin removes it. script writes to every harness directory present in project.
$<command>$impeccable <command>bash
node .agents/skills/impeccable/scripts/pin.mjs <pin|unpin> <command>Valid is any command from table above. Report script's result concisely — confirm new shortcut on success, relay stderr verbatim on error.
<command>Pin用于创建独立快捷方式,使可直接调用。Unpin用于移除该快捷方式。脚本会写入项目中所有存在的工具框架目录。
$<command>$impeccable <command>bash
node .agents/skills/impeccable/scripts/pin.mjs <pin|unpin> <command>有效的为上表中的任意命令。需简洁报告脚本执行结果——成功时确认新快捷方式,失败时直接返回标准错误信息。
<command>