CodeNib:一种用于向编码代理提供仓库上下文的多视图数据系统
CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents
- UC San Diego(加州大学圣地亚哥分校)
- Stanford University(斯坦福大学)
- UC Riverside(加州大学河滨分校)
- University of Southern California(南加州大学)
机构由 AI 辅助整理,请以论文原文为准。
AI总结:
研究编码代理从仓库获取上下文的问题,提出CodeNib构建多视图数据系统,可重用视图并映射到源范围,通过运行时提供多种服务,实验表明其在更新速度、延迟等方面有优势,支持多视图仓库上下文服务。
AI中文摘要:
编码代理需要从不断演变的仓库中反复搜索、导航和保留上下文,但断开连接的索引、语言服务器和任务本地历史记录会导致重复发现并模糊生命周期成本。CodeNib为每个仓库提交构建可重用的词汇、密集和结构化视图,将输出映射到与仓库相关的源范围,在编辑过程中维护选定的视图,并通过一个运行时提供排名搜索、符号导航和有界上下文。通过100个快照,我们绘制了仓库上下文生命周期中的质量成本前沿。当输出与独立重建匹配时,图和向量更新的速度在中位数上分别快8.7倍和25.4倍。在匹配归一化实时服务器位置的静态导航子集中(1000个请求中的63%),每个请求的实时/静态延迟中位数比为4.7倍。在五个模型中,选定的上下文策略比配对的grep/read保留轨迹令牌的数量减少了50%至87%。这些结果共同支持了具有明确的、特定于操作的有效性边界的多视图仓库上下文服务。
英文摘要:
An incremental code index can complete every update without error and still return the wrong graph half the time. Coding agents depend on such reused views for search and navigation, yet the systems that supply them never measure where a precomputed answer may stand in for the trusted route: localization agents rebuild a graph per task, tool servers query a live language server per request, and code-intelligence databases serve developers, not agents. CodeNib is a multi-view data system that makes that measurement possible. It is the first to compile lexical, dense, and structural views of one commit behind a single manifest and source-address contract, so that a lexical hit, a graph occurrence, and a dense block can be checked against each other and against a rebuild or a live server, and it serves search, navigation, and bounded context to agents through one cost-visible runtime. The comparisons overturn three assumptions. Execution status is not correctness: symbol-level repair completes on every held-out change but reproduces the rebuild on 13 of 24, so the runtime admits it per repository, while vector reuse is exact on 27 of 30 held-out changes at 40$\times$ and static definitions match the live server on 86\% of requests at a 1.2\,s ready point. Shorter answers finish more tasks: behind LocAgent, CodeNib's views let the agent finish 78 of 90 runs against 65 at lower cost, and selected context policies use 50--87\% fewer tokens than grep/read across five models. And context pays most when it is taken back: on 200 SWE-bench Verified tasks, handing the agent CodeNib's candidates and retiring them after its first source read resolves 79 issues, the most of five context policies, against 66 for on-demand exploration and 56 for Aider's repository map.