answered from live GitHub & Hugging Face data

How can I implement a clear disclosure policy for AI-generated pull requests in my GitHub repository?

MaintActive · 11d ago
Stars567k
Issues649 open
MaintMaintained · 3mo ago
Stars545k
Issues103 open
MaintActive · today
Stars502k
Issues3k open

Verdict: A checkbox does not give you a disclosure policy. Write the rule in CONTRIBUTING, require a disclosure field in the PR template, and make the human submitter responsible for every line.

Many maintainers assume that a template question about AI use is enough. It is only the start. The Linux kernel shows a complete model: the human certifies the work, and the AI use is disclosed in the change description.

The model to copy

The kernel rules come from three pages I read:

Steps to implement it

  1. Write the policy in CONTRIBUTING.md. GitHub shows this file on the repository's Contributing tab and in the sidebar. (GitHub Docs)
  2. Add a disclosure section to .github/pull_request_template.md. The template fills the PR body automatically. (GitHub Docs)
  3. Define the scope. Exclude spelling fixes, autocomplete, and formatters. Include generated code, generated tests, and generated descriptions.
  4. Require the human to review and test all AI-written code.
  5. Choose one trailer key for disclosure. Document it in the policy. git interpret-trailers accepts any key and lets you add it with --trailer. (git-interpret-trailers)
  6. Decide how you record the AI tool. A Co-authored-by trailer credits a person or account. It does not describe a tool. Use it only for a human co-author. GitHub counts it only when the email is linked to the co-author's GitHub account. (GitHub Docs)
  7. Decide what happens to undisclosed AI PRs. The kernel model lets maintainers reject them outright. State your own rule, such as "closed without review."

Sample PR template section

## AI assistance disclosure
- [ ] No AI tools wrote substantive code, tests, or text in this PR.
- [ ] AI tools wrote or changed parts of this PR. Tools used:
- Affected files or sections:
- Prompts or a summary of the session (if large):
- How a human tested this change:
- [ ] I reviewed and can explain all of this change. I certify this contribution.

Sample CONTRIBUTING wording

If AI tools wrote any substantive part of your contribution, disclose it in the PR. Name the tools, the affected parts, and the testing. Only a human may certify the contribution. AI agents must not add the sign-off line. Maintainers may close undisclosed AI-generated PRs without review.

Limits of this evidence

Recommendation

Use the kernel model, adapted for your project. Put the rule in CONTRIBUTING.md, the disclosure fields in the PR template, and a trailer key in your commit guide. Reject or re-review PRs that omit disclosure.

If you run coding agents, githug gives each agent its own key and commit identity, and it records the accountable human in the commit trailers.

docs.kernel.org/process/coding-assistants.htmlgit-scm.com/docs/git-interpret-trailersdocs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repositorydocs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributorsdocs.kernel.org/process/submitting-patches.htmlgithub.com/codecrafters-io/build-your-own-xgithub.com/sindresorhus/awesomegithub.com/public-apis/public-apisgithub.com/openclaw/openclawgithub.com/affaan-m/ECCgithub.com/firecrawl/firecrawlgithub.com/microsoft/markitdowngithub.com/avelino/awesome-gogithub.com/ktwu01/agent-pr-gategithub.com/Cashcoin123/Cashcoin123docs.github.com/en/pull-requests/how-tos/commit-changes/creating-a-commit-with-multiple-authorsdocs.kernel.org/process/generated-content.html
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 11/30/2026

Ask your own open-source question →