|
| 1 | +> [!IMPORTANT] |
| 2 | +> This project does not accept fully AI-generated pull requests. AI tools may be used assistively only. You must understand and take responsibility for every change you submit. |
| 3 | +> |
| 4 | +> Read and follow: |
| 5 | +> • [AGENTS.md](./AGENTS.md) |
| 6 | +> • [CONTRIBUTING.md](./CONTRIBUTING.md) |
| 7 | +> • [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) |
| 8 | +
|
| 9 | +# AI Usage Policy |
| 10 | + |
| 11 | +## Our Rule |
| 12 | + |
| 13 | +**All contributions must come from humans who understand and can take full responsibility for their code.** |
| 14 | + |
| 15 | +Large language models (LLMs) make mistakes and cannot be held accountable for their outputs. This is why we require human understanding and ownership of all submitted work. |
| 16 | + |
| 17 | +> [!WARNING] |
| 18 | +> Maintainers may close PRs that appear to be fully or largely AI-generated. |
| 19 | +
|
| 20 | +## Getting Help |
| 21 | + |
| 22 | +**We understand that asking questions can feel intimidating.** You might worry about looking inexperienced or bothering maintainers with "basic" questions. AI tools can feel like a safer and less judgmental first step. However, LLMs often provide incorrect or incomplete answers, and they may create a false sense of understanding. |
| 23 | + |
| 24 | +Before asking AI, we encourage you to talk to us in the [Discord #contribute-to-p5 channel](https://discord.gg/x7kU7k5HM3) or in the relevant issue thread. |
| 25 | + |
| 26 | +Please know: **there are no silly questions, and we genuinely want to help you.** You won't be judged for not knowing something. In fact, we are grateful for your questions as they help us improve our documentation and make the project more welcoming for everyone who comes after you. |
| 27 | + |
| 28 | +If you do end up using AI tools, we ask that you only do so **assistively** (like a reference or tutor) and not **generatively** (having the tool write code for you). |
| 29 | + |
| 30 | +## Guidelines for Using AI Tools |
| 31 | + |
| 32 | +1. **Understand fully:** You must be able to explain every line of code you submit |
| 33 | +2. **Test thoroughly:** Review and test all code before submission |
| 34 | +3. **Take responsibility:** You are accountable for bugs, issues, or problems with your contribution |
| 35 | +4. **Disclose usage:** Note which AI tools you used in your PR description |
| 36 | +5. **Follow guidelines:** Comply with all rules in [AGENTS.md](./AGENTS.md) and [CONTRIBUTING.md](./CONTRIBUTING.md) |
| 37 | + |
| 38 | +### Example disclosure |
| 39 | +> I used Claude to help debug a test failure. I reviewed the suggested fix, tested it locally, and verified it solves the issue without side effects. |
| 40 | +
|
| 41 | +> I used ChatGPT to help me understand an error message and suggest debugging steps. I implemented the fix myself after verifying it. |
| 42 | +
|
| 43 | +## What AI Tools Can Do |
| 44 | + |
| 45 | +✅ **Allowed (assistive use):** |
| 46 | +- Explain concepts or existing code |
| 47 | +- Suggest debugging approaches |
| 48 | +- Help you understand error messages |
| 49 | +- Run tests and analyze results |
| 50 | +- Review your code for potential issues |
| 51 | +- Guide you through the contribution process |
| 52 | + |
| 53 | +## What AI Tools Cannot Do |
| 54 | + |
| 55 | +❌ **Not allowed (generative use):** |
| 56 | +- Write entire PRs or large code blocks |
| 57 | +- Make implementation decisions for you |
| 58 | +- Submit code you don't understand |
| 59 | +- Generate documentation or comments without your review |
| 60 | +- Automate the submission of code changes |
| 61 | + |
| 62 | +## Why do we have this policy? |
| 63 | +AI-based coding assistants are increasingly enabled by default at every step of the contribution process, and new contributors are bound to encounter them and use them in good faith. |
| 64 | + |
| 65 | +While these tools can help newcomers navigate the codebase, they often generate well-meaning but unhelpful submissions. |
| 66 | + |
| 67 | +There are also ethical and legal considerations around authorship, licensing, and environmental impact. |
| 68 | + |
| 69 | +We believe that learning to code and contributing to open source are deeply human endeavors that requires curiosity, slowness, and community. |
| 70 | + |
| 71 | +## About AGENTS.md |
| 72 | + |
| 73 | +The [AGENTS.md](./AGENTS.md) file contains instructions for AI coding assistants to prompt them to act more like guides than code generators. When someone uses an assistant to contribute, the tool will be prompted to explain the code, point to our documentation, and suggest asking questions in the community channels, rather than writing code directly. |
| 74 | + |
| 75 | +Note that [AGENTS.md](./AGENTS.md) is intentionally structured so that large language models (LLMs) can better comply with the guidelines. This explains why certain sections may seem redundant, overly directive or repetitive. |
| 76 | + |
| 77 | +This is not a perfect solution. Agents may ignore it or be convinced to generate code anyway. However, this is our best effort to guide their behavior and encourage responsible use. |
| 78 | + |
| 79 | +We are continuously looking for ways to improve our approach and may have to change our policies as AI tools evolve. We welcome feedback and suggestions from the community. |
| 80 | + |
| 81 | +> [!NOTE] |
| 82 | +> Including this [AGENTS.md](./AGENTS.md) does not imply endorsement by p5.js, the p5.js contributors, or the Processing Foundation of any specific AI tool or service, or encourage their use. |
| 83 | +
|
| 84 | +## Questions? |
| 85 | + |
| 86 | +If you're unsure whether your use of AI tools complies with this policy, ask in the [Discord #contribute-to-p5 channel](https://discord.gg/x7kU7k5HM3) or in the relevant issue thread. We're here to help! |
| 87 | + |
| 88 | +## AI Disclosure |
| 89 | + |
| 90 | +This policy was created with the assistance of AI tools, including ChatGPT and Claude. It was thoroughly reviewed and edited by human contributors to ensure clarity and accuracy. |
0 commit comments