CodexCodex

Consumers

Three 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.

GET /v1/documents/{pdf_hash}/signals

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

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 → CodexDocumentlint-pdf + lens-pdf + assay-pdf. Consumers read signals independently — no consumer imports another.