Skip to content

Commit 1251ff7

Browse files
authored
[DOC] Add CLAUDE.md, AGENTS.md, scoped Rust rule (#7010)
Re-lands #7006, which was merged then immediately reverted on main so the changes never actually landed. Same diff as the original PR. - CLAUDE.md - commit format ([TYPE](scope): Description) and the 50/72 rule (<=50 char subject, 72-char body wrap, imperative mood) - AGENTS.md - one-liner for OpenAI Codex and other agents pointing them at CLAUDE.md - .claude/rules/foundation-rust.md - <=200-line file-size guideline scoped to foundation/**/*.rs via paths: frontmatter - .gitignore - negation entries so .claude/rules/ can be tracked ## Description of changes _Summarize the changes made by this PR._ - Improvements & Bug fixes - ... - New functionality - ... ## Test plan _How are these changes tested?_ - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Migration plan _Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?_ ## Observability plan _What is the plan to instrument and monitor this change?_ ## Documentation Changes _Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
1 parent f4bbbf2 commit 1251ff7

4 files changed

Lines changed: 50 additions & 0 deletions

File tree

.claude/rules/foundation-rust.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
paths:
3+
- "foundation/**/*.rs"
4+
---
5+
6+
## Rust File Size
7+
8+
Keep new Rust files under 200 lines where possible. If a file grows beyond that, prefer refactoring — split into submodules rather than continuing to grow the file.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ target/
4545

4646
# Rapid test data
4747
testdata
48+
49+
# Allow Claude Code rules to be tracked
50+
!.claude/
51+
!.claude/rules/
52+
!.claude/rules/*.md

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Chroma Codebase Guidelines for AI Agents
2+
3+
See [CLAUDE.md](./CLAUDE.md) for codebase conventions (commit message format, etc.).

CLAUDE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Chroma Codebase Guidelines
2+
3+
## Commit Message Style
4+
5+
Use the `[TYPE](scope): Description` format:
6+
7+
```
8+
[ENH](foundation-cli): Add login command
9+
[BUG](rust-client): Fix connection timeout on retry
10+
[TST](gc): Add MCMR hard delete integration test
11+
[DOC](api): Update embeddings endpoint docs
12+
[CHORE](deps): Bump reqwest to 0.13
13+
```
14+
15+
Common types: `ENH` (feature/enhancement), `BUG` (fix), `TST` (test), `DOC`
16+
(docs), `CHORE` (maintenance/refactor), `BLD` (build system changes).
17+
18+
Scope is optional but encouraged — use the component name (e.g.
19+
`foundation-cli`, `rust-client`, `gc`, `dashboard-api`).
20+
21+
### 50/72 Rule
22+
23+
- **Subject line: ≤ 50 characters.** Keeps it readable in `git log --oneline`,
24+
GitHub PR lists, and rebase tooling.
25+
- **Blank line** between subject and body (required — many tools use this to
26+
split them).
27+
- **Body lines: wrap at 72 characters.** Leaves room for indentation in
28+
80-column terminals and email patch workflows.
29+
- **Imperative mood** in the subject: "Add login command", not "Added" or
30+
"Adds". Matches Git's own generated messages.
31+
- **Body explains what and why**, not how — the diff shows how.
32+
33+
With the `[TYPE](scope):` prefix, aim to keep the whole subject under 50 chars.
34+
If the scope makes that tight, drop it — the type alone is fine.

0 commit comments

Comments
 (0)