How to be an Open Source Hero: Contributing AI-Generated Code with Care
Responsible AI Practices for Trustworthy Collaboration
AI coding tools are now part of everyday development. They help contributors explore new codebases, draft solutions quickly, and learn unfamiliar patterns. For people opening pull requests as contributors, that makes it easier than ever to participate. For maintainers, it often means more work reviewing code that may not always be complete or reliable.
The question is not whether AI belongs in open source, it’s already there. The real question is how to use it responsibly so that your contributions add value rather than create extra work.
If You’re Contributing with AI
The key to contributing responsibly is transparency. Maintainers do not need you to hide your tools, they need to understand your process.
Always disclose what you used: Put it directly in your pull request description. Be specific: “Used Claude Code to generate the initial algorithm, wrote tests manually.” If you used AI for comments or documentation, say that too. Honesty sets the right expectations and builds trust.
Show your process: Sharing your chat history can be surprisingly useful. Export your conversation from Cursor or Claude Code and link it in your PR. Tools like SpecStory make this simple by automatically saving your full session. Maintainers can then see how you arrived at your solution, which makes reviews faster and also helps others learn from your approach.
Check the quality yourself: AI is not a substitute for your judgment. Review every line, write and test the edge cases. If something feels unclear, ask your assistant to explain it until you understand. Use that review as a chance to learn and strengthen your own reasoning. If you still cannot explain the code in your own words, it is not ready to submit. This is what separates helpful contributions from noise.
Here is a simple way to phrase disclosure in your PR:
Minimal: “Claude Code assisted with this implementation.”
Better: “Used ChatGPT to understand the codebase, implemented the solution manually.”
Best: “Cursor suggested this approach (see linked chat history saved in SpecStory), and I modified it significantly to fit our use case.”
If You’re a Maintainer
Maintainers need to guide contributors clearly. Otherwise, every review risks turning into a guessing game about where the code came from.
Set expectations up front: Add an AI section to your
CONTRIBUTING.md
. Explain that disclosure is required and why it matters. Point to examples of what good AI-assisted contributions look like. Mitchell Hashimoto’s Ghostty project is a good model: it requires disclosure and treats it as a normal part of collaboration.Review with care: Watch for telltale signs of low-effort AI code through inconsistent styles, over-complicated functions, or generic comments. When in doubt, ask for clarification. It is perfectly acceptable to reject contributions that add more burden than value. Remember, you are building for people, not training a model.
Build community norms: The healthiest projects treat disclosure as routine, not shameful. Encourage contributors to share how they used AI, celebrate high-quality examples, and make sure newer developers learn what responsible usage looks like.
A Practical Guide to Disclosure
Not every use of AI requires disclosure. Simple autocomplete, syntax fixes, or variable name suggestions are part of everyday tooling. What does require disclosure is any substantial code generation, help with debugging, documentation, or architectural decisions. If AI shaped the contribution in a meaningful way, let others know.
Making It Work for Everyone
For contributors, treat AI like a junior developer. Let it propose ideas, but supervise carefully. Learn from what it suggests and build your own skills alongside it. Remember that on the other side of your pull request is a human maintainer with limited time.
For projects, AI-assisted contributions can become opportunities for growth. Share prompting strategies that work well. Build lightweight project guides so AI tools have the right context. And when a contributor does it right, highlight their PR as a positive example.
The Path Forward
AI is not replacing open source contributors. It is giving them new ways to participate. The challenge is making sure that speed does not come at the cost of quality. Sustainable collaboration depends on transparency, respect, and careful review.
Tools like SpecStory help by preserving not just the code, but the reasoning behind it. That context makes contributions easier to review, easier to learn from, and easier to trust.
The principle is simple: use AI as an assistant, not as a shortcut. Be clear about when and how you used it, check the quality yourself, and always remember there are people on the other side of your pull request.
That way you are not just making a contribution but you are helping projects thrive, and that is how you become the hero of the projects you care about.