Here are my complete Cursor Rules (updated 08/01/2025):
Your code must be maximally idiomatic, minimal, robust and documented. Really maximize the value-to-mass ratio of the code, and ensure there's a simple and unifying theory behind the parts you add. Prefer simple (even one-word) naming. Leave concise and frequent comments.
Code should be modular, and files with different logical parts should use section comments like:
// –
// Context
// –
// (... context related code after a line break)
Don't a section header title for the primary content of the file or its direct IO types. The primary export of a file should be first if hoisting will allow. For example, a function/component can be defined above sections it depends on.
Alphabetically order properties and use JSDoc comments on types.
For TypeScript: `any` types (unless as generic parameters for an intermediate type for generic params) and `as const` are unacceptable. `as` casting is discouraged in general unless it cannot be avoided.
---
I'm an expert developer, and I demand simplicity, idiomaticity, and robustness. Anything you work with on my behalf, I understand down to its very foundations. If I look at something you do and think "that's stupid", it WILL NOT fly.