Beyond grep: The case for a context-rich AI coding harness

Beyond grep: The case for a context-rich AI coding harness

超越 grep:构建富上下文 AI 编程辅助工具的必要性

There are a lot of AI coding applications out there, and as impressive as large language models and the agents they enable have become, many of the most recent developments in AI-assisted development have been in the software that manages those models, not just the models themselves.

市面上已经涌现出大量的 AI 编程应用。尽管大语言模型及其驱动的智能体(Agents)表现惊人,但近期 AI 辅助开发领域最显著的进展,往往不在于模型本身,而在于管理这些模型的软件架构。

Earlier this summer, I spoke with the head of product for Claude Code, Anthropic’s Cat Wu, about that company’s approach to building that software. Wu repeatedly came back to the same point in our conversation: Anthropic’s models (and those of its direct competitors) are improving so quickly that it makes little sense to plan too far ahead or to build opinionated or limiting features around them.

今年夏天早些时候,我与 Anthropic 旗下 Claude Code 的产品负责人 Cat Wu 探讨了该公司构建此类软件的方法。在对话中,Wu 反复强调同一个观点:Anthropic 的模型(以及其直接竞争对手的模型)进化速度极快,因此制定过于长远的规划,或围绕模型构建带有主观偏见、限制性的功能,意义并不大。

Rather, the Claude Code product team attempts to maintain what they call a lean harness. A harness is the software built around one or more AI models that determines how they are used. It decides what the models see, what actions they can take, and how they interact with the code base. Think of it like a layer between a model and the developer’s actual project.

相反,Claude Code 产品团队致力于维护他们所谓的“精简外壳”(lean harness)。所谓“外壳”,是指围绕一个或多个 AI 模型构建的软件,它决定了模型的使用方式,包括模型能看到什么、能执行什么操作,以及如何与代码库交互。你可以将其想象为模型与开发者实际项目之间的一层中间件。

It’s not that Claude Code as an application and harness has no opinionated features or design choices, but its product team does seem to err on the side of trusting where the models will take them over the next year. There are other harnesses besides Claude Code, though. There are OpenAI’s Codex, Google’s Antigravity, open source alternatives like OpenCode, and options from startups like Cursor or Augment Code. Each can have different features, emphasis, or opinions about how a model can or should be utilized in agentic workflows.

这并不是说 Claude Code 作为一款应用和外壳完全没有主观的功能设计或架构选择,但其产品团队似乎更倾向于相信模型在未来一年内的演进方向。除了 Claude Code,市面上还有其他外壳工具,例如 OpenAI 的 Codex、Google 的 Antigravity、开源替代品 OpenCode,以及 Cursor 或 Augment Code 等初创公司的产品。每一款工具在如何利用模型进行智能体工作流方面,都有着不同的功能侧重和设计理念。

One key choice that Claude Code makes is to avoid approaches that build a structured context around a codebase in advance by default. “Going by the evals, we don’t see a measurable change,” she said of those approaches. “And I think we generally lean more toward shipping a leaner harness with fewer opinionated tools and just letting developers add their own if they want.”

Claude Code 的一个关键决策是:默认避免预先为代码库构建结构化上下文的方法。“根据评估结果,我们没有看到明显的改进,”她在谈到这些方法时说,“我认为我们总体上更倾向于发布一个更精简的外壳,减少主观工具的预设,如果开发者有需要,让他们自行添加即可。”

Augment Code has made a substantially different bet, although the two companies are not necessarily testing the same interventions or optimizing for the same outcomes; its product pre-indexes the repository using embeddings, a retrieval model, and a vector database, then retrieves conceptually relevant code.

Augment Code 则做出了截然不同的选择,尽管两家公司未必是在测试相同的干预手段或优化相同的目标;其产品通过嵌入(embeddings)、检索模型和向量数据库对代码库进行预索引,从而检索出概念相关的代码。

So to get the other side of that discussion, I spoke with Vinay Perneti, Augment Code’s VP of Engineering. Perneti briefly described Augment Code’s differing approach, offered his own team’s evaluations of the advantages, responded to some of the arguments for a leaner harness, and shared his perspective on some of the concerns developers have about AI tools and agentic workflows more broadly.

为了了解这一讨论的另一面,我采访了 Augment Code 的工程副总裁 Vinay Perneti。Perneti 简要描述了 Augment Code 的差异化方法,提供了他团队对该方案优势的评估,回应了关于“精简外壳”的一些论点,并分享了他对开发者在 AI 工具和智能体工作流方面普遍担忧的看法。


A conversation with Vinay Perneti

与 Vinay Perneti 的对话

This interview has been edited for length and clarity. (本文采访内容经过删减与润色,以确保简洁明了。)

Ars Technica: Can you explain how Augment Code’s context engine works? Ars Technica:你能解释一下 Augment Code 的上下文引擎是如何工作的吗?

