WiseSpec: Requirements-Driven Agents for Code Generation
Zhao Tian
Abstract
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.
Create a lesson
Related papers
ShikumiMiner: Mining Recurring Implementation Patterns in AI Codebases
Afsana Tasnim, Sheikh Motahar Naim
Type Hints in Python Libraries and Frameworks: An Empirical Analysis of Adoption and Maintenance
Thiago Roberto Magalhães, Fabio Petrillo, João Eduardo Montandon
The Import Tax: A Longitudinal Measurement of Startup Cost in the Python Ecosystem
Trinath Sai Subhash Reddy Pittala
Automated Vulnerability Injection in Smart Contracts Using Large Language Models
Luca Migliaccio, Roberto Natella, Naghmeh Ivaki et al.
AgOSS: A Dataset and Multi-Layer Characterization of Open-Source Agricultural Software
Vatsal Dudhaiya, Mikhail Golovenchits, Aryan Banerjee et al.
From Prompting to Engineering: A Research Agenda for Prompt Engineering in Software Engineering
Vincenzo De Martino, Giovanna Broccia, Fabiano Pecorelli et al.