diff options
author | Antonin Godard <antonin.godard@bootlin.com> | 2025-02-12 09:50:53 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-02-24 07:00:54 -0800 |
commit | 2b7619fe2b7728778809b2f258a9997ac8dce05d (patch) | |
tree | 2163cf9e7922454130bf739c79b62ecd1a87858c | |
parent | 59e04621c90e886e53b9717a26a45ec36536700d (diff) | |
download | poky-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.rst | 49 |
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 | |||
791 | requirement or standard for these so please check the documentation for the | 791 | requirement or standard for these so please check the documentation for the |
792 | layers you are contributing to. | 792 | layers you are contributing to. |
793 | 793 | ||
794 | Acceptance of AI Generated Code | ||
795 | =============================== | ||
796 | |||
797 | The Yocto Project and OpenEmbedded follow the guidance of the Linux Foundation | ||
798 | in regards to the use of generative AI tools. See: | ||
799 | https://www.linuxfoundation.org/legal/generative-ai. | ||
800 | |||
801 | All of the existing guidelines in this document are expected to be followed, | ||
802 | including in the :doc:`recipe-style-guide`, and contributing the changes with | ||
803 | additional requirements to the items in section | ||
804 | :ref:`contributor-guide/submit-changes:Implement and commit changes`. | ||
805 | |||
806 | All AI Generated Code must be labeled as such in the commit message, | ||
807 | prior to your ``Signed-off-by`` line. It is also strongly recommended, | ||
808 | that any patches or code within the commit also have a comment or other | ||
809 | indication that this code was AI generated. | ||
810 | |||
811 | For 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 | |||
819 | The ``Signed-off-by`` line must be written by you, and not the AI helper. | ||
820 | As a reminder, when contributing a change, your ``Signed-off-by`` line is | ||
821 | required and the stipulations in the `Developer's Statement of Origin | ||
822 | 1.1 <https://developercertificate.org/>`__ still apply. | ||
823 | |||
824 | Additionally, you must stipulate AI contributions conform to the Linux | ||
825 | Foundation 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. | ||