{"_id":"blueprint4llm","_rev":"3-e9b378222ae1d78cee9313dc9ace00a8","name":"blueprint4llm","dist-tags":{"latest":"0.22.2"},"versions":{"0.0.0-stage":{"name":"blueprint4llm","version":"0.0.0-stage","_id":"blueprint4llm@0.0.0-stage","stub":true,"maintainers":[{"name":"ievkz","email":"igumnovnsk@gmail.com"}],"dist":{"shasum":"0066b5b27a829e7ab3991807a5590798802df2cf","tarball":"https://registry.npmjs.org/blueprint4llm/-/blueprint4llm-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-XlSWlmLSPhuMtGuOfOZb+FUUuKxKiYAcHH+C6oztlZ1GiZqedd7+Bkdim3hiqLzrnHXneCzxoE43IFUsX15l1A==","signatures":[{"sig":"MEYCIQDsn5AIK4YSjHqOgZQXgs0MA75XXV6/6T3z8uUok1MkKAIhALUBbaF/H0lEEZXQaUUqEeokYsNiEHnbBWHmXBvKrFTd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":335},"_npmUser":{"name":"ievkz","email":"igumnovnsk@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.16.1":{"name":"blueprint4llm","version":"0.16.1","keywords":["blueprint","markdown","mermaid","plantuml","wiremark","diagrams","ui-prototypes","cli"],"license":"MIT","_id":"blueprint4llm@0.16.1","maintainers":[{"name":"ievkz","email":"igumnovnsk@gmail.com"}],"homepage":"https://github.com/evgenyigumnov/blueprint4llm#readme","bugs":{"url":"https://github.com/evgenyigumnov/blueprint4llm/issues"},"bin":{"blueprint4llm":"dist/cli.js"},"dist":{"shasum":"937048e9974c015c1614192cd55edf5a0b4fc026","tarball":"https://registry.npmjs.org/blueprint4llm/-/blueprint4llm-0.16.1.tgz","fileCount":219,"integrity":"sha512-Z1R6jrHQrmkCJlRTsYkNu8wyPLYI7qKWnkOPjqBGAUywzx4CebZmSuy6SbCxSCFCp2vYRAXTW6IW978Luei6EQ==","signatures":[{"sig":"MEUCIDOZldGTNIxdP+e4RHL7OoRJGP0vZbF+bblNg5Hq8Ia3AiEAwBnXeju30q5EewzgQ2hla9XGgcgslGIzd5cLxv6Z3vA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICTn5TL0Cwq0rrs3ZdAcNXXxySf8IlmeocCvftMWKU+OAiEAnan1/vBvFEx+N9Ftj0aZK3upBRfkM0sG+lqJabId6Vg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5165889},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"434214629066e20aa285d09c51057cd2699a205c","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.build.json","format":"prettier --write .","pretest":"npm run build","typecheck":"tsc --noEmit","format:check":"prettier --check ."},"_npmUser":{"name":"ievkz","email":"igumnovnsk@gmail.com"},"overrides":{"katex":"0.18.2"},"repository":{"url":"git+https://github.com/evgenyigumnov/blueprint4llm.git","type":"git"},"_npmVersion":"10.9.9","description":"CLI generator of software blueprints: Markdown diagrams and UI prototypes to standalone HTML, PDF, SVG, PNG, or JPEG","directories":{},"_nodeVersion":"22.23.3","dependencies":{"unified":"^11.0.5","chokidar":"^5.0.0","commander":"^15.0.0","puppeteer":"25.14.0","remark-gfm":"^4.0.1","jsonc-parser":"^3.3.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","@plantuml/core":"1.2026.9","@wiremark/core":"^0.1.0","@shikijs/rehype":"4.5.0","rehype-stringify":"^10.0.1","hast-util-from-html":"^2.0.3","@mermaid-js/mermaid-cli":"12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.13.0","vitest":"^5.0.5","prettier":"^3.9.10","@eslint/js":"^10.0.1","pdfjs-dist":"6.4.299","typescript":"^6.0.3","@types/hast":"^3.0.5","@types/node":"^26.6.5","@types/mdast":"^4.0.4","typescript-eslint":"^8.72.0"},"_npmOperationalInternal":{"tmp":"tmp/blueprint4llm_0.16.1_1792675002358_0.9211678971168407","host":"s3://npm-registry-packages-npm-production"}},"0.22.2":{"_id":"blueprint4llm@0.22.2","bin":{"blueprint4llm":"dist/cli.js"},"bugs":{"url":"https://github.com/evgenyigumnov/blueprint4llm/issues"},"dist":{"shasum":"96beb40b9b47c25e9d416c8a717521e81abb187b","tarball":"https://registry.npmjs.org/blueprint4llm/-/blueprint4llm-0.22.2.tgz","fileCount":428,"integrity":"sha512-207NN1qAAqdW3kMQmqDINMdJvzTY5wkTNmtY16DItAZW8qes/bZtCuPWJ8gQIPxVK8Q8/5jyqoZiWuCpyiFYmw==","signatures":[{"sig":"MEUCIQCCo6XwPGFRSsQrkAHhWhAjWOFlHnrRV3er/Bt4xTf9pgIgeqwqzRryp3iruHIF7BNlIumuiG12ZzF0gKkfMDYKGMU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDCYBNz36jRvTwO4xoRT1/q8ape/ehMOP2KwjfkP1d14QIhAL91yq2fRjJo52BANfGjvQ4qXUSEZJwR4fEj5sncAyD9"}],"unpackedSize":5953224},"main":"./dist/index.js","name":"blueprint4llm","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"dcae911de368effd259d9488485a2a1f8cbd4714","license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","build":"tsc -p tsconfig.build.json","format":"prettier --write .","pretest":"npm run build","typecheck":"tsc --noEmit","format:check":"prettier --check .","test:d2-smoke":"vitest run tests/d2-diagnostics.test.ts tests/d2-policy.test.ts tests/d2-renderer.test.ts tests/d2-runner.test.ts tests/d2-svg.test.ts","test:graphviz":"vitest run tests/graphviz-diagnostics.test.ts tests/graphviz-renderer.test.ts tests/graphviz-runner.test.ts tests/graphviz-source.test.ts tests/graphviz-svg.test.ts","pretest:graphviz":"npm run build"},"version":"0.22.2","_npmUser":{"name":"ievkz","email":"igumnovnsk@gmail.com"},"homepage":"https://github.com/evgenyigumnov/blueprint4llm#readme","keywords":["blueprint","markdown","d2","mermaid","vega-lite","plantuml","graphviz","wiremark","diagrams","ui-prototypes","cli"],"overrides":{"katex":"0.18.2"},"repository":{"url":"git+https://github.com/evgenyigumnov/blueprint4llm.git","type":"git"},"_npmVersion":"10.9.9","description":"CLI generator of software blueprints: Markdown diagrams, data charts, and UI prototypes to standalone HTML, PDF, SVG, PNG, or JPEG","directories":{},"maintainers":[{"name":"ievkz","email":"igumnovnsk@gmail.com"}],"_nodeVersion":"22.23.3","dependencies":{"ajv":"8.20.0","vega":"6.4.0","yaml":"2.9.1","echarts":"6.1.0","postcss":"8.5.31","unified":"^11.0.5","chokidar":"^5.0.0","commander":"^15.0.0","puppeteer":"25.14.0","vega-lite":"6.5.0","@d2lang/d2":"0.1.34","remark-gfm":"^4.0.1","@viz-js/viz":"3.31.0","jsonc-parser":"^3.3.1","remark-parse":"^11.0.0","remark-rehype":"^11.1.2","@plantuml/core":"1.2026.9","@wiremark/core":"^0.1.0","@shikijs/rehype":"4.5.0","rehype-stringify":"^10.0.1","hast-util-from-html":"^2.0.3","@mermaid-js/mermaid-cli":"12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.13.0","vitest":"^5.0.5","prettier":"^3.9.10","@eslint/js":"^10.0.1","pdfjs-dist":"6.4.299","typescript":"^6.0.3","@types/hast":"^3.0.5","@types/node":"^26.6.5","@types/mdast":"^4.0.4","typescript-eslint":"^8.72.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blueprint4llm_0.22.2_1792760316488_0.13195776608574517"}}},"time":{"created":"2026-10-22T13:15:20.631Z","modified":"2026-10-23T12:58:37.269Z","0.0.0-stage":"2026-10-22T13:15:20.631Z","0.16.1":"2026-10-22T13:16:42.522Z","0.22.2":"2026-10-23T12:58:36.642Z"},"bugs":{"url":"https://github.com/evgenyigumnov/blueprint4llm/issues"},"license":"MIT","homepage":"https://github.com/evgenyigumnov/blueprint4llm#readme","keywords":["blueprint","markdown","d2","mermaid","vega-lite","plantuml","graphviz","wiremark","diagrams","ui-prototypes","cli"],"repository":{"url":"git+https://github.com/evgenyigumnov/blueprint4llm.git","type":"git"},"description":"CLI generator of software blueprints: Markdown diagrams, data charts, and UI prototypes to standalone HTML, PDF, SVG, PNG, or JPEG","maintainers":[{"name":"ievkz","email":"igumnovnsk@gmail.com"}],"readme":"# blueprint4llm\n\n**Markdown plans → diagrams, UI prototypes, HTML, and PDF.**\n\nWrite a plan yourself or with an agent. Review the system and screens before implementation.\nMarkdown stays the source of truth; the CLI renders it without calling an LLM.\n\n![Markdown source beside its rendered Mermaid diagram and Wiremark screen](https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/markdown-to-visual.png)\n\n## Quick start\n\n### Use with Codex or Claude Code\n\nFrom your project directory, install the `blueprint4llm` skill with the [skills CLI](https://github.com/vercel-labs/skills):\n\n```bash\n# Codex\nnpx skills add evgenyigumnov/blueprint4llm --skill blueprint4llm --agent codex\n\n# Claude Code\nnpx skills add evgenyigumnov/blueprint4llm --skill blueprint4llm --agent claude-code\n```\n\nThe installer requires **Node.js ≥22.20.0** and npm. It installs the skill for the current project by default; add `--global` to use it across projects. Codex stores project skills in `.agents/skills/`; Claude Code uses `.claude/skills/`.\n\nInvoke the skill in your agent:\n\n```text\n# Codex\n$blueprint4llm Create a visual plan for a task queue.\n\n# Claude Code\n/blueprint4llm Create a visual plan for a task queue.\n```\n\nThe skill guides the agent through writing a visual plan, validating and rendering it, and reviewing each visual. Rendering requires the `blueprint4llm` CLI and Puppeteer's Chrome; the next section shows how to install and run the CLI.\n\n### Use the CLI directly\n\nRequires **Node.js ≥22.13.0**, npm, and Puppeteer's Chrome.\n\n```bash\nnpm install --global blueprint4llm\n```\n\nSave this as `plan.md`:\n\n````markdown\n# Request workflow\n\n```d2\nform: Request form\napi: API validation\nqueue: Processing queue\n\nform -> api\napi -> queue\n```\n````\n\n```bash\nblueprint4llm plan.md --serve\n```\n\nOpen the printed URL, normally `http://127.0.0.1:8080/`. Saving the Markdown or a referenced\nlocal image refreshes the preview. The toolbar offers dark mode and PDF download. Stop with `Ctrl+C`.\n\nChrome is normally installed automatically. If install scripts were blocked, install it manually:\n\n```bash\nnpm exec --yes --package=puppeteer@25.14.0 -- puppeteer browsers install chrome\n```\n\n## How it works\n\n![A Markdown plan is validated and rendered into live previews, HTML or PDF documents, or a single SVG, PNG, or JPEG visual](https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/workflow.svg)\n\n## Formats\n\nUse fenced blocks alongside CommonMark and GitHub Flavored Markdown: text, tables, lists,\nlinks, images, and code. Ordinary code blocks receive syntax highlighting.\n\n| Format     | Fence                   | Input and support                                                                                                                                     |\n| ---------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |\n| D2         | `d2`                    | Self-contained D2 source rendered offline with bundled WebAssembly. Supports containers, connections, styles, SQL tables, UML classes, and sequences. |\n| Mermaid    | `mermaid`               | Flows, sequences, classes, states, and ER diagrams. Uses a vertical layout where supported.                                                           |\n| Graphviz   | `graphviz`, `dot`       | One offline DOT graph rendered to SVG in a worker. Supports verified `dot`, `neato`, `circo`, `fdp`, `osage`, `patchwork`, and `twopi` engines.       |\n| PlantUML   | `plantuml`              | Standard `@start…` / `@end…` diagrams. Local engine; no Java, external includes, or network requests.                                                 |\n| draw.io    | `drawio`, `draw.io`     | Structural JSON with nodes, groups, labels, and edges. Automatic layout; no XML.                                                                      |\n| Wiremark   | `wireframe`, `wiremark` | Screens and controls described as text. `wireframe` is the canonical fence.                                                                           |\n| Pencil     | `pencil`, `pen`         | Embedded `.pen` JSONC, schema 2.21. Frames, groups, shapes, paths, and text; no images, components, gradients, or effects.                            |\n| Balsamiq   | `balsamiq`              | One Mockups 3 JSON mockup with common controls. Preserves positions and text; no `.bmpr`, `.bmml`, assets, or symbols.                                |\n| Figma      | `figma`                 | REST API JSON rendered locally, or a frame URL exported through the Figma API. URL mode needs a token.                                                |\n| OpenAPI    | `openapi`               | OpenAPI 3.1.1 YAML or JSON rendered as a static API reference, including operations and component schemas.                                            |\n| Excalidraw | `excalidraw`            | Strict `.excalidraw` JSON v2. Keeps positions, rotations, groups, shapes, text, and ordinary arrows; unsupported items get placeholders.              |\n| Vega-Lite  | `vega-lite`, `vegalite` | Vega-Lite 6 specifications with embedded data; rendered locally as static SVG.                                                                        |\n| ECharts    | `echarts`               | Strict JSON using the supported static chart profile; rendered locally as SVG.                                                                        |\n\nEach supported format has a visual example below. All labels in the images are in English.\n\n| Format     |                                                                                        Preview                                                                                        | Format    |                                                                                            Preview                                                                                            |\n| ---------- | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |\n| D2         |             <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/d2.svg\" alt=\"Orders API connected to its orders table\" width=\"420\">              | Mermaid   |           <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/mermaid.svg\" alt=\"Order request sequence from customer to database\" width=\"420\">           |\n| Graphviz   |            <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/graphviz.svg\" alt=\"Order flow from customer to database\" width=\"420\">             | PlantUML  | <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/plantuml.svg\" alt=\"Order request sequence between customer, web app, API, and database\" width=\"420\"> |\n| draw.io    |  <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/drawio.svg\" alt=\"Release flow with a build-and-test group and a publish step\" width=\"420\">  | Wiremark  |            <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/wiremark.svg\" alt=\"Sign-in screen with email and password fields\" width=\"420\">            |\n| Pencil     | <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/pencil.svg\" alt=\"Profile screen with an avatar, email address, and save button\" width=\"420\"> | Balsamiq  |            <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/balsamiq.svg\" alt=\"Sign-in mockup with email and password fields\" width=\"420\">            |\n| Figma      |          <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/figma.svg\" alt=\"Figma sign-in screen with a continue button\" width=\"420\">           | OpenAPI   |           <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/openapi.svg\" alt=\"Tasks API reference with a list-tasks operation\" width=\"420\">            |\n| Excalidraw |             <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/excalidraw.svg\" alt=\"Client sends a request to an API\" width=\"420\">              | Vega-Lite |   <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/vega-lite.svg\" alt=\"Weekly requests bar chart with English day and request labels\" width=\"420\">    |\n| ECharts    |                  <img src=\"https://raw.githubusercontent.com/evgenyigumnov/blueprint4llm/main/docs/assets/echarts.svg\" alt=\"Requests by day bar chart\" width=\"420\">                   |           |                                                                                                                                                                                               |\n\n### Figma frames\n\nJSON mode needs a root `DOCUMENT` and works offline without a token. Select a frame with\n`node=12:34` in the fence metadata. The local renderer supports containers, basic shapes,\nvector paths, text, and solid fills; use URL mode for gradients, effects, masks, and images.\n\nURL mode accepts HTTPS `/design/` or `/file/` frame URLs. Use a personal access token with\n`file_content:read` permission. Token lookup order: `CompileOptions.figmaAccessToken`,\n`FIGMA_ACCESS_TOKEN`, then `.env` in the current working directory. The token is sent only\nto `api.figma.com`; exported SVGs are embedded in the result.\n\n## Commands\n\n| Task                 | Command                                                                |\n| -------------------- | ---------------------------------------------------------------------- |\n| Live preview         | `blueprint4llm plan.md --serve --port=8080`                            |\n| Validate for CI      | `blueprint4llm plan.md --check`                                        |\n| Validate with report | `blueprint4llm plan.md --check --report-json=diagnostics.json`         |\n| Export with report   | `blueprint4llm plan.md --out=plan.html --report-json=diagnostics.json` |\n| Export HTML          | `blueprint4llm plan.md --out=plan.html`                                |\n| Export with counts   | `blueprint4llm plan.md --out=plan.html --diagnostics-summary`          |\n| Export PDF           | `blueprint4llm plan.md --out=plan.pdf --format=pdf`                    |\n| Export SVG           | `blueprint4llm plan.md --out=visual.svg --format=svg`                  |\n| Export PNG           | `blueprint4llm plan.md --out=visual.png --format=png`                  |\n| Export JPEG          | `blueprint4llm plan.md --out=visual.jpeg --format=jpeg`                |\n\nImage exports require **exactly one supported visual block**; the quick start example qualifies.\n`--out` creates parent directories. Each invocation produces one format; HTML is the default.\n`--check` validates Markdown, diagrams, and local images without writing HTML or assets. The optional\n`--report-json=<file>` writes a UTF-8 JSON report atomically. It works with `--check` and one-shot\nexports. The report path must differ from the input and output paths, including symlink aliases.\n`--report-json` cannot be used with `--serve`.\n\nGenerated documents omit the overall error and warning count by default. Add\n`--diagnostics-summary` to HTML or PDF exports and live previews to include it. A failed diagram\nstill shows its full message at its position; the other Markdown and valid diagrams remain available.\nHTML and PDF exports are saved even when a diagram has an error, then the command exits with code\n`1`. SVG, PNG, and JPEG exports do not replace an existing file when their diagram has an error.\nWarnings alone exit with code `0`. Invalid arguments, including report path conflicts, exit with\ncode `2`.\n\nThe report has `schemaVersion: 1`, a `status` of `ok` or `error`, summary counts, and ordered\ndiagnostics. Each diagnostic includes `severity`, a stable `code`, `scope`, source path, optional\nMarkdown coordinates and diagram identity, and the full message. Codes are `diagram.render`,\n`diagram.limit`, `diagram.svg`, `renderer.warning`, `document.read`, `document.compile`,\n`output.render`, and `output.write`. The optional `outputs` object lists files that the invocation\nactually saved. For example, `--check` reports have no `outputs` field.\n\nFatal document or export failures stop that operation. If a JSON report was requested, it includes a\ndocument or output diagnostic when the report can still be written. An unwritable report is reported\non stderr and exits with code `1`; any HTML or PDF already saved remains available. See\n[`examples/blueprint-diagnostics.md`](examples/blueprint-diagnostics.md) for a document with two\nindependent diagram errors and a valid diagram between them.\n\nIn live preview, failed diagrams stay inline and the PDF uses that same compiled document. The\noverall count is opt-in through `--diagnostics-summary`. Fixing the source removes the diagnostics on\nthe next build. A fatal document error still shows a diagnostic page until the source is fixed.\n\n## Output and limits\n\n| Topic            | Behavior                                                                                                                                                            |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| HTML             | Embeds diagram SVGs; local images are copied to an adjacent `assets/` folder. Open the output directly in a browser.                                                |\n| PDF              | A4 pages with local Noto Sans fonts and selectable text. Wide D2 diagrams use landscape pages. External images must be saved locally before export.                 |\n| Image paths      | Resolve relative to the Markdown file. Paths and symlinks that escape its directory are rejected.                                                                   |\n| Offline use      | Local renderers need no network; Figma URL blocks fetch during compilation. HTML still needs a connection for external images.                                      |\n| Safety           | Raw HTML is escaped. SVGs are checked for active content and external resources. User scripts and graphical editing are not supported.                              |\n| Document limits  | 5 MiB of Markdown, 100 visual blocks, and normally 256 KiB per block.                                                                                               |\n| JSON limits      | draw.io, Pencil, and Figma: 1 MiB and 10,000 cells/nodes. Balsamiq: 256 KiB and 3,000 controls.                                                                     |\n| Vega-Lite limits | 256 KiB source, 64 levels, 50,000 AST nodes, 10,000 source rows, 100 expanded views and transforms, 50,000 computed rows/items, and 4 MiB SVG.                      |\n| OpenAPI limits   | 256 KiB source, 200 operations, 500 named schemas, 2,000 references, 5,000 layout lines, and 4 MiB SVG.                                                             |\n| Timeouts         | Mermaid, PlantUML, and Vega-Lite: 30 seconds. draw.io layout: 5 seconds. PDF: 60 seconds.                                                                           |\n| Chrome on Linux  | Requires Chrome system libraries. If sandbox startup fails, rendering retries with `--no-sandbox`. Set `BLUEPRINT4LLM_DISABLE_CHROME_SANDBOX=1` to force this mode. |\n\n## Agent and editor workflows\n\n| Workflow     | Setup                                                                                                                                                                                        |\n| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Coding agent | Use the `blueprint4llm` skill; see [Quick start](#quick-start) for Codex and Claude Code installation and invocation.                                                                        |\n| VS Code      | Install a built VSIX with `code --install-extension <file.vsix>`. Open a Markdown file and run **Blueprint: Open Preview to the Side**. Use **Blueprint: Export Preview as PDF** to save it. |\n\nThe VS Code preview compiles unsaved edits with a 200 ms delay, configurable through\n`blueprint4llm.preview.debounceMs`. It requires desktop VS Code ≥1.101.0 and Puppeteer's Chrome.\n\n## Programmatic API\n\nInstall locally with `npm install blueprint4llm`, then use the ESM exports:\n\n```js\nimport { compileMarkdown, writeBlueprintOutput } from 'blueprint4llm';\n\nconst compiled = await compileMarkdown('# Plan\\n\\nReady for review.', {\n  sourceFile: './plan.md',\n  includeDiagnosticsSummary: true,\n});\n\nawait writeBlueprintOutput('./plan.html', {\n  html: compiled.html,\n  assets: compiled.assets,\n});\n```\n\n| Export                                        | Purpose                                                                                      |\n| --------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| `compileMarkdown(markdown, options)`          | Returns `html`, `title`, `assets`, legacy `warnings`/`errors`, and structured `diagnostics`. |\n| `renderPdf(compiled, { signal }?)`            | Generates PDF bytes; pass them as `pdf` to `writeBlueprintOutput()`.                         |\n| `writeBlueprintOutput(path, options)`         | Writes HTML and/or PDF with assets; returns absolute output paths.                           |\n| `startPreviewServer({ input, port, signal })` | Returns `url`, `port`, and an asynchronous `close()` method.                                 |\n\n`warnings` and `errors` remain formatted string arrays for existing consumers. `diagnostics` adds\nstructured records; it is optional in the public result types so older compiler implementations can\ncontinue to provide only the string arrays. The built-in compiler always returns `diagnostics`.\nSet `includeDiagnosticsSummary: true` in `CompileOptions` to add an accessible count to generated\nHTML. It is disabled by default. `startPreviewServer()` accepts the same option.\n\n## Development\n\nFrom a repository clone:\n\n```bash\nnpm ci\nnpx puppeteer browsers install chrome\nnpm run build\nnpm run typecheck\nnpm run lint\nnpm run format:check\nnpm test\n```\n\nRun the CLI directly with `node dist/cli.js`, or use `npm link` to expose the command globally.\n`npm test` builds the CLI and runs unit and integration tests; Chrome must be installed.\nTo build the VSIX, run `npm install` and `npm run package` from `vscode-extension/`.\n","readmeFilename":"README.md"}