Source assurance
Legal Labelling Engine
A form-migration checker for legal automation teams, designed to catch answers landing in the wrong fields when a PDF is updated.
Working local engine- Intended users
- Legal-document automation teams maintaining PDF and docassemble workflows
- What they leave with
- A reviewed field mapping, comparison results and a reversible export.
01 / In practice
Update a form without putting answers in the wrong fields.
A legal-document automation team receives a revised PDF form. Its existing interview still collects the right information, but the fields in the new form may have moved or changed meaning.
The task
The maintainer must work out where each answer belongs and verify that names, dates and checkboxes will appear in the correct places when the form is filled.
What the user does
The engine inventories supported fields and proposes mappings. The maintainer reviews uncertain matches, records corrections and checks filled examples against independently prepared reference files before exporting a verified mapping.
What changes in the work
The maintainer gets a repeatable check of the completed form, including its appearance. A mapping that swaps parties or relies on a missing fact can be caught before it is reused. A changed mapping must be reviewed again.
An illustrative workflow. The intended benefits have not been measured in workplace use.
Supported PDF forms, a proposed mapping between their fields, and reference outputs prepared independently.
A mapping bundle with replay results and a reversible docassemble mapping, or a rejection explaining why verification failed.
02 / Workflow
How it works
- 01
Inspect the forms
The engine identifies supported fields and proposes matches. Unresolved matches stay visible.
- 02
Correct the mapping
A reviewer explains each edit. Duplicate destinations are blocked, and an edit invalidates the previous approval.
- 03
Try the reference examples
The mapped field values and rendered forms are compared with independently prepared files.
- 04
Check the export
The mapping, approval and replay evidence must agree before the verified bundle can be exported.
03 / Public or synthetic example
An example
The synthetic migration maps four renamed or reordered fields and checks checkbox states. Swapping the parties deliberately causes a rejection. Correcting the mapping requires another approval and a passing replay. A split field stays blocked when the fact needed to distinguish its parts is missing.
What still needs reviewA qualified reviewer decides whether the mapping preserves the form’s legal meaning. Scans, XFA forms and unsupported appearances remain outside scope.
Build details and capabilities
- My work
- I designed the workflow, built the software, and tested it.
- Built with
- Python · PDF processing · Render comparison · docassemble mappings
A revised form may have the same number of fields and ask different questions. Copying an old mapping can then put the right information in the wrong place. This engine checks a proposed migration against examples prepared independently of that mapping.
- Proposed PDF field mappings that identify unresolved matches
- Field-value and visual comparisons against independently authored reference files
- Verification tied to a reviewed mapping, plus reversible docassemble exports
- Reasoned mapping corrections in the offline review screen, with duplicate destinations blocked and a new approval required after edits
A mapping cannot be its own answer key. I used separate reference files and included deliberately incorrect mappings alongside correct examples to test whether the verifier catches the mistakes.
04 / Verification
What I tested
A clean serial run passed all 158 engine tests on 31 October 2026, including the four previously intermittent paths. The synthetic demonstration rejects an incorrect mapping and an outdated approval, replays an accepted correction, and blocks a split field when a required fact is missing.
Limits
Only a limited set of AcroForm migrations is supported. The engine rejects scans, XFA forms and unsupported appearances. Approval in the demonstration was simulated; a qualified reviewer still needs to assess the legal meaning.
Reviewed 31 October 2026. These software checks and synthetic examples do not establish legal accuracy or performance in production. Client materials and private source code are not included.