uxfix
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUxFix: 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 detector provides the analysis (findings + severity); UxFix applies the mechanical corrections and iterates. The agent supervises; the machine does the rounds.
impeccable不要只报告 UI 缺陷:让 UxFix 自主完成修复、再次验证,并循环执行,直到得分达到 99/100。 检测器负责分析(发现项 + 严重程度);UxFix 负责应用确定性修正并持续迭代。Agent 负责监督,机器负责执行各轮任务。
impeccableTooling
工具
Engine: (Node, no dependencies). Detector: the binary (installed globally by ).
<skill-dir>/engine/uxfix.jsimpeccablemarket install uxfixbash
node <skill-dir>/engine/uxfix.js <fichier-ou-dossier> [--target 99] [--max-iterations 6] [--dry-run] [--json]IMPECCABLE_BIN--dry-run--json引擎:(Node,无依赖)。检测器: 可执行文件(通过 全局安装)。
<skill-dir>/engine/uxfix.jsimpeccablemarket install uxfixbash
node <skill-dir>/engine/uxfix.js <fichier-ou-dossier> [--target 99] [--max-iterations 6] [--dry-run] [--json]IMPECCABLE_BIN--dry-run--jsonWorkflow
工作流
- Run on the built UI files (single HTML/CSS file or directory). It scans
uxfixfiles and.cssblocks in HTML.<style> - Read the report: score progression per iteration, fixes applied, manual remainder.
- 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.
- Originals are safe: before the first write, everything is copied to next to the target.
.uxfix-backup/<timestamp>/
- 运行 处理已构建的 UI 文件(单个 HTML/CSS 文件或目录)。它会扫描
uxfix文件及 HTML 中的.css块。<style> - 读取报告:查看每轮迭代的得分变化、已应用的修复以及需人工处理的剩余项。
- 自行处理需人工介入的剩余项:对于没有自动修复器的发现项,需要运用人工判断,例如未知规则、引擎已转为中性色的品牌配色选项,以及固定词典未覆盖的文案。
- 原始文件安全:首次写入前,所有内容都会复制到目标旁的 。
.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
自动修复目录
| Finding | Automatic fix |
|---|---|
| Recomputes the offending color with real WCAG math (binary search toward black/white) until the required ratio is met; touches only the |
| Replaces the gradient with its darkest stop as a solid color; removes |
| Zero-offset chromatic |
| |
| Flagged warm page background → |
| Violet/purple hues (265–300°) rotated toward blue, saturation/lightness kept |
| |
| Infinite pulse animation on the flagged dot → |
| Dictionary rewrite of EN/FR buzzwords in HTML text nodes (scripts, styles, code blocks untouched) |
Details and limits per rule: . Scoring details: .
references/fix-catalog.mdreferences/scoring.md| 发现项 | 自动修复 |
|---|---|
| 使用真实的 WCAG 计算重新计算有问题的颜色(朝黑色/白色二分查找),直至达到所需对比度;仅修改相关的 |
| 用渐变中最深的色标生成纯色以替换渐变;移除 |
| 零偏移彩色 |
| |
| 被标记的暖色页面背景 → #ffffff |
| 将紫色/紫罗兰色相(265–300°)向蓝色方向旋转,同时保留饱和度和明度 |
| 带过冲的 |
| 被标记圆点上的无限脉冲动画 → |
| 使用固定词典重写 HTML 文本节点中的英文/法语营销套话(脚本、样式和代码块保持不变) |
每条规则的详细信息和限制:。计分详情:。
references/fix-catalog.mdreferences/scoring.mdOperating rules
操作规则
- Run on the real built files, not on mockups: the detector resolves computed styles.
- Palette changes (,
ai-color-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.cream-palette - 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 as a hard gate in CI unless a human reviews the diff: the last point is sometimes a judgment call.
--target 100
- 对实际构建的文件运行,不要在 mockup 上运行:检测器需要解析计算后的样式。
- 调色板更改(、
ai-color-palette)会使用安全的中性色应用,但必须标记为需人工复核:品牌颜色属于选择,而不是缺陷。报告会逐一列出所有相关更改。cream-palette - 文案重写使用固定词典;细微的营销文案仍应经过人工审阅。
- 100/100 的检测器得分是缺陷检测方面的证据,并不能证明设计良好。不要将审美判断排除在流程之外:运行循环后,还要亲自查看页面。
- 除非有人工审阅变更差异,否则不要在 CI 中使用 作为硬性门禁:最后这一分有时取决于主观判断。
--target 100