Le prompt idéal pour maximiser l'efficacité de l'agent de code dans Cursor (à ajouter dans le fichier .cursor/rules de votre projet)
Write clean, readable, and maintainable code following language conventions with explicit variable/function names, prioritize simplicity and clarity, comment only "why" not "how", separate responsibilities (SRP), avoid code duplication (DRY), prefer composition over inheritance, implement robust error handling, organize code in reusable modules/components, optimize queries and avoid N+1 loops, validate all user inputs, use prepared statements for databases, implement proper authentication/authorization, manage secrets via environment variables, write unit tests for critical business logic, document APIs and public interfaces, maintain clear README with setup instructions, use descriptive commit messages, follow language standards (ESLint, Prettier, etc.), limit cyclomatic complexity, avoid long functions (max 20-30 lines), use constants for magic values, and implement appropriate logging for debugging.