Consumers
Five consumers. One contract.
Extract once with codex-pdf and every downstream tool reads from the same CodexDocument. No re-parsing, no diverging facts — each consumer picks the signals it needs and ignores the rest.
lint-pdf
Preflight engine — reads AI signals and ink facts for policy checks.
lint-pdf drives its AI analyzers from codex signals rather than running its own Claude calls. Language detection, logo recognition, barcode classification, spell candidates, and ink-pair color data all come from the CodexDocument contract — lint applies prepress rules on top.
Reads from codex
- detected_language, detected_logos, detected_barcodes, spell_candidates
- document_classification for content-type policy checks
- color_spaces + ink_list for spot-color delta_e rules
- page render via codex render endpoint for visual checks
compile-pdf-trap
Trap engine — reads zone candidates and spot Lab for spread/choke.
The trap producer fetches codex's AI-detected ink-boundary polygons (trap_zone_candidates, confidence ≥ 0.7) and uses the spot-color resolver's Lab L* values to compute neutral-density-based spread/choke direction. Drop a PDF, get trapped output — no manual zone declaration needed.
Reads from codex
- trap_zone_candidates per page (polygon, from_ink, to_ink, confidence)
- resolve_spot_swatch_color → Lab L* for neutral-density direction
- color_spaces for ink-pair rule inference
compile-pdf-impose
Impose engine — reads page geometry for sheet layout.
The impose producer delegates all layout math to codex_pdf.geom.tile_grid, which operates on page TrimBox dimensions extracted from the CodexDocument. Compile drops the cells via pikepdf; codex answers the geometry question so impose stays purely declarative.
Reads from codex
- page TrimBox dimensions (width_pt, height_pt) for tile_grid input
- page_count for sheet-fill validation
lens-pdf
Viewer — reads separations, layers, and page geometry for the canvas.
lens-pdf surfaces ink separations, TAC heatmaps, OCG layer toggles, and annotation overlays in the browser. Page renders, separation channel data, and optional-content group metadata come from codex so the viewer doesn't need to parse the PDF itself.
Reads from codex
- page renders (PNG) via codex render endpoint
- ink separations per channel for TAC and densitometer
- optional_content_groups for layer toggle UI
- page boxes (MediaBox, TrimBox, BleedBox) for canvas geometry
assay-pdf
Assay tool — reads document inventory for structural reporting.
assay-pdf surfaces the raw structural and content inventory of a PDF without applying policy rules. It consumes the CodexDocument contract directly — fonts, images, color spaces, page boxes, security flags, structure tags — and formats them for downstream tools and human review.
Reads from codex
- fonts (embedded state, subset, encoding) per page
- images (resolution, color space, compression) per page
- color_spaces for colorant inventory
- security and encryption metadata
- structure_tags for accessibility reporting
Data flow
codex-pdf → extract once → CodexDocument → lint-pdf + compile-pdf-trap + compile-pdf-impose + lens-pdf + assay-pdf.
Consumers read signals independently — no consumer imports another.