AI code fit enter open source? Check policy first
Open source projects get different rules for AI-assisted code. Check the policy before you write the patch, then disclose the source in the commit trailer.
Wetin you suppose do before you send AI-assisted code upstream
Open source projects don publish policies about AI-assisted code, and those policies no dey agree with each other. So make the habit simple: find the policy before you write the patch, and disclose am correctly when you send am. One rule dey under both. Never submit any line wey you no fit explain for review.
Correct patch still fit get closed if the project ban generated code, or if you hide where the code come from. The cost go rest on your name and remain there, because maintainer wey later discover the omission no get reason to trust the rest of your history. Make we explain some terms first, because the policies dey use dem. An LLM (large language model) na the model behind your coding agent. A PR (pull request) for GitHub na an MR (merge request) for GitLab, and everything below apply to both. The DCO (developer certificate of origin) na the sign-off line for the bottom of a commit message, and e turn out say na the centre of the whole argument.
Where open source policies on AI code don land
Projects don settle into four groups. Every example below get date, because these texts fit change.
Banned. Gentoo council vote on 14 April 2024 say e be "expressly forbidden to contribute to Gentoo any content that has been created with the assistance of Natural Language Processing artificial intelligence tools". NetBSD commit guidelines call output from an LLM "tainted code" wey "must not be committed without prior written approval by core". QEMU code provenance document, as of August 2026, still say project go "DECLINE any contributions which are believed to include or derive from AI generated content".
Analysis only. Most bans narrow pass the headline. QEMU document say the policy "does not apply to other uses of AI, such as researching APIs or algorithms, static analysis, or debugging, provided their output is not included in contributions". You fit use the agent read the code. You no fit ship wetin e write. Na this distinction most restrictive projects dey use, and na the one people dey miss.
Disclosure required. Fedora council approve policy on AI-assisted contributions for October 2025. E allow the tools and put responsibility for the person: contributor na the author, e fully accountable for the whole contribution, and e must disclose when significant part come from a tool without changes. Linux kernel add coding assistants page to its process documentation for December 2025, with a trailer to record the tool and a strict rule about who fit sign off.
Nothing written down. Na this still common pass. A preprint from May 2026 survey 1,000 popular GitHub repositories and find 118 wey get any written AI policy. Silence no mean permission. Ask for the issue tracker with one sentence before you write the patch, and the answer go become public record wey you fit point to later.
Why maintainers write these rules
The first reason na review load, and the calculation dey go one direction. An agent fit produce one plausible 400-line merge request for one minute. To review that request properly fit cost maintainer one whole afternoon, and most maintainers na volunteers. The cost to submit am don drop almost reach zero. The cost to review am no change at all.
curl dey show the far end of this curve. Daniel Stenberg report for middle of 2025 say roughly one-fifth of security reports wey dey enter through the project bug bounty na wetin e dey call AI slop: reports wey mention real functions and real code paths, describe attack wey fit happen, but contain nothing. The project end the bounty for early 2026 instead of continuing to fund the flood. Those ones na reports, no be patches, but na the same mechanism dey make maintainer open your PR already tired.
GNOME Calendar write the problem down as label. For June 2026, the project introduce "Probabilistically Automated" for merge requests wey show "major or total reliance on artificial 'intelligence' to generate code", and e name the symptom exactly: "usually accompanied by a lack of proper testing, and finalizing patches based on theoretical intended behavior rather than correctness of code". Read that last phrase twice. The code look like say e suppose work. Nobody check whether e really work.
The second reason na provenance, meaning where the code come from and under which license. QEMU state the conflict plainly: signing off mean say you "fully understand the copyright and license status of content" wey you contribute, and copyright status of model output never settle. Gentoo's council give the same reason, together with quality and ethics. You no need agree with the legal interpretation. But you must notice say na the maintainer get the decision to make, no be you.
How I fit find project AI policy?
Look for these places, for this order.
CONTRIBUTING.mdfor repository root, then.github/CONTRIBUTING.md, then anyDCOfile wey dey beside am.- Developer docs. QEMU keep im rule for
docs/devel/code-provenance.rst. Kernel keep im own forDocumentation/process/coding-assistants.rst. - Project website or wiki. Gentoo policy dey for council wiki page, and NetBSD own dey for commit guidelines.
- Issue tracker and mailing list archive. Policy fit don dey there for months before anybody write am into repository.
From inside checkout, one grep fit cover most of am:
grep -rniE '(llm|copilot|chatgpt|generative|ai-generated|ai-assisted)' CONTRIBUTING.md docs/ .github/ 2>/dev/null | head -20Then read the project own history, because the convention wey dem commit pass any summary of am:
git log --format='%(trailers:key=Assisted-by,valueonly)' | grep . | sort | uniq -c
git log --format='%(trailers:key=AI-used-for,valueonly)' | grep . | sort | uniq -cCount wey dey beside trailer value show the form wey this project actually dey use. Empty result mean say nobody don disclose for that form here, and that one sef na information. If project dey GitHub and this workflow new to you, how pull requests and forks dey work for GitHub explain the mechanics wey this section assume.
Disclose for commit trailer, no be comment
Trailer na a Key: value line wey dey for the last paragraph of commit message. Git already dey use this format for Signed-off-by: and Co-authored-by:, and tools dey parse am, so na this disclosure dey follow the code enter the tree.
net: release the buffer on the error path
The error path returned before releasing the buffer, so every failed
setup leaked one page.
Assisted-by: Claude:claude-3-opus coccinelle sparse
Signed-off-by: Your Real Name <you@example.com>The kernel document this format as Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2], and e clearly state the line limit: "AI agents MUST NOT add Signed-off-by tags. Only humans can legally certify the Developer Certificate of Origin (DCO)." Agent name go enter Assisted-by. Your name go enter Signed-off-by. No ever allow tool write the second one, and no ever make am create Co-authored-by address wey no belong to anybody.
Names dey differ, so copy the local one instead of creating your own. A patch wey dem post for QEMU list for May 2026 propose to relax that project ban for mechanical changes, tests, docs and bug fixes of twenty lines or less, recorded with trailer like AI-used-for: tests, docs. As of August 2026, na proposal for mailing list, and the committed document still reject generated content. One project change its position two times between 2023 and 2026. The next change no go wait for you, na why the method matter pass the list.
git commit -s --trailer "Assisted-by: Claude:claude-3-opus" -m "net: release the buffer on the error path"
git log -1 --format='%(trailers:key=Assisted-by,valueonly)'--trailer need Git 2.32 or newer. The second command suppose print the value back to you directly. Empty line mean say git no parse the trailer, almost always because blank line or ordinary sentence dey inside trailer block for the bottom of the message. For series wey you don write already, git rebase --signoff origin/main dey add sign-off to every commit, and git interpret-trailers --in-place --trailer "Assisted-by: Claude:claude-3-opus" msg.txt dey edit message file.
Two failure modes dey worth planning for. Squash merge dey rewrite commit message, so for project wey dey squash, repeat the disclosure for PR description where maintainer go read am. Review comment no be record, because dem fit edit comments and dem no dey enter git history.
Accuracy work for both sides. Assisted-by for commit wey you type by hand na noise, and e make your real disclosures lose value. If you leave am out for commit wey agent write, na that one go end the relationship.
Wetin Signed-off-by actually dey attest?
DCO na one short text, version 1.1, wey dem publish for developercertificate.org, and kernel, QEMU and many other projects dey use am. When you add Signed-off-by: Your Name <you@example.com>, you dey certify say you agree to am. Read wetin you dey certify, because many people dey sign am without ever reading am.
Clause (a) talk say the contribution "na me create am wholly or partly, and I get the right to submit am under the open source license wey dey indicated for the file". Clause (b) cover work wey dey based on earlier open source code wey you get right to pass on with modifications. Clause (c) cover code wey person wey certify the same thing hand over to you. Clause (d) talk say you understand say the contribution and the personal information for your sign-off na public, and dem go keep am indefinitely.
Notice wetin no dey inside. DCO never talk say na you type every character. E talk say you get the right to submit the code under this license. Na why generated code dey fit awkwardly here: the question no be who author am, na whether you fit account for where e come from. Most projects wey require sign-off also require real name, so pseudonym go fail the check. Add the line with git commit -s, wey reads user.name and user.email from your git config. When DCO bot fail your PR and name the commit wey no get the line, git rebase --signoff origin/main and force push to your branch go fix am.
Signing a commit no be the same thing as signing off
git commit -s dey add one line of text. git commit -S dey create cryptographic signature for the commit object with your GPG or SSH key. Dem answer different questions. The signature dey confirm say na the person wey hold that key create this commit, and nobody don change am since then. E no talk anything about where the code inside come from. So, signed commit wey get generated code wey dem no disclose still be signed, and e still break policy. Sign-off na claim about origin. The signature na claim about identity. Projects wey need both go ask for both.
Never submit code wey you no fit explain for review
Na this be the test, and e no really concern honesty. For every line: wetin this one dey do, and wetin go break without am? If either answer no dey, the patch never ready, because review comment dey come and your answer go be another round of generation. Reviewers fit notice. Na for that moment contributor go turn to cost. Ask the same question about the edges, empty input, failure path, and the second caller.
Run the thing. Build am, run the project test suite, and write reproducer for the bug wey you claim say you fix. Kernel documentation give the honest fallback with plain words: "If the fix could not be built or tested, or if no reproducer could be produced, say so explicitly: maintainers currently waste too much time analyzing unverified reports and untested fixes." Writing "I could not test this on real hardware" no cost you anything. If you imply say you test am, e go cost the project.
Answer review comments by yourself, with your own words and for your own time. Reply wey land thirty seconds after the comment and restate am for five paragraphs dey tell the maintainer exactly wetin happen. Keep the diff small too. Forty lines wey you understand completely get more value for project than four hundred line refactor wey you supervise. If your agent dey return more than wetin you ask, skill wey go hold am to the smallest change wey work na one way to keep the patch small enough for you to still defend every line.
Keep the agent instructions for inside the repo
The instructions wey you give your agent na part of your toolchain, so treat dem like code. File for the repository root, usually AGENTS.md, dey hold the build command, test command, commit message format, sign-off requirement, and style rules wey the project don already document. The file dey versioned and people fit review am, and e go remain the same tomorrow as e be today. If you type instructions again from memory for every session, each session go produce different patch, and you no go know which session produce the patch wey dem reject. How to write AGENTS.md wey both agent and human fit read cover the file itself.
One warning about other people's repositories. No make your first contribution be PR wey add agent instruction file to project wey you no maintain. E go look like say you dey try set the project's tooling policy from outside, and na quick way to make people associate your account with the thing wey maintainers don already tire of. Keep the file for your fork until person ask for am.
Where you run the agent matter for the same reason. Agent wey fit build the project and run the tests inside sandbox wey you control go give you patch wey you don actually verify. Na this one separate disclosing assistance from disclosing guess. How to run coding agent for your own VPS cover that setup, while the practical differences between Claude Code, Cursor, Codex and Copilot cover how the tools differ from day to day.
Method, after policy don change
- Find the policy wey dem talk about before you write anything: repository, developer docs, website, tracker.
- If policy no dey, ask for the issue with one sentence, and keep the answer.
- Disclose am for the format wey project dey use, for the commit trailer, and repeat am inside PR body if project dey squash commits.
- Sign off with your real name, knowing say that line na claim say you get right to submit the code.
- Review your own patch as if na stranger write am, because na stranger really write am.
Every project wey dem name for this page go don change by the time you read am. The five steps no dey change.
FAQ
I must tell dem say I use AI coding agent?
Check the project, because na local rule dey decide the answer. Fedora require disclosure when tool provide significant part of the contribution without changes. The Linux kernel dey ask for Assisted-by trailer. Gentoo and QEMU, as of August 2026, no want the contribution at all. If nothing dey written down, disclose am anyway inside commit trailer. Maintainer wey later find out go react to the omission, not to the tool, and that reaction go follow everything else wey you don send.
Which open source projects ban code wey AI generate?
As snapshot from August 2026: Gentoo since April 2024, NetBSD wey treat LLM output as tainted code wey need core approval, QEMU wey dey reject contributions derived from generated content, and some GNOME applications including Loupe and Calendar. Read each project own text instead of relying on this list, because e go become old. Notice the exemption wey most of dem share: using model to research API, run static analysis, or help you debug usually dey okay, as long as its output no dey inside the patch.
Wetin be the difference between Signed-off-by and signed commit?
Signed-off-by na plain text line wey git commit -s add. E certify developer certificate of origin, meaning say you get the right to submit this code under the project license. Signed commit, wey git commit -S make, na cryptographic signature over the commit object with your GPG or SSH key. E prove say the commit come from your key and nobody alter am. Origin and identity na separate claims, so signed commit still fit break AI policy.
I fit put the disclosure for pull request description instead of commit message?
Put am for commit message, because na that record dey enter git history and dey travel with the code go anybody wey clone the repository later. Person fit edit pull request description afterwards, and e dey live for hosting platform. Add am to PR body too when the project dey use squash merge, because squash dey rewrite your commit message and fit drop the trailer.
My pull request close because AI generate am. Wetin I go do now?
No argue the policy for the thread, because the person wey close am no write the rule alone, and thread no be where dem dey change am. Read the policy text, then decide whether you fit meet am. If project ban generated patches, clear bug report with reproducer and no patch still welcome, and e often be the more useful contribution. If you return with code, return with small change wey you fit defend line by line.