finalize

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- AUTO-GENERATED. Do not edit here. Source: skills/ui-craft/ + commands/*.md. Regenerate with `node scripts/sync-harnesses.mjs`. -->
Context: this sub-skill is one lens of the broader
ui-craft
skill. If the
ui-craft
skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.
Load the
ui-craft
skill. This command produces findings only — do NOT edit code.

<!-- AUTO-GENERATED. Do not edit here. Source: skills/ui-craft/ + commands/*.md. Regenerate with `node scripts/sync-harnesses.mjs`. -->
背景说明: 此子技能是更广泛的
ui-craft
技能的一个分支。如果同时安装了
ui-craft
技能,请先阅读其SKILL.md中的发现排查、防冗余及工艺测试部分,再应用以下特定流程。
加载
ui-craft
技能。此命令仅生成问题排查结果——请勿编辑代码。

Step 1 — Brief check (gate)

步骤1——设计说明检查(关卡)

Look for
.ui-craft/brief.md
.
  • Absent: STOP. Output: "No brief found. Run
    /brief
    first.
    /finalize
    requires a design brief to distinguish intentional decisions from findings." Do not proceed.
  • Present: load it. Extract principles (numbered, in conflict-resolution order). These are the override registry for Steps 4–5.

查找
.ui-craft/brief.md
文件。
  • 未找到:停止操作。输出:"未找到设计说明。请先运行
    /brief
    命令。
    /finalize
    需要设计说明来区分有意的设计决策和排查出的问题。" 请勿继续。
  • 已找到:加载该文件。提取设计原则(按编号排序,用于冲突解决)。这些原则将作为步骤4-5的优先级覆盖规则。

Step 2 — Detector

步骤2——检测器运行

Run
npx ui-craft-detect
on the target the user described (or current working surface if no argument).
Capture all output. Every Critical detector finding maps directly to a block-ship finding in the report. Preserve detector source labels.

在用户指定的目标(若未指定则为当前工作目录)上运行
npx ui-craft-detect
命令。
捕获所有输出结果。检测器排查出的每一个Critical(严重)问题都直接对应报告中的“阻止交付”问题。保留检测器的来源标签。

Step 3 — Token check

步骤3——Tokens检查

Quick three-question audit (no deep read required):
  1. Are all three token layers present (primitives → semantic → component)?
  2. Are both light and dark modes explicitly authored (not inverted)?
  3. Are all seven token categories represented (color, spacing, radius, shadow, typography, motion, z-index)?
Any "no": flag as Major. Do not block ship. Append a recommendation: "Run
/tokens
to close the gap at [category]."

快速三问检查(无需深度查阅):
  1. 是否包含全部三层token结构(基础层→语义层→组件层)?
  2. 是否明确配置了浅色和深色模式(非自动反转)?
  3. 是否覆盖全部七类token(颜色、间距、圆角、阴影、排版、动效、层级)?
若有任何一项为“否”:标记为Major(主要)问题。不阻止交付。附加建议:"运行
/tokens
命令来填补[对应类别]的缺口。"

Step 4 — Finish bar

步骤4——终检流程

Load
references/finish-bar.md
. Run all 10 passes in document order. Do not reorder.
Knob behavior (apply before running):
  • CRAFT_LEVEL ≤ 6
    AND user did not explicitly invoke
    /finalize
    : run Passes 1, 6, 8 only; mark remaining as N/A (knob-gated).
  • CRAFT_LEVEL ≥ 7
    OR user explicitly invoked
    /finalize
    : run all 10 passes.
  • MOTION_INTENSITY ≤ 3
    : Pass 7 = motion-gap audit only; do not fail on absent entrance animations.
  • VISUAL_DENSITY ≥ 8
    AND brief documents compressed rhythm: Pass 4 accepts compressed spacing values.
For each pass:
  • Collect findings.
  • Assign severity per the severity map in
    finish-bar.md
    (Critical / Major / Minor).
  • If a finding conflicts with a recorded principle in
    brief.md
    : downgrade to "Deferred per brief" and cite the exact principle. If no brief principle covers it, it remains a finding regardless.
  • Record file:line when available.

加载
references/finish-bar.md
文件。按文档顺序运行全部10轮检查,请勿调整顺序。
参数配置规则(运行前应用):
  • CRAFT_LEVEL ≤ 6
    且用户未显式调用
    /finalize
    :仅运行第1、6、8轮检查;其余轮次标记为N/A(受参数限制)。
  • CRAFT_LEVEL ≥ 7
    或用户显式调用
    /finalize
    :运行全部10轮检查。
  • MOTION_INTENSITY ≤ 3
    :第7轮仅检查动效缺口;不会因缺少入场动效判定为失败。
  • VISUAL_DENSITY ≥ 8
    且设计说明中记录了紧凑布局规则:第4轮接受紧凑间距值。
每轮检查要求:
  • 收集问题结果。
  • 根据
    finish-bar.md
    中的严重程度映射表分配等级(Critical / Major / Minor)。
  • 若问题与
    brief.md
    中记录的设计原则冲突:降级为“按设计说明延期处理”并引用具体原则。若设计说明中无相关原则,则仍保留为问题。
  • 若有文件和行号信息,记录下来。

Step 5 — Feedback hierarchy filter

步骤5——反馈优先级过滤

Load
references/review.md
Feedback Hierarchy section.
Group all findings (detector + token + finish-bar) into three tiers:
  • Value — does the surface solve the problem the brief defines?
  • Ease of Use — can the user accomplish the primary task?
  • Delight — is it polished?
If any Value findings exist: surface them first in the report and add a standing recommendation to defer all Delight findings until Value findings are resolved. This prevents polish work masking broken functionality.

加载
references/review.md
中的“反馈优先级”部分。
将所有问题(检测器+Tokens+终检流程)分为三个层级:
  • 价值层——该界面是否解决了设计说明中定义的问题?
  • 易用层——用户能否完成核心任务?
  • 愉悦层——界面是否足够精致?
若存在价值层问题:在报告中优先展示,并添加固定建议,即所有愉悦层问题延期处理,直至价值层问题解决。这可避免精致的表面掩盖功能缺陷。

Step 6 — Output

步骤6——输出报告

Print this report. Do not add preamble.
undefined
打印此报告,请勿添加前言。
undefined

Finalize report — <surface name>

Finalize report — <surface name>

Ship verdict: READY / NOT READY / BLOCKED
BLOCKED = any Critical finding present. NOT READY = any Major finding present, no Critical. READY = zero Critical, zero Major (Minor explicitly accepted).
Ship verdict: READY / NOT READY / BLOCKED
BLOCKED = any Critical finding present. NOT READY = any Major finding present, no Critical. READY = zero Critical, zero Major (Minor explicitly accepted).

Block-ship findings (must fix before merge)

Block-ship findings (must fix before merge)

  • [Pass / detector source] — [finding] — [file:line if available]
  • [Pass / detector source] — [finding] — [file:line if available]

Major findings (fix or defer with recorded reason)

Major findings (fix or defer with recorded reason)

  • [...]
  • [...]

Minor findings (polish; ship-okay if explicitly accepted)

Minor findings (polish; ship-okay if explicitly accepted)

  • [...]
  • [...]

Deferred per brief

Deferred per brief

  • [finding] — [principle from brief.md that defers it]
  • [finding] — [principle from brief.md that defers it]

Recommended next actions

Recommended next actions

  • [ordered, 3–5 items max]

If a tier has no findings, omit the section header entirely.

---
  • [ordered, 3–5 items max]

若某层级无问题,完全省略该部分标题。

---

Step 7 — Hard stops

步骤7——强制限制

Do not edit any file. Do not propose code changes inline. The verdict is the output. If the user asks for fixes after reading the report, respond to that as a separate request.
请勿编辑任何文件。请勿在报告中直接提出代码修改建议。交付判定即为输出结果。若用户阅读报告后要求修复问题,将其作为单独请求处理。