How a PDF engine fits inside a single Cloudflare Worker request with no eval, no headless browser, and no Node filesystem — and still returns sub-second renders for typical documents.
Making AI reliably produce a working PDF template needs three pieces working together — a machine-readable catalog, a compact DSL that costs 75–95% fewer tokens than raw JSON, and a skill file the agent can fetch once and remember.