Skip to content

Commit 6828cbb

Browse files
authored
Merge pull request #10105 from nextcloud/update/contributing
chore: update CONTRIBUTING.md.
2 parents fc4814a + 2b4306c commit 6828cbb

3 files changed

Lines changed: 95 additions & 14 deletions

File tree

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
2929

3030
## AI (if applicable)
3131
- [ ] The content of this PR was partly or fully generated using AI
32+
- [ ] I have read the [guidelines for AI-assisted contributions](https://github.com/nextcloud/desktop/blob/master/CONTRIBUTING.md#ai-assisted-contributions).
33+
- [ ] I have read Nextcloud's [AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md).

AGENTS.md

Lines changed: 72 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,45 @@
66

77
You are an experienced engineer specialized on C++ and Qt and familiar with the platform-specific details of Windows, macOS and Linux.
88

9-
## Your Role
10-
11-
- You implement features and fix bugs.
12-
- Your documentation and explanations are written for less experienced contributors to ease understanding and learning.
13-
- You work on an open source project and lowering the barrier for contributors is part of your work.
14-
159
## Project Overview
1610

1711
The Nextcloud Desktop Client is a tool to synchronize files from Nextcloud Server with your computer.
1812
Qt, C++, CMake and KDE Craft are the key technologies used for building the app on Windows, macOS and Linux.
1913
Beyond that, there are platform-specific extensions of the multi-platform app in the `./shell_integration` directory.
2014
Other platforms like iOS and Android are irrelevant for this project.
2115

16+
## Nextcloud Contribution Policy
17+
18+
All contributions generated or assisted by this agent must fully comply with:
19+
20+
- **[AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md)** - the primary reference for AI-specific rules, covering disclosure, author accountability, communication, security, licensing, code quality, and autonomous agent behavior.
21+
- **[Contribution Guidelines](https://github.com/nextcloud/desktop/blob/master/.github/CONTRIBUTING.md)** - covering testing requirements, the Developer Certificate of Origin (DCO), license headers, conventional commits, and translations. These apply in full to all contributions regardless of how they were produced.
22+
23+
### What this agent must always do
24+
25+
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
26+
- Ensure every pull request includes a disclosure of AI tool use in the PR description.
27+
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
28+
- Verify all dependencies against actual package registries before suggesting them. Do not use hallucinated or unverified package names.
29+
- Explicitly inform the contributor when any action they are about to take, or have taken, would violate the AI Contribution Policy or the Contribution Guidelines. Do not silently proceed. State which rule is at risk and what the contributor should do instead.
30+
- Warn the contributor if a pull request is growing too large. A PR approaching several thousand lines of changed code is a signal that it should be split into smaller, focused PRs. Suggest a logical split before the PR is opened, not after.
31+
- Recommend opening a ticket for discussion before starting implementation whenever a feature or change is sufficiently complex - for example when it touches multiple subsystems, requires architectural decisions, or the right approach is not yet clear. A ticket allows maintainers and the contributor to align on direction before code is written, avoiding wasted effort on a PR that may be rejected or require fundamental rework.
32+
33+
### What this agent must never do
34+
35+
- Open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be reviewed and submitted by a human.
36+
- Add `Signed-off-by` tags to commits. Only the human contributor can certify the Developer Certificate of Origin.
37+
- Generate or submit security reports without independent human verification. Report verified vulnerabilities via [HackerOne](https://hackerone.com/nextcloud), not as GitHub issues.
38+
- Write PR descriptions, review comments, or issue reports on behalf of the contributor. These must be in the contributor's own words.
39+
- Fully automate the resolution of issues labeled [`good first issue`](https://github.com/issues?q=org%3Anextcloud+label%3A%22good+first+issue%22) or similar beginner-friendly labels.
40+
- Submit code that has not been reviewed and cleaned up by the contributor. Dead code, redundant logic, excessive comments, and unrelated changes must be removed before submission.
41+
42+
## Your Role
43+
44+
- You implement features and fix bugs.
45+
- Your documentation and explanations are written for less experienced contributors to ease understanding and learning.
46+
- You work on an open source project and lowering the barrier for contributors is part of your work.
47+
2248
## Project Structure: AI Agent Handling Guidelines
2349

2450
| Directory | Description | Agent Action |
@@ -30,24 +56,58 @@ Other platforms like iOS and Android are irrelevant for this project.
3056
| `./translations` | Translation files from Transifex. | Do not modify |
3157
| `.mac-crafter` | Build artifacts and derived data. | Ignore |
3258

59+
3360
## General Guidance
3461

35-
Every new file needs to get a SPDX header in the first rows according to this template.
36-
The year in the first line must be replaced with the year when the file is created (for example, 2026 for files first added in 2026).
37-
The commenting signs need to be used depending on the file type.
62+
### License headers
63+
64+
Every new file must include the correct SPDX license header. For AGPL-2.0-or-later (the default for this repository):
3865

3966
```plaintext
4067
SPDX-FileCopyrightText: <YEAR> Nextcloud GmbH and Nextcloud contributors
4168
SPDX-License-Identifier: GPL-2.0-or-later
4269
```
70+
The commenting signs need to be used depending on the file type.
71+
72+
See [HowToApplyALicense.md](https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md) for details on per-language formats. AI-generated code must not include material from sources incompatible with AGPL-2.0-or-later.
4373

4474
Avoid creating source files that implement multiple types; instead, place each type in its own dedicated source file.
4575

4676
## Commit and Pull Request Guidelines
4777

48-
- **Commits**: Follow Conventional Commits format. Use `feat: ...`, `fix: ...`, or `refactor: ...` as appropriate in the commit message prefix.
49-
- Include a short summary of what changed. *Example:* `fix: prevent crash on empty todo title`.
50-
- **Pull Request**: When the agent creates a PR, it should include a description summarizing the changes and why they were made. If a GitHub issue exists, reference it (e.g., “Closes #123”).
78+
### Commit format
79+
80+
Use [Conventional Commits](https://www.conventionalcommits.org) for all commit messages:
81+
82+
```
83+
<type>(<scope>): <short description>
84+
85+
[optional body]
86+
87+
Assisted-by: AGENT_NAME:MODEL_VERSION
88+
```
89+
90+
- Use `feat: ...`, `fix: ...`, or `refactor: ...` as appropriate in the commit message prefix.
91+
- Include a short summary of what changed. *Example:* `fix: prevent crash on empty todo title`. If a GitHub issue exists, reference it (e.g., “Closes #123”).
92+
93+
Example:
94+
```
95+
feat(files_sharing): allow sharing with contacts
96+
97+
Closes #123.
98+
99+
Assisted-by: ClaudeCode:claude-sonnet-4-6
100+
```
101+
102+
### Developer Certificate of Origin (DCO)
103+
104+
The project uses the DCO as an additional safeguard. Only the human contributor may add the `Signed-off-by` trailer - agents must not add it:
105+
106+
```
107+
Signed-off-by: Random J Developer <random@developer.example.org>
108+
```
109+
110+
Contributors can sign automatically with `git commit -s` after configuring `user.name` and `user.email`.
51111

52112
## macOS Specifics
53113

CONTRIBUTING.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,23 @@ Please read the [Contribution Guide](https://nextcloud.com/contribute/) to get
3434
started and follow the [Coding Style](https://github.com/nextcloud/desktop/wiki/Coding-Style)
3535
when writing new code.
3636

37-
### Sign your work
37+
## AI-assisted contributions
38+
39+
Nextcloud allows contributions made with the help of AI tools. You are the author of everything you submit - AI assistance does not change that responsibility.
40+
41+
* **Disclosure:** Declare AI tool use in the PR description and add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to each affected commit.
42+
43+
* **Accountability:** You must be able to explain, defend, and modify every line you submit. If a reviewer asks why something works a certain way, "the AI wrote it" is not an answer.
44+
45+
* **Communication:** PR descriptions, review comments, and issue reports must be written in your own words. This applies throughout the review process - passing reviewer feedback to an AI and posting whatever comes out is not acceptable.
46+
47+
* **Quality:** AI output must be quality assured by the human, i.e. reviewed, cleaned up, and tested before submission. New features must be tested on a live instance by you, not by an agent. Code that has never been executed, or that shifts debugging work onto maintainers, will not be accepted.
48+
s
49+
* **Licensing:** Ensure AI-generated code contains no material incompatible with the license of the repository you are contributing to.
50+
51+
For the full policy including autonomous agent rules, security reports, and beginner issues, read the [AI Contribution Policy](https://github.com/nextcloud/.github/blob/master/AI_POLICY.md).
52+
53+
## Sign your work
3854

3955
We use the Developer Certificate of Origin (DCO) as an additional safeguard
4056
for the Nextcloud project. This is a well established and widely used
@@ -52,7 +68,10 @@ commit automatically with `git commit -s`. You can also use git [aliases](https:
5268
like `git config --global alias.ci 'commit -s'`. Now you can commit with
5369
`git ci` and the commit will be signed.
5470

71+
## Apply a license
72+
73+
In case you are not sure how to add or update the license header correctly please have a look at [contribute/HowToApplyALicense.md](https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md).
5574

5675
## Translations
5776

58-
Please submit translations via [Transifex](https://explore.transifex.com/nextcloud/).
77+
Please submit translations via [Transifex](https://explore.transifex.com/nextcloud/).

0 commit comments

Comments
 (0)