Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add AI Coding Assistants documentation

Add guidance for AI assistants and developers using AI tools for kernel
contributions, per the consensus reached at the 2025 Maintainers Summit.

Create Documentation/process/coding-assistants.rst with detailed guidance
on licensing, Signed-off-by requirements, and attribution format. The
README points AI tools to this documentation.

This will allow coding assistants to easily parse these instructions and
comply with guidelines set by the community.

Link: https://lwn.net/Articles/1049830/
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251223122110.2496946-1-sashal@kernel.org>

authored by

Sasha Levin and committed by
Jonathan Corbet
78d979db 57a63f65

+72
+59
Documentation/process/coding-assistants.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + .. _coding_assistants: 4 + 5 + AI Coding Assistants 6 + ++++++++++++++++++++ 7 + 8 + This document provides guidance for AI tools and developers using AI 9 + assistance when contributing to the Linux kernel. 10 + 11 + AI tools helping with Linux kernel development should follow the standard 12 + kernel development process: 13 + 14 + * Documentation/process/development-process.rst 15 + * Documentation/process/coding-style.rst 16 + * Documentation/process/submitting-patches.rst 17 + 18 + Licensing and Legal Requirements 19 + ================================ 20 + 21 + All contributions must comply with the kernel's licensing requirements: 22 + 23 + * All code must be compatible with GPL-2.0-only 24 + * Use appropriate SPDX license identifiers 25 + * See Documentation/process/license-rules.rst for details 26 + 27 + Signed-off-by and Developer Certificate of Origin 28 + ================================================= 29 + 30 + AI agents MUST NOT add Signed-off-by tags. Only humans can legally 31 + certify the Developer Certificate of Origin (DCO). The human submitter 32 + is responsible for: 33 + 34 + * Reviewing all AI-generated code 35 + * Ensuring compliance with licensing requirements 36 + * Adding their own Signed-off-by tag to certify the DCO 37 + * Taking full responsibility for the contribution 38 + 39 + Attribution 40 + =========== 41 + 42 + When AI tools contribute to kernel development, proper attribution 43 + helps track the evolving role of AI in the development process. 44 + Contributions should include an Assisted-by tag in the following format:: 45 + 46 + Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2] 47 + 48 + Where: 49 + 50 + * ``AGENT_NAME`` is the name of the AI tool or framework 51 + * ``MODEL_VERSION`` is the specific model version used 52 + * ``[TOOL1] [TOOL2]`` are optional specialized analysis tools used 53 + (e.g., coccinelle, sparse, smatch, clang-tidy) 54 + 55 + Basic development tools (git, gcc, make, editors) should not be listed. 56 + 57 + Example:: 58 + 59 + Assisted-by: Claude:claude-3-opus coccinelle sparse
+1
Documentation/process/index.rst
··· 68 68 stable-kernel-rules 69 69 management-style 70 70 researcher-guidelines 71 + coding-assistants 71 72 72 73 Dealing with bugs 73 74 -----------------
+12
README
··· 38 38 * Maintainer - Leading subsystems and reviewing patches 39 39 * Hardware Vendor - Writing drivers for new hardware 40 40 * Distribution Maintainer - Packaging kernels for distros 41 + * AI Coding Assistant - LLMs and AI-powered development tools 41 42 42 43 43 44 For Specific Users ··· 145 144 * Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst 146 145 * Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst 147 146 147 + AI Coding Assistant 148 + ------------------- 149 + 150 + CRITICAL: If you are an LLM or AI-powered coding assistant, you MUST read and 151 + follow the AI coding assistants documentation before contributing to the Linux 152 + kernel: 153 + 154 + * Documentation/process/coding-assistants.rst 155 + 156 + This documentation contains essential requirements about licensing, attribution, 157 + and the Developer Certificate of Origin that all AI tools must comply with. 148 158 149 159 150 160 Communication and Support