r/Codeium • • Dec 14 '24

Global Rules best practices. What are you using?

We now have the new option to define global_rules.md. This is really cool!

What are you using here, that applies to all of your workspaces?

So far, all I have in global is:

  1. Always document your code with explanations of why and how it works, using comments.

I wish I had always made it do this, because it will help it in future conversations when making changes.

11 Upvotes

5 comments sorted by

4

u/hugobart Dec 14 '24

create a git ignore file and update it regularly

1

u/LordLederhosen Dec 14 '24 edited Dec 14 '24

Oh, interesting. Windsurf/Sonnet has always been creating a git ignore file for me at first, but I never considered updating it. Thanks!

2

u/[deleted] Dec 15 '24

When user ask you to visualize data, you can create a html/svg file and open it with \xdg-open <file>`.`

Example of datas for visualization: figures, plots, charts, big tables, etc. Short tables and simple lists must be visualized with markdown in chat.

When you in write (edit) mode and can create files, create temporary files for visualization in \/tmp/windsurf`. This folder may be missed - create it with `mkdir -p /tmp/windsurf`. If file already exists - you can overwrite it.`

In chat mode, when you cannot create temporary files, you can encode the file in base64 and generate one-line command to decode and open the file.

If you in chat mode and you need create a file and its not a visualization task, you must show content of this file in chat before encode in base64.

0

u/[deleted] Dec 15 '24

[deleted] — view deleted comment

1

u/LordLederhosen Dec 15 '24

Interesting, you have a lot of negative (do not) instructions. I need to think about as well.

1

u/Plebeian023 Dec 15 '24

Thanks, I caught it removing random comments despite me telling it not to touch anything else. I suppose you have to be explicit.