SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-10-21

AI Code: Wetin Open Source Policy Allow Before PR

Open source project rules no dey agree on AI-assisted code. Check the policy before PR, know DCO sign-off, and disclose the code source before review.

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 dey 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 12 October 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 how headline make am look. QEMU document say 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 be the working boundary inside most restrictive projects, 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 the responsibility for the person: contributor na the author, e fully accountable for the whole contribution, and e must disclose when significant part of am come from a tool without changes. Linux kernel add coding assistants page to im process documentation for January 2026, with a trailer for recording the tool and a strict rule about who fit sign off.

Nothing written down. This one still common pass. One 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

Pehin reason na review load, and the arithmetic dey go one way. An agent fit produce plausible 400 line merge request within one minute. To review that request properly fit cost maintainer one afternoon, and most maintainers na volunteers. The cost to submit am don fall almost reach zero. The cost to review am no change at all.

curl dey show the far end of that curve. For middle of 2025, Daniel Stenberg report say roughly one-fifth of the security reports wey dey enter through the project's bug bounty na wetin e call AI slop: reports wey mention real functions and real code paths, describe plausible attack, and 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 wey 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". As of 12 October 2026, the label itself cover "Major or total reliance on 'AI' / LLMs / stochastic parrots to generate code or bug reports", and e name the symptom exactly: "Usually accompanied by a lack of proper testing, and writing reports or finalizing patches based on plausibly sounding intended behavior rather than correctness of code". Read that last phrase two times. 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 the copyright status of model output dey unsettled. Gentoo's council give the same reason, together with quality and ethics. You no need agree with the legal reading. But you must notice say na maintainer get the decision to make, no be you.

How I fit find a project's AI policy?

Look for these places, in this order.

  • CONTRIBUTING.md for the repository root, then .github/CONTRIBUTING.md, then any DCO file wey dey next to am.
  • The developer docs. QEMU keep its rule for docs/devel/code-provenance.rst. The kernel keep its own for Documentation/process/coding-assistants.rst.
  • The project website or wiki. Gentoo's policy dey for the council's wiki page, and NetBSD's dey for the commit guidelines.
  • The issue tracker and the mailing list archive. Policy usually dey there for months before anybody write am into the repository.

From inside checkout, one grep cover most of am:

grep -rniE '(llm|copilot|chatgpt|generative|ai-generated|ai-assisted)' CONTRIBUTING.md docs/ .github/ 2>/dev/null | head -20

Then read the project's own history, because the convention wey dem commit get priority over 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 -c

A count next to trailer value dey tell you the form wey this project actually use. Empty result mean say nobody disclose with that form here, and that one too na information. If the project dey for GitHub and this workflow new to you, how pull requests and forks work for GitHub explain the mechanics wey this section assume.

Disclose for the commit trailer, no be for comment

Trailer na a Key: value line for the last paragraph of commit message. Git don already 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: LLM coccinelle sparse
Signed-off-by: Your Real Name <you@example.com>

The kernel document this format as Assisted-by: LLM [TOOL1] [TOOL2]. The optional tool names na specialized analysis tools like coccinelle, sparse, smatch or clang-tidy; dem no be git, gcc or your editor. For August 2026, the kernel remove the agent and model name wey the page previously ask for, because naming the model "provides free advertising to proprietary software companies while adding little or no useful information". The page still talk clearly about the limit of the line: "AI agents MUST NOT add Signed-off-by tags. Only humans can legally certify the Developer Certificate of Origin (DCO)." The disclosure continue with Assisted-by. Your name dey for Signed-off-by. Never allow tool write the second one, and never make am invent 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 to the QEMU list for May 2026 propose to relax that project ban for mechanical changes, tests, docs and bug fixes of twenty lines or less, with trailer like AI-used-for: tests, docs. As of 12 October 2026, dem never merge that patch. A September 2026 RFC from the same author propose wider rewrite wey still use the same trailer, and the committed document still reject generated content. One project change position twice 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: LLM" -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 git no parse the trailer. Most times, na 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 add sign-off to every commit, while git interpret-trailers --in-place --trailer "Assisted-by: LLM" msg.txt edit message file.

Two failure cases good make you plan for dem. Squash merge dey rewrite commit message, so for project wey dey squash, repeat the disclosure for the PR description where maintainer go read am. Review comment no be proper record, because dem fit edit comments and dem no dey enter git history.

Accuracy work both ways. Assisted-by for commit wey you type yourself na noise, and e make your real disclosures get less value. If you leave am out for commit wey agent write, na that one fit 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

Instructions wey you give your agent na part of your toolchain, so treat dem like code. File for repository root, usually AGENTS.md, dey hold build command, test command, commit message format, sign-off requirement, and style rules wey project don already document. Dem version dey tracked and people fit review dem, and dem go remain the same tomorrow as dem be today. If you dey type instructions again from memory for every session, each session fit 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. Conventions na only half of wetin agent dey miss for codebase wey you no write, and repository structure map wey you fit query give am the real call graph to work with. So the output go follow the code around am instead of looking like guess about the code.

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

  1. Find the policy wey dem talk about before you write anything: repository, developer docs, website, tracker.
  2. If policy no dey, ask for the issue with one sentence, and keep the answer.
  3. Disclose am for the format wey project dey use, for the commit trailer, and repeat am inside PR body if project dey squash commits.
  4. Sign off with your real name, knowing say that line na claim say you get right to submit the code.
  5. 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 need tell dem say I use AI coding agent?

Check the project, because na the project policy go decide am. Fedora require disclosure when significant part of the contribution come from tool without changes. The Linux kernel dey ask for an Assisted-by trailer. Gentoo and QEMU, as of 12 October 2026, no want the contribution at all. Where nothing dey written down, disclose am anyway for commit trailer. Maintainer wey discover am later go react to the omission, not the tool, and that reaction fit affect everything else wey you don send.

Which open source projects ban AI-generated code?

As snapshot wey dem check on 12 October 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 several GNOME applications including Loupe and Calendar. Read each project's own text instead of relying on this list, because e go become outdated. Note 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 the 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's license. Signed commit, wey you make with git commit -S, 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 go enter git history and travel with the code go anybody wey clone the repository later. You fit edit pull request description afterwards, and e dey live for hosting platform. Add am to PR body too when the project dey 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 follow am. Where project ban generated patches, clear bug report with reproducer and no patch still welcome, and e often be the more useful contribution. If you come back with code, come back with small change wey you fit defend line by line.

Dis article help you?

#open-source#contribution#llm-policy#disclosure#coding-agents