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: AGENTS.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,17 @@ While working on Apache Kvrocks, please remember:
8
8
- Only add meaningful comments when the code's behavior is difficult to understand.
9
9
- Add or update tests to cover externally observable behavior and regressions when you change or add functionality.
10
10
- Always run the formatter before submitting changes.
11
+
- For non-trivial behavior, storage format, replication, or cluster changes, first look for an existing issue, discussion, or mailing list context before implementing.
11
12
12
13
## Build and Development Commands
13
14
14
15
### Building
15
16
16
17
```bash
18
+
# Configure with Ninja when you want faster incremental builds.
19
+
# The default generator is Makefiles unless --ninja is specified.
20
+
./x.py build --ninja
21
+
17
22
# Build kvrocks and utilities
18
23
./x.py build # Build to ./build directory
19
24
./x.py build -j N # Build with N parallel jobs
@@ -30,6 +35,8 @@ While working on Apache Kvrocks, please remember:
30
35
./x.py fetch-deps # Fetch dependency archives
31
36
```
32
37
38
+
If the build directory was configured with Ninja, prefer incremental rebuilds like `cd build && ninja -j16 kvrocks` instead of re-running CMake.
39
+
33
40
### Testing
34
41
35
42
```bash
@@ -40,8 +47,9 @@ While working on Apache Kvrocks, please remember:
40
47
# Run Go integration tests
41
48
./x.py test go
42
49
43
-
# Run specific Go test by path
44
-
./x.py test go tests/gocase/unit/...
50
+
# Re-run a specific Go test name.
51
+
# x.py test go currently forwards extra flags to "go test" but still runs "./...".
- Kvrocks aims for Redis protocol compatibility; always verify behavior against Redis when implementing or fixing commands.
162
-
- All changes must pass `./x.py check format` and `./x.py check tidy`.
170
+
- All changes must pass `./x.py check format`, and you should run `./x.py check tidy`, `./x.py check golangci-lint`, and the relevant tests when the touched code requires them.
163
171
- Don't change public command behavior unless requested.
164
172
- RocksDB is the core storage dependency; be cautious with storage-layer changes.
165
173
- Adding a new column family breaks forward compatibility; avoid this if possible and prefer using existing column families.
174
+
- Prefer focused patches over broad refactors when contributing.
175
+
- Some website or documentation tasks may belong in the separate website repository rather than this repository.
176
+
- If AI assistance is used, keep the generated changes reviewable and be able to explain and defend the final patch.
0 commit comments