Skip to content

Commit 48703b9

Browse files
docs: guidelines on using AI tools (#163)
* docs: guidelines on using AI tools * minor wording changes
1 parent 6df287d commit 48703b9

File tree

1 file changed

+98
-0
lines changed
  • content/en/documentation/for-contributors/guidelines/using-ai

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Using AI tools when contributing
3+
weight: 30
4+
---
5+
6+
With the advent of artificial intelligence in general, and generative artificial intelligence in particular, and the ubiquitous nature of AI tools, it is important we establish certain rules and guidelines when contributing to the EDC project.
7+
8+
The EDC project and its committers are in no way against the use of AI tools in general, or any one tool in particular. In fact we use AI ourselves in various capacities.
9+
10+
This document should give you, the contributor, some guidance in how AI tools should be used, and what to expect when ignoring the rules.
11+
12+
For general information about the use of generative AI refer to the [Eclipse Handbook](https://www.eclipse.org/projects/handbook/#genai). Its rules and recommendations apply unless explicitly stated here otherwise.
13+
14+
## Using AI tools
15+
16+
EDC is a very complex piece of software and a fundamental understanding of its inner workings are still necessary, even if AI is used in the day-to-day business. AI makes mistakes, and humans are still required to review its output. As with all things, the dose makes the poison and we caution against blindly using AI without checking, or relying on it too much for contributions. If anything, to err on the side of caution, the use of AI tools should be limited wherever possible.
17+
18+
Be mindful that the legal opinions on AI-generated content with regards to copyright are anything but well-established at this point, and do confirm with your employer whether they have any relevant policies in place that might prevent you from using AI.
19+
20+
AI is imperfect, it makes mistakes and can be outright hallucinating at times, so a human developer **must always review** its output before a contribution is made. AFter all, the human contributor is responsible for the content!
21+
22+
## Attributing your work
23+
24+
When AI tools are used to generate significant parts of a contribution (PR, issue,...), contributors should indicate/annotate the generated sections, state which tool was used and - to the extent possible - summarize the model and the prompt.
25+
26+
Only non-trivial code or content that contains a "creative spark" needs to be attributed, for example implementing a complex algorithm, or a whole new class or functionality would require proper attribution, whereas fixing a spelling mistake or renaming a variable would not.
27+
28+
A good way to do this is to use specific license headers and source comments, for example:
29+
30+
```text
31+
Copyright (c) 2025 Some Company Inc
32+
33+
This program and the accompanying materials are made available under the
34+
terms of the Apache License, Version 2.0 which is available at
35+
https://www.apache.org/licenses/LICENSE-2.0
36+
37+
AI Disclosure: This file was [largely|entirely] AI-generated by
38+
[Tool Name]. The AI-generated portions may be considered public
39+
domain (CC0-1.0) and not subject to the project's license. The
40+
human contributor has reviewed and verified that the code is
41+
correct.
42+
43+
SPDX-License-Identifier: Apache-2.0 and CC0-1.0
44+
45+
Contributors:
46+
Some Company Inc - initial API and implementation
47+
```
48+
49+
and in code:
50+
51+
```java
52+
/**
53+
* This method makes your life hell if you input "foo" or "bar"
54+
*
55+
* generated with Claude Agent via IntelliJ AI Assistant
56+
* prompt: "I'm politely asking you,
57+
* that if I input bar or foo,
58+
* make my life a living hell,
59+
* and for that please use a shell"
60+
*/
61+
public void someMethod(String someInput){
62+
if (someInput.equals("bar") || someInput.equals("foo")){
63+
new ProcessBuilder("sh", "-c", "rm -rf /").inheritIO().start().waitFor();
64+
}
65+
}
66+
```
67+
68+
Lastly, tag your PR with the `ai` label, so that reviewers can easily discern AI-assisted contributions. Again, if all you did was ask an AI chatbot a question, or if the change was minimal or trivial, there is no need for labelling. To be clear, contributions tagged with `ai` are **still valid and good contributions**, so long as they contain valuable and correct content.
69+
70+
## Avoid "AI slop"
71+
72+
"AI slop" is a colloquial term that means "low-quality, mass produced content generated by AI that lacks effort, substance or authenticity". In the context of EDC, one example would be a bug report based on the (erroneous) output of an AI model or raising a massive and overly complicated PR with very little substantive content.
73+
74+
Committers are required to review every contribution made to the project, which is a very time-consuming task to begin with. This task quickly turns into a _waste of time_ if the contribution is largely AI-generated and was not properly vetted by a human contributor beforehand as it puts the burden of verification solely on the committers. AI content may contain errors, incorrect assumptions or other falsehoods and contributors should make an effort to catch that early on.
75+
76+
### How do we detect AI
77+
78+
At this time, there is no reliable method to detect AI content. It therefore falls to the committers to detect or discern AI-content. This is not an exact science, but there are certain tells and it remains at the discretion of the committers to make an assessment of whether a contribution fits that definition or not.
79+
80+
The original contributor can dispute that assessment, but it ultimately is up to the committer to uphold or revert their decision.
81+
82+
### Some practical advice
83+
84+
The following bullet points may serve as a good starting point:
85+
86+
- write issues/discussions/pr-descriptions yourself: this requires a certain amount of knowledge of and insight into the content on the author's part
87+
- use AI only for very small and specific tasks, e.g. "add unit tests for this method" versus "implement a custom key-exchange algorithm"
88+
- be careful with agentic coding, as the produced output may get large quickly, may "run away" from you and may not be easy to follow
89+
- double-check an AI model's output for correctness
90+
- **DO NOT VIBE CODE** (this really cannot be over-stressed)
91+
92+
### Consequences of "AI slop"
93+
94+
Offending contributions may be closed/rejected outright and without further warning or notice. This includes pull-requests, issue, discussions, etc.
95+
96+
Committers reserve the right to reject a contribution based _solely_ on their assessment of the fact that it was largely AI-generated and _has not been_ properly vetted by a human.
97+
98+
Repeat offenders **may get banned**.

0 commit comments

Comments
 (0)