Skip to content

Commit a8d2d46

Browse files
Guideance on copyright notices and AI agent attributions (#1233)
* Guideance on copyright notices and AI agent attributions Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com> * Apply suggestions from code review Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com> Assisted-by: Copilot Code Review:not-known Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Gergely Csatari <gergely.csatari@nokia.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bf9d255 commit a8d2d46

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@
33
We'd love to accept your contributions to this project. There are just a few
44
small guidelines you need to follow.
55

6+
## Developer Certificate of Origin (DCO)
7+
8+
Contributors to this project should state that they agree with the terms published at https://developercertificate.org/
9+
for their contribution. To do this when creating a commit with the Git CLI, a sign-off can be added with
10+
[the -s option](https://git-scm.com/docs/git-commit#git-commit--s). The sign-off is stored as part of the commit message
11+
itself.
12+
13+
## Copyright notices
14+
15+
All files should have the copyright notice.
16+
```
17+
// Copyright 2026 The kpt Authors
18+
//
19+
// Licensed under the Apache License, Version 2.0 (the "License");
20+
// you may not use this file except in compliance with the License.
21+
// You may obtain a copy of the License at
22+
//
23+
// http://www.apache.org/licenses/LICENSE-2.0
24+
//
25+
// Unless required by applicable law or agreed to in writing, software
26+
// distributed under the License is distributed on an "AS IS" BASIS,
27+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28+
// See the License for the specific language governing permissions and
29+
// limitations under the License.
30+
```
31+
32+
If the file has never been modified: use the creation year only
33+
34+
* Example: `Copyright 2026 The kpt Authors`
35+
36+
If the file has been modified: use a year range from creation to last modification
37+
38+
* Example: `Copyright 2024-2026 The kpt Authors`
39+
640
## Code reviews
741

842
All submissions, including submissions by project members, require review. We
@@ -16,6 +50,47 @@ Process for code reviews. Before requesting human review, a PR must:
1650
* Meeting project code quality requirements, including passing all configured static analysis / SonarCloud quality gates and not reducing automated test coverage for the affected components
1751
* The comments from the first run of automatically generated comments (AI generated comments, SonarCloud comments, bot generated comments, etc.) of the PR are addressed (addressing further re-runs of AI are optional)
1852
* If it is not possible to resolve an automatic comment, please add a sub-comment indicating why the automated comment cannot be resolved or ask for help in resolving the comment
53+
* The PR description states whether AI was used to help create the PR; if so, it lists the AI tools used and the areas where they were used
54+
55+
## Declare any use of AI
56+
57+
> In addition to the above, the use of AI in the creation of PRs is allowed, but you must declare any use of AI and you must be able to explain the PR code independently of any AI tools.
58+
59+
Update the PR description to state whether you used AI to help you create this PR; if so, list the AI tools you have used and in what areas.
60+
61+
For example:
62+
```text
63+
I have used AI in the creation of this PR.
64+
65+
I have used the following AI tools:
66+
- GitHub Copilot to analyze the code
67+
- Claude Code to generate the function someNewFunctionIAdded()
68+
- Amazon Q to generate unit tests
69+
```
70+
71+
### Attribute AI in the Git commit messages
72+
73+
Following the [guidance of the Linux kernel](https://docs.kernel.org/process/coding-assistants.html#attribution)
74+
we recommend the attribution of AI tools in the commit messages using the following format:
75+
76+
```text
77+
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
78+
```
79+
80+
Where:
81+
82+
- `AGENT_NAME` is the name of the AI tool or framework
83+
- `MODEL_VERSION` is the specific model version used
84+
- `[TOOL1] [TOOL2]` are optional specialized analysis tools used (e.g., coccinelle, sparse, smatch, clang-tidy)
85+
86+
Basic development tools (git, gcc, make, editors) should not be listed.
87+
88+
Example:
89+
90+
```text
91+
Assisted-by: Claude:claude-3-opus coccinelle sparse
92+
```
93+
1994

2095
## Style Guides
2196

0 commit comments

Comments
 (0)