sddesign

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- HARNESS MIRROR — do not edit here. Canonical source: skills/ or commands/. After editing source, copy into cli/assets/<harness>/ and repo-root harness mirrors. -->
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.
Run the spec-driven design pipeline for
$ARGUMENTS
. Load the
ui-craft
skill.

<!-- HARNESS MIRROR — 请勿在此编辑。标准源文件位于skills/或commands/目录下。编辑源文件后,请复制到cli/assets/<harness>/和仓库根目录的harness镜像文件夹中。 -->
背景说明: 此子技能是更广泛的
ui-craft
技能的一个分支。如果已安装
ui-craft
技能,请先阅读其SKILL.md文档了解Discovery(探索)、Anti-Slop(反冗余)和Craft Test(构建测试)相关内容,再应用以下特定流程。
针对
$ARGUMENTS
描述的内容运行规格驱动设计流水线。加载
ui-craft
技能。

ORCHESTRATE-ONLY RULE

仅编排规则

This command sequences existing phase commands. It MUST NOT re-implement or duplicate any logic from them. Every composition rule, wireframe algorithm, craft rule, and convergence engine lives in the phase commands. This command contributes only:
  1. Gate detection (does the artifact exist?)
  2. Offer prompts (run phase X or skip?)
  3. Progress reporting (the checklist)
  4. Degraded-mode honesty (what was skipped and what that costs)
When in doubt: call the phase command, don't inline its steps.

此命令仅用于编排现有阶段命令的执行顺序。不得重新实现或复制这些阶段命令中的任何逻辑。所有布局规则、线框算法、构建规则和收敛引擎均存在于阶段命令中。此命令仅负责以下内容:
  1. 节点检测(检查相关工件是否存在)
  2. 提示选择(是否运行某个阶段或跳过)
  3. 进度报告(任务清单)
  4. 降级模式说明(说明跳过的内容及其影响)
如有疑问:调用阶段命令,不要将其步骤内联到本命令中。

Progress Checklist

进度清单

Print this at the start and update it after each gate resolves:
[ ] brief   [ ] tokens   [ ] shape (spec)   [ ] craft (build)   [ ] converge   [ ] ship
Use
[✓]
for completed/skipped-with-artifact,
[>]
for the current gate,
[–]
for skipped-without-artifact (degraded).

在流程开始时打印此清单,并在每个节点处理完成后更新:
[ ] brief   [ ] tokens   [ ] shape (spec)   [ ] craft (build)   [ ] converge   [ ] ship
使用
[✓]
表示已完成/跳过但存在相关工件,
[>]
表示当前正在处理的节点,
[–]
表示跳过且无相关工件(降级模式)。

Pipeline Gates

流水线节点

Gate 1 — Brief

节点1 — 需求概述(Brief)

Check: does
.ui-craft/brief.md
exist?
If yes: mark
[✓] brief
. Note that brief §6 learned constraints and the a11y/correctness floor are in effect for all downstream gates — they take precedence over any spec.md composition choice.
If no: offer to run
/brief
now.
  • User confirms → run
    /brief
    . When it completes, mark
    [✓] brief
    .
  • User declines → mark
    [–] brief
    . Note downstream impact: "no brief → craft will use skill defaults; composition will not be anchored to project principles."
检查:
.ui-craft/brief.md
文件是否存在?
如果存在: 标记
[✓] brief
。注意,需求概述第6节中提到的约束条件以及无障碍(a11y)/正确性底线将对所有下游节点生效——它们的优先级高于spec.md中的任何布局选择。
如果不存在: 询问用户是否立即运行
/brief
命令。
  • 用户确认 → 运行
    /brief
    。完成后标记
    [✓] brief
  • 用户拒绝 → 标记
    [–] brief
    。说明下游影响:“无需求概述 → 构建(craft)将使用技能默认设置;布局将无法锚定到项目原则。”

Gate 2 — Tokens

节点2 — 设计令牌(Tokens)

