From nobody Mon Oct 6 01:22:05 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE9B622ACE3; Sun, 27 Jul 2025 19:58:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646299; cv=none; b=AEcc2LQRJHnshXt+VnlV4GiyR8kytcVyTdu3OOzSqjpRKyMG1/qfv8ZnTrluwz5ZuUgSJ+qbwPaqh6otb72traVEhC/1o+cC29au7trd/Fv44wa75Nwrml5rvXAIgI4AK2nPlrWLz+NyZiGNUw8JpyUqfiZXpika3rDpryUjOL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646299; c=relaxed/simple; bh=MQriHyB3xdTvzzCtjBZYzfIZZsUp6BJ53BqMl3Lm9eA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Lp41iGsppBeEgwHwPl3fIS9cGqO8giajjYtj3smx1IMofQSi413qkyQZ8SFKPLEEt14ZFeZCFzIUk8XQYOgnxm8O2ivm4DnICnw9t1HUb+GL60NMIJB3+HK3vajak/WVE9P2YrlmcE0kN4Q29Bk08CJTUquRnegPjvC5nHxS6zU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UnX8h4wt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UnX8h4wt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1BBDC4CEF8; Sun, 27 Jul 2025 19:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753646299; bh=MQriHyB3xdTvzzCtjBZYzfIZZsUp6BJ53BqMl3Lm9eA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UnX8h4wtYpvBh5aknZlvRKuTaaF8EroKcnMaINaB64nbDb6jRzDFq7z8bfl7zyH1H 0sziZwhkHJFJ38knsHHAGWC3ImazJFClbW5/kz6jAUusSnUMK4w+8ZHj0+Xj2vLS8S HNxpdoT0srL7xDVv/Jax053nov96X0oF5nTFNyzipcPCHvextCUZYUSuwRIsjdXol1 5Xji1Zz/rv8WnHLm7yXjunup/Zpnxs7prgD/8y4yb8Rx7lQ2wDxrPrM1X4LMVT4gos EeuB58X1lxnHcaZQKDQuOKe/n2jx/1ELwLGQvjedhKsBpOC5Ci5kkgEb5qsWm/Ec1/ JRxGBpX1hhQ6g== From: Sasha Levin To: corbet@lwn.net, linux-doc@vger.kernel.org, workflows@vger.kernel.org Cc: sashal@kernel.org, josh@joshtriplett.org, kees@kernel.org, konstantin@linuxfoundation.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: [PATCH 1/4] agents: add unified agent coding assistant configuration Date: Sun, 27 Jul 2025 15:57:59 -0400 Message-Id: <20250727195802.2222764-2-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250727195802.2222764-1-sashal@kernel.org> References: <20250727195802.2222764-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Create a single source of truth for agent instructions in Documentation/AI/main.md with symlinks for all major coding agents: - CLAUDE.md (Claude Code) - .github/copilot-instructions.md (GitHub Copilot) - .cursorrules (Cursor) - .codeium/instructions.md (Codeium) - .continue/context.md (Continue) - .windsurfrules (Windsurf) - .aider.conf.yml (Aider) Signed-off-by: Sasha Levin --- .aider.conf.yml | 1 + .codeium/instructions.md | 1 + .continue/context.md | 1 + .cursorrules | 1 + .github/copilot-instructions.md | 1 + .windsurfrules | 1 + CLAUDE.md | 1 + Documentation/agents/index.rst | 10 ++++++++++ Documentation/agents/main.rst | 7 +++++++ 9 files changed, 24 insertions(+) create mode 120000 .aider.conf.yml create mode 120000 .codeium/instructions.md create mode 120000 .continue/context.md create mode 120000 .cursorrules create mode 120000 .github/copilot-instructions.md create mode 120000 .windsurfrules create mode 120000 CLAUDE.md create mode 100644 Documentation/agents/index.rst create mode 100644 Documentation/agents/main.rst diff --git a/.aider.conf.yml b/.aider.conf.yml new file mode 120000 index 000000000000..a5120c4e5d0a --- /dev/null +++ b/.aider.conf.yml @@ -0,0 +1 @@ +Documentation/agents/main.rst \ No newline at end of file diff --git a/.codeium/instructions.md b/.codeium/instructions.md new file mode 120000 index 000000000000..aa9a2063afbd --- /dev/null +++ b/.codeium/instructions.md @@ -0,0 +1 @@ +../Documentation/agents/main.rst \ No newline at end of file diff --git a/.continue/context.md b/.continue/context.md new file mode 120000 index 000000000000..aa9a2063afbd --- /dev/null +++ b/.continue/context.md @@ -0,0 +1 @@ +../Documentation/agents/main.rst \ No newline at end of file diff --git a/.cursorrules b/.cursorrules new file mode 120000 index 000000000000..a5120c4e5d0a --- /dev/null +++ b/.cursorrules @@ -0,0 +1 @@ +Documentation/agents/main.rst \ No newline at end of file diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions= .md new file mode 120000 index 000000000000..aa9a2063afbd --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +../Documentation/agents/main.rst \ No newline at end of file diff --git a/.windsurfrules b/.windsurfrules new file mode 120000 index 000000000000..a5120c4e5d0a --- /dev/null +++ b/.windsurfrules @@ -0,0 +1 @@ +Documentation/agents/main.rst \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 000000000000..a5120c4e5d0a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +Documentation/agents/main.rst \ No newline at end of file diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst new file mode 100644 index 000000000000..109266ca91ec --- /dev/null +++ b/Documentation/agents/index.rst @@ -0,0 +1,10 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D +Agents +=3D=3D=3D=3D=3D=3D + +.. toctree:: + :maxdepth: 1 + + main \ No newline at end of file diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst new file mode 100644 index 000000000000..98aa8250be9d --- /dev/null +++ b/Documentation/agents/main.rst @@ -0,0 +1,7 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Linux Kernel Development Agent Instructions +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This is the Linux kernel repository. When working with this codebase, you = must follow the Linux kernel development processes and coding standards. --=20 2.39.5 From nobody Mon Oct 6 01:22:05 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3715422FDE6; Sun, 27 Jul 2025 19:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646301; cv=none; b=mL0O9bFfA96qvYAXRiaXdR+DPqVvLbcHyhhGQax03K+4VjTMpx1+WW1dULRgXSHjT7KTOgVxRF85KhVcg8UlHip2AHfhCYsayNJtsMwkOygU94ax35ag/YLWRpA/4/wwDEYT0f5D1Zh3IPyVZt2EOjNlKKlqSiVLDRa6R9eL/j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646301; c=relaxed/simple; bh=oLCDK1T1x0R7EmTwhwpVbjC3s4vp39BNykyI9TtQHUU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GIZlxCJ3nD99GwEazUkjSKjLQ5BghJjBHYzSTVo01DNKRF9Wd2wMFjqHSDBbrxNeBv47Gi8z6VqrYn59BSoSzWhL9/Gw8Tj0N6Qs/cBk9pjdjtzfypVDCi270Te5KEyBkYCMa4DC1Girqogc+pRYo3L9PUCh8qsFTCWgACCgwWE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UJBTo/Sr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UJBTo/Sr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87F3CC4CEEB; Sun, 27 Jul 2025 19:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753646301; bh=oLCDK1T1x0R7EmTwhwpVbjC3s4vp39BNykyI9TtQHUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UJBTo/SrqGmt3TMkX0Ics22MrLsCSPfsPcG0RWttkZ+jIEhTmTqvqioGO+LZc+PnD GLrGX45GosuqPmHSb/KGDJLC/pGRNv9Do0QdqpRchSL5s4PwxdI4j2FUwkpnHsNC4n EsndJn+C7EHGsazEPIZgclPyG8vvCaQuYDVIT4wN5yPT5vN1kz/hzLkVrIyHswdgCj vGpPoI15dgbNQRg4JgKogxdUseThcLY+jjg3yiQ7vAds7C56zqoV54M5BaWSK1g/2l XKhQg68PaV/jiDMleWtfzK4f4mcBQKPImrWLTsoSxZoPMMYgvudfK0LUx15AUXS9rm eCjff8rJwEd3w== From: Sasha Levin To: corbet@lwn.net, linux-doc@vger.kernel.org, workflows@vger.kernel.org Cc: sashal@kernel.org, josh@joshtriplett.org, kees@kernel.org, konstantin@linuxfoundation.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: [PATCH 2/4] agents: add core development references Date: Sun, 27 Jul 2025 15:58:00 -0400 Message-Id: <20250727195802.2222764-3-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250727195802.2222764-1-sashal@kernel.org> References: <20250727195802.2222764-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Sasha Levin --- Documentation/agents/core.rst | 28 ++++++++++++++++++++++++++++ Documentation/agents/index.rst | 3 ++- Documentation/agents/main.rst | 5 +++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Documentation/agents/core.rst diff --git a/Documentation/agents/core.rst b/Documentation/agents/core.rst new file mode 100644 index 000000000000..da171dde1f9d --- /dev/null +++ b/Documentation/agents/core.rst @@ -0,0 +1,28 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Core Linux Kernel Development References +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Essential documentation for Linux kernel development: + +How to do Linux kernel development +---------------------------------- + +The comprehensive guide for becoming a Linux kernel developer and learning= to work with the kernel development community. + +See :ref:`Documentation/process/howto.rst ` + +Submitting patches +------------------ + +The essential guide to getting your code into the kernel, covering everyth= ing from patch formatting to the submission process. + +See :ref:`Documentation/process/submitting-patches.rst ` + +Submission checklist +-------------------- + +A checklist of items to review before submitting code to ensure patches ar= e accepted more quickly. + +See :ref:`Documentation/process/submit-checklist.rst ` diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst index 109266ca91ec..2737ab62efa0 100644 --- a/Documentation/agents/index.rst +++ b/Documentation/agents/index.rst @@ -7,4 +7,5 @@ Agents .. toctree:: :maxdepth: 1 =20 - main \ No newline at end of file + main + core \ No newline at end of file diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst index 98aa8250be9d..34f13d0b975a 100644 --- a/Documentation/agents/main.rst +++ b/Documentation/agents/main.rst @@ -5,3 +5,8 @@ Linux Kernel Development Agent Instructions =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 This is the Linux kernel repository. When working with this codebase, you = must follow the Linux kernel development processes and coding standards. + +Core Development Process +------------------------ + +For essential kernel development documentation, see :doc:`core` --=20 2.39.5 From nobody Mon Oct 6 01:22:05 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F9D02356C0; Sun, 27 Jul 2025 19:58:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646303; cv=none; b=Re4MZriEgerbvbhwpgcs1Ma27RXeiRoW8Qn+UJqG8SGOT0vBA/LFx3jAFUGdVB58MotBpF/Xjj0iYyAghmSLyJ5597eI5hHxmvklPM+YGIuXeoTXlxVFAlPgbfSMcHZH1J6EH4Qsx2NC3u5mrSJ/Nk5PLv0Bq71jbmWyHOmGBWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646303; c=relaxed/simple; bh=ixTKyJfBR0xmMaTaFtvOU7QBpVjahgLuJtscAk6EDmE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=b8hvMCcgzoH9H4/J/mCOOFeQh9duHVbHLntm3hZNrIs6rf/GEL/LcW7A92a45G+DWqtxvc67K8ngO47D7n5v7n7Pn/88qPOcAQWDRTBoqzdJimfxOw7aHbfPQnLM7K2EmiWcVggamld8K9ntK0S7414wBcK/hcmjDuPQ6JiRSfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=e5rKyL8a; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="e5rKyL8a" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72823C4CEF8; Sun, 27 Jul 2025 19:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753646303; bh=ixTKyJfBR0xmMaTaFtvOU7QBpVjahgLuJtscAk6EDmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5rKyL8aI/ol53BFcr+KPmkFF0QiTSJdmjHQTGbHtUJGgNeOePc53sIm00++RCwaG StwretWahDqyOUoWREspYETQeZ4ASTxtvT/sIyTXGULyjH/E8Eu4mTCT88JXEIi7CT ODFtplD/mkBHC8+H3hrErga0unE2vYkvN7bNyYSmroqv9uuIzdwuKYEBZOqarOz5Ds c8GomqPcYLNQVARz3u9iY6N6hnDt7zdrCbjuhjHTasguc0pjyM79MavmQnmsl24g2N QQn0DjDTvgaQhBY5CAb/gwZOQTVm7DVdWBmMj3lpfDQhvDL8Gm/q6NcKgpDXynTLkH 3/mRmw770Ns7A== From: Sasha Levin To: corbet@lwn.net, linux-doc@vger.kernel.org, workflows@vger.kernel.org Cc: sashal@kernel.org, josh@joshtriplett.org, kees@kernel.org, konstantin@linuxfoundation.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: [PATCH 3/4] agents: add coding style documentation and rules Date: Sun, 27 Jul 2025 15:58:01 -0400 Message-Id: <20250727195802.2222764-4-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250727195802.2222764-1-sashal@kernel.org> References: <20250727195802.2222764-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Sasha Levin --- Documentation/agents/coding-style.rst | 35 +++++++++++++++++++++++++++ Documentation/agents/index.rst | 3 ++- Documentation/agents/main.rst | 5 ++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Documentation/agents/coding-style.rst diff --git a/Documentation/agents/coding-style.rst b/Documentation/agents/c= oding-style.rst new file mode 100644 index 000000000000..b0332ee91e6c --- /dev/null +++ b/Documentation/agents/coding-style.rst @@ -0,0 +1,35 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +Linux Kernel Coding Style +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + +Essential coding style documentation and rules for Linux kernel developmen= t. + +Coding Style Documentation +-------------------------- + +The comprehensive guide to Linux kernel coding style, covering indentation= , naming conventions, functions, and more. + +See :ref:`Documentation/process/coding-style.rst ` + +Programming Language +-------------------- + +Information about the C programming language dialect used in the kernel, c= ompiler options, and attributes. + +See :ref:`Documentation/process/programming-language.rst ` + +Explicit Coding Rules +--------------------- + +The following rules must be followed when writing kernel code: + +**No trailing whitespaces** + Never leave whitespace at the end of lines. Git will warn about patches = that introduce trailing whitespace. + +**80 character line limit** + The preferred limit on the length of a single line is 80 columns. Statem= ents longer than 80 columns should be broken into sensible chunks, unless e= xceeding 80 columns significantly increases readability and does not hide i= nformation. + +**8 character tabs for indents** + Tabs are 8 characters, and thus indentations are also 8 characters. The = kernel uses tabs for indentation, never spaces. This makes code structure c= lear and warns when nesting becomes too deep. \ No newline at end of file diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst index 2737ab62efa0..354af3f025e5 100644 --- a/Documentation/agents/index.rst +++ b/Documentation/agents/index.rst @@ -8,4 +8,5 @@ Agents :maxdepth: 1 =20 main - core \ No newline at end of file + core + coding-style \ No newline at end of file diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst index 34f13d0b975a..8e0463794b76 100644 --- a/Documentation/agents/main.rst +++ b/Documentation/agents/main.rst @@ -10,3 +10,8 @@ Core Development Process ------------------------ =20 For essential kernel development documentation, see :doc:`core` + +Coding Style +------------ + +For coding style guidelines and rules, see :doc:`coding-style` --=20 2.39.5 From nobody Mon Oct 6 01:22:05 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56C71221737; Sun, 27 Jul 2025 19:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646305; cv=none; b=XT/h3SEs7ovNBBAE60ZA25+OLjLbj6qd6Yww675kdZMIm0w/dl3OCNNVRioH/e8YRBUHbZg0xXoO+py+rn8wm9Hby2kInUfZlAcmL+LiSbcWPrvC8g5W/xaNPtbk0CHQ2mlMq7pSHDqYopDbUklMZt1LKBtm6SK84r72JN4AknY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753646305; c=relaxed/simple; bh=bjWayEAh716FQw0T22n60tZUcfpnlVvoEVEBTenLoFk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BcGwECp2FhshqlvX6UvOm9KtsVpVqCIOxwcWD0Iss7ql6j73kVOSorGmgUbvi53IMBpRFiZ9K625wLSMC4QNfQloGlUs2ecKw/0rBr4fbGxEd2MCUQlJC8CdRgiHW1pC14/W4E+ROodYXRhyg0MGv7BT+ev2EEaCvFdFxH1y6OY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k6IaTgi+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k6IaTgi+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59DEBC4CEEB; Sun, 27 Jul 2025 19:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753646304; bh=bjWayEAh716FQw0T22n60tZUcfpnlVvoEVEBTenLoFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k6IaTgi++JzLAgZk6lhLqW2G2KKCOKmToowTLMUW4B/tD5JVhvgYU534FyMBgz4aQ nDMsT5+z0ydR5IAvXUSOC0WqYqFBggfpgzMKguw0JtJ3XEgifnbJnOMWtYRiEAcrCP vUarHCzm12kqx64+QrrKFIDGVfn46Rl+xVY2UOXTBeeIjrgsfm91ika52A40Rv38YU iiMmFGC5cSou/aHcy71M8M1AY77gYowYzz3qovPwItgZMstTTMziyiQTA2SoBoJ+xO sjmYWLMBUj2KCtsqdLxMd9i72vyflamLlMtdz6VG61a+pJgFdg59CHTCy65Ug/sI+8 CcSOUleEaJqtw== From: Sasha Levin To: corbet@lwn.net, linux-doc@vger.kernel.org, workflows@vger.kernel.org Cc: sashal@kernel.org, josh@joshtriplett.org, kees@kernel.org, konstantin@linuxfoundation.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org Subject: [PATCH 4/4] agents: add legal requirements and agent attribution guidelines Date: Sun, 27 Jul 2025 15:58:02 -0400 Message-Id: <20250727195802.2222764-5-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250727195802.2222764-1-sashal@kernel.org> References: <20250727195802.2222764-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" And below is the first test of this scheme: Co-developed-by: Claude claude-opus-4-20250514 Signed-off-by: Sasha Levin --- 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 =20 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 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D +Legal Requirements for Agents +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D + +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 cod= e contributed must be compatible with this license. + +**SPDX License Identifiers** + All files must have proper SPDX license identifiers. For most kernel sou= rce files, this should be the first line of the file in the appropriate com= ment 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`` + +Signed-off-by Restriction +------------------------- + +Coding assistants **MUST NOT** add a ``Signed-off-by`` tag pointing to the= mselves. The ``Signed-off-by`` tag represents a legal certification by a hu= man developer that they have the right to submit the code under the open so= urce license. + +Only the human user running the coding assistant should add their ``Signed= -off-by`` tag to commits. The agent's contribution is acknowledged through = the ``Co-developed-by`` tag as described below. + +Agent Attribution Requirement +----------------------------- + +When creating commits, coding agents **MUST** identify themselves by inclu= ding the following tag in the commit message:: + + Co-developed-by: $AGENT_NAME $AGENT_MODEL $AGENT_VERSION + +Examples: + +- ``Co-developed-by: Claude claude-3-opus-20240229`` +- ``Co-developed-by: GitHub-Copilot GPT-4 v1.0.0`` +- ``Co-developed-by: Cursor gpt-4-turbo-2024-04-09`` + +This transparency helps maintainers and reviewers understand that a coding= agent was involved in the development process. diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst index 8e0463794b76..9ef75978a2e6 100644 --- a/Documentation/agents/main.rst +++ b/Documentation/agents/main.rst @@ -15,3 +15,8 @@ Coding Style ------------ =20 For coding style guidelines and rules, see :doc:`coding-style` + +Legal Requirements +------------------ + +For licensing, attribution, and legal requirements, see :doc:`legal` --=20 2.39.5