diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml index 9b6d4943..15f7dd3c 100644 --- a/.github/workflows/ai-policy.yml +++ b/.github/workflows/ai-policy.yml @@ -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" @@ -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)" diff --git a/AGENT_MD_SNIPPETS.md b/AGENT_MD_SNIPPETS.md index 4387edac..36e176bf 100644 --- a/AGENT_MD_SNIPPETS.md +++ b/AGENT_MD_SNIPPETS.md @@ -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. - 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. diff --git a/AI_POLICY.md b/AI_POLICY.md index 79350579..522dbf43 100644 --- a/AI_POLICY.md +++ b/AI_POLICY.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2f6d46f4..de36d09c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/workflow-templates/ai-policy.yml b/workflow-templates/ai-policy.yml index 9b6d4943..15f7dd3c 100644 --- a/workflow-templates/ai-policy.yml +++ b/workflow-templates/ai-policy.yml @@ -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" @@ -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)"