Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions docs/guides/ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,37 @@ open about the whole process is generally better!
**Always follow the policy of the project you are contributing to.** The
following are general guidelines.

**Credit AI in commits.** Follow the convention used by the Linux kernel and
add a trailer. Never allow the model to add itself as a co-author. The code is
still yours (and your responsibility); the AI is a tool, not an author or
copyright holder, which is what co-authored-by is for. An AI must never add a
`Signed-off-by:` line, because certifying the DCO is a legal act only a human
can perform.
**Credit AI in commits.** Follow the convention previously used by the Linux
kernel and add a trailer. Never allow the model to add itself as a co-author.
The code is still yours (and your responsibility); the AI is a tool, not an
author or copyright holder, which is what co-authored-by is for. An AI must
never add a `Signed-off-by:` line, because certifying the DCO is a legal act
only a human can perform.

:::{note} The Linux kernel trailer
:::{note} The old Linux kernel trailer

This is part of the kernel's official
This was part of the kernel's official
[coding assistants documentation][kernel-ai], and looks like this:

```text
Assisted-by: <harness>:<model>
```

You can usually customize your harness to include this, either in an agents
file (below), or via specific settings.
file (below), or via specific settings. The Linux kernel later simplified this
to `Assisted-by: LLM` (optional tool names allowed), then dropped the trailer
requirement entirely at the [2026 Maintainers Summit][kernel-ai-summit]; it now
asks contributors to describe tool use in the cover letter instead.

:::

:::{warning} Not a universal standard
:class: dropdown
Note that the trailer is not universal. Kubernetes, for example, forbids AI
trailers and wants disclosure in the PR description instead. Some projects do
not want to know when AI was used so they can't be singled out later.
not want to know when AI was used so contributors can't be singled out later.
Many projects now assume AI use is common and have no disclosure requirement
at all.
:::

**Write your own PR descriptions.** Generated PR summaries tend to be verbose,
Expand Down Expand Up @@ -107,9 +112,10 @@ and capacity. The tabs below sketch three levels you can adapt.
:::{tab-item} All in

AI-assisted contributions are welcome on the same footing as any other, as long
as they meet the project's quality bar and are disclosed. This is very similar
to the [Linux kernel][kernel-ai] policy. [CPython][cpython-ai] is close too,
but only appreciates disclosure instead of requiring it.
as they meet the project's quality bar and are disclosed. This is close to the
[Linux kernel][kernel-ai] policy, though the kernel now asks for disclosure in
the cover letter instead of a commit trailer. [CPython][cpython-ai] is close
too, but only appreciates disclosure instead of requiring it.

````markdown
# AI Policy
Expand All @@ -128,7 +134,7 @@ translation or grammar help is fine. Contributions that ignore this policy may
be closed.

Only humans can be named as co-authors, and AI can _never_ sign off on a
commit. The Linux kernel trailer can be used to credit AI assistance, like
commit. An `Assisted-by:` trailer can be used to credit AI assistance, like
this:

```text
Expand Down Expand Up @@ -165,7 +171,7 @@ your responsibility to make sure it does not.
Unsolicited, undisclosed, or low-effort AI PRs will be closed.

Only humans can be named as co-authors, and AI can _never_ sign off on a
commit. The Linux kernel trailer should be used to credit AI assistance, like
commit. An `Assisted-by:` trailer should be used to credit AI assistance, like
this:

```text
Expand Down Expand Up @@ -194,7 +200,7 @@ grammar help is fine. AI output may infringe copyright; it is your
responsibility to make sure it does not. Repeat violations may lead to a ban.

Only humans can be named as co-authors, and AI can _never_ sign off on a
commit. The Linux kernel trailer must be used to credit AI assistance, like
commit. An `Assisted-by:` trailer must be used to credit AI assistance, like
this:

```text
Expand Down Expand Up @@ -513,6 +519,7 @@ directly.
[fedora-ai]: https://docs.fedoraproject.org/en-US/council/policy/ai-policy/
[ghostty-ai]: https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md
[kernel-ai]: https://docs.kernel.org/process/coding-assistants.html
[kernel-ai-summit]: https://lwn.net/Articles/1099594/
[llvm-ai]: https://llvm.org/docs/AIToolPolicy.html
[numpy-ai]: https://numpy.org/devdocs/dev/ai_policy.html
[nvimtree-ai]: https://github.com/nvim-tree/nvim-tree.lua/blob/master/CONTRIBUTING.md#ai-usage-policy-highly-discouraged
Expand Down
Loading