# 在为 Linux 内核做贡献时使用 AI 辅助

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：hmokiguess
- 发布时间：2026-04-11 09:41
- AIHOT 链接：https://aihot.virxact.com/items/cmnw1z0fl021gslc3azpj0auo
- 原文链接：https://github.com/torvalds/linux/blob/master/Documentation/process/coding-assistants.rst

## AI 摘要

Linux 内核官方文档新增 coding-assistants.rst，明确贡献者使用 AI 辅助工具时的披露义务与代码审查标准，要求声明 AI 生成内容并确保符合内核编码规范，为开源大型项目整合 LLM 提供首个官方指引框架。

## 正文

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

AGENT_NAME

MODEL_VERSION is the specific model version used

MODEL_VERSION

[TOOL1] [TOOL2] are optional specialized analysis tools used (e.g., coccinelle, sparse, smatch, clang-tidy)

[TOOL1] [TOOL2]

Basic development tools (git, gcc, make, editors) should not be listed.

Example:

Assisted-by: Claude:claude-3-opus coccinelle sparse
