arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.05344cs.AI

构建高效的AI编码代理:支架、驾驭、上下文工程及经验教训

Building Effective AI Coding Agents for the Terminal: Scaffolding, Harness, Context Engineering, and Lessons Learned

Nghi D. Q. Bui

更新

AI总结:

本文提出OPENDEV,一种基于命令行的开源编码代理,通过安全控制、高效上下文管理及自适应压缩技术,实现终端优先的自主软件工程支持。

AI中文摘要:

AI编码辅助领域正从复杂的IDE插件转向多功能、终端原生的代理。在开发者管理源代码、执行构建和部署环境的终端环境中,基于命令行的代理提供前所未有的长期开发任务自主性。本文介绍了OPENDEV,一种用Rust编写的开源命令行编码代理,专门为此新范式设计。有效的自主辅助需要严格的安全部署和高效的上下文管理以防止上下文膨胀和推理退化。OPENDEV通过复合AI系统架构,具有工作负载专用的模型路由、双代理架构分离规划与执行、惰性工具发现和自适应上下文压缩,逐步减少旧观察。此外,它采用自动化内存系统,在会话间积累项目特定知识,并通过事件驱动系统提醒对抗指令遗忘。通过强制显式推理阶段和优先考虑上下文效率,OPENDEV提供了一个安全、可扩展的终端优先AI辅助基础,为稳健的自主软件工程提供蓝图。

英文摘要:

The landscape of AI coding assistance is undergoing a fundamental shift from complex IDE plugins to versatile, terminal-native agents. Operating directly where developers manage source control, execute builds, and deploy environments, CLI-based agents offer unprecedented autonomy for long-horizon development tasks. In this paper, we present OPENDEV, an open-source, command-line coding agent written in Rust, engineered specifically for this new paradigm. Effective autonomous assistance requires strict safety controls and highly efficient context management to prevent context bloat and reasoning degradation. OPENDEV overcomes these challenges through a compound AI system architecture with workload-specialized model routing, a dual-agent architecture separating planning from execution, lazy tool discovery, and adaptive context compaction that progressively reduces older observations. Furthermore, it employs an automated memory system to accumulate project-specific knowledge across sessions and counteracts instruction fade-out through event-driven system reminders. By enforcing explicit reasoning phases and prioritizing context efficiency, OPENDEV provides a secure, extensible foundation for terminal-first AI assistance, offering a blueprint for robust autonomous software engineering.

补充信息

↑