From 9836f0760d4a053d9d1eba78171be89cb22dc850 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Fri, 25 Jul 2025 12:10:14 -0700 Subject: [PATCH] docs: add AI contribution guidelines (#2013) --- CONTRIBUTING.md | 21 +++++++++++++++++++-- README.md | 4 +++- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3fd7f1e9..11d015c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,23 @@ If your contribution is not straightforward, please first discuss the change you creating a new issue before making the change, or starting a discussion on [discord](https://discord.gg/pMCEU9hNEj). +## AI Generated Content + +We welcome high quality PRs, whether they are human generated or made with the assistance of AI +tools, but we ask that you follow these guidelines: + +- **Attribution**: Tell us about your use of AI tools, don't make us guess whether you're using it. +- **Review**: Make sure you review every line of AI generated content for correctness and relevance. +- **Quality**: AI-generated content should meet the same quality standards as human-written content. +- **Quantity**: Avoid submitting large amounts of AI generated content in a single PR. Remember that + quality is usually more important than quantity. +- **License**: Ensure that the AI-generated content is compatible with Ratatui's + [License](./LICENSE). + +> [!IMPORTANT] +> Remember that AI tools can assist in generating content, but you are responsible for the final +> quality and accuracy of the contributions and communicating about it. + ## Reporting issues Before reporting an issue on the [issue tracker](https://github.com/ratatui/ratatui/issues), @@ -61,7 +78,7 @@ to be installed when running rustfmt. You can install the nightly version of Rus rustup install nightly ``` -> [!IMPORTANT] +> [!IMPORTANT] > Do not modify formatting configuration (`rustfmt.toml`, `.clippy.toml`) without > prior discussion. These changes affect all contributors and should be carefully considered. @@ -165,7 +182,7 @@ If an area that you're making a change in is not tested, write tests to characte behavior before changing it. This helps ensure that we don't introduce bugs to existing software using Ratatui (and helps make it easy to migrate apps still using `tui-rs`). -> [!IMPORTANT] +> [!IMPORTANT] > Do not remove existing tests without clear justification. If tests need to be > modified due to API changes, explain why in your PR description. diff --git a/README.md b/README.md index 8fab6b4a..c2e380a5 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,8 @@ There is also a [Matrix](https://matrix.org/) bridge available at We rely on GitHub for [bugs][Report a bug] and [feature requests][Request a Feature]. Please make sure you read the [contributing](./CONTRIBUTING.md) guidelines before [creating a pull -request][Create a Pull Request]. +request][Create a Pull Request]. We accept AI generated code, but please read the [AI Contributions] +guidelines to ensure compliance. If you'd like to show your support, you can add the Ratatui badge to your project's README: @@ -152,6 +153,7 @@ This project is licensed under the [MIT License][License]. [Request a Feature]: https://github.com/ratatui/ratatui/issues/new?labels=enhancement&projects=&template=feature_request.md [Create a Pull Request]: https://github.com/ratatui/ratatui/compare [Contributing]: https://github.com/ratatui/ratatui/blob/main/CONTRIBUTING.md +[AI Contributions]: https://github.com/ratatui/ratatui/blob/main/CONTRIBUTING.md#ai-generated-content [Crate]: https://crates.io/crates/ratatui [tui-rs]: https://crates.io/crates/tui [Sponsors]: https://github.com/sponsors/ratatui