Skip to content

[Artifact Forest 5/9] Recover screenplay structure from PDF and unstructured text #426

Open

Description

@szmyty

Merged implementation — 2026-10-13

PR #446 merged at 8e0f5f4 with maintainer authorization. The bounded PDF/text recovery implementation is on main, including explicit optional OCR, retained evidence, and lossy/review-required native body derivatives.

#429 is reconciling the recovery provider inventory, doctor schema, setup guidance and deferred qualification record. Tests, builds, lint, native probes/conversions, schema validation and CI remain deferred. This issue stays open and its acceptance boxes stay unchecked for the later deep testing session.

Current handoff: docs/work/426/HANDOFF.md. Earlier draft status below is historical.


Parent: #421
Depends on: #423
Coordinates with: #424, #425

Outcome

Support an explicitly lossy, review-required path from screenplay-shaped PDF or text into a recoverable screenplay representation and then into Fountain/other script derivatives.

Pipeline

PDF
 ├─ text-bearing → deterministic text/layout extraction
 └─ image-only   → bounded OCR fallback
                     ↓
              screenplay recovery
                     ↓
          renderflow.screenplay/v1
             ├─ Fountain
             ├─ FDX
             ├─ FadeIn
             └─ OSF

Provider candidates

  • Poppler pdftotext / equivalent local deterministic extractor.
  • Existing Tesseract provider for image-only pages.
  • Optional reviewed AI transform only when deterministic recovery is insufficient and policy explicitly allows it.

Requirements

Acceptance criteria

  • Text PDF → reviewed screenplay candidate works on a synthetic fixture.
  • Image-only PDF takes the OCR path or reports provider unavailability.
  • Recovery evidence names extraction method and confidence/ambiguity.
  • Fountain/FDX/etc. derivatives are marked as recovered/lossy lineage.
  • Source PDF is unchanged and not regenerated by an exhaustive forest unless explicitly requested.
  • Malformed/encrypted/unsupported PDFs produce typed outcomes.
  • Optional AI cannot upgrade confidence or approval without explicit evidence/review.

Non-goals

Claiming exact Final Draft reconstruction or visual-layout preservation from arbitrary PDFs.

Authored checkpoint — draft PR #446

The #426 implementation is available in draft PR #446, based on main after #445 was merged.

Authored: bounded PDF/text extraction with explicitly pinned optional OCR; deterministic canonical recovery with complete page/line evidence; Fountain/FDX/Fade In/OSF body exports; CLI and SDK planning/publication; mandatory lossy/review-required lineage; schemas, documentation, examples, and deferred regression cases. No AI fallback or source-PDF regeneration route is supplied.

Per the sprint instruction, tests, compilation/builds, lint/formatting, schema validation, native probes/conversions, installations/downloads, and CI were not run. Verification was source review plus exact Git content identity. All acceptance checkboxes remain unqualified and this issue stays open for the later testing session.

Handoff: docs/work/426/HANDOFF.md.

Audit-to-roadmap reconciliation — 2026-10-21

Audit: https://github.com/egohygiene/renderflow/blob/audit/flow-suite-20261021T025401Z/audits/flow-suite-20261021T025401Z.md · Complete roadmap: #367

PDF/text screenplay recovery authored; optional explicit OCR; lossy review-required lineage, no implicit source PDF regeneration.

Bounded preparation: Review ambiguity/refusal and lineage cases; prepare bounded qualification records.

Full outcome remains gated (*): Exact Poppler/OCR assets and deferred recovery/native export/schema/runtime human review.

The maintainer's implementation-sprint qualification deferral remains in force. This audit ran no Renderflow tests, compiler/build/Cargo resolution, product lint/format/schema qualification, native/CLI/provider/visual execution, installers or new CI. Reading existing exact-source provider records is not a qualification rerun. Source implementation and authored tests are not passing-test, native-fidelity, release or downstream-consumer evidence.

This is an additive planning note. The full original issue, acceptance criteria, scope, parent references and historical checkpoints remain authoritative and unchanged. No acceptance box or issue is closed by this audit. Recommended ledger parent: #421.

Activity

  1. added a commit that references this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions