LEAF · WEB BUILD

Unfold a
page.
Fold it back.

Take a page apart. Put it back. Prove it is the same bytes.

EDIT THE PAGE. WATCH THE DIGEST. the real parser, running here
in
UNPACK →
← PACK
out

The round trip always matches, which is the point — so here is why that sentence is worth anything.
THE VERB

unpack / pack / check

unpack(page)   → shell + parts
pack(dir)      → page
check(page)    → self-contained?

// The shell keeps every byte that is
// not a block. Blocks come back in
// document order, at the same offsets.
out/ leaf.json shell.html parts/ 00-script-importmap.json 01-style.css 02-script.js 03-script-module.js

It reassembles from the shell rather than re-serialising a parse tree. That is why the bytes survive.

THE ROUND TRIP

22,891 bytes out.
22,891 bytes back.

$ npx @mrkt_frwd/leaf unpack engines/job.html --output-dir ./outunpacked job.html → ./outsha256 7d3437b28d34…  4 part(s)  parts/00-script-importmap.json     104 B  parts/01-style.css              7970 B  parts/02-script.js              2128 B  parts/03-script-module.js       3671 B $ npx @mrkt_frwd/leaf pack ./out --out rebuilt.htmlpacked → rebuilt.htmlsha256 7d3437b28d34…  22891 Bidentical to the source it was unpacked from

A sha256 is a fingerprint of a file's exact contents — change one character and it changes completely. The same fingerprint before and after is the proof that taking the page apart and putting it back changed nothing at all.

A round trip that is nearly right is the worst outcome available — a page that still loads, quietly missing a newline inside a shader. So Leaf reports the digest, not a success message.

WORKED EXAMPLES

Run against real pages,
not a fixture.

Three pieces from the library — hand-authored, self-contained, nothing chosen to make this easy. Each was unpacked into parts, packed back, and compared byte for byte.

TERRA 016 blocks23,847 Bbyte-identical
SAISON 012 blocks24,533 Bbyte-identical
NACRE 012 blocks44,404 Bbyte-identical

TERRA carries a WebGL scene and six blocks including a module; NACRE is nearly twice the bytes in two. Same result, which is the only interesting outcome — a round trip that worked on the small one and not the large one would be a round trip nobody could rely on.

THE CLI GUIDES YOUR AGENT

Point your agent at npx @mrkt_frwd/leaf.

unpackPage to shell and parts. Nothing is reformatted.
packParts back to page. Reports whether the bytes match.
checkIs it genuinely self-contained, or does it fetch?
$ npx @mrkt_frwd/leaf check engines/job.html
job.html  4 block(s)  22891 B
ok  self-contained — nothing is fetched from another origin

That is the whole instruction.

DOCS

What the CLI cats.

Get startedunpack · pack · check Agent readinessagents.md Doc indexllms.txt All seven enginesthe register