pdfcraft/ROADMAP.md

16 KiB
Raw Blame History

PrintCraft roadmap

The milestones, current progress and time estimates to Acrobat Pro feature parity. Keep this up to date:

  • Every session: update the progress column and add a line to the log.
  • Every milestone: re-estimate.

Detailed task lists and acceptance tests are in plan/execution-plan.md (local-only). This file is the public summary.

What "parity" means here: the offline feature set of Acrobat Pro, milestones M0–M14. It excludes Adobe's cloud services (Document Cloud storage, Adobe Sign, the Adobe AI Assistant). Those have no clean-room equivalent; PrintCraft's alternatives are local-first, plus opt-in providers (M13).

Estimate summary

The unit is wall-clock hours of agent work: Claude Opus-class models coding continuously, with a person reviewing at milestone boundaries. Time spent waiting for that review is not included.

Scenario Hours to parity (M0–M14) Continuous calendar time
One agent, 24/7 2,000–4,000 h ≈ 3–6 months
3–5 agents in parallel on separate crates after M4 800–1,500 h ≈ 5–9 weeks
Realistic, with human review, integration and pauses — ≈ 4–9 months (see plan/execution-plan.md §9)

How these numbers are built:

  • Size: about 450–700k lines of Rust at parity, including tests. The repo has about 15k today.
  • Rate: so far, about 1.0–1.5k lines of kept, tested code per agent-hour. That includes debugging against the oracles (qpdf, poppler, pdf.js corpus).
  • Why the total is 3–6× the raw typing time: the hard work is not the line count. Most of the time goes into fidelity work: text editing and reflow, font embedding, redaction that really removes content, signature validation, PDF/A and PDF/UA, XFA, OCR and web performance. Each of these needs repeated oracle checks and visual comparison.
  • Parallelism is limited early: M0–M4 are mostly sequential, because the core crates must settle first. Extra agents pay off from M5 onwards.
  • The long tail: the last 5–10% (odd real-world files, pixel-level polish) costs about as much as the first 50%.

Milestones

Hours are for a single agent (low–high). "Done" is the estimated fraction of that milestone's acceptance criteria that are met. It is not a count of lines of code.

