List the files
In deliverables.json at the project root, name each delivery file, its editable HTML source and the exact comparison size:
[
{"file":"delivery/card.png","html":"outputs/post.html","width":1080,"height":1080}
]Add "transparent":true for a transparent PNG and "fullPage":true for a full-page capture. For a PDF, pageSizeMm checks the visible page box to within 0.1 mm on each axis.
What is compared
- PNG: decoded and compared with the HTML render; every RGBA pixel must match.
- PDF: rasterized with PDF.js and compared with the HTML in print media. The mean maximum-channel difference is at most 2 on a 0 to 255 scale, with at most 2% of pixels differing by more than 32.
- Receipt: the SHA-256 of the checked bytes, so the file you send is the file that passed.
Run it
npx briefatto-board check . validates the listed files. npx briefatto-board kit . adds the layout checks and writes the results to outputs/kit-check.json. After editing an HTML piece, board render <file.html> regenerates its PNG.
Questions and answers
Why compare the export with its HTML?
So the PNG or PDF you hand over is the design that passed the floor, byte for byte on record.
Does a failed export stop the run?
Yes. board check sets exit status 1 when any piece fails, so a hook, CI or the agent stops on it.
Is Briefatto Board free?
Yes. It is open source under the Apache-2.0 licence and installs with npx briefatto-board install.