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
+5-35Lines changed: 5 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,45 +7,15 @@
7
7
8
8
# Code style
9
9
10
-
Use standard Rust code style. Use `cargo fmt` to reformat code automatically after every edit.
11
-
Before committing or finishing a task, use `cargo clippy` to detect more serious lint errors.
12
-
13
-
VERY IMPORTANT:
14
-
NEVER add comments that are redundant with the nearby code.
15
-
ALWAYS be sure comments document "Why", not "What", the code is doing.
16
-
ALWAYS challenge the user's assumptions
17
-
ALWAYS attempt to prove hypotheses wrong - never assume a hypothesis is true unless you have evidence
18
-
ALWAYS demonstrate that the code you add is STRICTLY necessary, either by unit, integration, or logical processes
19
-
NEVER take the lazy way out
20
-
ALWAYS work carefully and methodically through the steps of the process.
21
-
NEVER use quick fixes. Always carefully work through the problem unless specifically asked.
22
-
ALWAYS Ask clarifying questions before implementing
23
-
ALWAYS Break large tasks into single-session chunks
24
-
25
-
VERY IMPORTANT: you are to act as a detective, attempting to find ways to falsify the code or planning we've done by discovering gaps or inconsistencies. ONLY write code when it is absolutely required to pass tests, the build, or typecheck.
26
-
27
-
VERY IMPORTANT: NEVER comment out code or skip tests unless specifically requested by the user
28
-
29
-
## Principles
30
-
-**Data first**: Define types before implementation
31
-
-**Small Modules**: Try to keep files under 200 lines, unless required by implementation. NEVER allow files to exceed 1000 lines unless specifically instructed.
10
+
- Use standard Rust code style.
11
+
- Use `cargo fmt` to reformat code automatically after every edit.
12
+
- Don't write functions with many arguments: create a struct and use that as input instead.
32
13
33
14
# Workflow
34
15
35
16
- Prefer to run individual tests with `cargo nextest run --test-threads=1 --no-fail-fast <name of the test here>`. This is much faster.
36
-
- A local PostgreSQL server is required for some tests to pass. Ensure it is set up, and if necessary create a database called "pgdog", and create a user called "pgdog" with password "pgdog".
37
-
- Focus on files in `./pgdog` and `./integration` - other files are LOWEST priority
38
-
39
-
## Test-Driven Development (TDD) - STRICT ENFORCEMENT
40
-
-**MANDATORY WORKFLOW - NO EXCEPTIONS:**
41
-
1. Write exactly ONE test that fails
42
-
2. Write ONLY the minimal code to make that test pass
43
-
3. Refactor if needed (tests must still pass)
44
-
4. Return to step 1 for next test
45
-
-**CRITICAL RULES:**
46
-
- NO implementation code without a failing test first
47
-
- NO untested code is allowed to exist
48
-
- Every line of production code must be justified by a test
17
+
- A local PostgreSQL server is required for some tests to pass. Assume it's running, if not, stop and ask the user to start it.
0 commit comments