arXiv:2606.09090cs.SEcs.AI2026-06被引 2

AI编程助手的配置文件会随代码过时,导致生成错误,可用旧文档检查工具发现。

Context Rot in AI-Assisted Software Development: Repurposing Documentation Consistency for AI Configuration Artifacts

  • 用现有文档一致性工具检测AI配置文件中的过时信息
  • 在356个仓库中发现23.0%存在过时的代码元素引用
  • 适合关注AI辅助开发可靠性的工程师和研究者

开发者越来越多地通过CLAUDE.md、AGENTS.md、.cursorrules等配置文件向AI编码助手提供持久上下文,描述代码元素、架构与开发规范,指导跨会话的AI行为。随着软件演进,这些上下文可能过时,我们称之为‘上下文腐化’(context rot)。尽管AI配置文件是新现象,但其一致性问题与数十年来软件文档研究相关。已有工具可检查文档与代码的一致性,涵盖README、注释、API文档、架构说明和安装指南。本文主张,这些工具可直接应用于检测上下文腐化,并提出研究路线图,将文档一致性方法映射到新场景。初步证据显示,将现有README/wiki一致性检查器应用于356个代表性仓库,发现23.0%的仓库存在过时的代码元素引用,证明传统工具已能有效揭示上下文腐化。

原文摘要 · Abstract (English)

Developers increasingly provide AI coding assistants with persistent context through configuration files such as CLAUDE.md, AGENTS.md, and .cursorrules. These files describe code elements, architecture, and development conventions, forming the context that guides AI tool behavior across sessions. As software evolves, this context can become stale, a phenomenon we call context rot. While AI configuration artifacts are new, the underlying consistency problem connects to decades of software documentation research. Researchers have built tools to check consistency between documentation and code, spanning README files, code comments, API documentation, architecture descriptions, and installation instructions. We argue that this existing toolbox is an immediate starting point for detecting context rot, and we present a research roadmap mapping documentation consistency approaches to corresponding problems in this new setting. As preliminary evidence, applying an existing README/wiki consistency checker to a statistically representative sample of 356 repositories identifies stale code element references in 23.0% of repositories, showing that traditional documentation consistency tools can already surface context rot.

AI编程上下文腐化文档一致性

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