Check: does a token spine exist? (Look for CSS variables
--color-*
,
--font-*
,
--accent-*
, a Tailwind
theme.extend
with tokens, or a token file.)
If yes: mark
[✓] tokens
.
If no: offer to run
/tokens
now.
  • User confirms → run
    /tokens
    . When it completes, mark
    [✓] tokens
    .
  • User declines → mark
    [–] tokens
    . Note downstream impact: "no token spine → craft will establish a minimal inline token set; it won't match an existing system."
检查:是否存在令牌核心?(查找CSS变量
--color-*
--font-*
--accent-*
,包含令牌的Tailwind
theme.extend
,或令牌文件。)
如果存在: 标记
[✓] tokens
如果不存在: 询问用户是否立即运行
/tokens
命令。
  • 用户确认 → 运行
    /tokens
    。完成后标记
    [✓] tokens
  • 用户拒绝 → 标记
    [–] tokens
    。说明下游影响:“无令牌核心 → 构建(craft)将建立最小化的内联令牌集;无法匹配现有系统。”

Gate 3 — Shape (spec)

节点3 — 原型定义(Shape,即规格)

Existing-surface guard: Before running
/shape
, check if
.ui-craft/spec.md
already contains a
## Surface: <name>
block for this surface. If it does, do NOT re-run shape and blindly append a duplicate section — offer to update the existing section or skip shape (the spec already exists).
Run
/shape
for the surface described in
$ARGUMENTS
. Shape produces its full five-step output (content inventory, ASCII layout, state list, open questions).
Persist in pipeline (default): Inside the
/sddesign
pipeline, shape's Step 6 spec persist is the default — it is auto-confirmed unless the user explicitly opts out of the spec gate. The persist writes
.ui-craft/spec.md
(or appends the surface section). This is the whole point of the pipeline.
  • Persist completes →
    .ui-craft/spec.md
    is written (or the surface section is appended). Mark
    [✓] shape (spec)
    .
  • User explicitly opts out of persist → mark
    [–] shape (spec, unsaved)
    . Note downstream impact: "no spec.md → craft (build) will build against shape's printed output; acceptance bar will not be persisted."
已有界面防护: 在运行
/shape
之前,检查
.ui-craft/spec.md
中是否已包含针对此界面的
## Surface: <name>
区块。如果已存在,请勿重新运行shape并盲目追加重复区块——提供更新现有区块或跳过shape的选项(规格已存在)。
针对
$ARGUMENTS
描述的界面运行
/shape
。Shape会生成完整的五步输出(内容清单、ASCII布局、状态列表、待解决问题)。
流水线内持久化(默认):
/sddesign
流水线中,shape的第6步规格持久化为默认操作——除非用户明确选择退出规格节点,否则将自动确认。持久化操作会写入
.ui-craft/spec.md
文件(或追加界面区块)。这是本流水线的核心目标。
  • 持久化完成 →
    .ui-craft/spec.md
    已写入(或已追加界面区块)。标记
    [✓] shape (spec)
  • 用户明确选择退出持久化 → 标记
    [–] shape (spec, unsaved)
    。说明下游影响:“无spec.md文件 → 构建(craft)将基于shape输出到终端的内容进行开发;验收标准不会被持久化。”

Gate 4 — Craft (build)

节点4 — 构建实现(Craft,即开发)

