当需求相互作用:通过相互依赖的规范扩展长周期编程

·

研究论文 · 2026/11/02

为了在真实世界的长周期软件开发中取得成功,编码智能体必须满足多维任务规范(如接口兼容性和错误处理),且不破坏现有依赖。然而,当前工作缺乏数量和多样性上的规范,往往强调主要目标而忽略复杂约束。合成任务以弥合这一差距面临两个挑战:简单添加规范可能使任务沦为琐碎的检查清单,而非强制联合推理;验证这些微妙的交互可能忽略隐藏缺陷或拒绝有效替代方案。为此,我们提出CodeSpecWeave,一个合成具有丰富、相互依赖规范的任务的框架。基于真实开发者种子,合成智能体迭代开发耦合的任务需求和可执行测试,而审查智能体审计来自多个模型的解决方案轨迹以确保测试可靠性。利用该流程,我们在2,865个仓库中构建了4,670个训练任务。在这些任务上应用强化学习,在DeepSWE-v1.1上显著优于基础模型,大幅超越现有基线。此外,我们策划了CodeSpecWeave-Bench,一个包含100个任务和1,044个规范的严格基准,清晰区分前沿模型,并揭示处理相互依赖的工程约束方面的显著提升空间。

该研究针对编码智能体在复杂规范下的长周期任务能力,提出了可扩展的任务合成框架和严格基准,实验证明能显著提升模型性能并揭示现有模型的不足,对推动代码生成领域的发展具有重要价值。

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.

阅读原文

参与讨论