PairCoder++: Pair Programming as a Universal Paradigm for Verified Code-Driven Multimodal and Structured-Artifact Generation
Existing code-driven generation of structured artifacts—such as charts and 3D scenes—is prone to errors due to the absence of validation feedback from toolchains like compilers and renderers. This work proposes a dual-agent pair programming framework: a Driver agent generates code, while a Navigator agent critiques it based on execution outcomes, diagnostic messages, and rendered visual comparisons. When persistent errors occur, the agents dynamically swap roles, establishing a closed-loop iterative refinement process. This approach represents the first systematic integration of toolchain feedback into multimodal structured generation, substantially improving output executability. Evaluated across 17 benchmarks, the method consistently outperforms baselines—for instance, increasing Blender scene executability from 0.20 to 0.78 and boosting TikZ compilation rates by 10–30 percentage points—at an inference cost approximately seven times that of a single model.