返回首页

对比阅读

对比阅读:One Ownership Prompt Takes Claude’s Refactoring Rate from 10% to 75%—at a Cost 与 一句所有权提示词让 Claude 重构率从不足 10% 升至 75%,代价是 Token 增八成

AEN
AnthropicClaude Fable 5.2Claude Code·

One Ownership Prompt Takes Claude’s Refactoring Rate from 10% to 75%—at a Cost

Tell Claude that “you are responsible for maintaining this codebase in the long term,” and its rate of proactively merging duplicate code can rise from less than 10% to roughly 75%, while output tokens increase by 70%–80%. We believe these tests reveal more than yet another leaderboard for programming models: the bottleneck in AI programming is shifting from whether models can write code to whether they will take responsibility for a system’s long-term costs.

What this is

This is not a new model or tool, but a role definition in Anthropic’s prompting guide: “You are the owner and long-term maintainer of this codebase; you decide how the codebase is designed.” These instructions simultaneously convey three signals: ownership, a long-term timeline, and authority over refactoring decisions.

According to the Claude Fable 5.2 tests cited in the article, without an explicit code-ownership role, the model tends to make minimal changes and avoid unfamiliar code. Once the role is set, the model looks across files for duplicated logic, extracts common functions, removes dead code, and standardizes naming and directory structures. Notably, even when instructed not to refactor opportunistically, the model still merged duplicate code in more than half of the tests.

Industry view

The competitive metrics for AI programming products may change as a result. Users have historically compared generation speed, correctness, and the cost of a single run. Going forward, enterprises buying Agents—AI systems that can autonomously call tools and complete multistep tasks—are likely to evaluate whether a model can identify technical debt, undertake cross-file changes, and add the missing tests.

That does not mean this prompt should be enabled by default. A 70%–80% increase in output tokens makes it suitable for focused governance of core modules, but not for configuration changes, minor bug fixes, or high-frequency automation. A more realistic risk is that the model changes existing business behavior in pursuit of structural cleanliness, while its change summary may omit additional modifications. Without file-scope limits, interface protections, human approval, and line-by-line review, “taking long-term responsibility” can become an excuse to expand the blast radius.

We therefore see this as a form of “responsibility simulation,” not genuine acceptance of the consequences of maintenance. A model can simulate a sense of ownership, but it bears no responsibility for production incidents and lacks the institutional conditions needed to keep understanding changing business requirements. Enterprises must still constrain it through tests, permission boundaries, and change-management processes.

Impact on regular people

For enterprise IT: Companies can apply this type of prompt to internal codebases with clear ownership. They should first test non-core modules to determine whether the maintenance savings outweigh token and review costs. It should not be handed directly to external or multi-contributor repositories.

For individual careers: Developers are gradually shifting from “submitting requests and issuing orders” to “designing constraints and accepting AI-generated changes.” Code review, test design, and business judgment will become more important, not less.

For the consumer market: Software tools may place greater emphasis on continuous maintenance and automatic governance. Pricing may also move from per-call fees toward charges based on tasks, context, or output volume. Users should watch whether these maintenance costs are passed on through subscription prices.

来源: juejin.cn
BZH
AnthropicClaude Fable 5.2Claude Code·

一句所有权提示词让 Claude 重构率从不足 10% 升至 75%,代价是 Token 增八成

把代码库告诉 Claude“由你负责长期维护”,其主动合并重复代码的比例可从不足 10% 升至约 75%,同时输出 Token 增加 70%—80%。我们认为,这组测试比又一个编程模型榜单更能说明问题:AI 编程的瓶颈正在从“会不会写”转向“是否愿意负责系统长期成本”。

这是什么

这不是一种新模型或新工具,而是 Anthropic 提示词指南中的一个角色设定:“你是这个代码库的所有者和长期维护者,代码库的设计由你决定。”这组指令同时传递了归属、长期时间线和重构决策权三种信号。

按照文章引述的 Claude Fable 5.2 测试,未设定代码归属时,模型倾向于采取最小改动,避免触碰陌生代码;设定后,模型会跨文件寻找重复逻辑、抽取公共函数,并清理死代码、统一命名和目录结构。值得注意的是,即使增加“禁止顺手重构”的限制,超过一半测试中模型仍会合并重复代码。

行业怎么看

值得关心的是,AI 编程产品的竞争指标可能因此改变。过去用户主要比较生成速度、正确率和单次成本;今后,模型能否识别技术债、承担跨文件修改并补齐测试,会成为企业采购 Agent(能自主调用工具并完成多步任务的 AI 系统)时的新指标。

但这并不等于该提示词应默认开启。输出 Token 增加 70%—80%,适合专项治理核心模块,不适合改配置、修小错误或高频自动化。更现实的风险是模型为追求结构整洁而改变原有业务行为,而且变更摘要可能漏掉额外修改;如果没有文件范围、接口保护、人工审批和逐行审查,所谓长期负责可能变成扩大改动。

因此,我们倾向于把它视为一种“责任模拟”,而非真正承担维护后果。模型可以模拟主人翁意识,却没有生产事故责任,也没有持续理解业务变化的制度条件。企业仍需用测试、权限边界和变更流程约束它。

对普通人的影响

对企业 IT:企业可把这类提示词用于有明确所有权的内部代码库,先在非核心模块验证节省的维护成本能否覆盖 Token 与审查成本,不宜直接交给外部或多人协作仓库。

对个人职场:开发者从“提交需求的指挥者”逐渐转向“设计约束并验收 AI 变更的人”;代码审查、测试设计和业务判断的重要性会上升,而不是下降。

对消费市场:软件工具可能更强调持续维护和自动治理能力,收费也会从单次调用转向按任务、上下文或产出量计费,用户需要留意维护成本是否被转嫁到订阅价格。

来源: juejin.cn