All AI-generated code should be Open Source


This may be a hot take, but I strongly believe that all code generated by AI should be Open Source. And here’s why.

First of all, AI models were trained on a massive corpus of Open Source code written since RMS announced the GNU Project and the Free Software Movement. That code was simply scraped from the internet and used without permission or proper attribution. The models were also trained on Stack Overflow and Stack Exchange sister projects, which are released under Creative Commons licenses that legally require attribution. Turning this collective knowledge into proprietary, closed-source code feels like license laundering.

The second reason is legal: purely AI-generated code is not written by a human, meaning it should not be copyrightable. The foundation for this principle in the US goes back to the famous Monkey Selfie dispute, which established that non-humans cannot hold copyrights. A precedent later cited by the U.S. Copyright Office regarding AI. Following the same logic, Wikimedia Commons requires all purely AI-generated images to be tagged as Public Domain.

However, copyright laws differ across the globe. For instance, countries like the UK grant limited copyright protection to computer-generated works. To make things fair across all jurisdictions, and to honor the open ecosystem that made AI possible, developers and companies should explicitly release AI-generated code under Open Source licenses or dedicate it to the public domain using the Creative Commons Zero (CC0) license.

Of course, code is not always 100% manual or 100% automated. However, developers more and more rely on AI without even reviewing the generated output, let alone modifying it to fit their specific needs. Code like this, where humans put little effort, except writing prompts, should definitely be Open Source.

If you find this article interesting you may want to follow me on Twitter: @jcubic and on LinkedIn.



Source link