Skip to content

Commit 591cc78

Browse files
committed
windsurf: adjust global_rules
1 parent 6575370 commit 591cc78

File tree

1 file changed

+22
-31
lines changed

1 file changed

+22
-31
lines changed

.codeium/windsurf/memories/global_rules.md

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,35 @@
22

33
## General
44

5-
- Prefer simple solutions
6-
- Prefer self-explanatory code
7-
- Prefer short-lived variables
8-
- Prefer short functions
9-
10-
## Your Ability
11-
12-
- You have the right to do these without the pilot's approval:
13-
- Inspect code, history, and file tree. this includes:
14-
- `package-lock.json`, `pnpm-lock.json`, or `bun.lock` for which package manager to use
15-
- `package.json` for scripts.
16-
- git history for commit message convention.
17-
- Create decisions based on the code.
18-
- Suggest changes to the code.
19-
- Make up your own mind.
20-
- Guess the pilot's next move: create new function, variable, etc.
5+
## Coding Style
6+
7+
- Prefer simple solutions.
8+
- Prefer self-explanatory code.
9+
- Prefer short and self-explanatory variable names.
10+
- Make wrong code look wrong. you may add prefixes or suffixes to variables if that makes wrong things more clear. (e.g. `distance_km` `kg_weight`)
11+
- Prefer short-lived variables.
12+
- Prefer short functions.
13+
- TypeScript: Always add extensions to imports: `import "./foo.ts"`, not `import "./foo"`.
14+
15+
### Codebase structure
16+
17+
- Large file is bad file. Split logic into multiple files as soon as possible.
18+
- Prefer flat directory structure until it's no longer managable (~15 files).
2119

2220
## Documentation
2321

24-
- Don't overuse comments
25-
- Use comments to explain the intent, not the implementation
26-
- Comment only the documentation
27-
- Use types for type-checkable documentation
28-
- Use docstrings for documentation for human readers
22+
- Don't overuse comments.
23+
- Use comments to explain the intent, not the implementation.
24+
- Comment only the documentation.
25+
- Use types for type-checkable documentation.
2926

3027
## Cascade Session
3128

32-
- Avoid running commands unless absoutely necessary.
33-
reason:
34-
- windsurf can't terminate it properly
35-
- it lags the computer
36-
if it's absolutely necessary, make sure
37-
- you give it a timeout
38-
- if I terminate it, it's because it has stopped and you don't respond.
3929
- If I don't explicitly review your changes, it means the diff was good.
4030

4131
## Commit Message
4232

43-
- Prefix commit message, e.g. `fix:`, `feat:`, `chore:`, `breaking:`
44-
- Commit message should describe what has become possible after the commit, rather than describint what has changed in detail
45-
- Commit message should only contain one line. Avoid commit "body".
33+
- Prefix commit message, e.g. `fix:`, `feat:`, `chore:`, `breaking:`.
34+
- Commit message should describe what has become possible after the commit, rather than describint what has changed in detail.
35+
- Commit message should only contain one line. Avoid commit body.
36+

0 commit comments

Comments
 (0)