From 21c14313d645af8006c41a93153f951b819a6bfc Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 18 Mar 2026 05:50:15 +0000 Subject: [PATCH] contributing: document AI-assisted contribution guidelines Add an "AI-assisted contributions" section to CONTRIBUTING.md describing the Assisted-by tag format for commits that involve AI coding assistants, following the Linux kernel guidance at docs.kernel.org/process/coding-assistants.html. Also add concise instructions to GEMINI.md (symlinked to CLAUDE.md) so that AI agents use the Assisted-by tag instead of free-form attribution lines. Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Adrian Reber --- CONTRIBUTING.md | 32 ++++++++++++++++++++++++++++++++ GEMINI.md | 11 +++++++++++ 2 files changed, 43 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 03875639d..a52484f7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -304,6 +304,38 @@ Signed-off-by: Random J Developer Patch body here ``` +## AI-assisted contributions + +Use this tag when AI tools meaningfully contribute to the code, +design, or commit message. Trivial use (e.g. basic autocomplete) +does not require attribution. Following the +[Linux kernel guidance on coding assistants](https://docs.kernel.org/process/coding-assistants.html), +the tag format is: + +``` +Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2] +``` + +Where `AGENT_NAME` identifies the AI tool or framework, `MODEL_VERSION` +specifies which model was used, and the optional `[TOOL1] [TOOL2]` +fields list any specialized analysis tools (e.g. coccinelle, sparse, +smatch, clang-tidy) that were used alongside the AI assistant. Basic +development tools (git, gcc, make, editors) should not be listed. + +For example: + +``` +Assisted-by: Claude:claude-3-opus coccinelle sparse +``` + +The `Assisted-by` tag should be placed after the commit message body +and before the `Signed-off-by` line. + +Note that AI agents should not add `Signed-off-by` tags. Only human +developers can certify the Developer's Certificate of Origin. The +submitter is responsible for reviewing all AI-generated code and +ensuring its correctness and license compliance. + ## Submit your work upstream We accept GitHub pull requests and this is the preferred way to contribute to CRIU. diff --git a/GEMINI.md b/GEMINI.md index e56c1de12..ac0a009b0 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -134,3 +134,14 @@ Each ZDTM test has three stages: preparation, C/R, and results checks. During the test, a process calls `test_daemon()` to signal it is ready for C/R, then calls `test_waitsig()` to wait for the C/R stage to complete. After being restored, the test checks that all its resources are still in a valid state. + +## AI-assisted contributions + +Add an `Assisted-by` tag to each commit message, placed after the +commit message body and before the `Signed-off-by` line: + +``` +Assisted-by: AGENT_NAME:MODEL_VERSION +``` + +Do not add `Signed-off-by` tags on behalf of the user.