Files
pbakaus_impeccable/tests/oracle/golden/comp-diff-json.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
3.6 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\": \"spec.json\",\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\": \"top\",\n \"x\": 0,\n \"y\": 0,\n \"w\": 1,\n \"h\": 0.2,\n \"kind\": \"chrome\",\n \"score\": {\n \"overall\": 0.8167,\n \"structure\": 0.9826,\n \"color\": 0.7489,\n \"colorIntersection\": 0.7389,\n \"paletteMatch\": 0.7544,\n \"detail\": 0.5422,\n \"detailRaw\": 0.5422,\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\": 102\n },\n \"build\": {\n \"x\": 0,\n \"y\": 0,\n \"w\": 768,\n \"h\": 102\n }\n }\n },\n {\n \"id\": \"art\",\n \"x\": 0.4,\n \"y\": 0.2,\n \"w\": 0.6,\n \"h\": 0.3,\n \"kind\": \"plate\",\n \"score\": {\n \"overall\": 0.3551,\n \"structure\": 0.8561,\n \"color\": 0.4159,\n \"colorIntersection\": 0.2608,\n \"paletteMatch\": 0.4994,\n \"detail\": 0.0158,\n \"detailRaw\": 0.0158,\n \"detailAdded\": 0,\n \"bands\": 1\n },\n \"verdict\": \"missing\",\n \"inkBox\": {\n \"comp\": {\n \"x\": 33,\n \"y\": 0,\n \"w\": 400,\n \"h\": 138\n },\n \"build\": null\n }\n },\n {\n \"id\": \"body\",\n \"x\": 0,\n \"y\": 0.5,\n \"w\": 0.4,\n \"h\": 0.4,\n \"kind\": \"text\",\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\": 307,\n \"h\": 201\n },\n \"build\": {\n \"x\": 0,\n \"y\": 4,\n \"w\": 307,\n \"h\": 201\n }\n }\n }\n ],\n \"files\": null\n}\n",
"stderr": "",
"exit": 0,
"signal": null,
"files": {}
}