通过模块化可执行开发原语实现软件工程的治理工程
研究论文 · 2026/10/07
具备终端访问能力的大语言模型在自动化软件工程任务中表现强劲,但现有智能体在长周期工作流中仍然脆弱:它们必须反复重建分散于源文件、配置、测试、依赖和运行时行为中的程序状态,导致交互历史不断增长、上下文爆炸和语义漂移,大型仓库更使任务相关组件的识别变得困难。为此,作者提出 Dev-Primitives(开发原语),一种模块化且可执行的抽象,将仓库组件从被动的软件制品转变为软件工程的主动参与者。每个 Dev-Primitive 将一个仓库制品与一个常驻 LLM 配对,使该制品获得基于自身实现和依赖的智能体原生接口,从而支持自然语言推理、组件间通信和局部自我修改。基于 Dev-Primitives,作者提出 HERMES,一个通过模块化可执行 Dev-Primitives 进行软件工程的 Harness Engineering 框架,它通过依赖感知的动态激活机制和将执行证据映射回必须修改组件的缺陷诊断机制,在仓库规模上实例化这些原语。在四个软件工程基准上的大量实验表明,HERMES 平均比匹配的基线 harness 高出 12.4%。此外,当搭配强激活和诊断模型时,即使使用 Qwen3-8B Dev-Primitives,HERMES 在全部四个基准上也与同构 GPT-5.6 Sol 配置相差不超过 4.5%,同时在 Terminal-Bench 4.0 上将推理成本降低 26.2%,凸显了 harness 设计在软件工程智能体中的重要性。
该工作针对长周期软件工程智能体中的上下文爆炸与语义漂移问题,提出将仓库组件转化为可执行、可交互的 Dev-Primitives,并通过 HERMES 框架在仓库规模上实现动态激活与缺陷诊断,在多个基准上取得显著性能提升与成本降低,为 harness 设计提供了新思路。
Large language models (LLMs) equipped with terminal access have demonstrated strong capabilities in automating software engineering tasks. However, existing agents remain brittle on long-horizon workflows, where they must repeatedly reconstruct program state scattered across source files, configurations, tests, dependencies, and runtime behavior, leading to increasingly long interaction histories, context explosion, and semantic drift. Large repositories further complicate the identification of task-relevant components. To address these challenges, we introduce Dev-Primitives (Development Primitives), a modular and executable abstraction that transforms repository components from passive software artifacts into active participants in software engineering. Each Dev-Primitive pairs a repository artifact with a resident LLM, which gives the artifact an agent-native interface grounded in its own implementation and dependencies, enabling natural-language reasoning, inter-component communication, and localized self-modification. Building on Dev-Primitives, we propose HERMES, a Harness Engineering framework for software engineeRing via Modular Executable Dev-PrimitiveS, which instantiates these primitives at repository scale through a dependency-aware dynamic activation mechanism and a bug diagnosis mechanism that maps execution evidence back to the components that must be revised. Extensive experiments on four software engineering benchmarks demonstrate that HERMES outperforms matched baseline harnesses by 12.4\% on average. Moreover, when paired with strong activation and diagnosis models, HERMES, even with Qwen3-8B Dev-Primitives, remains within 4.5\% of the homogeneous GPT-5.6 Sol configuration across all four benchmarks, while reducing inference cost by 26.2\% on Terminal-Bench 4.0, highlighting the importance of harness design in software engineering agents.