arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.25773cs.SE
收藏

规范作为质量门:关于AI辅助代码审查的三个假设

The Specification as Quality Gate: Three Hypotheses on AI-Assisted Code Review

Christo Zietsman

AI总结:

本文探讨AI辅助代码审查的三个假设,指出缺乏可执行规范时审查过程的循环性,并提出规范优先、确定性验证管道和AI审查残余的架构。

摘要:

行业对AI生成代码质量问题的主要响应是部署AI审查员。本文认为,当缺乏可执行规范时,这种响应在结构上是循环的:没有外部参照,生成者和审查者基于同一 artefact 推理,共享相同的训练分布,并表现出相关性故障。审查检查代码而非意图。三个假设被提出:第一,同质LLM管道中的相关错误回响而非抵消,这一主张由多个2025-2026研究和三个小型实验支持;第二,可执行规范在Cynefin意义上执行域转换,将启用约束转化为管理约束,将问题从复杂域转移到复杂域;第三,超出可执行规范范围的缺陷类别形成明确残余,是AI审查的合法且有界目标。综合论点暗示架构:规范优先,确定性验证管道次之,AI审查仅用于结构和架构残余。这不是AI审查无价值的主张,而是关于其实际用途以及在缺乏使其非循环的基础时发生的情况。

英文摘要:

The dominant industry response to AI-generated code quality problems is to deploy AI reviewers. This paper argues that this response is structurally circular when executable specifications are absent: without an external reference, both the generating agent and the reviewing agent reason from the same artefact, share the same training distribution, and exhibit correlated failures. The review checks code against itself, not against intent. Three hypotheses are developed. First, that correlated errors in homogeneous LLM pipelines echo rather than cancel, a claim supported by convergent empirical evidence from multiple 2025-2026 studies and by three small contrived experiments reported here. The first two experiments are same-family (Claude reviewing Claude-generated code); the third extends to a cross-family panel of four models from three families. All use a planted bug corpus rather than a natural defect sample; they are directional evidence, not a controlled demonstration. Second, that executable specifications perform a domain transition in the Cynefin sense, converting enabling constraints into governing constraints and moving the problem from the complex domain to the complicated domain, a transition that AI makes economically viable at scale. Third, that the defect classes lying outside the reach of executable specifications form a well-defined residual, which is the legitimate and bounded target for AI review. The combined argument implies an architecture: specifications first, deterministic verification pipeline second, AI review only for the structural and architectural residual. This is not a claim that AI review is valueless. It is a claim about what it is actually for, and about what happens when it is deployed without the foundation that makes it non-circular.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