Create a single source of truth for agent instructions in
Documentation/AI/main.md with symlinks for all major coding
agents:
- CLAUDE.md (Claude Code)
- .github/copilot-instructions.md (GitHub Copilot)
- .cursorrules (Cursor)
- .codeium/instructions.md (Codeium)
- .continue/context.md (Continue)
- .windsurfrules (Windsurf)
- .aider.conf.yml (Aider)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.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/agents/index.rst | 10 ++++++++++
Documentation/agents/main.rst | 7 +++++++
9 files changed, 24 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/agents/index.rst
create mode 100644 Documentation/agents/main.rst
diff --git a/.aider.conf.yml b/.aider.conf.yml
new file mode 120000
index 000000000000..a5120c4e5d0a
--- /dev/null
+++ b/.aider.conf.yml
@@ -0,0 +1 @@
+Documentation/agents/main.rst
\ No newline at end of file
diff --git a/.codeium/instructions.md b/.codeium/instructions.md
new file mode 120000
index 000000000000..aa9a2063afbd
--- /dev/null
+++ b/.codeium/instructions.md
@@ -0,0 +1 @@
+../Documentation/agents/main.rst
\ No newline at end of file
diff --git a/.continue/context.md b/.continue/context.md
new file mode 120000
index 000000000000..aa9a2063afbd
--- /dev/null
+++ b/.continue/context.md
@@ -0,0 +1 @@
+../Documentation/agents/main.rst
\ No newline at end of file
diff --git a/.cursorrules b/.cursorrules
new file mode 120000
index 000000000000..a5120c4e5d0a
--- /dev/null
+++ b/.cursorrules
@@ -0,0 +1 @@
+Documentation/agents/main.rst
\ No newline at end of file
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
new file mode 120000
index 000000000000..aa9a2063afbd
--- /dev/null
+++ b/.github/copilot-instructions.md
@@ -0,0 +1 @@
+../Documentation/agents/main.rst
\ No newline at end of file
diff --git a/.windsurfrules b/.windsurfrules
new file mode 120000
index 000000000000..a5120c4e5d0a
--- /dev/null
+++ b/.windsurfrules
@@ -0,0 +1 @@
+Documentation/agents/main.rst
\ No newline at end of file
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 120000
index 000000000000..a5120c4e5d0a
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1 @@
+Documentation/agents/main.rst
\ No newline at end of file
diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst
new file mode 100644
index 000000000000..109266ca91ec
--- /dev/null
+++ b/Documentation/agents/index.rst
@@ -0,0 +1,10 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+======
+Agents
+======
+
+.. toctree::
+ :maxdepth: 1
+
+ main
\ No newline at end of file
diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst
new file mode 100644
index 000000000000..98aa8250be9d
--- /dev/null
+++ b/Documentation/agents/main.rst
@@ -0,0 +1,7 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=====================================
+Linux Kernel Development Agent Instructions
+=====================================
+
+This is the Linux kernel repository. When working with this codebase, you must follow the Linux kernel development processes and coding standards.
--
2.39.5
Sasha Levin <sashal@kernel.org> writes: > Create a single source of truth for agent instructions in > Documentation/AI/main.md with symlinks for all major coding > agents: > - CLAUDE.md (Claude Code) > - .github/copilot-instructions.md (GitHub Copilot) > - .cursorrules (Cursor) > - .codeium/instructions.md (Codeium) > - .continue/context.md (Continue) > - .windsurfrules (Windsurf) > - .aider.conf.yml (Aider) This doesn't work for aider, probably because the .md it links to is not YAML. When I start aider with this, I get: aider: error: Couldn't parse config file: while scanning a simple key in "/work/kernel/linux/.aider.conf.yml", line 3, column 1 could not find expected ':' in "/work/kernel/linux/.aider.conf.yml", line 4, column 1 Not related to this series, but related to aider... I'm curious if anyone has got aider to work with the kernel repo. It seems to have problems with large repos. When starting in the kernel, I get: Unable to list files in git repo: cannot close exported pointers exist Is your git repo corrupted? Unable to read git repository, it may be corrupt? cannot close exported pointers exist but neither claude nor gemini-cli have any problems with the same repo. The aider FAQ[1] mentions using .aiderignore to ignore parts of the repo, but even with an "ignore everything" rule, I get the same error, so something seems wrong with aider and large repos. Kevin [1] https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo
On Wed, Jul 30, 2025 at 5:06 PM Kevin Hilman <khilman@kernel.org> wrote: > > Sasha Levin <sashal@kernel.org> writes: > > > Create a single source of truth for agent instructions in > > Documentation/AI/main.md with symlinks for all major coding > > agents: > > - CLAUDE.md (Claude Code) > > - .github/copilot-instructions.md (GitHub Copilot) > > - .cursorrules (Cursor) > > - .codeium/instructions.md (Codeium) > > - .continue/context.md (Continue) > > - .windsurfrules (Windsurf) > > - .aider.conf.yml (Aider) > > This doesn't work for aider, probably because the .md it links to is not > YAML. When I start aider with this, I get: > > aider: error: Couldn't parse config file: while scanning a simple key > in "/work/kernel/linux/.aider.conf.yml", line 3, column 1 > could not find expected ':' > in "/work/kernel/linux/.aider.conf.yml", line 4, column 1 > > Not related to this series, but related to aider... I'm curious if > anyone has got aider to work with the kernel repo. It seems to have > problems with large repos. When starting in the kernel, I get: > > Unable to list files in git repo: cannot close exported pointers exist > Is your git repo corrupted? > Unable to read git repository, it may be corrupt? > cannot close exported pointers exist > > but neither claude nor gemini-cli have any problems with the same repo. > > The aider FAQ[1] mentions using .aiderignore to ignore parts of the > repo, but even with an "ignore everything" rule, I get the same error, > so something seems wrong with aider and large repos. It worked for a bit for me, but then aider fell over after a while and refused to run with errors accessing git. Some suggestions to repack the repo didn't help. In the end, I just ran it without any git awareness. Rob
Rob Herring <robh@kernel.org> writes: > On Wed, Jul 30, 2025 at 5:06 PM Kevin Hilman <khilman@kernel.org> wrote: >> >> Sasha Levin <sashal@kernel.org> writes: >> >> > Create a single source of truth for agent instructions in >> > Documentation/AI/main.md with symlinks for all major coding >> > agents: >> > - CLAUDE.md (Claude Code) >> > - .github/copilot-instructions.md (GitHub Copilot) >> > - .cursorrules (Cursor) >> > - .codeium/instructions.md (Codeium) >> > - .continue/context.md (Continue) >> > - .windsurfrules (Windsurf) >> > - .aider.conf.yml (Aider) >> >> This doesn't work for aider, probably because the .md it links to is not >> YAML. When I start aider with this, I get: >> >> aider: error: Couldn't parse config file: while scanning a simple key >> in "/work/kernel/linux/.aider.conf.yml", line 3, column 1 >> could not find expected ':' >> in "/work/kernel/linux/.aider.conf.yml", line 4, column 1 >> >> Not related to this series, but related to aider... I'm curious if >> anyone has got aider to work with the kernel repo. It seems to have >> problems with large repos. When starting in the kernel, I get: >> >> Unable to list files in git repo: cannot close exported pointers exist >> Is your git repo corrupted? >> Unable to read git repository, it may be corrupt? >> cannot close exported pointers exist >> >> but neither claude nor gemini-cli have any problems with the same repo. >> >> The aider FAQ[1] mentions using .aiderignore to ignore parts of the >> repo, but even with an "ignore everything" rule, I get the same error, >> so something seems wrong with aider and large repos. > > It worked for a bit for me, but then aider fell over after a while and > refused to run with errors accessing git. Some suggestions to repack > the repo didn't help. In the end, I just ran it without any git > awareness. Do you mean just using the --no-git option to aider? Kevin
On Wed, Jul 30, 2025 at 03:06:26PM -0700, Kevin Hilman wrote: >Sasha Levin <sashal@kernel.org> writes: > >> Create a single source of truth for agent instructions in >> Documentation/AI/main.md with symlinks for all major coding >> agents: >> - CLAUDE.md (Claude Code) >> - .github/copilot-instructions.md (GitHub Copilot) >> - .cursorrules (Cursor) >> - .codeium/instructions.md (Codeium) >> - .continue/context.md (Continue) >> - .windsurfrules (Windsurf) >> - .aider.conf.yml (Aider) > >This doesn't work for aider, probably because the .md it links to is not >YAML. When I start aider with this, I get: > > aider: error: Couldn't parse config file: while scanning a simple key > in "/work/kernel/linux/.aider.conf.yml", line 3, column 1 > could not find expected ':' > in "/work/kernel/linux/.aider.conf.yml", line 4, column 1 Thanks! I'll drop aider. -- Thanks, Sasha
On Sun, Jul 27, 2025 at 03:57:59PM -0400, Sasha Levin wrote: > Create a single source of truth for agent instructions in > Documentation/AI/main.md with symlinks for all major coding > agents: > - CLAUDE.md (Claude Code) > - .github/copilot-instructions.md (GitHub Copilot) > - .cursorrules (Cursor) > - .codeium/instructions.md (Codeium) > - .continue/context.md (Continue) > - .windsurfrules (Windsurf) > - .aider.conf.yml (Aider) I *really* don't like this. I use the CLAUDE.md file as my instructions for my agent. I think all of these should be .gitignore entries. > diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst > new file mode 100644 > index 000000000000..109266ca91ec > --- /dev/null > +++ b/Documentation/agents/index.rst > @@ -0,0 +1,10 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +====== > +Agents > +====== > + > +.. toctree:: > + :maxdepth: 1 > + > + main > \ No newline at end of file > diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst > new file mode 100644 > index 000000000000..98aa8250be9d > --- /dev/null > +++ b/Documentation/agents/main.rst > @@ -0,0 +1,7 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +===================================== > +Linux Kernel Development Agent Instructions > +===================================== > + > +This is the Linux kernel repository. When working with this codebase, you must follow the Linux kernel development processes and coding standards. And now I start my "this is redundant, why do we have to repeat it in a new place?" part of my review comments. :) I *really* think Agent instructions should only be about stuff specific to the agent. It is _supposed_ to be able to find the rest of it on its own. -- Kees Cook
On Sun, Jul 27, 2025 at 07:37:31PM -0700, Kees Cook wrote: >On Sun, Jul 27, 2025 at 03:57:59PM -0400, Sasha Levin wrote: >> Create a single source of truth for agent instructions in >> Documentation/AI/main.md with symlinks for all major coding >> agents: >> - CLAUDE.md (Claude Code) >> - .github/copilot-instructions.md (GitHub Copilot) >> - .cursorrules (Cursor) >> - .codeium/instructions.md (Codeium) >> - .continue/context.md (Continue) >> - .windsurfrules (Windsurf) >> - .aider.conf.yml (Aider) > >I *really* don't like this. I use the CLAUDE.md file as my instructions >for my agent. I think all of these should be .gitignore entries. Sorry, I might have misunderstood you: how does it play out if we add these to .gitignore? The tool will just end replacing whatever we put in there with something customized that doesn't necessarily correspond to what the community will consider a "standard" set of rules for agents? >> diff --git a/Documentation/agents/index.rst b/Documentation/agents/index.rst >> new file mode 100644 >> index 000000000000..109266ca91ec >> --- /dev/null >> +++ b/Documentation/agents/index.rst >> @@ -0,0 +1,10 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +====== >> +Agents >> +====== >> + >> +.. toctree:: >> + :maxdepth: 1 >> + >> + main >> \ No newline at end of file >> diff --git a/Documentation/agents/main.rst b/Documentation/agents/main.rst >> new file mode 100644 >> index 000000000000..98aa8250be9d >> --- /dev/null >> +++ b/Documentation/agents/main.rst >> @@ -0,0 +1,7 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +===================================== >> +Linux Kernel Development Agent Instructions >> +===================================== >> + >> +This is the Linux kernel repository. When working with this codebase, you must follow the Linux kernel development processes and coding standards. > >And now I start my "this is redundant, why do we have to repeat it in a >new place?" part of my review comments. :) > >I *really* think Agent instructions should only be about stuff specific >to the agent. It is _supposed_ to be able to find the rest of it on its >own. Right - I trimmed down most of these specific callouts, but I left a few that I found necessary since in my testing the agent would sometime forget about those. I'll comment more on the rest of your review. -- Thanks, Sasha
On Mon, Jul 28, 2025 at 12:43:52AM -0400, Sasha Levin wrote: > On Sun, Jul 27, 2025 at 07:37:31PM -0700, Kees Cook wrote: > > On Sun, Jul 27, 2025 at 03:57:59PM -0400, Sasha Levin wrote: > > > Create a single source of truth for agent instructions in > > > Documentation/AI/main.md with symlinks for all major coding > > > agents: > > > - CLAUDE.md (Claude Code) > > > - .github/copilot-instructions.md (GitHub Copilot) > > > - .cursorrules (Cursor) > > > - .codeium/instructions.md (Codeium) > > > - .continue/context.md (Continue) > > > - .windsurfrules (Windsurf) > > > - .aider.conf.yml (Aider) > > > > I *really* don't like this. I use the CLAUDE.md file as my instructions > > for my agent. I think all of these should be .gitignore entries. > > Sorry, I might have misunderstood you: how does it play out if we add > these to .gitignore? Then what claude learns about my workflows and preference can be correctly stored in CLAUDE.me (which is how claude is designed to work). I would think of it like why we don't ship a debian/ package build tree: it's going to be different for everyone. And if you look in .gitignore you can already see that /debian/ is there. :) These agent files are for developer-specific use, and adding them to .gitignore is the right approach (at least for Claude and Gemini). Which reminds me, please also include GEMINI.md in your list. :) > The tool will just end replacing whatever we put in there with something > customized that doesn't necessarily correspond to what the community > will consider a "standard" set of rules for agents? Right, and then it will always be a git diff delta and cause pain. For the agents that are designed to _write_ to their files, then it needs to be in .gitignore. -- Kees Cook
On Sun, Jul 27, 2025 at 10:16:32PM -0700, Kees Cook wrote: >On Mon, Jul 28, 2025 at 12:43:52AM -0400, Sasha Levin wrote: >> On Sun, Jul 27, 2025 at 07:37:31PM -0700, Kees Cook wrote: >> > On Sun, Jul 27, 2025 at 03:57:59PM -0400, Sasha Levin wrote: >> > > Create a single source of truth for agent instructions in >> > > Documentation/AI/main.md with symlinks for all major coding >> > > agents: >> > > - CLAUDE.md (Claude Code) >> > > - .github/copilot-instructions.md (GitHub Copilot) >> > > - .cursorrules (Cursor) >> > > - .codeium/instructions.md (Codeium) >> > > - .continue/context.md (Continue) >> > > - .windsurfrules (Windsurf) >> > > - .aider.conf.yml (Aider) >> > >> > I *really* don't like this. I use the CLAUDE.md file as my instructions >> > for my agent. I think all of these should be .gitignore entries. >> >> Sorry, I might have misunderstood you: how does it play out if we add >> these to .gitignore? > >Then what claude learns about my workflows and preference can be >correctly stored in CLAUDE.me (which is how claude is designed to work). >I would think of it like why we don't ship a debian/ package build tree: >it's going to be different for everyone. And if you look in .gitignore >you can already see that /debian/ is there. :) These agent files are for >developer-specific use, and adding them to .gitignore is the right >approach (at least for Claude and Gemini). Which reminds me, please >also include GEMINI.md in your list. :) > >> The tool will just end replacing whatever we put in there with something >> customized that doesn't necessarily correspond to what the community >> will consider a "standard" set of rules for agents? > >Right, and then it will always be a git diff delta and cause pain. For >the agents that are designed to _write_ to their files, then it needs >to be in .gitignore. Okay, I'll update it for v2. -- Thanks, Sasha
© 2016 - 2025 Red Hat, Inc.