Files
pbakaus_impeccable/tests/oracle/golden/comp-diff-no-spec.json
T
Paul Bakaus 6c474b1c79 Node-free swap: comp-fidelity verbs move to the engine
The four comp-fidelity scripts (comp-spec, comp-diff, font-match, build-phase)
and their six libs are ported into the impeccable-engine binary. This removes
the last Node .mjs from the skill: `git ls-files skill/scripts | grep '\.mjs$'`
now returns nothing.

- reference/new-work.md, reference/visualize.md, and the asset-producer /
  finish-reviewer agents now invoke `{{scripts_path}}/impeccable <verb>` instead
  of `node <script>.mjs`.
- Deleted the ten ported .mjs and the four JS unit tests that imported them
  (their behavior is now covered by the engine's Rust tests and the oracle);
  removed those files from scripts/test-suites.mjs.
- Added oracle cases (comp-*, font-match-*, build-phase-*) over a comp-basic
  workspace, recorded from the engine binary; the deterministic outputs are
  byte-identical to the JS the scripts left behind.
- docs/CLI-CONTRACT.md documents the four verbs, the CDP font rendering, and
  the runtime-resolved (never-committed) font-index catalog.

The font-index catalog JSON stays shipped in the skill (data/font-index.json);
the engine resolves it at run time and never vendors it.

Prepared with AI assistance (Claude Code).
2026-09-01 12:29:17 -07:00

8 lines
8.9 KiB
JSON

{
"stdout": "{\n \"tool\": \"comp-diff\",\n \"version\": 1,\n \"createdAt\": \"<ISO>\",\n \"label\": \"build\",\n \"comp\": \"comp.png\",\n \"build\": \"build.png\",\n \"spec\": null,\n \"compSize\": \"768x512\",\n \"buildSize\": \"768x512\",\n \"align\": \"top\",\n \"overall\": 0.8374,\n \"verdict\": \"match\",\n \"scores\": {\n \"overall\": 0.8374,\n \"structure\": 0.9846,\n \"color\": 0.8306,\n \"colorIntersection\": 0.8148,\n \"paletteMatch\": 0.8391,\n \"detail\": 0.5407,\n \"detailRaw\": 0.5407,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"palette\": {\n \"comp\": [\n {\n \"hex\": \"#f7e8e8\",\n \"coverage\": 0.6852\n },\n {\n \"hex\": \"#182838\",\n \"coverage\": 0.14\n },\n {\n \"hex\": \"#9a9aa5\",\n \"coverage\": 0.0682\n },\n {\n \"hex\": \"#c5c5d1\",\n \"coverage\": 0.067\n },\n {\n \"hex\": \"#7c7c82\",\n \"coverage\": 0.0373\n },\n {\n \"hex\": \"#b82828\",\n \"coverage\": 0.0022\n }\n ],\n \"build\": [\n {\n \"hex\": \"#ede1e1\",\n \"coverage\": 0.844\n },\n {\n \"hex\": \"#182838\",\n \"coverage\": 0.14\n },\n {\n \"hex\": \"#787878\",\n \"coverage\": 0.0138\n },\n {\n \"hex\": \"#b82828\",\n \"coverage\": 0.0022\n }\n ]\n },\n \"regions\": [\n {\n \"id\": \"band-1\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 0.09411764705882353,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 8,\n \"w\": 768,\n \"h\": 40\n },\n \"build\": {\n \"x\": 0,\n \"y\": 8,\n \"w\": 768,\n \"h\": 40\n }\n }\n },\n {\n \"id\": \"band-2\",\n \"x\": 0,\n \"y\": 0.09411764705882353,\n \"w\": 1,\n \"h\": 0.0823529411764706,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 0.6951,\n \"structure\": 0.9814,\n \"color\": 0.5732,\n \"colorIntersection\": 0.5482,\n \"paletteMatch\": 0.5866,\n \"detail\": 0.2333,\n \"detailRaw\": 0.2333,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"drift\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 24,\n \"y\": 3,\n \"w\": 716,\n \"h\": 45\n },\n \"build\": {\n \"x\": 24,\n \"y\": 25,\n \"w\": 280,\n \"h\": 22\n }\n }\n },\n {\n \"id\": \"band-3\",\n \"x\": 0,\n \"y\": 0.17647058823529413,\n \"w\": 1,\n \"h\": 0.2941176470588235,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 0.662,\n \"structure\": 0.9645,\n \"color\": 0.539,\n \"colorIntersection\": 0.5123,\n \"paletteMatch\": 0.5534,\n \"detail\": 0.1585,\n \"detailRaw\": 0.1585,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"drift\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 24,\n \"y\": 0,\n \"w\": 716,\n \"h\": 150\n },\n \"build\": {\n \"x\": 24,\n \"y\": 0,\n \"w\": 280,\n \"h\": 50\n }\n }\n },\n {\n \"id\": \"band-4\",\n \"x\": 0,\n \"y\": 0.47058823529411764,\n \"w\": 1,\n \"h\": 0.07058823529411762,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 0.9468,\n \"structure\": 0.9934,\n \"color\": 0.9286,\n \"colorIntersection\": 0.9385,\n \"paletteMatch\": 0.9232,\n \"detail\": 0.868,\n \"detailRaw\": 0.868,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 48\n },\n \"build\": {\n \"x\": 0,\n \"y\": 25,\n \"w\": 768,\n \"h\": 23\n }\n }\n },\n {\n \"id\": \"band-5\",\n \"x\": 0,\n \"y\": 0.5411764705882353,\n \"w\": 1,\n \"h\": 0.09411764705882353,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 330,\n \"h\": 43\n },\n \"build\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 330,\n \"h\": 43\n }\n }\n },\n {\n \"id\": \"band-6\",\n \"x\": 0,\n \"y\": 0.6352941176470588,\n \"w\": 1,\n \"h\": 0.08235294117647063,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 4,\n \"w\": 768,\n \"h\": 44\n },\n \"build\": {\n \"x\": 0,\n \"y\": 4,\n \"w\": 768,\n \"h\": 44\n }\n }\n },\n {\n \"id\": \"band-7\",\n \"x\": 0,\n \"y\": 0.7176470588235294,\n \"w\": 1,\n \"h\": 0.09411764705882353,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 49\n },\n \"build\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 49\n }\n }\n },\n {\n \"id\": \"band-8\",\n \"x\": 0,\n \"y\": 0.8117647058823529,\n \"w\": 1,\n \"h\": 0.07058823529411762,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 37\n },\n \"build\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 37\n }\n }\n },\n {\n \"id\": \"band-9\",\n \"x\": 0,\n \"y\": 0.8823529411764706,\n \"w\": 1,\n \"h\": 0.09411764705882353,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 24,\n \"y\": 8,\n \"w\": 160,\n \"h\": 36\n },\n \"build\": {\n \"x\": 24,\n \"y\": 8,\n \"w\": 160,\n \"h\": 36\n }\n }\n },\n {\n \"id\": \"band-10\",\n \"x\": 0,\n \"y\": 0.9764705882352941,\n \"w\": 1,\n \"h\": 0.02352941176470591,\n \"kind\": \"band\",\n \"score\": {\n \"overall\": 1,\n \"structure\": 1,\n \"color\": 1,\n \"colorIntersection\": 1,\n \"paletteMatch\": 1,\n \"detail\": 1,\n \"detailRaw\": 1,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"match\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 24,\n \"y\": 0,\n \"w\": 160,\n \"h\": 14\n },\n \"build\": {\n \"x\": 24,\n \"y\": 0,\n \"w\": 160,\n \"h\": 14\n }\n }\n }\n ],\n \"files\": null\n}\n",
"stderr": "",
"exit": 0,
"signal": null,
"files": {}
}