// lib/dom-dump-script.ts — the rendered-DOM dump script design-review evaluates // in the page before handing the result to the design detector. // // Pure module: no I/O, no imports from scripts/. Consumers: // scripts/resolvers/design.ts Phase 3 prose tells the agent to load lib/dom-dump.js // lib/dom-dump.js committed copy gen-skill-docs writes; the engines load it at runtime // test/fixtures/*.dom.html captured by running it through the browse engine // test/impeccable-fixtures.test.ts pins that the committed dump came from THIS script // // Contract (one script, two engines): // - An IIFE expression: Aside's `pg.evaluate(...)` and `$B eval ` both // wrap an expression, and every `aside repl '...'` body is a single-quoted // bash string, so the text contains NO single-quote characters and no `${`. // - Works on a CLONE of document.documentElement, never the live page. // - Inlines only the stylesheets a owns (inline