Skip to content

[Deepin-Kernel-SIG] [linux 6.18-y] [Upstream] docs: add AI Coding Assistants documentation#1648

Merged
opsiff merged 2 commits into
deepin-community:linux-6.18.yfrom
Avenger-285714:aidoc-6.18
Apr 27, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.18-y] [Upstream] docs: add AI Coding Assistants documentation#1648
opsiff merged 2 commits into
deepin-community:linux-6.18.yfrom
Avenger-285714:aidoc-6.18

Conversation

@Avenger-285714
Copy link
Copy Markdown
Member

@Avenger-285714 Avenger-285714 commented Apr 24, 2026

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:

  • Add a new Documentation/process/coding-assistants.rst file describing policies and requirements for AI-assisted code contributions.
  • Update Documentation/process/index.rst to include the new AI coding assistants documentation in the process docs TOC.
  • Update the top-level README to point AI tools and users to the new coding assistants documentation.

Sasha Levin added 2 commits April 24, 2026 20:01
[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>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 24, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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

Change Details Files
Introduce a dedicated AI Coding Assistants process document and integrate it into the kernel documentation tree.
  • Create a new process document describing policies for AI assistants and AI-assisted contributions, including licensing expectations, Signed-off-by requirements, and attribution format.
  • Add the new AI Coding Assistants document to the process documentation index so it appears in the rendered docs navigation.
  • Update the top-level README to explicitly reference the AI Coding Assistants documentation, providing a clear entry point for AI tools and users.
Documentation/process/coding-assistants.rst
Documentation/process/index.rst
README

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot deepin-ci-robot requested review from Wenlp and shy129 April 24, 2026 12:05
@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from avenger-285714. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rst describing licensing/DCO responsibilities and an attribution mechanism.
  • Include the new document in Documentation/process/index.rst so it’s built and discoverable in the process docs.
  • Update the top-level README to 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.

Comment thread README
Comment on lines +4 to +13
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/
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +59
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
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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."

Copilot uses AI. Check for mistakes.
@Avenger-285714 Avenger-285714 marked this pull request as draft April 24, 2026 12:13
@Avenger-285714 Avenger-285714 marked this pull request as ready for review April 24, 2026 12:14
@opsiff opsiff merged commit 495d21d into deepin-community:linux-6.18.y Apr 27, 2026
13 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants