workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] Add AI coding assistant configuration to Linux kernel
@ 2025-07-25 17:53 Sasha Levin
  2025-07-25 17:53 ` [RFC 1/2] AI: Add unified AI coding assistant configuration Sasha Levin
                   ` (4 more replies)
  0 siblings, 5 replies; 31+ messages in thread
From: Sasha Levin @ 2025-07-25 17:53 UTC (permalink / raw)
  To: workflows, linux-doc, linux-kernel
  Cc: rostedt, kees, konstantin, corbet, josh, Sasha Levin

This patch series adds unified configuration and documentation for AI
coding assistants working with the Linux kernel codebase. As AI tools
become increasingly common in software development, it's important to
establish clear guidelines for their use in kernel development.

The series consists of two patches:

1. The first patch adds unified configuration files for various AI
coding assistants (Claude, GitHub Copilot, Cursor, Codeium, Continue,
Windsurf, and Aider). These are all symlinked to a central documentation
file to ensure consistency across tools.

2. The second patch adds the actual rules and documentation that guide
AI assistants on Linux kernel development practices, including:
   - Following kernel coding standards
   - Respecting the development process
   - Properly attributing AI-generated contributions
   - Understanding licensing requirements

The examples below demonstrate how these guidelines work in practice, showing
proper AI attribution in commits and the assistant's understanding of kernel
documentation requirements.

All AI assistants are required to identify themselves in commits using
Co-developed-by tags, ensuring full transparency about AI involvement in
code development.

"Hello world" test:

	$ claude -p "do you need to attribute your commits?"
	Yes, according to the CLAUDE.md file in this Linux kernel repository, I must identify myself as an AI assistant in commits by including:

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

	I should NOT add a Signed-off-by tag - only you (the human developer) should add that, as it represents a legal certification.


Example patch creation with Claude Code:

	$ claude -p "Fix the dont -> don't typo in @Documentation/power/opp.rst. Commit the result"
	Done! The typo has been fixed and committed.


And the resulting patch (no manual edits):

	From 7613561f430920803d945b3cd53aa81440d4f6f0 Mon Sep 17 00:00:00 2001
	From: Sasha Levin <sashal@kernel.org>
	Date: Fri, 25 Jul 2025 13:38:43 -0400
	Subject: [PATCH] Documentation: power: opp: Fix typo dont -> don't

	Fix a typo in the OPP documentation where "dont" was missing an apostrophe.

	Co-developed-by: Claude claude-opus-4-20250514
	---
	 Documentation/power/opp.rst | 2 +-
	 1 file changed, 1 insertion(+), 1 deletion(-)

	diff --git a/Documentation/power/opp.rst b/Documentation/power/opp.rst
	index 1b7f1d854f14a..3eae4b955a63b 100644
	--- a/Documentation/power/opp.rst
	+++ b/Documentation/power/opp.rst
	@@ -149,7 +149,7 @@ dev_pm_opp_find_freq_exact

	         opp = dev_pm_opp_find_freq_exact(dev, 1000000000, false);
	         dev_pm_opp_put(opp);
	-        /* dont operate on the pointer.. just do a sanity check.. */
	+        /* don't operate on the pointer.. just do a sanity check.. */
	         if (IS_ERR(opp)) {
	                pr_err("frequency not disabled!\n");
	                /* trigger appropriate actions.. */


Sasha Levin (2):
  AI: Add unified AI coding assistant configuration
  AI: Add initial set of rules and docs

 .aider.conf.yml                 |  1 +
 .codeium/instructions.md        |  1 +
 .continue/context.md            |  1 +
 .cursorrules                    |  1 +
 .github/copilot-instructions.md |  1 +
 .windsurfrules                  |  1 +
 CLAUDE.md                       |  1 +
 Documentation/AI/main.md        | 71 +++++++++++++++++++++++++++++++++
 8 files changed, 78 insertions(+)
 create mode 120000 .aider.conf.yml
 create mode 120000 .codeium/instructions.md
 create mode 120000 .continue/context.md
 create mode 120000 .cursorrules
 create mode 120000 .github/copilot-instructions.md
 create mode 120000 .windsurfrules
 create mode 120000 CLAUDE.md
 create mode 100644 Documentation/AI/main.md

-- 
2.39.5


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2025-07-29  0:18 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 17:53 [RFC 0/2] Add AI coding assistant configuration to Linux kernel Sasha Levin
2025-07-25 17:53 ` [RFC 1/2] AI: Add unified AI coding assistant configuration Sasha Levin
2025-07-25 18:19   ` Steven Rostedt
2025-07-25 22:11     ` Sasha Levin
2025-07-25 18:27   ` Jonathan Corbet
2025-07-25 22:15     ` Sasha Levin
2025-07-27  2:24       ` Sasha Levin
2025-07-28 16:56         ` Mauro Carvalho Chehab
2025-07-25 20:40   ` Kees Cook
2025-07-25 22:25     ` Sasha Levin
2025-07-25 17:53 ` [RFC 2/2] AI: Add initial set of rules and docs Sasha Levin
2025-07-25 20:53   ` Kees Cook
2025-07-25 22:10     ` Sasha Levin
2025-07-28 17:00     ` Mauro Carvalho Chehab
2025-07-25 18:41 ` [RFC 0/2] Add AI coding assistant configuration to Linux kernel Jakub Kicinski
2025-07-25 19:00   ` Steven Rostedt
2025-07-25 19:59     ` Jakub Kicinski
2025-07-25 20:32       ` Dr. David Alan Gilbert
2025-07-25 20:34       ` dan.j.williams
2025-07-25 22:28         ` Sasha Levin
2025-07-28 17:46         ` Steven Rostedt
2025-07-28 18:20           ` dan.j.williams
2025-07-28 22:12           ` Mauro Carvalho Chehab
2025-07-29  0:18             ` Mauro Carvalho Chehab
2025-07-25 21:03     ` Kees Cook
2025-07-28 15:57       ` dan.j.williams
2025-07-28 16:41         ` Kees Cook
2025-07-26  9:07 ` Mario Limonciello
2025-07-26 11:53   ` Sasha Levin
2025-07-26 16:36   ` Kees Cook
2025-07-28 16:49 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).