When Requirements Interact: Scaling Long-Horizon Coding via Interdependent Specifications
Yishuo Cai, Minzheng Wang, Liang Zhao, Linghao Zhang, Lei Li, Shicheng Li, Xu Sun, Fuli Luo
Abstract
To succeed in real-world long-horizon software development, coding agents must satisfy multi-dimensional task specifications, such as interface compatibility and error handling, and do so without breaking existing dependencies. However, current works lack specification in both quantity and diversity, often emphasizing primary goals while ignoring complex constraints. Synthesizing tasks to bridge this gap presents two challenges: naively adding specifications risks reducing tasks to trivial checklists rather than compelling joint reasoning, and verifying these subtle interactions risks overlooking hidden flaws or rejecting valid alternatives. To address these challenges, we introduce CodeSpecWeave, a framework for synthesizing tasks with rich, interdependent specifications. Grounded in real developer seeds, a synthesis agent iteratively develops both coupled task requirements and executable tests, while a review agent audits solution trajectories from multiple models to guarantee test reliability. Using this pipeline, we construct 4,670 training tasks across 2,865 repositories. Applying Reinforcement learning on these tasks significantly improves performance over the base model on DeepSWE-v1.1, largely outperforming existing baselines. Furthermore, we curate CodeSpecWeave-Bench, a rigorous benchmark comprising 100 tasks and 1,044 specifications, which clearly separates frontier models and reveals significant headroom in handling interdependent engineering constraints.
Create a lesson
Metadata
- Categories
- cs.SE, cs.CL
Related papers
CLEAR: Structured Specifications for Controllable Long-Horizon ML Research Engineering
Shared title terminologycs.SEXin Liu, Hongru Song, Ruqing Zhang et al.
Spine: Compiling Subtask Trees into Structured Context for Long-Horizon Coding Agents
Shared title terminologycs.SEJiahong Xiang, Kunqiu Chen, Lingming Zhang et al.
SpecEngineeringBench: Evaluating Coding Agents as Autonomous Specification Engineers
Shared title terminologycs.SEXingjian Wang, Shijian Wang, Minghao Liu et al.
AEGIS: Evidence-Guided Set Decisions for Requirement-to-Code Traceability
Shared title terminologycs.SEZhiyao Wang, Yiming Peng, Munan Li et al.
TEA-Bench-BR: Can Coding Agents Turn a Branching Clinical Specification into Correct Code?
Shared title terminologycs.SEMarcio Andre de Souza Estevam
Systematic Mapping Protocol. Generative AI-Augmented Requirements Engineering: A Systematic Mapping Study of Practices, Specifications, and Reuse in Software Development
Shared title terminologycs.SEFernando Pinciroli