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.