Skip to contentSkip to conversation

Add AI Code submissions policy to contributor guide

DISCUSSION Richard Purdie 1 participant 1 message Feb 7, 2025

lore
Share & tools
lore
#0 lore raw

The YP TSC received a request to document whether the project accepts AI written contributions. The Linux Foundation has some information on that and after some discussion with both the YP and OE TSCs, we have agreed to start with the text below. I'm hoping Antonin can help us update the contributors guide with it. We agreed there may need to be minor edits to get the tenses right (e.g. you vs contributor).

We're basically trying to take the LF text, extend it to say our normal submission process applies and that a human must write the signed off by line and review/send the submission. By doing that, they take responsibility that any copyright/license issues are handled. We've tried to keep everything minimal but copy pieces out the LF doc in case it changes later.

Cheers,

Richard (after discussion with both TSCs)

"""
This is based on the contents of:

https://docs.yoctoproject.org/contributor-guide/index.html

as well as the LF:

https://www.linuxfoundation.org/legal/generative-ai

4.10 Acceptance of AI Generated Code

The Yocto Project and OpenEmbedded follow the guidance of the Linux Foundation in regards to the use of generative AI tools.  See:
https://www.linuxfoundation.org/legal/generative-ai

All of the existing guidelines in this document are expected to be followed, including in the recipe style guide, and contributing the changes with additional requirements to the items in section 4.2.4.

All AI Generated Code must be labeled as such in the commit message, prior to your signed-off-by line.  It is also strongly recommended, that any patches or code within the commit also have a comment or other indication that this code was AI generated.

For example:

component: Add the ability to ....

AI-Generated: Uses GitHub Copilot

The signed-off-by line must be written by you, and not the AI helper. As a reminder, when contributing a change, your Signed-off-by line is required and the stipulations in the Developer's Statement of Origin 1.1 still apply.

Additionally, you must stipulate AI contributions conform to the Linux Foundation policy, specifically:

1. Contributors should ensure that the terms and conditions of
the generative AI tool do not place any contractual restrictions on how the tool’s output can be used that are inconsistent with the project’s open source software license, the project’s intellectual property policies, or the Open Source Definition.

2. If any pre-existing copyrighted materials (including pre-
existing open source code) authored or owned by third parties are included in the AI tool’s output, prior to contributing such output to the project, the Contributor should confirm that they have have permission from the third party owners–such as the form of an open source license or public domain declaration that complies with the project’s licensing policies–to use and modify such pre-existing materials and contribute them to the project. Additionally, the contributor should provide notice and attribution of such third party rights, along with information about the applicable license terms, with their contribution.
"""