Generative AI¶
Generative AI tools have evolved rapidly, and their suggested results 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.
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, including those that are fully generated by AI. If a contributor repeatedly opens unproductive issues or PRs, they may be blocked.
Considerations for success¶
While AI assisted tools such as autocompletion can enhance productivity, they sometimes rewrite entire code blocks instead of making small, focused edits. This can make it more difficult to review changes and to fully understand both the original intent of the code and the rationale behind the new modifications. Maintaining consistency with the original code helps preserve clarity, traceability, and meaningful reviews and also helps us avoid unnecessary code churn.
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. Authors must review the work done by AI tooling in detail to ensure it actually makes sense before proposing it as a PR.
Keep the following principles for the quality of your contributions in mind whether you use generative AI or not:
Consider whether the change is necessary
Make minimal, focused changes
Follow existing coding style and patterns
Write tests that exercise the change