Skip to content

Commit 5c91cbf

Browse files
committed
docs: incorporate some AI guidance for contributors
This what @thisisnic suggested via apache/arrow#48952 and has discussed on the Apache Arrow developers mailing list. I think this is good guidance to start with for AI contributions Signed-off-by: R. Tyler Croy <[email protected]>
1 parent 987e535 commit 5c91cbf

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,44 @@ If you want to start contributing, first look at our good first issues: https://
88

99
If you want to contribute something more substantial, see our "Projects seeking contributors" section on our roadmap: https://github.com/delta-io/delta-rs/issues/1128
1010

11+
## AI-generated code
12+
13+
We recognise that AI coding assistants are now a regular part of many
14+
developers' workflows and can improve productivity. Thoughtful use of these
15+
tools can be beneficial, but AI-generated PRs can sometimes lead to
16+
undesirable additional maintainer burden. PRs that appear to be fully
17+
generated by AI with little to no engagement from the author may be closed
18+
without further review.
19+
20+
Human-generated mistakes tend to be easier to spot and reason about, and
21+
code review is intended to be a collaborative learning experience that
22+
benefits both submitter and reviewer. When a PR appears to have been
23+
generated without much engagement from the submitter, reviewers with access
24+
to AI tools could more efficiently generate the code directly, and since
25+
the submitter is not likely to learn from the review process, their time is
26+
more productively spent researching and reporting on the issue.
27+
28+
We are not opposed to the use of AI tools in generating PRs, but recommend
29+
the following:
30+
31+
* Only submit a PR if you are able to debug and own the changes yourself -
32+
review all generated code to understand every detail. [Apache Datafusion has a useful explanation of **why fully AI-generated PRs without understanding are not helpful**](https://datafusion.apache.org/contributor-guide/index.html#why-fully-ai-generated-prs-without-understanding-are-not-helpful).
33+
* Match the style and conventions used in the rest of the codebase, including
34+
PR titles and descriptions
35+
* Be upfront about AI usage and summarise what was AI-generated
36+
* If there are parts you don't fully understand, leave comments on your own PR
37+
explaining what steps you took to verify correctness
38+
* Watch for AI's tendency to generate overly verbose comments, unnecessary
39+
test cases, and incorrect fixes
40+
* Break down large PRs into smaller ones to make review easier
41+
42+
PR authors are also responsible for disclosing any copyrighted materials in
43+
submitted contributions. See the `[Apache Software
44+
Foundation's](https://apache.org) [guidance on AI-generated
45+
code](https://www.apache.org/legal/generative-tooling.html) for further
46+
information on licensing considerations.
47+
48+
1149
## Claiming an issue
1250

1351
If you want to claim an issue to work on, you can write the word `take` as a comment in it and you will be automatically assigned.

0 commit comments

Comments
 (0)