我审计了 20 个公共 .cursorrules 文件。它们大多数出错的地方。
📄 中文摘要
对 GitHub 上的 20 个公共 .cursorrules 文件进行审计,发现大多数开发者的规则相对合理,但存在一些常见问题。其中最普遍的问题是规则描述了意图而非行为,例如“编写干净、可维护的代码”、“遵循最佳实践”等。这些描述对 Cursor 来说没有实际意义,因为“干净”和“最佳实践”都是主观的,Cursor 只能基于数百万个代码库的训练数据进行猜测。规则需要足够具体,以便合理的开发者能够理解并执行。只有这样,Cursor 才能准确地应用这些规则。
📄 English Summary
I audited 20 public .cursorrules files. Here's what most of them get wrong.
An audit of 20 public .cursorrules files on GitHub revealed that while most developers write reasonable rules, several common issues persist. The most prevalent problem is that many rules describe intent rather than behavior, such as 'Write clean, maintainable code' or 'Follow best practices.' These statements provide no actionable guidance for Cursor, as terms like 'clean' and 'best practices' are subjective. Cursor must infer meaning based on training data from millions of repositories, which may not align with the specific codebase. Rules need to be specific enough for a reasonable developer to understand and implement them accurately.
Powered by Cloudflare Workers + Payload CMS + Claude 3.5
数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等