gate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Step 0 — is the kit here? This skill reads files from the kit. Check once:
ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING
On
KIT_MISSING
only the skill folders were installed, which is what
npx skills add
does. Say so plainly, point the user at
npx ux-ui-agent-skills init
or the plugin install, and stop. Do not guess the contents of a file you could not open.
Run the full quality gate and report the ACTUAL output — never a remembered or reasoned number.
  1. Run:
    node ${CLAUDE_SKILL_DIR}/../../../scripts/accuracy_report.mjs
    (tokens + contrast + spec + no-hardcode + theme-refs + no-emoji + real-render WCAG + state-aware, light and dark — all-or-nothing).
  2. Report the exact
    N/N
    line it prints.
  3. If it is not fully green:
    • List each failing check verbatim.
    • Fix the cause (do not suppress the check).
    • Re-run until green. Do not announce success between failures.
  4. For any rendered HTML touched this session, also run the pixel-truth checks the gate cannot prove:
    • node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_states.mjs <file> [--dark]
    • node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_responsive.mjs <file>
    • RENDER-AND-LOOK: screenshot the harness, park the pointer off it, inspect every state, click each control to confirm the state changed.
Honest scope: these gates prove objective correctness (tokens, a11y, no drift). They do not prove taste. Pair with
node ${CLAUDE_SKILL_DIR}/../../../scripts/taste_audit.mjs
+ human review; never claim auto-100% on aesthetics.
步骤 0 — 套件是否在这里? 此 skill 会从套件中读取文件。检查一次:
ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING
如果出现
KIT_MISSING
,则只安装了 skill 文件夹,这是
npx skills add
的执行结果。 如实说明这一点,向用户指出
npx ux-ui-agent-skills init
或插件安装方式,然后停止。不要猜测无法打开的文件内容。
运行完整质量门禁并报告实际输出,绝不能使用记忆中的或推断出的数字。
  1. 运行:
    node ${CLAUDE_SKILL_DIR}/../../../scripts/accuracy_report.mjs
    (tokens + contrast + spec + no-hardcode + theme-refs + no-emoji + real-render WCAG + state-aware、light 和 dark——全有或全无)。
  2. 原样报告它打印的确切
    N/N
    行。
  3. 如果未全部通过:
    • 逐字列出每个失败的检查项。
    • 修复根本原因(不要抑制检查)。
    • 重新运行,直至全部通过。不要在失败之间宣布成功。
  4. 对于本次会话中修改过的任何已渲染 HTML,还需运行门禁无法证明的 pixel-truth 检查:
    • node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_states.mjs <file> [--dark]
    • node ${CLAUDE_SKILL_DIR}/../../../scripts/verify_responsive.mjs <file>
    • RENDER-AND-LOOK:对 harness 截图,将指针移开并停在那里,检查每一种状态,点击每个控件以确认状态确实发生了变化。
准确适用范围:这些门禁能够证明客观正确性(tokens、a11y、无漂移),但不能证明审美。应结合
node ${CLAUDE_SKILL_DIR}/../../../scripts/taste_audit.mjs
与人工审查;绝不能声称审美自动达到 100%。