answered from live GitHub & Hugging Face data
How can I implement a clear disclosure policy for AI-generated pull requests in my GitHub repository?
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:
- Humans certify. "AI agents MUST NOT add Signed-off-by tags. Only humans can legally certify the Developer Certificate of Origin (DCO)." (AI Coding Assistants)
- Disclosure is required when the tool wrote a meaningful part. The kernel guidance applies when "a meaningful amount of content" was created by a tool. It also says: "If in doubt, choose transparency." (Tool-Generated Content)
- Disclosure has three parts. Name the tools. Say which portions they affected. Say how the change was tested. Include prompts for large generated changes. (Tool-Generated Content)
- Maintainers keep discretion. They may reject, review more closely, or ask for more testing. (Tool-Generated Content)
Steps to implement it
- Write the policy in
CONTRIBUTING.md. GitHub shows this file on the repository's Contributing tab and in the sidebar. (GitHub Docs) - Add a disclosure section to
.github/pull_request_template.md. The template fills the PR body automatically. (GitHub Docs) - Define the scope. Exclude spelling fixes, autocomplete, and formatters. Include generated code, generated tests, and generated descriptions.
- Require the human to review and test all AI-written code.
- Choose one trailer key for disclosure. Document it in the policy.
git interpret-trailersaccepts any key and lets you add it with--trailer. (git-interpret-trailers) - Decide how you record the AI tool. A
Co-authored-bytrailer 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) - 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
- I could not open the README or maintenance data for
ktwu01/agent-pr-gate, a community template for AI PR policies. The tool limit blocked it. The search result shows 7 stars, a CC0-1.0 license, and a push 45 days ago. I did not verify its contents. Read it before you copy it. - I found no large, popular repository with a documented AI disclosure policy in this search. The kernel is the strongest reference I checked.
- This is operational guidance, not legal advice. Check the DCO and copyright terms with your own counsel if you accept contributions under a license.
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.
- Choose a PR template only if you have few contributors and want a light process.
- Choose the full model if you get many outside PRs or need an audit trail.
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.