Pulpoide/lextrace-agentic-contract-diff — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Python app called LexTrace that helps compare an original contract with an amendment and explains what changed in plain English.

I want a simple web interface where I can upload scanned contract images for both documents, extract the text with vision OCR, let me edit the extracted text before analysis, then run a one click comparison. The result should show which sections changed, what topics were touched, and a clear summary of the differences. It should also return structured JSON so the output is predictable.

Use a multi step agent style flow, first map related sections between the two documents, then analyze those matched sections for legal or semantic changes. Keep the output consistent and validated. Add a command line option too, where I can pass two image paths and get the final JSON in the terminal.

Include environment variable setup for OpenAI and Langfuse, basic tracing for the pipeline, sample data support, and tests for the image processing, agents, and pipeline. Look up current docs online if you need to.

Want more depth? Deep Reverse