Search papers, labs, and topics across Lattice.
This paper introduces Project Prometheus, a framework designed to address the "Intent Gap" in Automated Program Repair (APR) by prioritizing Specification Inference over traditional code generation methods. By employing Behavior-Driven Development (BDD) and a multi-agent architecture to reverse-engineer executable specifications from runtime failure reports, Prometheus achieves a remarkable 93.97% correct patch rate on the Defects4J benchmark. The framework's innovative Requirement Quality Assurance (RQA) Loop enhances the alignment of generated patches with developer intent, leading to a significant Rescue Rate of 74.4% for complex bugs that eluded previous agents.
Bridging the Intent Gap in APR, Project Prometheus achieves a staggering 93.97% correct patch rate by aligning code repairs with executable specifications rather than relying solely on code generation.
The transition from neural machine translation to agentic workflows has revolutionized Automated Program Repair (APR). However, existing agents, despite their advanced reasoning capabilities, frequently suffer from the ``Intent Gap'' -- the misalignment between the generated patch and the developer's original intent. Current solutions relying on natural language summaries or adversarial sampling often fail to provide the deterministic constraints required for surgical repairs. In this paper, we introduce \textsc{Prometheus}, a novel framework that bridges this gap by prioritizing \textit{Specification Inference} over code generation. We employ Behavior-Driven Development (BDD) as an executable contract, utilizing a multi-agent architecture to reverse-engineer Gherkin specifications from runtime failure reports. To resolve the ``Hallucination of Intent,'' we propose a \textbf{Requirement Quality Assurance (RQA) Loop}, a mechanism that leverages ground-truth code as a proxy oracle to validate inferred specifications. We evaluated \textsc{Prometheus} on 680 defects from the Defects4J benchmark. The results are transformative: our framework achieved a total correct patch rate of \textbf{93.97\%} (639/680). More significantly, it demonstrated a \textbf{Rescue Rate of 74.4\%}, successfully repairing 119 complex bugs that a strong blind agent failed to resolve. Qualitative analysis reveals that explicit intent guides agents away from structurally invasive over-engineering toward precise, minimal corrections. Our findings suggest that the future of APR lies not in larger models, but in the capability to align code with verified, \textbf{Executable Specifications} -- whether pre-existing or reverse-engineered.