[Deepin-Kernel-SIG] [linux 6.18-y] [Upstream] docs: add AI Coding Assistants documentation#1648
Conversation
[Upstream commit b9a565b] Reorganize README to provide targeted documentation paths for different user roles including developers, researchers, security experts, and maintainers. Add quick start section and essential docs links. Signed-off-by: Sasha Levin <sashal@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: SeongJae Park <sj@kernel.org> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251121180009.2634393-1-sashal@kernel.org> Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
[Upstream commit 78d979d] 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> Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds new documentation describing how AI coding assistants and developers using AI tools should contribute to the kernel, and wires it into the existing documentation index and top-level README so tools and contributors can discover it easily. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Adds documentation intended to guide AI coding assistants (and developers using AI tools) when contributing to the Linux kernel, and links it into the existing process documentation set.
Changes:
- Add
Documentation/process/coding-assistants.rstdescribing licensing/DCO responsibilities and an attribution mechanism. - Include the new document in
Documentation/process/index.rstso it’s built and discoverable in the process docs. - Update the top-level
READMEto direct AI tools to the new documentation (along with a broader README rewrite).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
README |
Expanded and reorganized top-level guidance; includes an explicit pointer for AI assistants to the new process doc. |
Documentation/process/index.rst |
Adds coding-assistants to the process documentation toctree. |
Documentation/process/coding-assistants.rst |
New guidance document for AI-assisted contributions, including licensing/DCO notes and an attribution format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The Linux kernel is the core of any Linux operating system. It manages hardware, | ||
| system resources, and provides the fundamental services for all other software. | ||
|
|
||
| In order to build the documentation, use ``make htmldocs`` or | ||
| ``make pdfdocs``. The formatted documentation can also be read online at: | ||
| Quick Start | ||
| ----------- | ||
|
|
||
| https://www.kernel.org/doc/html/latest/ | ||
| * Report a bug: See Documentation/admin-guide/reporting-issues.rst | ||
| * Get the latest kernel: https://kernel.org | ||
| * Build the kernel: See Documentation/admin-guide/quickly-build-trimmed-linux.rst | ||
| * Join the community: https://lore.kernel.org/ |
There was a problem hiding this comment.
The PR description says the README should point AI tools to the new coding-assistants documentation, but this change rewrites the entire top-level README into a large role-based navigation document. That’s a much broader change (and higher maintenance surface) than the stated goal; consider limiting README changes to a small pointer to Documentation/process/coding-assistants.rst, or split the README overhaul into a separate patch/PR with its own justification.
| 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 |
There was a problem hiding this comment.
The document introduces an "Assisted-by" trailer and prescribes a value format ("AGENT_NAME:MODEL_VERSION ...") that doesn’t match the usual kernel trailer conventions (typically "Tag: Name ") described in Documentation/process/submitting-patches.rst. As written, this risks inconsistent attribution and may confuse existing tooling/parsers; either align the format with established trailer patterns (and clarify who adds it) or document/standardize the new trailer alongside the existing trailer guidance in submitting-patches.rst.
| 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 | |
| If AI assistance is disclosed in the commit message, the human submitter | |
| may add an Assisted-by trailer using the standard kernel trailer format:: | |
| Assisted-by: AGENT_NAME <CONTACT> | |
| Where: | |
| * ``AGENT_NAME`` is the name of the AI tool or framework | |
| * ``CONTACT`` is a stable contact address for that tool or its provider | |
| Details such as model version and optional specialized analysis tools | |
| (for example, coccinelle, sparse, smatch, or clang-tidy) should be | |
| described in the commit message body, not encoded into the trailer value. | |
| Basic development tools (git, gcc, make, editors) should not be listed. | |
| Example:: | |
| Assisted-by: Claude <ai@example.com> | |
| Additional details can be described in the commit message body, for | |
| example: "Generated with claude-3-opus; checked with coccinelle and | |
| sparse." |
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
Summary by Sourcery
Document guidelines for using AI coding assistants in kernel development and surface this policy in existing documentation entry points.
Documentation: