arXiv:2607.18356cs.SEcs.AI2026-07中稿 · the 26th ACM Sympo…

将代码变更转化为可查询的动态文档,提升团队协作效率。

CODENS: Transforming Code Changes into Living, Accessible, and Queryable Documentation

论文配图:CODENS: Transforming Code Changes into Living, Accessible, and Queryable Documentation
图 1 · 摘自论文原文
  • 从拉取请求构建类型化软件知识图谱,自动提取组件与关系。
  • 在真实生产环境的Ruby on Rails项目中,答案相关性达90%以上。
  • 适合开发团队、新成员快速理解复杂代码库,支持问答式检索。

在快速迭代的代码仓库中,维护最新文档困难,因设计知识分散于源码文件和拉取请求中。我们提出CODENS系统,将拉取请求转化为可动态访问、可查询的生产级代码文档。该系统通过增量方式从拉取请求构建类型化软件知识图谱,利用模式驱动的语义提取增强组件信息,推导出组件间的类型化关系,并通过三种检索模式(包括代理引导的图遍历)暴露知识,实现跨仓库级别的问答。系统还保留了拉取请求间的语义变更历史,并集成答案质量与运行评估指标。我们在一个真实的生产级Ruby on Rails项目上评估了CODENS,结果表明其生成的答案高度相关且有据可依;定性反馈指出,在简洁性与文档导向合成方面仍有改进空间。

原文摘要 · Abstract (English)

Maintaining up-to-date code documentation is difficult in fast-moving repositories because design knowledge is scattered across source files and pull requests. We present CODENS , a system that turns pull requests into living, accessible, and queryable documentation for production codebases. CODENS incrementally builds a typed software knowledge graph from pull requests, enriches components through schema-driven semantic extraction, derives typed relations between them, and exposes the resulting knowledge through three retrieval modes, including agent-guided graph traversal for repository-level question answering. The system also preserves semantic change history across pull requests and integrates both answer-quality and operational evaluation metrics. We evaluate CODENS on a client Ruby on Rails project in production. Results show that CODENS produces highly relevant and well-grounded answers, while qualitative feedback highlights a remaining challenge in concise, documentation-oriented synthesis.

代码文档知识图谱智能问答

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