Proposal: Add an AI/LLM Contribution Policy to Django

I’d like to propose adding an AI/LLM contribution policy to Django’s .github directory, similar to what the attrs project recently introduced:

https://github.com/python-attrs/attrs/blob/main/.github/AI_POLICY.md

The policy was written by Hynek in response to a PR that listed Claude as a co-author. In his comment, he highlighted two key concerns: ongoing legal uncertainty around copyright status of LLM-generated code, and the human cost of reviewing large volumes of plausible-looking but low-quality AI-generated contributions.

The attrs policy does not try to police tool usage, but it sets clear boundaries:

  • every contribution must be backed by a human who unequivocally owns the copyright,

  • no LLM tools listed as co-authors,

  • full technical and legal responsibility remains with the submitting person.

I agree with this framing. We have never listed tools (e.g. formatters or linters) as co-authors, even when they generated 100% of a diff. Listing an LLM as co-author puts it on the same level as a person, while the responsibility for a commit must remain clearly and entirely human.

Given Django’s size, reputation, and the increasing volume of AI-assisted contributions, having an explicit policy could help set expectations early, reduce ambiguity for contributors, and protect both the project and its maintainers.

I’d be interested in hearing whether the Steering Council and the community think it makes sense to draft a similar document tailored to Django.

13 Likes

[personal opinions inbound]

I think our existing policy is pretty solid in terms of how LLM contributions should be treated and are considered.

I can see how the co-authored-by attribute is a bit heavy. However, it does provide useful information. I’d be interested in options that keep that information present in git.

Regarding copyright, I believe that’s largely going to be driven by the board and a lawyer.

4 Likes

I think co-authored-by is being abused by GenAI providers as advertisement and would welcome a policy that prevents it.

5 Likes

Thanks Tim, this makes sense.

I agree that Django already has a solid policy around AI-assisted contributions, and I’m not suggesting we lose transparency. I also see the value of having context available in git history.

My concern is specifically about authorship semantics. I’d personally keep co-authored-by for people who actually contributed and share responsibility for the code. If it’s useful to retain the information, it could live in the commit message instead: noting AI assistance (e.g. Claude) just like we might mention tools such as Ruff or Black that shaped parts of the diff.

Claude may be more advanced than traditional tooling, but it’s still a tool. The developer submitting the commit remains fully responsible, technically and legally, and I think authorship should reflect that clearly.

On the copyright side, I agree that this likely needs guidance from the Board and possibly legal counsel. My goal here is mostly to clarify boundaries early and keep responsibility unambiguous in the project history.

1 Like

Hey Paulo! I’m happy to see this discussion. I agree with improving the authorship semantics, but would rather see it coming from an angle of embracing agentic engineering like official instructions.md files perhaps or tooling around that. I think “full technical and legal responsibility” goes too far for a PR author and discourages potential contributors. Of course we want contributors to be responsible in spirit but what about mergers? Not to mention AI labs or end users of Django. Is that the current state of liability or would this introduce a change? Awesome convo :slightly_smiling_face:

Hi Sean, thank you for joining the discussion, I’m really glad it’s growing.

As I said elsewhere, regarding the sentence you quoted, I’m not proposing to copy the AI policy from the attrs project word by word. I shared it as inspiration and as a starting point for discussion. Any possible AI policy for Django would require proper discussion and careful adaptation to our context, from many points of view, including the legal one. However, it could still take inspiration from the document I shared.

I like your idea of approaching this from the angle of agentic engineering, maybe with official guidance or dedicated tooling. That could be a constructive way to frame the discussion, without making it sound like we are against these tools. How would you imagine this in practice?

Thanks again for your contribution.

1 Like

Ah thanks sorry I missed that! Yeah a few projects are already doing this in ways I think we could learn from. Melissa Weber Mendonça has a helpful compilation of how different projects are approaching this if it hasn’t been shared already.

As you may know several projects now ship AGENTS.md files that load contribution guidelines directly into AI tools before any code is generated (scikit-learn, xarray, SciPy). For Django this could encode the stuff we repeat in PR review.

On authorship, we already have the PR template disclosure — one thing LLVM does differently is an Assisted-by: commit trailer so the metadata lives in the git log itself, not just the PR description.

If you use AI-generated content, you currently cannot claim copyright on it in the US. When coding, if you fail to disclose/disclaim exactly which parts were not written by a human, you forfeit your copyright claim on the entire codebase.

This means copyright notices and even licenses that folks put on their vibe-coded GitHub repos are unenforceable. The AI-generated code, and possibly the whole project, becomes public domain.

Source: https://www.congress.gov/crs_external_products/LSB/PDF/LSB10922/LSB10922.8.pdf

Hi Sean, thanks again for the pointers.

I had a look at Melissa’s repository, and it is very interesting. It is helpful to see how different projects are approaching this.

Also, thank you for mentioning the LLVM example. The use of Assisted-by: looks interesting.

Regarding agents, just to make sure I understand correctly, are you suggesting that we add an AGENTS.md file for Django?

It is also true that we already have a disclosure checkbox in the PR template for AI assistance. However, that information lives only in the pull request discussion on GitHub. I’m not sure if it’s preserved in the Git commit history itself, or if it does exist in the Git repository outside GitHub.

Totally. Yeah there are many angles to consider regarding copyright, vetting contributors, etc. But for authorship semantics AGENTS.md on the tooling side, and the trailer convention (e.g. Assisted-by:) to get that disclosure into the actual git history alongside the code.

1 Like

I think that overstates what the Copyright Office report actually says.

The January 2025 report does not say that using AI means you cannot claim copyright, nor that failing to disclose AI portions automatically forfeits the entire work.

What it says is:

• Copyright requires human authorship.
• Purely AI-generated material without human creative contribution is not protected.
• Human-authored contributions remain protectable.
• When registering a work, applicants should disclaim non-human portions.

That’s very different from “the whole repo becomes public domain.” Mixed works can still have protected human-authored elements. AI use does not automatically invalidate copyright or licenses.

It’s a nuanced position, not a blanket forfeiture rule.

Check out parts 2 and 3 of the very same report for updates a year+ after the first was written.

8 Likes