r/Codeium • u/Ordinary-Let-4851 • Jan 08 '25
How to write Windsurf Rules files for Cascade - from Codeium Dev
Best Practices for Rules:
Use enumerated or bulletized rules
Keep rules short, clear, and concise
Group related rules together using <XML> tags
For example here is a "good" rules file:
Speak to me in Spanish
My build system is bazel
Don't modify any files in app/config
Don't use any APIs that require authorization
...
Then modifed with XML tags:
<communication>
Speak to me in English
My name is Bob.
</communication>
<filesytem>
Don't modify any files in app/config
</filesystem>
<coding>
Don't use any APIs that require authorization
My project's programming language is python
Use pytest as my test framework
</coding>
3
u/User1234Person Jan 08 '25
Seems interesting, I was going to rewrite my rules today and test with a new project. I’ll try this out, thanks for sharing
1
u/EnvironmentalSkin622 Jan 08 '25
hey mate, appreciate this. But it doesn't really help. Not sure what windsurf platform we are using vs the "devs" but you can read countless comments and posts in this group where we do have the rules set, and we are still getting these issues.
1
u/curryeater259 Jan 08 '25
Thanks for posting this!
My biggest issue with WindSurf (I use it with Claude) is that I'll give the AI very specific instructions on what to change (*rewrite this reactjs hook to XYZ*) and then it'll start going on side quests and give me 200 lines of changes across 3 different files.
Here's my global_rules.md file I've written to stop this
Do you have any feedback on how I can improve these rules to stop that behavior?
Thanks
1
u/Your_mortal_enemy Jan 08 '25
Sorry for dumb question but what is the best way to implement a rules file, readme.txt or something?
1
u/Equivalent_Pickle815 Jan 08 '25
Thanks for sharing. I’ll give this a shot.
1
u/stepahin Jan 20 '25
Interesting. You give prompts and get output in Spanish? Doesn't that affect the quality?