ChatPaper.aiChatPaper

CodeNib:一种为编码智能体提供仓库上下文的多视图数据系统

CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents

July 28, 2026
作者: Zhongming Yu, Hengjia Yu, Boqin Yuan, Shuting Zhao, Yizhao Chen, Aryan Dokania, Mihir Jagtap, Jiayu Chang, Yitong Ma, Yash Jayswal, Wentao Ni, Hejia Zhang, Zhaoling Chen, Gangda Deng, Jishen Zhao
cs.AI

摘要

编码代理不断搜索、导航并维护来自不断演变的代码库的上下文,但零散的索引、语言服务器以及任务局部历史迫使重复发现并掩盖了生命周期成本。CodeNib为每个仓库提交构建可复用的词汇、稠密和结构视图,将输出映射到仓库相对源范围,在编辑过程中维护所选视图,并通过一个运行时提供排序搜索、符号导航和有界上下文。 在100个快照中,我们映射了仓库上下文生命周期中的质量-成本边界。当输出与独立重建匹配时,图更新和向量更新的中位数速度分别提升8.7倍和25.4倍。在匹配标准化实时服务器位置的静态导航子集(占1,000个请求的63%)上,每次请求的实时/静态延迟中位数比值为4.7倍。在五个模型中,所选的上下文策略相比配对grep/read,以50-87%更少的轨迹令牌保持了局部性。综合来看,这些结果支持带明确、操作特定有效边界的多视图仓库上下文服务。
English
Coding agents repeatedly search, navigate, and retain context from evolving repositories, but disconnected indexes, language servers, and task-local histories force repeated discovery and obscure lifecycle costs. CodeNib builds reusable lexical, dense, and structural views per repository commit, maps outputs to repository-relative source ranges, maintains selected views across edits, and serves ranked search, symbol navigation, and bounded context through one runtime. Across 100 snapshots, we map quality-cost frontiers across the repository-context lifecycle. When outputs match an independent rebuild, graph and vector updates are 8.7times and 25.4times faster at the median. On the static-navigation subset matching normalized live-server locations (63% of 1,000 requests), the median per-request live/static latency ratio is 4.7times. Across five models, selected context policies preserve localization with 50--87% fewer trajectory tokens than paired grep/read. Together, these results support multi-view repository-context serving with explicit, operation-specific validity boundaries.