Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ai-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ jobs:
# shellcheck disable=SC2016
echo 'AGENT_NAMES=GitHub Copilot|Claude( [A-Za-z0-9. -]+)?|Devin( AI)?|aider( \(.*\))?|OpenAI Codex|Cursor( AI)?|Windsurf|Amazon Q|CodeWhisperer|Gemini Code Assist|OpenHands|SWE-agent|AutoCodeRover|Tabnine' >> "$GITHUB_ENV"

- name: Check for AI-assistant / Assisted-by trailers
- name: Check for AI-assistant / AI-Assisted-By trailers
id: ai_trailers
run: |
set -euo pipefail
AI_ASSISTED=false
if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then
if grep -qiE '^(AI-assistant|AI-Assisted-By):' /tmp/pr_commits.txt; then
AI_ASSISTED=true
echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):"
grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt
echo "Found AI-assistant/AI-Assisted-By trailer(s):"
grep -iE '^(AI-assistant|AI-Assisted-By):' /tmp/pr_commits.txt
fi
echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"

Expand Down Expand Up @@ -167,9 +167,9 @@ jobs:
echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)"
echo "and must only be attested by a human contributor."
echo "Please amend the affected commit(s) to remove the coding-agent sign-off"
echo "and replace it with an 'Assisted-by' trailer, for example:"
echo "and replace it with an 'AI-Assisted-By' trailer, for example:"
echo ""
echo " Assisted-by: Claude Code:claude-sonnet-4-6"
echo " AI-Assisted-By: Claude Opus 4.5 (medium)"
echo ""
echo "References:"
echo " • AGENTS.md (this repository)"
Expand Down
2 changes: 1 addition & 1 deletion AGENT_MD_SNIPPETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ All contributions generated or assisted by this agent must fully comply with:

### What this agent must always do

- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to every commit containing AI-assisted content.
- Add an `AI-Assisted-By: MODEL (REASONING_EFFORT)` git trailer to every commit containing AI-assisted content, for example `AI-Assisted-By: Claude Opus 4.5 (medium)`. Ask the contributor for the reasoning effort if you do not know it. Do not add your own agent name unless the contributor asks for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the policy is also interested in the harness used, but I agree that it's confusing that we're saying AGENT_NAME when we mean HARNESS_NAME

Suggested change
- Add an `AI-Assisted-By: MODEL (REASONING_EFFORT)` git trailer to every commit containing AI-assisted content, for example `AI-Assisted-By: Claude Opus 4.5 (medium)`. Ask the contributor for the reasoning effort if you do not know it. Do not add your own agent name unless the contributor asks for it.
- Add an `AI-Assisted-By: HARNESS:MODEL (REASONING_EFFORT)` git trailer to every commit containing AI-assisted content, for example `AI-Assisted-By: Claude code:Claude Opus 4.5 (medium)`. Ask the contributor for the reasoning effort if you do not know it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my own interpretation, I might be wrong the maintainers can correct me on it

- Ensure every pull request includes a disclosure of AI tool use in the PR description.
- Produce focused, scoped pull requests that address exactly one concern. Do not touch unrelated files or introduce incidental refactors.
- Verify all dependencies against actual package registries before suggesting them. Do not use hallucinated or unverified package names.
Expand Down
14 changes: 7 additions & 7 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ This policy complements the existing [Contribution Guidelines](CONTRIBUTING.md).

Every pull request containing AI-assisted code, documentation, or tests must declare this in the PR description. PRs found to have undisclosed AI use might be closed.

For full traceability at the commit level, each commit containing AI-assisted content must include an `Assisted-by:` git trailer:
For full traceability at the commit level, each commit containing AI-assisted content must include an `AI-Assisted-By:` git trailer:

```
Assisted-by: AGENT_NAME:MODEL_VERSION
AI-Assisted-By: MODEL (REASONING_EFFORT)
```

The agent name and model version identify the AI tool. Basic development tools such as git, compilers, editors, and static analyzers are not listed - these are standard parts of any development workflow regardless of AI involvement.
Name the model and, if the tool lets you choose one, the reasoning effort. The agent or editor integration that ran the model does not need to be named. Tools without AI that generated or changed code, such as code generators or codemods, can be named with `Assisted-by:`. Commits made before this change may use `Assisted-by:` for AI tools and don't need to be rewritten. Basic development tools such as git, compilers, editors, and static analyzers are not listed - these are standard parts of any development workflow regardless of AI involvement.

The PR description disclosure explains how AI was used; the commit trailer ensures that provenance is permanently recorded in version history and available to future contributors, auditors, and tooling.

Examples:

```
Assisted-by: Devstral:devstral-small-2507
Assisted-by: ClaudeCode:claude-sonnet-4-6
Assisted-by: Qwen:qwen3-coder-32b
Assisted-by: Copilot:gpt-4o
AI-Assisted-By: Devstral Small 1.1
AI-Assisted-By: Claude Opus 4.5 (medium)
AI-Assisted-By: Qwen3-Coder-30B-A3B-Instruct
AI-Assisted-By: GPT-4o
```

### Author Accountability
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please read the [Developer Manuals][devmanual] to learn how to create your first

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.

* **Disclosure:** Declare AI tool use in the PR description and add an `Assisted-by: AGENT_NAME:MODEL_VERSION` git trailer to each affected commit.
* **Disclosure:** Declare AI tool use in the PR description and add an `AI-Assisted-By: MODEL (REASONING_EFFORT)` git trailer to each affected commit, for example `AI-Assisted-By: Claude Opus 4.5 (medium)`. The agent does not need to be named.

* **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.

Expand Down
12 changes: 6 additions & 6 deletions workflow-templates/ai-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ jobs:
# shellcheck disable=SC2016
echo 'AGENT_NAMES=GitHub Copilot|Claude( [A-Za-z0-9. -]+)?|Devin( AI)?|aider( \(.*\))?|OpenAI Codex|Cursor( AI)?|Windsurf|Amazon Q|CodeWhisperer|Gemini Code Assist|OpenHands|SWE-agent|AutoCodeRover|Tabnine' >> "$GITHUB_ENV"

- name: Check for AI-assistant / Assisted-by trailers
- name: Check for AI-assistant / AI-Assisted-By trailers
id: ai_trailers
run: |
set -euo pipefail
AI_ASSISTED=false
if grep -qiE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt; then
if grep -qiE '^(AI-assistant|AI-Assisted-By):' /tmp/pr_commits.txt; then
AI_ASSISTED=true
echo "Found AI-assistant/Assisted-by/AI-Assisted-By trailer(s):"
grep -iE '^(AI-assistant|Assisted-by|AI-Assisted-By):' /tmp/pr_commits.txt
echo "Found AI-assistant/AI-Assisted-By trailer(s):"
grep -iE '^(AI-assistant|AI-Assisted-By):' /tmp/pr_commits.txt
fi
echo "ai_assisted=${AI_ASSISTED}" >> "$GITHUB_OUTPUT"

Expand Down Expand Up @@ -167,9 +167,9 @@ jobs:
echo "The 'Signed-off-by' trailer represents the Developer Certificate of Origin (DCO)"
echo "and must only be attested by a human contributor."
echo "Please amend the affected commit(s) to remove the coding-agent sign-off"
echo "and replace it with an 'Assisted-by' trailer, for example:"
echo "and replace it with an 'AI-Assisted-By' trailer, for example:"
echo ""
echo " Assisted-by: Claude Code:claude-sonnet-4-6"
echo " AI-Assisted-By: Claude Opus 4.5 (medium)"
echo ""
echo "References:"
echo " • AGENTS.md (this repository)"
Expand Down