uxfix

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

UxFix: autonomous UX fixing loop

UxFix:自主 UX 修复循环

Purpose

用途

Don't just report UI defects: fix them alone, re-verify, and loop until the score reaches 99/100. The
impeccable
detector provides the analysis (findings + severity); UxFix applies the mechanical corrections and iterates. The agent supervises; the machine does the rounds.
不要只报告 UI 缺陷:让 UxFix 自主完成修复、再次验证,并循环执行,直到得分达到 99/100。
impeccable
检测器负责分析(发现项 + 严重程度);UxFix 负责应用确定性修正并持续迭代。Agent 负责监督,机器负责执行各轮任务。

Tooling

工具

Engine:
<skill-dir>/engine/uxfix.js
(Node, no dependencies). Detector: the
impeccable
binary (installed globally by
market install uxfix
).
bash
node <skill-dir>/engine/uxfix.js <fichier-ou-dossier> [--target 99] [--max-iterations 6] [--dry-run] [--json]
IMPECCABLE_BIN
env overrides the detector path.
--dry-run
previews fixes without writing.
--json
emits a machine-readable report.
引擎:
<skill-dir>/engine/uxfix.js
(Node,无依赖)。检测器:
impeccable
可执行文件(通过
market install uxfix
全局安装)。
bash
node <skill-dir>/engine/uxfix.js <fichier-ou-dossier> [--target 99] [--max-iterations 6] [--dry-run] [--json]
IMPECCABLE_BIN
环境变量可覆盖检测器路径。
--dry-run
会在不写入文件的情况下预览修复。
--json
输出机器可读的报告。

Workflow

工作流

  1. Run
    uxfix
    on the built UI files (single HTML/CSS file or directory). It scans
    .css
    files and
    <style>
    blocks in HTML.
  2. Read the report: score progression per iteration, fixes applied, manual remainder.
  3. Handle the manual remainder yourself: findings with no auto-fixer (unknown rules, brand palette choices the engine neutralized, copy the dictionary missed) need human judgment.
  4. Originals are safe: before the first write, everything is copied to
    .uxfix-backup/<timestamp>/
    next to the target.
  1. 运行
    uxfix
    处理已构建的 UI 文件(单个 HTML/CSS 文件或目录)。它会扫描
    .css
    文件及 HTML 中的
    <style>
    块。
  2. 读取报告:查看每轮迭代的得分变化、已应用的修复以及需人工处理的剩余项。
  3. 自行处理需人工介入的剩余项:对于没有自动修复器的发现项,需要运用人工判断,例如未知规则、引擎已转为中性色的品牌配色选项,以及固定词典未覆盖的文案。
  4. 原始文件安全:首次写入前,所有内容都会复制到目标旁的
    .uxfix-backup/<timestamp>/
    。

The 99% contract

99% 约定

  • Score = 100 − 1 per unique warning − 5 per unique error. Duplicates of the same finding count once. Advisories are informational and don't count (same as the detector's own failure semantics).
  • 99+ means zero primary findings, or a single trivial warning left.
  • The loop keeps fixing while the fixers make progress (max 6 iterations), then reports what's left instead of churning.
  • 得分 = 100 − 每个唯一 warning 计 1 分 − 每个唯一 error 计 5 分。同一个发现项的重复项只计一次。提示项仅提供信息,不计入得分(与检测器自身的计分语义相同)。
  • 达到 99+ 意味着没有主要发现项,或仅剩一个微不足道的 warning。
  • 只要自动修复器仍能取得进展,循环就会继续修复(最多 6 轮迭代),随后报告剩余问题,而不是反复无效执行。

Auto-fix catalog

自动修复目录

FindingAutomatic fix
low-contrast
Recomputes the offending color with real WCAG math (binary search toward black/white) until the required ratio is met; touches only the
color
/
background
declarations involved
gradient-text
Replaces the gradient with its darkest stop as a solid color; removes
background-clip: text
dark-glow
Zero-offset chromatic
box-shadow
→ neutral elevation shadow; chromatic
text-shadow
→
none
wide-tracking
letter-spacing
above 0.05em →
0.02em
(
0.04em
for uppercase labels)
cream-palette
Flagged warm page background →
#ffffff
ai-color-palette
Violet/purple hues (265–300°) rotated toward blue, saturation/lightness kept
bounce-easing
cubic-bezier
with overshoot →
cubic-bezier(0.4, 0, 0.2, 1)
pulsing-dot
Infinite pulse animation on the flagged dot →
animation: none
marketing-buzzword
Dictionary rewrite of EN/FR buzzwords in HTML text nodes (scripts, styles, code blocks untouched)
Details and limits per rule:
references/fix-catalog.md
. Scoring details:
references/scoring.md
.
发现项自动修复
low-contrast
使用真实的 WCAG 计算重新计算有问题的颜色(朝黑色/白色二分查找),直至达到所需对比度;仅修改相关的
color
/
background
声明
gradient-text
用渐变中最深的色标生成纯色以替换渐变;移除
background-clip: text
dark-glow
零偏移彩色
box-shadow
→ 中性层级阴影;彩色
text-shadow
→
none
wide-tracking
letter-spacing
大于 0.05em →
0.02em
(大写标签为
0.04em
)
cream-palette
被标记的暖色页面背景 → #ffffff
ai-color-palette
将紫色/紫罗兰色相(265–300°)向蓝色方向旋转,同时保留饱和度和明度
bounce-easing
带过冲的
cubic-bezier
→
cubic-bezier(0.4, 0, 0.2, 1)
pulsing-dot
被标记圆点上的无限脉冲动画 →
animation: none
marketing-buzzword
使用固定词典重写 HTML 文本节点中的英文/法语营销套话(脚本、样式和代码块保持不变)
每条规则的详细信息和限制:
references/fix-catalog.md
。计分详情:
references/scoring.md
。

Operating rules

操作规则

  • Run on the real built files, not on mockups: the detector resolves computed styles.
  • Palette changes (
    ai-color-palette
    ,
    cream-palette
    ) are applied with safe neutrals but must be flagged for human review: brand colors are a choice, not a bug. The report lists every one.
  • Copy rewrites use a fixed dictionary; nuanced marketing copy still deserves a human pass.
  • A 100/100 detector score is defect evidence, not proof of good design. Keep taste in the loop: run the loop, then look at the page.
  • Never run with
    --target 100
    as a hard gate in CI unless a human reviews the diff: the last point is sometimes a judgment call.
  • 对实际构建的文件运行,不要在 mockup 上运行:检测器需要解析计算后的样式。
  • 调色板更改(
    ai-color-palette
    、
    cream-palette
    )会使用安全的中性色应用,但必须标记为需人工复核:品牌颜色属于选择,而不是缺陷。报告会逐一列出所有相关更改。
  • 文案重写使用固定词典;细微的营销文案仍应经过人工审阅。
  • 100/100 的检测器得分是缺陷检测方面的证据,并不能证明设计良好。不要将审美判断排除在流程之外:运行循环后,还要亲自查看页面。
  • 除非有人工审阅变更差异,否则不要在 CI 中使用
    --target 100
    作为硬性门禁:最后这一分有时取决于主观判断。