Cursor + Windsurf Settings to 5x AI’s Output Quality (Works with VS Code too)



AI Summary

Summary of AI Context Video

Importance of Context for AI

  • AI cannot guess everything in real-world product development.
  • Providing concrete context is key, not just better prompts or more powerful models.

Rules File for AI Coding Assistants

  • A rules file can enhance the performance of AI coding assistants across various code editors.
  • Context from the rules file is included in all AI interactions (e.g., composer runs, chat, GitHub Co-pilot sessions).

Code Editors and Rules Files

  • VS Code: GitHub Code Pilot instructions.
  • Cursor: Cursor rules file at the root of the repository.
  • Wind Surf: Recently released Wind Surf rules.

Creating and Using a Rules File

  • Adding a greeting (“ho ho ho”) to the beginning of every output as an example.
  • Verifying the rules file by explicitly stating the applied rule in the output.

Content of the Rules File

  1. Project Context: A short description of the project’s purpose, not the implementation.
  2. Codebase Structure: Outlining the structure, such as monorepo, front-end, back-end, Chrome extension, and shared packages.
  3. Tech Stack: Specifying the tech stack to prevent AI from introducing random dependencies.
  4. Specific Preferences: Detailing preferences for specific implementations, like Chrome manifest V3 for Chrome extensions.
  5. Git Commit Preferences: Outlining how to categorize and frame commit messages.
  6. Commenting Guidelines: Instructing AI on when to include comments in the code.

Principles for Maintaining the Rules File

  • Keep the file concise to avoid confusing the AI.
  • Update the file continuously as new issues are discovered.

Iterative Approach

  • Add rules only when AI consistently makes mistakes.
  • Provide critical context for the project.

Future Improvements

  • Conditional inclusion of context files for different tasks.
  • Automatic addition of preferences to the rules file based on user interactions with AI.

Conclusion

  • A well-maintained rules file can significantly improve the reliability of AI coding assistants.
  • The video encourages viewers to check out other AI coding assistant pro tips.

Note

  • No detailed instructions such as CLI commands, website URLs, or specific tips were provided in the text for extraction.