summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2025-02-12 09:50:53 +0100
committerSteve Sakoman <steve@sakoman.com>2025-02-24 07:00:54 -0800
commit2b7619fe2b7728778809b2f258a9997ac8dce05d (patch)
tree2163cf9e7922454130bf739c79b62ecd1a87858c
parent59e04621c90e886e53b9717a26a45ec36536700d (diff)
downloadpoky-2b7619fe2b7728778809b2f258a9997ac8dce05d.tar.gz
contributor-guide/submit-changes: add policy on AI generated code
Based on message by Richard Purdie on the yocto-docs list: https://lists.yoctoproject.org/g/docs/message/6300 Re-formatted for the Yocto Project documentation syntax. (From yocto-docs rev: 50eae3ab433ada5c3863d880f11e2b2bcbd46b94) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit a72dd13e6841b621c9e8f904dfaa440c186d2959) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--documentation/contributor-guide/submit-changes.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/documentation/contributor-guide/submit-changes.rst b/documentation/contributor-guide/submit-changes.rst
index 31d7ffd865..da0668ebe9 100644
--- a/documentation/contributor-guide/submit-changes.rst
+++ b/documentation/contributor-guide/submit-changes.rst
@@ -791,3 +791,52 @@ Other layers may have similar testing branches but there is no formal
791requirement or standard for these so please check the documentation for the 791requirement or standard for these so please check the documentation for the
792layers you are contributing to. 792layers you are contributing to.
793 793
794Acceptance of AI Generated Code
795===============================
796
797The Yocto Project and OpenEmbedded follow the guidance of the Linux Foundation
798in regards to the use of generative AI tools. See:
799https://www.linuxfoundation.org/legal/generative-ai.
800
801All of the existing guidelines in this document are expected to be followed,
802including in the :doc:`recipe-style-guide`, and contributing the changes with
803additional requirements to the items in section
804:ref:`contributor-guide/submit-changes:Implement and commit changes`.
805
806All AI Generated Code must be labeled as such in the commit message,
807prior to your ``Signed-off-by`` line. It is also strongly recommended,
808that any patches or code within the commit also have a comment or other
809indication that this code was AI generated.
810
811For example, here is a properly formatted commit message::
812
813 component: Add the ability to ...
814
815 AI-Generated: Uses GitHub Copilot
816
817 Signed-off-by: Your Name <your.name@domain>
818
819The ``Signed-off-by`` line must be written by you, and not the AI helper.
820As a reminder, when contributing a change, your ``Signed-off-by`` line is
821required and the stipulations in the `Developer's Statement of Origin
8221.1 <https://developercertificate.org/>`__ still apply.
823
824Additionally, you must stipulate AI contributions conform to the Linux
825Foundation policy, specifically:
826
827#. Contributors should ensure that the terms and conditions of the generative AI
828 tool do not place any contractual restrictions on how the tool's output can
829 be used that are inconsistent with the project's open source software
830 license, the project's intellectual property policies, or the Open Source
831 Definition.
832
833#. If any pre-existing copyrighted materials (including pre-existing open
834 source code) authored or owned by third parties are included in the AI tool's
835 output, prior to contributing such output to the project, the Contributor
836 should confirm that they have permission from the third party
837 owners -- such as the form of an open source license or public domain
838 declaration that complies with the project's licensing policies -- to use and
839 modify such pre-existing materials and contribute them to the project.
840 Additionally, the contributor should provide notice and attribution of such
841 third party rights, along with information about the applicable license
842 terms, with their contribution.