Home Linux KernelNew Rules for AI Coding Assistants in Linux Kernel Development: A Proposal from Sasha Levin (NVIDIA)

New Rules for AI Coding Assistants in Linux Kernel Development: A Proposal from Sasha Levin (NVIDIA)

By sk
1.9K views 4 mins read

Sasha Levin, a well-known Linux developer from NVIDIA, and a co-maintainer of the Linux LTS kernel, has recently put forward an important proposal. This proposal aims to establish clear guidelines for using AI coding assistants when contributing to the Linux kernel.

Why is This Happening Now?

AI tools are quickly becoming a common sight in software development. Think of assistants like Claude, GitHub Copilot, and others.

As these tools become more popular, it's necessary to have proper rules in place for their use in a project as critical as the Linux kernel.

This ensures the code remains high quality and everyone understands how contributions are made.

What Does the Proposal Involve?

Sasha Levin's "Request For Comments" (RFC) proposal outlines a two-part plan to integrate AI coding assistants smoothly into the kernel's development process:

1. Unified Configuration Files

The first part involves adding special configuration files for various AI coding assistants. This includes popular tools like Claude, GitHub Copilot, Cursor, Codeium, Continue, Windsurf, and Aider.

These files will all link to a central document, making sure the rules are consistent across all tools.

2. Clear Rules and Documentation

The second part introduces the actual rules and instructions for AI assistants. These guidelines will help AI tools understand the specific practices required for Linux kernel development.

Key Guidelines for AI-Assisted Contributions

For any AI tool helping with Linux kernel development, the proposal sets out important expectations:

1. Follow Kernel Coding Standards

AI-generated code must meet the strict quality and style standards of the Linux kernel.

2. Respect the Development Process

The AI tools must understand and adhere to the established development workflows.

3. Properly Attribute AI Contributions

This is a big one! All AI assistants will be required to identify themselves within the code commits. This is done using "Co-developed-by" tags, ensuring complete transparency about AI involvement.

For example, a commit might include: Co-developed-by: Claude claude-opus-4-20250514. Importantly, only human developers should add the "Signed-off-by" tag, as this is a legal certification.

4. Understand Licensing Requirements

AI contributions must also comply with the licensing rules of the Linux kernel.

Sasha Levin even provided examples, showing how Claude correctly attributes its work in commits and understands the documentation needs.

Example Kernel Patch Creation with AI Assistant Claude Code

The following example demonstrates how Claude Code fixes a typo in documentation and correctly adding its "Co-developed-by" tag.

Example Kernel Patch Creation with Claude Code
Example Kernel Patch Creation with Claude Code

The above example demonstrates the following:

1. Command Execution

The user runs a command:

$ claude -p "Fix the dont -> don't typo in @Documentation/power/opp.rst. Commit the result"

This command asks Claude to fix the typo "dont" → "don't" in the specified file and commit the change.

2. Automatic Patch Creation

Claude automatically fixes the typo and creates a patch. The output includes a standard Git patch format with headers like:

  • From (commit hash and timestamp)
  • From: (author)
  • Date: (timestamp)
  • Subject: (patch title)

3. Commit Message and Attribution

The commit message clearly explains that the typo "dont" was changed to "don’t".

There is also a “Co-developed-by” attribution line:

Co-developed-by: Claude claude-opus-4-20250514

This shows that the patch was co-authored with Claude (Claude Opus 4, a specific model version).

4. Patch Details

The patch shows the difference (diff) between the old file (a/Documentation/power/opp.rst) and the new file (b/Documentation/power/opp.rst):

  • One line is removed (marked with -)
  • One corrected line is added (marked with +)

Key Takeaways:

  • This example shows how AI can be used to assist in software development, specifically in fixing small issues like typos.
  • The Co-developed-by line is a new convention for acknowledging AI contributions in open-source projects.
  • The patch follows standard Linux kernel commit practices: clear subject, body, and diff.

This kind of workflow could become more common as AI tools like Claude, GitHub Copilot, and Cursor are integrated into development environments.

What Happens Next?

This is a RFC (Request for Comments) proposal, not a final decision. For those wondering, an RFC is a document that asks for feedback and discussion from the community before a decision is made or a change is officially implemented.

The Linux community is looking forward to hear the perspective of Linus Torvalds on this proposal.

What do you think of this proposal? Do you believe allowing AI to contribute to kernel development is a good idea? Please share your thoughts via the comment section below.

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More