diff --git a/.hunspell.en.dic b/.hunspell.en.dic index aa1876c98..ecf59ef4f 100644 --- a/.hunspell.en.dic +++ b/.hunspell.en.dic @@ -1341,3 +1341,8 @@ HTTPS mirrorEnvVarChange PYTHONPATH pythonpath +ai +claude +kernel's +TOOL1 +TOOL2 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3ba16021d..f3e7a52b3 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -99,6 +99,8 @@ Start coding without your patch. * `Run the tests `_ and `verify coverage `_. * `Sign-off your commits `_. +* If you used `AI coding assistants `_, disclose it in + your commit message. * Push your commits to GitHub and `create a pull request`_. .. _committing as you go: https://afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes @@ -293,6 +295,33 @@ will fail. You will need to amend your commit:: .. _Developer Certificate of Origin (DCO): https://developercertificate.org/ +.. _ai-coding-assistants: + +AI coding assistants +~~~~~~~~~~~~~~~~~~~~~ + +Modules follows the Linux kernel's approach to AI-assisted contributions. AI +tools may help write a patch, but the human submitter remains fully +responsible for it: reviewing all AI-generated code, ensuring it complies +with the project's licensing requirements and `coding conventions +`_, and testing it thoroughly. + +AI agents must not add ``Signed-off-by`` tags. Only a human can certify the +`DCO `_, so the human submitter still adds +their own ``Signed-off-by`` line as usual. + +When AI tools are used, disclose their involvement with an ``Assisted-by`` +trailer at the end of the commit message:: + + Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2] + +``AGENT_NAME`` is the name of the AI tool or framework and ``MODEL_VERSION`` +is the specific model version used. ``[TOOL1] [TOOL2]`` are optional +specialized analysis tools used alongside it (e.g. a linter); basic +development tools (git, make, editors) should not be listed. For example:: + + Assisted-by: Claude:claude-sonnet-5 + .. _commit-hooks: Commit hooks