# PDF Export Tool Implementation Plan > **For agentic workers:** Execute inline using executing-plans. No delegation required. **Goal:** Reuse a logged-in Chrome order tab to export a named PDF without a print dialog. **Architecture:** MV3 extension captures a static visible form and permitted assets, then POSTs it to a paired loopback Node service. An isolated offline Chromium process renders the PDF, with exclusive filename reservation preventing overwrite. **Tech Stack:** Node.js 22+, playwright-core, Chrome MV3, node:test. **Spec:** docs/tool-design.md ## Global Constraints - No remote debugging port or account credential persistence. - Only user-triggered captures of https://bpm.skyworthdigital.com/. - Local helper listens on 127.0.0.1:18765; requests need extension Origin and random pairing token. - Four naming fields required; existing files preserved. - Browser renderer has scripts and network disabled. ## Task 1: Export core - [x] Write tests for missing fields, Windows-safe names, collision preservation and real PDF bytes. - [x] Run `node --test tests/core.test.cjs` and confirm missing functionality fails. - [x] Implement `src/exporter.cjs`: `buildFilename(metadata)`, `renderSnapshot(snapshot, options)` and offline browser lifecycle. - [x] Run tests using installed Chrome and local fixture markup. ## Task 2: Browser capture and bridge - [x] Write DOM fixture tests for `captureOrder()` bindings, live values and hidden secrets removal; write HTTP tests for origin, token and size checks. - [x] Confirm tests fail before implementation. - [x] Implement extension capture, asset bundling and popup; implement `src/server.cjs` with authenticated POST `/export` and GET `/health`. - [x] Run tests; malformed submissions must never start a renderer or write a file. ## Task 3: Packaging and acceptance - [x] Add direct Node Windows command launcher, configuration example, dependency setup and Chinese README. - [x] Run full tests and real captured-page regression, render the resulting PDF and inspect pages. - [x] Check extension manifest and scripts; document that live extension loading requires user action and is not yet verified. - [x] Deliver startup and extension-loading paths, output naming and exact verification limits.