代码所有权提示改变Fable 5.2重构行为
Anthropic文档称,Claude Fable 5.2处理代码库时会明显响应有关代码所有权的提示措辞。在Anthropic的小型编程任务测试中,加入代码库归模型所有的提示后,模型约有一半尝试会合并重复代码;未加入时则不到十分之一。Simon Willison’s Weblog引用了Anthropic的《Prompting Claude Fable 5.2》文档。
据厂商测试,明确说明代码所有权可能显著影响Claude Fable 5.2在小型编程任务中保留还是重构现有代码。
A quote from Prompting Claude Fable 5.2
Simon Willison’s Weblog
Sponsored by: Dynatrace — Your coding agent can read your code but can’t see how it runs in production. Read the blog to see how Dynatrace MCP closes that gap.
10th November 2026
Claude Fable 5.2 pays close attention to who owns the code it works on. In Anthropic’s testing on small coding tasks, the model tended to add to the existing structure when the prompt said nothing about ownership or presented the code base as someone else’s, even when that duplicated existing code. When the prompt said the code base was the model’s own, it often consolidated duplicated code and sometimes made related fixes without being asked. If you want the model to improve the structure as it works, say that the code is its own:
You are the owner and long-term maintainer of this codebase, and its design is up to you.The ownership sentence makes the model much more likely to consolidate duplicated code into one shared function. In Anthropic’s testing on small coding tasks, the model consolidated duplicated code in under 10 percent of runs without the sentence and in about 75 percent of runs with it.