Skip to content

Commit ca320fd

Browse files
committed
Adopt Linux kernel policy on AI coding assistants
Document, in CONTRIBUTING.rst, that AI agents must never add their own Signed-off-by tag and that AI involvement must be disclosed with an Assisted-by trailer, mirroring the Linux kernel's coding-assistants.rst policy. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
1 parent dbcb2c0 commit ca320fd

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

‎.hunspell.en.dic‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,3 +1467,8 @@ setModuleResolution
14671467
superset
14681468
trimElemListForStopmod
14691469
uncached
1470+
ai
1471+
claude
1472+
kernel's
1473+
TOOL1
1474+
TOOL2

‎CONTRIBUTING.rst‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Start coding
102102
without your patch.
103103
* `Run the tests <running-the-tests_>`_ and `verify coverage <running-test-coverage_>`_.
104104
* `Sign-off your commits <developer-certificate-of-origin_>`_.
105+
* If you used `AI coding assistants <ai-coding-assistants_>`_, disclose it in
106+
your commit message.
105107
* Push your commits to GitHub and `create a pull request`_.
106108

107109
.. _committing as you go: https://afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes
@@ -314,6 +316,8 @@ Commit message conventions
314316
subject line alone says everything there is to say.
315317
* Reference an issue this commit resolves on its own line in the body,
316318
e.g. ``Fixes #645`` or ``Closes #572``.
319+
* Disclose `AI coding assistants <ai-coding-assistants_>`_ involvement, if
320+
any, with an ``Assisted-by:`` trailer.
317321
* `Sign-off your commits <developer-certificate-of-origin_>`_ with a
318322
``Signed-off-by:`` trailer, always as the last line of the commit
319323
message.
@@ -357,6 +361,33 @@ will fail. You will need to amend your commit::
357361

358362
.. _Developer Certificate of Origin (DCO): https://developercertificate.org/
359363

364+
.. _ai-coding-assistants:
365+
366+
AI coding assistants
367+
~~~~~~~~~~~~~~~~~~~~~
368+
369+
Modules follows the Linux kernel's approach to AI-assisted contributions. AI
370+
tools may help write a patch, but the human submitter remains fully
371+
responsible for it: reviewing all AI-generated code, ensuring it complies
372+
with the project's licensing requirements and `coding conventions
373+
<coding-conventions_>`_, and testing it thoroughly.
374+
375+
AI agents must not add ``Signed-off-by`` tags. Only a human can certify the
376+
`DCO <developer-certificate-of-origin_>`_, so the human submitter still adds
377+
their own ``Signed-off-by`` line as usual.
378+
379+
When AI tools are used, disclose their involvement with an ``Assisted-by``
380+
trailer at the end of the commit message::
381+
382+
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
383+
384+
``AGENT_NAME`` is the name of the AI tool or framework and ``MODEL_VERSION``
385+
is the specific model version used. ``[TOOL1] [TOOL2]`` are optional
386+
specialized analysis tools used alongside it (e.g. a linter); basic
387+
development tools (git, make, editors) should not be listed. For example::
388+
389+
Assisted-by: Claude:claude-sonnet-5
390+
360391
.. _commit-hooks:
361392

362393
Commit hooks

0 commit comments

Comments
 (0)