arXiv:2607.13091cs.SEcs.AI2026-07中稿 · - 32nd ICE IEEE/IT…被引 2

让编程大模型通过积累评审规则持续进化,无需重训就能越用越准。

Self-Improving AI Coding Agents Through Accumulated Behavioral Rules: A Closed-Loop Framework

  • 将每次通过的评审意见转为持久行为规则,形成可复用的知识库
  • 实测15类错误零复发,审查重点从语法转向架构设计
  • 适合需要长期迭代、注重工程规范的团队协作场景

基于LLM的编程代理在不同会话中重复相同错误,因其缺乏保留人工评审修正的能力。本文提出一个闭环框架:每次被接受的评审意见均转化为持久的行为规则,逐步扩展代理自我检测的错误类别。该框架包含版本控制的规则文件、提交前的自检清单及自动化验证机制,确保规则集在增长过程中保持完整性。在35+服务的微服务平台上部署,规则集从5条扩展至18条行为规则、15+语言特定标准和15项自检条目,均源自真实评审反馈。11次实际工作会话(含代码生成、PR评审、故障排查与跨服务重构)显示,累积规则使审查重点从低级正确性转向设计层面,对被规则禁止的错误类别实现0%复发率,并可在异构代理接口间迁移。相比同类工作(Reflexion、ExpeL、Voyager等)与自动代码评审工具(CodeReviewer、SWE-bench),本方法实现无权重更新的跨会话持续学习,运行于真实生产代码库而非合成基准,填补了现有评估体系未覆盖的行为一致性维度。最终形成一个随每次评审循环不断进化、积累人类协作智慧却无需修改模型权重的编程代理。

原文摘要 · Abstract (English)

LLM-based coding agents repeat the same classes of mistakes across sessions because they lack a mechanism to retain corrections from human review feedback. We present a closed-loop framework in which every accepted review comment is codified as a persistent behavioral rule, progressively expanding the set of error classes the agent can self-detect. The framework combines an accumulating rule set in a version-controlled instruction file, a self-review checklist executed before code submission, and automated validation that ensures rule set integrity as it grows. In deployment across a 35+ service microservices platform, the rule set grew from 5 to 18 behavioral rules, 15+ language-specific standards, and a 15-item self-review checklist, all derived from real review feedback. We present empirical results from 11 recorded working sessions spanning code generation, PR review, incident investigation, and cross service refactoring. We observe that accumulated rules shift review effort from low-level correctness toward design-level validation, achieve a measured 0% recurrence rate for ruled-against error classes, and transfer across heterogeneous agent interfaces. We compare our approach against related work in experiential LLM learning (Reflexion, ExpeL, Voyager) and automated code review (CodeReviewer, SWE-bench agents), showing that our framework achieves persistent cross-session learning without weight updates, operates on production codebases rather than synthetic benchmarks, and addresses an orthogonal dimension (behavioral consistency over time) that existing benchmarks do not measure. The result is a coding agent that improves with every review cycle, accumulating the engineering wisdom of its human collaborators without changing a single model weight.

AI编程持续学习代码生成规则系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。