Vinay Perneti: So, if I take a step back, what is it that a particular developer is trying to achieve? They want a particular task implemented and they give it to an agent. And the interesting thing with agents today is they have a limited context window, and every time they need to essentially go get all of the context needed for that and then work on it. There’s two approaches to context. One is grep-based. Claude Code and Codex and other agents have done that. The second is the semantic retrieval bit. For Augment, we’ve always taken the semantic route, and I’ll describe the building blocks of that. I would say there’s two core pieces. One is, we have an embedding and a retrieval model pair that are working in the system, and then you have a vector database and an entire, highly optimized back-end system that makes it possible to retrieve in sub-milliseconds.

Vinay Perneti: 让我们退一步看,开发者到底想实现什么?他们希望完成某项特定任务,并将其交给智能体。目前智能体的一个有趣之处在于,它们的上下文窗口是有限的,每次它们都需要获取完成任务所需的所有上下文,然后进行处理。处理上下文有两种方法:一种是基于 grep(文本搜索)的,Claude Code、Codex 和其他智能体都采用了这种方式;第二种是语义检索。对于 Augment,我们一直走的是语义检索路线,我来描述一下它的构建模块。我认为有两个核心部分:一是系统中运行着一对嵌入模型和检索模型;二是拥有一个向量数据库和一套高度优化的后端系统,使得亚毫秒级的检索成为可能。

Ars: Does it have an advantage in one kind of code base versus another? Ars:它在不同类型的代码库中是否有优势差异?

Perneti: Yeah, it actually turns out the advantage comes in large, private codebases. And here is why I say that. For all the public, open source repos where most of the benchmarks are run, every single model has basically memorized the repo. These models are large enough that they’re actually able to memorize the whole repo. So when you’re trying to get something done, the models kind of already know where to look so they can get to an outcome quickly. Whereas when you’re doing this in a private repo, a model has never seen that repo. And now the iteration loop for finding the outcome is much longer, right? If you have a semantic understanding of your entire private repo, you can ask a question, and you get to those outcomes much more quickly.

Perneti: 是的,事实证明,这种优势在大型私有代码库中体现得尤为明显。原因如下:对于大多数基准测试所使用的公共开源仓库,每个模型基本上都已经“背诵”了这些代码。这些模型足够大,能够记住整个仓库。因此,当你试图完成某项任务时,模型已经知道去哪里查找,从而能快速得出结果。然而,当你处理私有仓库时,模型从未见过这些代码。此时,寻找结果的迭代循环就会长得多。如果你对整个私有仓库有语义层面的理解,你就可以提出问题,并更快地获得结果。

Ars: People are concerned about token efficiency. Does this semantic approach help with that? Ars:人们很关心 Token 的使用效率。这种语义方法对此有帮助吗?

Perneti: We’ve certainly seen it in certain situations. In fact, we published a blog post—we ran Terminal-Bench with Claude Code and Augment Code, same model. And we completed at similar accuracy, but we were 33 percent more efficient than Claude Code. So I do see this showing up in terms of making better use of tokens because you’re not spending as much time on the exploration side.

Perneti: 我们在某些情况下确实看到了这种效果。事实上,我们发布过一篇博客文章——我们使用相同的模型,分别用 Claude Code 和 Augment Code 运行了 Terminal-Bench 测试。结果显示,我们的准确率相当,但效率比 Claude Code 高出 33%。所以我确实看到它在更有效地利用 Token 方面有所体现,因为你不需要在探索阶段花费那么多时间。

Ars: Anthropic told me that Claude Code does not see measurable eval gains from including more semantic code-navigation tools. But then I look at your blog, and I see you posting benchmarks and other claims that, actually, this really helps. Are you guys measuring different things when you say this, or what are their evals missing? Ars:Anthropic 告诉我,Claude Code 在引入更多语义代码导航工具后,并没有看到可衡量的评估提升。但我看你们的博客,你们发布的基准测试却声称这确实很有帮助。你们在评估时衡量的是不同的东西吗?还是说他们的评估漏掉了什么?

Perneti: Great questions. I don’t know what specific retrieval engine they used, and I think the other mistake that often people conflate is, not all retrieval systems are equal just like not all databases are equal, right? And by that, what I mean is the models and the system that are working together, which is the context engine, makes a big difference in terms of the quality of outcomes as well. So, for example, at Augment, we spent about 18 months at the beginning of the company being founded in 2022—this…

Perneti: 问得好。我不知道他们具体使用了什么检索引擎。我认为人们常犯的另一个错误是混淆了概念:并非所有的检索系统都是平等的,就像并非所有的数据库都一样,对吧?我的意思是,模型与协同工作的系统(即上下文引擎)在结果质量方面有着巨大的差异。例如,在 Augment,我们自 2022 年公司成立之初就花了大约 18 个月的时间……(此处原文截断)