You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+26-4Lines changed: 26 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Always test your changes by running the appropriate script or CLI command. Never complete a task without testing your changes until the script or CLI command runs without issues for 3 minutes+ (at minimum). If you find an error unrelated to your task, at minimum quote the exact error back to me when you have completed your task and offer to investigate and fix it.
1
+
Always test your changes by running the appropriate script or CLI command. Never complete a task without testing your changes until the script or CLI command runs without issues. If it's a long-running script let it run for at least a few iterations of the main loop. If you find an error unrelated to your task, at minimum quote the exact error back to me when you have completed your task and offer to investigate and fix it.
2
2
3
3
## Project Structure and Conventions
4
4
@@ -18,17 +18,39 @@ Put imports at the top of the file unless you have a good reason to do otherwise
18
18
19
19
# Development
20
20
21
+
Never use try/except blocks - fail fast, fail explicitly.
22
+
23
+
Never use "fallbacks".
24
+
25
+
Do not write lines longer than 88 characters.
26
+
27
+
Don't use ALL CAPS unless it's proper English (e.g. an acronym).
28
+
29
+
Don't keep default run path values inside low level code - if a module calls another module, the higher level module should always pass through inject a base path.
30
+
31
+
Don't save data to a directory that is not in the .gitignore - especially the data/ directory.
32
+
33
+
Don't remove large datasets from the HF cache without asking.
34
+
21
35
You can call CLI commands without prefixing `python -m`, like `bergson build`.
22
36
23
37
Use `pre-commit run --all-files` if you forget to install pre-commit and it doesn't run in the hook.
24
38
25
39
Run bash commands in the dedicated tmux pane named "claude" if it is available.
26
40
27
-
Don't keep default run path values inside low level code - if a module calls another module, the higher level module should always pass through inject a base path.
41
+
Don't betray lineage. An example of betraying lineage is duplicating a file, making changes in the duplicate, then calling it "foo_fixed" rather than "foo". Instead, commit the file and modify it directly. Another example is adding a RoundButton to a module containing a Button but not updating the original Button to be called RectangleButton. This betrays that the rectangular button was written first.
28
42
29
-
Don't save data to a directory that is not in the gitignore - especially the data/ directory.
43
+
If you think some data files (e.g. CSVs) have been invalidated but you're not 100% sure, you can add them to a .gitignore'd archive directory along with an equivalentally named markdown file explaining the context.
30
44
31
-
Don't remove large datasets from the HF cache without asking.
45
+
File names always use snake case - in_memory, not inmemory.
46
+
47
+
When writing files to disk python scripts should choose their own filenames but be provided with their file paths.
48
+
49
+
### Documentation
50
+
51
+
Do not mark documentation for code that has been removed as deprecated - simply remove the documentation.
52
+
53
+
No context leakage: do not write code or comments that link features to the specific experiment for which the feature was developed, unless it's only useful for that particular experiment. Be as generic as is correctly possible and not more.
0 commit comments