Guidelines in using Generative AI

Generative AI tools are evolving rapidly, and their work can be helpful. As with using any tool, the resulting contribution is the responsibility of the contributor. We value good code, concise accurate documentation, and avoiding unneeded code churn. Discretion, good judgment, and critical thinking are the foundation of all good contributions, regardless of the tools used in their creation.

Considerations for success

Authors must review the work done by AI tooling in detail to ensure it actually makes sense before proposing it as a PR.

We expect PR authors to be able to explain their proposed changes in their own words.

Disclosure of the use of AI tools in the PR description is appreciated, while not required. Be prepared to explain how the tool was used and what changes it made.

Whether you are using Generative AI or not, keep the following principles in mind for the quality of your contribution:

  • Consider whether the change is necessary

  • Make minimal, focused changes

  • Follow existing coding style and patterns

  • Write tests that exercise the change

Acceptable uses

Some of the acceptable uses of generative AI include:

  • Assistance with writing comments, especially in a non-native language

  • Gaining understanding of existing code

  • Supplementing contributor knowledge for code, tests, and documentation

Unacceptable uses

Maintainers may close issues and PRs that are not useful or productive, regardless of whether AI was used or not.

If a contributor repeatedly opens unproductive issues or PRs, they may be blocked.

Sometimes AI assisted tools make failing unit tests pass by altering or bypassing the tests rather than addressing the underlying problem in the code. Such changes do not represent a real fix and are not acceptable.