Re: [PATCH 4/4] agents: add legal requirements and agent attribution guidelines

Laurent Pinchart
2025-08-05T23:12:06Z

On Tue, Aug 05, 2025 at 03:08:45PM -0700, Jeff Johnson wrote:
> On 7/27/2025 12:58 PM, Sasha Levin wrote:
> > And below is the first test of this scheme:
> >
> > Co-developed-by: Claude claude-opus-4-20250514
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> > ---
> > Documentation/agents/index.rst | 3 ++-
> > Documentation/agents/legal.rst | 42 ++++++++++++++++++++++++++++++++++
> > Documentation/agents/main.rst | 5 ++++
> > 3 files changed, 49 insertions(+), 1 deletion(-)
> > create mode 100644 Documentation/agents/legal.rst
> >
> > diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst
> > index 354af3f025e5..982602db3349 100644
> > --- a/Documentation/agents/index.rst
> > +++ b/Documentation/agents/index.rst
> > @@ -9,4 +9,5 @@ Agents
> >
> > main
> > core
> > - coding-style
> > \ No newline at end of file
> > + coding-style
> > + legal
> > \ No newline at end of file
> > diff --git a/Documentation/agents/legal.rst b/Documentation/agents/legal.rst
> > new file mode 100644
> > index 000000000000..67e6b2cdff9d
> > --- /dev/null
> > +++ b/Documentation/agents/legal.rst
> > @@ -0,0 +1,42 @@
> > +.. SPDX-License-Identifier: GPL-2.0
> > +
> > +===============================
> > +Legal Requirements for Agents
> > +===============================
> > +
> > +This document outlines critical legal requirements that coding agents must follow when working with the Linux kernel codebase.
> > +
> > +Licensing Requirements
> > +----------------------
> > +
> > +**GPL-2.0 License**
> > + The Linux kernel is licensed under GPL-2.0 only with a syscall exception. Coding agents MUST follow this licensing rule with no exceptions. Any code contributed must be compatible with this license.
> > +
> > +**SPDX License Identifiers**
> > + All files must have proper SPDX license identifiers. For most kernel source files, this should be the first line of the file in the appropriate comment format:
> > +
> > + - For C source/header files: ``// SPDX-License-Identifier: GPL-2.0``
> > + - For scripts: ``# SPDX-License-Identifier: GPL-2.0``
> > + - For documentation: ``.. SPDX-License-Identifier: GPL-2.0``
>
> I believe the agent has not processed the following correctly:
> https://www.kernel.org/doc/html/latest/process/license-rules.html
>
> 1) C header files use /* SPDX-License-Identifier: <expression> */
> 2) Contributions need not be GPL-2.0, "individual files can be provided under
> a dual license, e.g. one of the compatible GPL variants and alternatively
> under a permissive license like BSD, MIT etc."
>
> These two issues jumped out at me...

And the text isn't properly wrapped. Also, compiling the series, I get

----------------------------------------
Documentation/agents/main.rst:3: WARNING: Title overline too short.

=====================================
Linux Kernel Development Agent Instructions
=====================================

[...]

Documentation/agents/index.rst: WARNING: document isn't included in any toctree [toc.not_included]
----------------------------------------

<irony>

Sasha, please make sure you read the kernel documentation before
submitting patches. We understand there's a learning curve, but we
expect contributors to perform due diligence to avoid wasting the time
of reviewers. I would have expected a human developer submitting patches
generated by LLMs to have proof-read the patches, compiled them, and
fixed those issues.

</irony>

--
Regards,

Laurent Pinchart