Search papers, labs, and topics across Lattice.
This paper introduces WiseSpec, a requirements-driven agent framework designed to enhance code generation by focusing on the quality of task requirements. By leveraging principles from software requirements engineering, WiseSpec automatically generates structured, high-quality requirements and refines them through execution-based evaluation. Experimental results demonstrate that WiseSpec outperforms existing methods, achieving an average improvement of 13.17% in %Resolved, highlighting the critical role of well-defined requirements in successful code generation.
Code generation success hinges more on the quality of task requirements than on advanced coding tools, with WiseSpec achieving a 13.17% improvement in resolving complex tasks.
Code generation aims to automatically generate source code from task requirements and has attracted significant attention with the rapid advancement of large language models (LLMs). Despite remarkable progress, LLMs often struggle to generate correct code for complex software engineering tasks because task descriptions are frequently incomplete, ambiguous, or lack critical contextual information. Existing approaches primarily improve the capabilities of coding agents through more sophisticated tools, skills, and workflows, while largely overlooking the quality of the task requirements themselves. To address this limitation, we draw inspiration from software requirements engineering and propose WiseSpec, a novel requirements-driven agent framework for repository-level code generation. WiseSpec automatically constructs structured and information-rich requirements, assesses their quality through execution-based evaluation, and iteratively refines them to better guide code generation. Experimental results show that WiseSpec consistently outperforms all baselines, achieving an average improvement of 13.17% in %Resolved.