Skip to content

Commit db7c13a

Browse files
Merge pull request #15486 from nextcloud/chore/agents-update
docs: sync AI contribution policy snippet from nextcloud/.github#774
2 parents 6f9d050 + 38d9135 commit db7c13a

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,34 @@ Use `fixes #NNNN` in the PR body to auto-close on merge; use `relates to #NNNN`
181181
| `check-occ-command` | Invalid OCC command references |
182182

183183
Sphinx treats warnings as errors in CI — fix all of them.
184+
185+
## Nextcloud Contribution Policy
186+
187+
All contributions generated or assisted by this agent must fully comply with:
188+
189+
- **[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.
190+
- **[Contribution Guidelines](https://github.com/nextcloud/.github/blob/master/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.
191+
192+
### What this agent must always do
193+
194+
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
195+
- Ensure every pull request includes a disclosure of AI tool use in the PR description.
196+
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
197+
- Write code comments that document the code, never the process that produced it:
198+
- Comments describe what the code does - method signatures, behavior, and constraints the code itself cannot express (e.g. a non-obvious invariant or workaround).
199+
- Never add comments that document progress, decisions, or changes (e.g. "changed X to Y", "as requested", "this fixes ...", "previously this did ..."). That belongs in the commit message or PR discussion; in the code it goes stale and becomes misleading.
200+
- Do not narrate self-explanatory code. If the code is readable without a comment, omit the comment.
201+
- Keep comments brief - short and simple, matching the comment density of the surrounding code.
202+
- Reuse existing helper functions and utilities instead of re-implementing their logic inline. When fixing a flawed pattern, fix every occurrence of it across the changed code, not only the instance that was pointed out.
203+
- 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.
204+
- 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.
205+
- 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.
206+
207+
### What this agent must never do
208+
209+
- Open issues, submit pull requests, post review comments, or send security reports autonomously. Every contribution must be reviewed and submitted by a human.
210+
- Add `Signed-off-by` tags to commits. Only the human contributor can certify the Developer Certificate of Origin.
211+
- Generate or submit security reports without independent human verification. Report verified vulnerabilities via [HackerOne](https://hackerone.com/nextcloud), not as GitHub issues.
212+
- Write PR descriptions, review comments, or issue reports on behalf of the contributor. These must be in the contributor's own words.
213+
- 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.
214+
- Submit code that has not been reviewed and cleaned up by the contributor. Dead code, redundant logic, excessive comments, malformed or garbled characters (e.g. `` replacement characters), and unrelated changes must be removed before submission.

0 commit comments

Comments
 (0)