kim130727/modu_math — reverse-engineered prompt
Reverse engineered prompt
Build me a Python tool called modu_math that turns an image of a math problem into editable structured files and a final SVG preview.
The main flow should be PNG to a human review draft, then a refined draft, then a Python DSL file, then generated semantic JSON, solvable JSON, layout JSON, renderer JSON, and SVG. The Python DSL should be the file people edit by hand, and all JSON and SVG outputs should be regenerated from it rather than edited directly.
Please include a working command line interface so I can run the pipeline on an example problem folder. Add tools for generating a vision draft from an image, refining it, generating DSL from the refined draft, validating the DSL, and a quick direct PNG to DSL fallback. Include one complete example under examples with an input image and generated artifacts.
Keep the project clean and testable, with schemas for the JSON contracts and focused tests for the core pipeline. Use uv for running commands, and look up current docs online if needed.
Want more depth? Deep Reverse