Skip to content

Commit 613bcc9

Browse files
authored
Merge pull request #3506 from stgraber/llm
Update AI/LLM policy
2 parents d74f65d + 5d9e946 commit 613bcc9

3 files changed

Lines changed: 94 additions & 11 deletions

File tree

AGENTS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Legal
2+
3+
- All contributions to this repository must be compatible with the Apache 2.0 license.
4+
- Specifically (but not limited to), contributions cannot include code licensed under the terms of the GPL, AGPL or LGPL licenses.
5+
- Only human beings are allowed to sign the Developer Certificate of Ownership (DCO / Signed-off-by).
6+
- Only human beings can ever be credited within commit messages.
7+
8+
# Formatting
9+
10+
- Code comments should be no longer than one line, unless they are required to cover complex unintuitive logic.
11+
- Commit messages should similarly be kept as short and to the point as possible, no need to summarize the whole issue.
12+
- We don't use the define and test one line `if` syntax, instead splitting defintion and testing across two lines.
13+
14+
# Testing / validation
15+
16+
- The commit structure described in `CONTRIBUTING.md` should generally be followed.
17+
- All branches are expected to pass `make static-analysis` and `go test -v ./...`.
18+
- Excessive unit tests are generally discouraged.
19+
- When possible, existing system tests should be extended to cover new features.
20+
- A full local system test run isn't required prior to contribution, all tests get run in our CI.

CONTRIBUTING.md

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,83 @@ By default, any contribution to this project is made under the Apache
1818
The author of a change remains the copyright holder of their code
1919
(no copyright assignment).
2020

21-
## No Large Language Models (LLMs) or similar AI tools
21+
## Policy on the use of Large Language Models (LLMs) and AI tooling
22+
### For issue reporting
2223

23-
All contributions to this project are expected to be done by human
24-
beings or through standard predictable tooling (e.g. scripts, formatters, ...).
24+
We do NOT allow direct filing of issues by LLMs.
2525

26-
We expect all contributors to be able to reason about the code that they
27-
contribute and explain why they're taking a particular approach.
26+
We REQUIRE a human being to go through our issue reporting form on
27+
Github and accurately describe their issue and provide all needed
28+
information.
2829

29-
LLMs and similar predictive tools have the annoying tendency of
30-
producing large amount of low quality code with subtle issues which end
31-
up taking the maintainers more time to debug than it would have taken to
32-
write the code by hand in the first place.
30+
The more concise and to the point the issue is, the more likely it is to
31+
be understood, tracked down and resolved quickly.
3332

34-
Any attempt at hiding the use of LLMs or similar tools in Incus contributions
35-
will result in a revert of the affected changes and a ban from the project.
33+
Long winded AI written essays can easily look overwhelming and cause our
34+
maintainers and other contributors to just entirely skip the issue to
35+
focus their energy on something else.
36+
37+
We also don't benefit from AI generated root cause analysis or proposed
38+
fixes in those issues. If you yourself understand the code base well
39+
enough to go through that content and suggested fix, then turn it into a
40+
pull request and submit it yourself. Otherwise, please limit your report
41+
to describing the issue at hand and we'll take it from there.
42+
43+
### For contributions
44+
45+
We REQUIRE all contributions to Incus to be submitted by human beings who
46+
can assert full copyright ownership of their contribution or have been
47+
allowed by their employer to contribute. This is what the DCO (see below)
48+
requires of all contributors.
49+
50+
AI tools can sometimes be beneficial, particularly when it comes to
51+
finding patterns among a large data set (entire code base), performing
52+
tedious repetitive changes or large refactoring/re-organization.
53+
54+
While we now tolerate the use of such tools, they must abide by our
55+
instructions (`AGENTS.md`) and their operators cannot override those
56+
instructions.
57+
58+
We expect everyone contributing to Incus to fully own their
59+
contribution, be able to reason about it, be able to explain why things
60+
were done a particular way and act as the full owner of that code. AI
61+
tools are treated the same as traditional tooling like `sed`, `awk` or
62+
`coccinelle`.
63+
64+
For the purpose of this project, AI tools CANNOT be treated as author,
65+
co-author or be credited in any way that would suggest any ownership
66+
over the contribution.
67+
68+
The contributor should have done all the thinking, planning and
69+
understanding of the changes needed to resolve an issue or implement a
70+
new feature prior to using automated tooling to perform the grunt work.
71+
72+
Unguided use of those tools or the inability to prove understanding of
73+
the code contributed will result in a loss of trust in that contributor
74+
by project maintainers which can then lead to exclusion from any further
75+
contribution to the project.
76+
77+
It's also worth pointing out that while those tools are good at
78+
implementing the more boring/repetitive/grunt work. We've generally
79+
found that you only really understand the project and its structure by
80+
having done such work yourself a few times.
81+
82+
### For anyone with write access to the repository
83+
84+
Anyone with write access to this repository must ensure to NEVER run an
85+
AI agent or similar tool on a system which holds repository credentials
86+
(SSH key, GPG key, web browser cookies, ...).
87+
88+
Any use of AI tooling should be done inside of a clean VM/container that
89+
itself cannot directly push to or alter this repository in any way.
90+
91+
The safest approach is to SSH into that environment and then extract the
92+
changes using `git format-patch`, then review and apply them to your
93+
actual tree, tweak them as needed, sign them off and then push and open
94+
the pull request.
95+
96+
Any potential credential compromise or loss of control should be
97+
immediately reported to `security@linuxcontainers.org`.
3698

3799
## Pull requests
38100

doc/.wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ GIDs
109109
Github
110110
Golang
111111
goroutines
112+
GPG
112113
GPUs
113114
Grafana
114115
HAProxy

0 commit comments

Comments
 (0)