diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 72be677e..a5de3a3a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,6 +6,7 @@ .github/dependabot.yml @IBM/cloudant-sdks .github/pull_request_template.md @IBM/cloudant-sdks .whitesource @IBM/cloudant-sdks +AI_CODE_POLICY.md @IBM/cloudant-sdks CODE_OF_CONDUCT.md @IBM/cloudant-sdks CONTRIBUTING.md @IBM/cloudant-sdks Jenkinsfile @IBM/cloudant-sdks diff --git a/AI_CODE_POLICY.md b/AI_CODE_POLICY.md new file mode 100644 index 00000000..58d83510 --- /dev/null +++ b/AI_CODE_POLICY.md @@ -0,0 +1,10 @@ +# Policy on submitting AI-generated code to IBM Open Source software projects (v.1.0) + +Although IBM does not generally prohibit AI-generated code (“AI Code”) from being contributed to IBM- maintained Open Source software projects (“IBM Projects”), any such contributions should comply with this policy (“Policy”). This Policy applies to contributions to IBM Projects made by IBMers and non-IBMers alike. + +AI Code can create potential copyright infringement issues for an IBM Project if it is substantially similar to code used to train the generative AI model (“Training Code”) that outputs the AI Code. As a result, IBM asks that contributors comply with the following guidance when deciding whether it is appropriate to submit a piece of AI Code to an IBM Project: + +1. Only use a generative AI tool (“AI Tool”) with functionality specifically designed to mitigate the risk of AI Code that is substantially similar to Training Code, either by trying to (a) filter AI Code that is substantially similar to Training Code or (b) identify AI Code that is substantially similar to the Training Code such that the contributor can identify and comply with the Training Code’s license, including its notice and attribution requirements. You must ensure the mitigation functionality is enabled during your use of the AI Tool. +2. Ensure that the terms and conditions of the generative AI tool (“AI Tool”) (a) allow its AI Code to be used for external Open Source development and (b) are consistent with submitting the AI Code under the IBM Project’s Developer Certificate of Origin (DCO) or Contributor License Agreement (CLA), including enabling it to be used by the IBM Project under its Open Source license. +3. Review and understand the terms of the DCO or CLA specific to the IBM Project and ensure that contribution of the AI Code complies with such terms or other applicable project guidance. If the AI Tool indicates the AI Code is substantially similar to Training Code, comply with the license requirements of the Training Code’s license (including notice and attribution terms) when contributing the AI Code to the IBM Project, and only submit if its license is compatible with the IBM Project license. +4. As a best practice, if your contribution to this project contains AI Code, indicate so with a pair of inline comment tags that note the beginning and end of the AI Code content that identify the AI Tool used (including version if applicable). For example, if you modified a file and your contribution contains AI Code, include a comment before the AI-generated content such as “// Begin modifications with assistance from AI Tool [X v.Y] ” paired with a comment after the content “// End modifications with assistance from AI Tool [X v.Y].” If you have substantially altered the file using an AI tool, we recommend adding a comment in the file header (“// this file has been modified with the assistance of AI Tool [X v.Y]”). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a83b20e..75d7bc9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,8 @@ are often inappropriate and we may need to make changes to the specification instead. Please, first [look at the list of files](.github/CODEOWNERS) that _should not_ be modified. +Before submitting your pull request, please ensure you've reviewed and adhere to our [AI policy](AI_CODE_POLICY.md). + # General Information For general guidance on contributing to this project, please see the [general guidance for contributing](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/CONTRIBUTING_python.md).