Skip to content

Commit 571b6ee

Browse files
committed
extend AGENTS.md based on CONTIBUTING.md
1 parent e083264 commit 571b6ee

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ Main modules:
1717

1818
- Minimal supported Java version is 8.
1919
- Follow `docs/ai-review.md` for compatibility, breaking-change, and review instructions.
20+
- Follow `AI_POLICY.MD`: take the same responsibility for generated code as hand-written code, don't
21+
submit code you don't understand, and respect licensing when reproducing any external code.
22+
23+
## When to pause and ask
24+
25+
- Before implementing a new feature, a large behavior change, or anything touching public API,
26+
configuration, protocol handling, serialization, or JDBC/R2DBC behavior: check whether an approved
27+
issue or proposal already covers it. If not, say so and ask before implementing instead of proceeding silently — see `CONTRIBUTING.md`.
28+
- Do not modify CI workflow files (`.github/workflows/**`). CI changes are restricted; raise it with the user first.
2029

2130
## Setup and test commands
2231

@@ -29,6 +38,11 @@ Prefer targeted Maven commands over full-repo runs.
2938
- `mvn -pl jdbc-v2 test`
3039
- `mvn -pl clickhouse-data test`
3140

41+
Also compile examples or packaging modules (e.g. `packages/clickhouse-jdbc-all`) when a change affects examples, packaging, public APIs, or other user-facing behavior — running the touched module's tests alone isn't enough.
42+
43+
Run benchmarks under `clickhouse-benchmark` when a change touches a performance-sensitive path (see
44+
`docs/ai-review.md`); this is optional and only worth doing when performance is actually in question.
45+
3246
Avoid broad dependency, formatting, or unrelated cleanup churn unless required by the task.
3347

3448
## Editing expectations
@@ -37,10 +51,40 @@ Avoid broad dependency, formatting, or unrelated cleanup churn unless required b
3751
- Read nearby code and follow existing local patterns before introducing new abstractions.
3852
- Prefer focused tests near the affected module over repo-wide runs.
3953

54+
## Scope discipline
55+
56+
- One logical change per commit/PR: a feature, a bug fix, a refactor, or a doc update. Don't mix.
57+
- Implement the smallest change that solves the problem. Defer polish, extra configuration, and
58+
optimization to follow-ups rather than expanding scope.
59+
- Flag it if a change is growing large: ~400 LOC starts to hurt reviewability, 800+ LOC needs to be
60+
split into smaller changes.
61+
62+
## Testing expectations
63+
64+
- Add negative tests when a change affects validation, error handling, parsing, serialization, or
65+
compatibility-sensitive behavior. The test should prove the failure path produces the correct
66+
result/exception, not just that the original bug no longer reproduces.
67+
- Don't pad coverage: add a test only when it covers a distinct scenario, edge case, module, type,
68+
format, or failure mode. Avoid duplicating existing coverage.
69+
- Favor scenario coverage (boundary values, invalid input, nullable/nested interactions) over raw
70+
coverage percentage.
71+
- Keep tests compact, readable, and focused on the scenario being verified. Reduce duplication in test setup and assertions so a reviewer can quickly see what behavior is being tested.
72+
73+
## Closeout checklist
74+
75+
- Run the affected module's tests locally (see "Setup and test commands") before treating a change as done. Don't hand off a change with failing or unrun tests.
76+
- Update `CHANGELOG.md` for user-facing changes: what the problem was, how it was fixed, and a link to the issue.
77+
- Update `docs/features.md` when a `client-v2` or `jdbc-v2` feature is added, removed, or its behavior intentionally changes.
78+
- In the final summary: state compatibility impact explicitly, describe any user-visible behavior
79+
change, and link the related issue (note that one should be created if it's missing).
80+
4081
## Review expectations
4182

4283
For review requests, follow `docs/ai-review.md` as the shared review standard across AI agents.
4384

85+
Before treating implementation work as done, self-review your own diff against `docs/ai-review.md`
86+
not only when a review is explicitly requested.
87+
4488
## Optional nested AGENTS.md
4589

4690
If a module develops its own conventions, add a nested `AGENTS.md` inside that module.

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ For a new feature, implement the smallest change that solves the problem. Polish
4848
For self and AI review use following guids:
4949
- `docs/ai-review.md`
5050
- `docs/changes_checklist.md`
51-
- `docs/highlevel-changes-checklist.md`
5251
- `docs/features.md` for changes that touch `client-v2` or `jdbc-v2`
5352

5453
### Testing Expectations

0 commit comments

Comments
 (0)