Anthropic 的 Boris Cherny 认为 Claude 写的代码应区别对待,一次性原型可当作完全的黑盒,生产代码的质量门槛则应高于人类编写。他提到 Anthropic 内部设有大量护栏,包括 lint 规则、测试、Claude 驱动的端到端测试、每日运行的 Claude fuzzer、自动代码审查与安全审查、自动重构等。
Hey ████,
I think there is room for both.
1. Prototypes and other throw-away code can be treated as totally black box. If you’re going to throw it away anyway, and if the blast radius of it breaking is low, it doesn’t need to be perfect.
2. Production code written by Claude should have a higher bar than if it was written by a human. At Anthropic, we have many guardrails in place to make sure this is happening: lots of lint rules, lots of tests, Claude-driven end to end tests, Claude-powered fuzzers running daily, automated code reviews and security reviews, automated code refactoring, and so on. Without these, you can end up with a mess that is hard to maintain down the line. Luckily, the model makes it increasingly easy to do these well — run a few daily routines, use Claude Code Review, etc.
Your job is to hold the bar on code quality. If Claude’s code doesn’t meet the bar, try:
- Using the latest frontier model (Opus 5 or Fable 5.1)
- Increase effort to high or xhigh
- Invest in your CLAUDE.md and skills to succinctly teach Claude how to work in your codebase
If all else fails, steer Claude more when you work with it, or have Claude fix accumulated debt and rewrite your codebase to make it easier to work with. Or, wait for the next model.
Best,
Boris
来源:@bcherny · x.com