M Milestone Est. hours Done Remaining (h) Notes
M0 Skeleton: workspace, xtask gates, CI 15–30 92% 2–4 GitHub workflow, deny.toml (licence audit of every dependency), parity checklist (826 features, xtask parity) done. Missing: remaining crate stubs, testkit/oracle crates
M1 COS: filters, crypt, parser, xref, writer 120–200 72% 35–60 Done:
- filters and crypt: every standard-security revision R2–R6 (RC4, AES-128/256), SASLprep, permissions, creating encryption;
- cos: parse and repair, decrypt on load, re-encrypt on save, incremental and full writing.
Corpus: open/edit/save passes on 958 files, and all 7 password-protected files open.
Full saves now pack objects into compressed object streams. Fuzzing runs nightly (xtask fuzz). Missing: ≥ 250 tests, own image codecs
M2 Model, render, text 200–350 15% 170–300 hayro bootstrap renderer (vendored patches). Text extraction reaches word-F1 0.98 against pdftotext. Missing: model crate, fonts, DisplayList, renderer independent of hayro
M3 Viewer app (native + web) 80–150 85% 12–23 Acrobat-style shell, find, select, panels, tiles, web build, UI control channel for agents (opt-in). Missing: 60 fps test on a 500-page document, snapshot tests of every panel
M4 Engine, history, save, organize 100–180 95% 9–17 Done:
- command registry (menus, shortcuts and palette all use it);
- undo/redo; incremental, atomic and encrypted saves;
- autosave and crash recovery;
- organize, combine, extract, split and insert-from-file, with identical fonts and images stored once;
- CLI edit/combine/extract/split.
Done since: bookmark editing, page labels (Number pages), CLI run, Set Page Boxes, Crop tool, Duplicate pages. Missing: Replace pages, page transitions, recovery on the web
M5 Comments (all annotation types, XFDF) 120–200 76% 30–50 Done: notes, highlight/underline/strikeout/squiggly, text boxes, ink, lines, arrows, rectangles, ovals, stamps (dynamic, Sign Here, Standard Business), with appearance streams; replies, status, checkmarks, locking, move/resize/restyle/delete; properties dialog; panel filter and sort; hide all; summaries (comments only); XFDF/FDF import and export; flatten; Fill & Sign; agent tools. Done since: polygons, connected lines, clouds, callouts, inserted text, colour and checkmark filters. Missing: custom stamps, replace-text proposals, summary layouts with the page
M6 Forms + JavaScript 160–320 45% 95–185 Done: filling all field types with regenerated appearances; Prepare a form (every field type, move/resize/delete, Field Properties General/Appearance/Position/Options/Format/Validate/Calculate); Acrobat's AF format/keystroke/validate/calculate functions and simplified field notation run natively in Acrobat's event order; tab order; push-button actions; flatten; agent tools. Form data exchange (FDF, XFDF, XML, CSV, text) done. Missing: a JavaScript engine for custom scripts, Actions tab
M7 Content editing (text, images, header/footer, watermark) 250–500 17% 210–420 Done: header & footer, watermarks, backgrounds, Bates; added text and images that stay editable (move, resize, format, rotate, flip, crop, replace); links (Link tool, Link Properties, create from URLs, remove all). Missing: editing existing text and images in place (the longest pole), image/PDF watermarks
M8 Security + redaction 100–180 63% 40–75 Done: opening protected documents, permissions, Protect Using Password, Remove security; redaction (mark text/areas/pages, Search & Redact with patterns, apply removing glyphs, image pixels, vectors, XObject content, annotations and fields, verification, full rewrite on save); Remove hidden information and Sanitize. Missing: certificate security, redaction codes and pattern locales, DCT re-encoding
M9 Signatures (PAdES, validation) 160–280 35% 105–180 Done: new sign crate (DER, X.509, CMS, PKCS #12 on RustCrypto; aws-lc-rs for RSA private keys); PAdES B-B signing (visible, invisible, existing fields, certification with DocMDP); validation with trust store and changes-after-signing classification; self-signed digital IDs; Signatures panel, message bar, sign dialogs; agent tools. Checked with pdfsig and OpenSSL. Missing: timestamps (B-T), LTV (DSS, OCSP, CRL), FieldMDP, OS key stores, PKCS #11, certificate viewer
M10 OCR, create, export, print 200–350 28% 145–255 Done: create from blank/text/PNG/JPEG/TIFF (multi-page)/GIF/BMP; export PNG/JPEG/TIFF and text; Print (Acrobat's sizing, n-up, booklet, poster, comments & forms, preview, CUPS spooler, print-ready PDF). Missing: OCR, Office export/import, Windows/web printing
M11 Optimize, preflight, PDF/A/X/UA, print production 200–350 10% 180–315 Done: new optimize crate: Reduce File Size and the PDF Optimizer (images measured where drawn, bicubic downsampling, JPEG/ZIP recompression only when smaller, discard objects and user data, Flate clean-up, resource merging, object streams). Missing: fonts and transparency panels, space audit, preflight, PDF/A/X/UA
M12 Accessibility, compare, measure, search, XFA 200–380 0% 200–380
M13 Automation (MCP, Action Wizard, CLI) + AI providers 60–120 35% 39–78 Done: headless tool table (85 tools incl. signing, optimizing, initial view, links, stamps, data exchange, comment review, forms authoring and scripts, redaction, sanitize, print, add content), opt-in MCP server over stdio, CLI run/tools, UI control channel with drag. Missing: Action Wizard, AI providers
M14 1.0 polish: performance, localization, installers 120–250 0% 120–250
Total 2,085–3,840 ≈ 27% ≈ 1,520–2,830

Overall progress: about 27% of the effort. The viewer and the core are far ahead of the editing features, because the viewer was built first so progress could be seen.

Critical path

M0 → M1 → M2 → M3 → M4 must happen in order. After M4, M5–M12 can run in parallel across crates. The long poles are M7 (content editing), M9 (signatures) and M12 (XFA).

Risks most likely to push estimates up

  • Fidelity of text editing: fonts, subsets, reflow.
  • XFA dynamic layout.
  • Real-world signature chains and revocation checks.
  • The rendering long tail: Type3 fonts, broken fonts, shadings.
  • Correctness of PDF/A and PDF/UA conversion.
  • CPU rendering performance on the web.

Log

Newest first. One line per session: the date, what moved, and the new overall percentage.

  • 2026-10-02 (session 10, last): Manual tab order, backgrounds/watermarks from files (PDF pages as forms, images), Initial View and reading options (honoured on open), bookmarks expand/collapse, make-default comment properties, required-field borders, cut/copy/paste pages, marquee zoom, snapshot. 85 tools; P0 80%, P1 ≈ 27%.

  • 2026-10-02 (session 10, latest): PDF Optimizer and real Reduce File Size (new optimize crate: effective-resolution image downsampling, recompression, discards), Field Properties ▸ Options for every field type, Redaction Properties overlay styling, drag-to-reorder pages, repair notice and log; signature revalidation made incremental (comment edit on a 120 MB signed file 84 → 6 ms). 84 tools; P0 parity ≈ 80%. ≈ 27%.

  • 2026-10-02 (session 10, later): Digital signatures (new sign crate: PKCS #12, X.509, CMS; PAdES B-B signing incl. certification; validation with trust store and DocMDP-aware change detection; Signatures panel, message bar, sign and digital ID dialogs; signed documents keep incremental saves), polygon/cloud/connected-lines/callout/caret comments, Create PDF from clipboard, comment filters by colour and checkmark. Verified against pdfsig and OpenSSL. 83 tools; P0 parity 78%, P1 22.5%. ≈ 26%.

  • 2026-10-02 (session 10): Viewer conveniences (fit height, view history, cover page, close all, revert, system theme, find options), XFDF/FDF and form data exchange (new xfdf crate), stamps, organize extras (split by bookmarks/size, Extract and Rotate Pages dialogs), links (Link tool and properties, create from URLs), comment review (checkmarks, locking, copy text, hide all, summaries). Fixed the Comments panel's "…" menu, which chased the pointer. 79 tools; P0 parity ≈ 73%, P1 ≈ 19%. ≈ 23%.

  • 2026-10-02 (session 9, later): Print (n-up, booklet, poster, preview, CUPS), export JPEG/TIFF and create from TIFF/GIF/BMP, add text and images that stay editable, form formats/validation/calculation run natively (Acrobat's AF functions), field appearance, tab order, push buttons, 500-page frame budget. 67 tools; P0 parity ≈ 73%. ≈ 21%.

  • 2026-10-02 (session 9): Prepare a form (field authoring, Field Properties), Redaction (new content and redact crates: glyph/image/vector/XObject removal with verification, Search & Redact patterns, full-rewrite saves), Remove hidden information and Sanitize. 59 agent tools; P0 parity ≈ 63%. ≈ 18%.

  • 2026-10-01 (session 8):

    • Commenting: sticky notes, highlights, underline, strikethrough, text boxes, freehand, lines, arrows, rectangles and ovals, with replies, status, colours, moving and resizing; Acrobat-style quick bar and Comments panel; six agent tools (an agent can highlight a phrase by naming it).
    • Protect Using Password, with Acrobat's permission levels and compatibility options; Remove security.
    • Filling in forms: text, check boxes, radio buttons, combo and list boxes, Tab between fields, Clear form; three agent tools.
    • Performance: opening a 190 MB manual went from 172 s to under 2 s; comment and form edits on it are 6× faster.
    • Fixed: saving a password-protected document failed; encrypted documents were not reported as encrypted.
    • Set Page Boxes, a Crop tool and Duplicate pages.
    • Header & footer (page numbers, dates, Bates numbers), watermarks and backgrounds, with Update and Remove.
    • Export to PNG and text; create PDFs from images, text or nothing; Reduce file size.
    • Fill & Sign: typed text, marks, the date and a drawn signature.
    • Comment properties, filtering and sorting; flattening comments and form fields.
    • Fixed: the Hand tool did not pan.
    • 50 agent tools.
    • Overall ≈ 16%.
  • 2026-10-01 (session 7):

    • Bookmark editing and page numbering (Number pages), with undo, agent tools and UI.
    • A render watchdog: pathological pages are skipped after 20 s instead of spinning forever.
    • The agent control channel no longer reports success when the window is hidden.
    • Community links: Discord button in the title bar, plus Home, About, Help menu, CLI and README.
    • Overall ≈ 10%.
  • 2026-10-01 (session 6):

    • UI control channel: agents can inspect the widget tree, click, type, press keys, run commands and take screenshots of the running app. Off unless the app is started with --control; loopback only, token-authenticated.
    • Combine and insert store identical fonts, images and other resources once. 40 copies of the showcase: 130 MB → 3.9 MB, 3× faster, pixel-identical.
    • Full saves use compressed object streams (showcase 3.4 → 2.8 MB; the 40× combine is now 2.3 MB). Fixed opening encrypted files whose catalog is compressed, and a crash on looped page trees.
    • Fuzzing (cargo xtask fuzz, nightly in CI): about 150,000 mutated files tried. Seven crash and hang bugs found and fixed, each with a regression test: two in our code, five in the temporary renderer.
    • Parity checklist: 826 Acrobat Pro features tracked in parity/acrobat-features.toml; cargo xtask parity checks every claim against code and tests. 11.8% shipped overall, 31.6% of P0.
    • Overall ≈ 9.5%.
  • 2026-09-30 (session 5, after a machine crash; no work lost):

    • Agent control: new printcraft-automation crate with 20 JSON-Schema tools, an opt-in MCP server (printcraft-cli mcp, stdio only, can be compiled out), and printcraft-cli run/tools.
    • Text on rotated pages now reads along its lines; the pdf.js oracle is unchanged at median 0.980.
    • Finding text in 520 pages: 17.9 s → 3.7 s (parallel), about 20 ms when repeated (cached).
    • CI: dependency licence audit (deny.toml, xtask deny) and a GitHub workflow for macOS, Windows, Linux and wasm.
    • Overall ≈ 8%.
  • 2026-09-30 (session 4):

    • Combine, extract and split, with links, named destinations, fields, layers, attachments and nested bookmarks all carried over. Combined pages render pixel-identical to their sources.
    • Fixed a precision bug in how reals were written.
    • Encryption: a new crypt crate covering R2–R6. Encrypted documents can be opened, edited and saved; permissions are honoured; the Security tab is real. Checked against hayro and qpdf.
    • Autosave and crash recovery.
    • Command registry.
    • Asset policy (AGENTS.md, ATTRIBUTION.toml, xtask assets) and a README with 13 reproducible screenshots (xtask screenshots).
    • Overall ≈ 7%.
  • 2026-09-30 (session 3):

    • New crates: filters (every non-image filter, 57 tests) and cos (object parser, xref reader, repair, incremental and full writer).
    • New organize crate: page operations and info edits.
    • Engine: editing with undo/redo and save. CLI: edit.
    • UI: organize toolbar with multi-select, ⌘Z/⇧⌘Z/⌘S/⇧⌘S, Edit menu, editable Description properties, a dot on tabs with unsaved changes, and a save prompt on close and quit. 13 new kittest tests.
    • Corpus: open, edit and save round-trip on 946 of 951 files. 182 of 182 sampled saved outputs pass qpdf --check.
    • Overall ≈ 5%.
  • 2026-09-30 (session 2):

    • Robustness sweep (963 of 983 files open, 0 crashes), text layer, find and select, tiles, web build, polish.
    • Overall ≈ 3–4%.
  • 2026-09-30 (session 1): planning complete; viewer vertical slice.