Run
/craft <surface>
where
<surface>
matches the description in
$ARGUMENTS
.
/craft
declares the Craft Read (
references/craft-intent.md
) before building — surface kind, audience, theme/accent, DESIGN_VARIANCE, and the one signature bet. The signature bet is built inside this gate, not deferred to converge or polish. If the spec section names a composition, the Craft Read must be consistent with it.
/craft
loads
.ui-craft/spec.md
before building. If
[✓] shape (spec)
was set, the spec's chosen composition, component inventory, state lattice, and acceptance bar take precedence over recipe defaults — every acceptance bar item from the spec must be green before craft reports done.
If
[–] shape (spec, unsaved)
, craft builds against the shape output printed to the terminal. Note in the checklist.
Mark
[✓] craft (build)
when the build completes.
运行
/craft <surface>
,其中
<surface>
$ARGUMENTS
中的描述匹配。
/craft
在构建前会声明Craft Read(参考
references/craft-intent.md
)——界面类型、受众、主题/强调色、DESIGN_VARIANCE,以及一个核心设计决策。核心设计决策将在此节点内完成,不会推迟到收敛或优化阶段。如果规格区块中指定了布局,Craft Read必须与其保持一致。
/craft
在构建前会加载
.ui-craft/spec.md
文件。如果标记了
[✓] shape (spec)
,则规格中选择的布局、组件清单、状态网格和验收标准的优先级高于配方默认值——规格中的每一项验收标准必须全部达标,craft才会报告完成。
如果标记了
[–] shape (spec, unsaved)
,则craft将基于输出到终端的shape内容进行构建。在清单中注明此情况。
构建完成后标记
[✓] craft (build)

Gate 5 — Converge

节点5 — 迭代收敛(Converge)

Run the
visual-anti-slop
preset from
../skills/ui-craft/references/loops.md
. This iterates — evaluate → fix one → re-evaluate — until the zero-critical gate passes or the budget is exhausted (default budget: 3 iterations).
  • If the loop gate passes (zero critical findings) → mark
    [✓] converge
    .
  • If budget exhausted with open findings → mark
    [>] converge (open findings)
    . List unresolved findings from the loop report.
运行
../skills/ui-craft/references/loops.md
中的
visual-anti-slop
预设。此过程会循环执行——评估→修复一项→重新评估——直到零严重问题节点通过或预算耗尽(默认预算:3次迭代)。
  • 如果循环节点通过(无严重问题)→ 标记
    [✓] converge
  • 如果预算耗尽仍有未解决问题 → 标记
    [>] converge (open findings)
    。列出循环报告中未解决的问题。

Gate 6 — Ship

节点6 — 交付上线(Ship)

Run
/finalize
verdict. Finalize reports READY / NOT READY / BLOCKED based on the 10-pass finish bar and the brief/token gate.
Print the final verdict and the complete resolved checklist:
[✓] brief   [✓] tokens   [✓] shape (spec)   [✓] craft (build)   [✓] converge   [✓] ship
Degraded-mode honesty. If any gate was marked
[–]
, list them in the ship verdict with their downstream impacts:
"Skipped gates: tokens (skipped) → token spine not validated; shape (spec, unsaved) → acceptance bar not persisted. These gaps reduce the ship verdict's confidence."

运行
/finalize
命令获取最终结论。Finalize会基于10项完成标准以及需求概述/令牌节点的情况,报告READY(就绪)/NOT READY(未就绪)/BLOCKED(阻塞)状态。
打印最终结论和完整的已处理清单:
[✓] brief   [✓] tokens   [✓] shape (spec)   [✓] craft (build)   [✓] converge   [✓] ship
降级模式说明:如果任何节点被标记为
[–]
,在上线结论中列出这些节点及其下游影响:
"跳过的节点:tokens(已跳过)→ 令牌核心未验证;shape (spec, unsaved) → 验收标准未持久化。这些缺口会降低上线结论的可信度。"

Precedence

优先级规则

Brief §6 learned constraints and the a11y/correctness floor take precedence over spec.md composition choices at every gate. If a constraint conflicts with a spec.md decision, the constraint wins — update the spec section to reflect the winning choice and note the brief §6 reference.
Next step: Ship. The pipeline already walked rungs 1 to 3;
.ui-craft/spec.md
is the record for the next session.
需求概述第6节中的约束条件以及无障碍(a11y)/正确性底线在所有节点中的优先级均高于spec.md中的布局选择。如果约束条件与spec.md中的决策冲突,约束条件优先——更新规格区块以反映最终选择,并注明参考需求概述第6节。
下一步: 交付上线。流水线已完成第1至第3阶段;
.ui-craft/spec.md
将作为下一次会话的记录。