mirror of
https://github.com/torvalds/linux.git
synced 2026-03-07 23:04:33 +01:00
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>
This commit is contained in:
parent
57a63f6549
commit
78d979db6c
3 changed files with 72 additions and 0 deletions
59
Documentation/process/coding-assistants.rst
Normal file
59
Documentation/process/coding-assistants.rst
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
.. _coding_assistants:
|
||||||
|
|
||||||
|
AI Coding Assistants
|
||||||
|
++++++++++++++++++++
|
||||||
|
|
||||||
|
This document provides guidance for AI tools and developers using AI
|
||||||
|
assistance when contributing to the Linux kernel.
|
||||||
|
|
||||||
|
AI tools helping with Linux kernel development should follow the standard
|
||||||
|
kernel development process:
|
||||||
|
|
||||||
|
* Documentation/process/development-process.rst
|
||||||
|
* Documentation/process/coding-style.rst
|
||||||
|
* Documentation/process/submitting-patches.rst
|
||||||
|
|
||||||
|
Licensing and Legal Requirements
|
||||||
|
================================
|
||||||
|
|
||||||
|
All contributions must comply with the kernel's licensing requirements:
|
||||||
|
|
||||||
|
* All code must be compatible with GPL-2.0-only
|
||||||
|
* Use appropriate SPDX license identifiers
|
||||||
|
* See Documentation/process/license-rules.rst for details
|
||||||
|
|
||||||
|
Signed-off-by and Developer Certificate of Origin
|
||||||
|
=================================================
|
||||||
|
|
||||||
|
AI agents MUST NOT add Signed-off-by tags. Only humans can legally
|
||||||
|
certify the Developer Certificate of Origin (DCO). The human submitter
|
||||||
|
is responsible for:
|
||||||
|
|
||||||
|
* Reviewing all AI-generated code
|
||||||
|
* Ensuring compliance with licensing requirements
|
||||||
|
* Adding their own Signed-off-by tag to certify the DCO
|
||||||
|
* Taking full responsibility for the contribution
|
||||||
|
|
||||||
|
Attribution
|
||||||
|
===========
|
||||||
|
|
||||||
|
When AI tools contribute to kernel development, proper attribution
|
||||||
|
helps track the evolving role of AI in the development process.
|
||||||
|
Contributions should include an Assisted-by tag in the following format::
|
||||||
|
|
||||||
|
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
|
||||||
|
|
||||||
|
Where:
|
||||||
|
|
||||||
|
* ``AGENT_NAME`` is the name of the AI tool or framework
|
||||||
|
* ``MODEL_VERSION`` is the specific model version used
|
||||||
|
* ``[TOOL1] [TOOL2]`` are optional specialized analysis tools used
|
||||||
|
(e.g., coccinelle, sparse, smatch, clang-tidy)
|
||||||
|
|
||||||
|
Basic development tools (git, gcc, make, editors) should not be listed.
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
Assisted-by: Claude:claude-3-opus coccinelle sparse
|
||||||
|
|
@ -68,6 +68,7 @@ beyond).
|
||||||
stable-kernel-rules
|
stable-kernel-rules
|
||||||
management-style
|
management-style
|
||||||
researcher-guidelines
|
researcher-guidelines
|
||||||
|
coding-assistants
|
||||||
|
|
||||||
Dealing with bugs
|
Dealing with bugs
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
||||||
12
README
12
README
|
|
@ -38,6 +38,7 @@ Find your role below:
|
||||||
* Maintainer - Leading subsystems and reviewing patches
|
* Maintainer - Leading subsystems and reviewing patches
|
||||||
* Hardware Vendor - Writing drivers for new hardware
|
* Hardware Vendor - Writing drivers for new hardware
|
||||||
* Distribution Maintainer - Packaging kernels for distros
|
* Distribution Maintainer - Packaging kernels for distros
|
||||||
|
* AI Coding Assistant - LLMs and AI-powered development tools
|
||||||
|
|
||||||
|
|
||||||
For Specific Users
|
For Specific Users
|
||||||
|
|
@ -144,6 +145,17 @@ Package and distribute the kernel:
|
||||||
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
|
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
|
||||||
* Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst
|
* Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst
|
||||||
|
|
||||||
|
AI Coding Assistant
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
CRITICAL: If you are an LLM or AI-powered coding assistant, you MUST read and
|
||||||
|
follow the AI coding assistants documentation before contributing to the Linux
|
||||||
|
kernel:
|
||||||
|
|
||||||
|
* Documentation/process/coding-assistants.rst
|
||||||
|
|
||||||
|
This documentation contains essential requirements about licensing, attribution,
|
||||||
|
and the Developer Certificate of Origin that all AI tools must comply with.
|
||||||
|
|
||||||
|
|
||||||
Communication and Support
|
Communication and Support
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue