[PATCH v2 2/2] agents: add unified agent coding assistant configuration

Sasha Levin posted 2 patches 1 month, 3 weeks ago
[PATCH v2 2/2] agents: add unified agent coding assistant configuration
Posted by Sasha Levin 1 month, 3 weeks ago
Create a single source of truth for agent instructions 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)
- GEMINI.md (Gemini)

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 .codeium/instructions.md        |  1 +
 .continue/context.md            |  1 +
 .cursorrules                    |  1 +
 .github/copilot-instructions.md |  1 +
 .gitignore                      | 10 ++++++++++
 .windsurfrules                  |  1 +
 CLAUDE.md                       |  1 +
 GEMINI.md                       |  1 +
 8 files changed, 17 insertions(+)
 create mode 100644 .codeium/instructions.md
 create mode 100644 .continue/context.md
 create mode 100644 .cursorrules
 create mode 100644 .github/copilot-instructions.md
 create mode 100644 .windsurfrules
 create mode 100644 CLAUDE.md
 create mode 100644 GEMINI.md

diff --git a/.codeium/instructions.md b/.codeium/instructions.md
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/.codeium/instructions.md
@@ -0,0 +1 @@
+@README
diff --git a/.continue/context.md b/.continue/context.md
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/.continue/context.md
@@ -0,0 +1 @@
+@README
diff --git a/.cursorrules b/.cursorrules
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/.cursorrules
@@ -0,0 +1 @@
+@README
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/.github/copilot-instructions.md
@@ -0,0 +1 @@
+@README
diff --git a/.gitignore b/.gitignore
index bf5ee6e01cd4..f8f575ab8cf6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -182,3 +182,13 @@ sphinx_*/
 
 # Rust analyzer configuration
 /rust-project.json
+
+# Agentic coding assistant configuration
+.aider.conf.yml
+.codeium/
+.continue/
+.cursorrules
+.github/copilot-instructions.md
+.windsurfrules
+CLAUDE.md
+GEMINI.md
diff --git a/.windsurfrules b/.windsurfrules
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/.windsurfrules
@@ -0,0 +1 @@
+@README
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1 @@
+@README
diff --git a/GEMINI.md b/GEMINI.md
new file mode 100644
index 000000000000..8b6a7196d2b0
--- /dev/null
+++ b/GEMINI.md
@@ -0,0 +1 @@
+@README
-- 
2.39.5
Re: [PATCH v2 2/2] agents: add unified agent coding assistant configuration
Posted by Kees Cook 1 month, 2 weeks ago
On Sat, Aug 09, 2025 at 07:40:08PM -0400, Sasha Levin wrote:
> Create a single source of truth for agent instructions 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)
> - GEMINI.md (Gemini)
>
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Still a big NAK from me for this for at least CLAUDE.md and GEMINI.md. I
don't know about the other agents, but at least these two belong in
.gitignore because they are files used for _personalized_ project
management of the agent by the developer. Both Agents will find README
automatically.

Please, just add to .gitignore:

CLAUDE.md
.claude/

etc...

This is exactly the same reason that debian/ is listed in .gitignore.

--
Kees Cook
Re: [PATCH v2 2/2] agents: add unified agent coding assistant configuration
Posted by Greg KH 1 month, 3 weeks ago
On Sat, Aug 09, 2025 at 07:40:08PM -0400, Sasha Levin wrote:
> Create a single source of truth for agent instructions 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)
> - GEMINI.md (Gemini)

Having these non-dot-files in the root directory for just specific
closed source tools feels a bit wrong to me.  I thought all of these
tools were standardizing on "use README" and didn't need these extra
helpers?  The fact that most of them just contain README seems like
that's the case, they just need to work it out somehow?

Anyway, I'd not like this patch to be added (patch 1/2 is great), as it
feels like these agents need to get their act together in ways to not
need these, we shouldn't be forced to deal with their inefficiencies.

thanks,

greg k-h
Re: [PATCH v2 2/2] agents: add unified agent coding assistant configuration
Posted by Sasha Levin 1 month, 3 weeks ago
On Sun, Aug 10, 2025 at 09:01:00AM +0200, Greg KH wrote:
>On Sat, Aug 09, 2025 at 07:40:08PM -0400, Sasha Levin wrote:
>> Create a single source of truth for agent instructions 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)
>> - GEMINI.md (Gemini)
>
>Having these non-dot-files in the root directory for just specific
>closed source tools feels a bit wrong to me.  I thought all of these
>tools were standardizing on "use README" and didn't need these extra
>helpers?  The fact that most of them just contain README seems like
>that's the case, they just need to work it out somehow?
>
>Anyway, I'd not like this patch to be added (patch 1/2 is great), as it
>feels like these agents need to get their act together in ways to not
>need these, we shouldn't be forced to deal with their inefficiencies.

No, agents will not read the README unless we explicitly tell them to
"study" the codebase (either via something like "/init" in the CLI tools
or a "Scan the codebase" button on the VSCode clones).

This is why the agent files only have a reference to README: their only
purpose is to get the agents to read the goddamn README file by default.

We don't strictly need this patch. Here are the options I came up with:

1. Multiple agent files: agents automatically read our rules, higher
chance of comlpiance, doesn't require user to do anything manually.

2. No agents files at all: this means that the user will need to
explicitly trigger an action, otherwise all the tools I've tested it
with will happily ignore the README file even when prompted to do other
actions on the codebase (analyze code/write a patch/etc).

3. Only "AGENTS.md" which seems like a few of the tools are trying to
standardize on. We could also use it in the future to add prompt cues
that might not be relevant within the README.

We could also start with most of these files, along with a statement
that they will be removed within 12 months to give the various tools
time to standardize around something.

-- 
Thanks,
Sasha
Re: [PATCH v2 2/2] agents: add unified agent coding assistant configuration
Posted by Steven Rostedt 1 month, 3 weeks ago
On Sun, 10 Aug 2025 10:22:15 -0400
Sasha Levin <sashal@kernel.org> wrote:

> We don't strictly need this patch. Here are the options I came up with:
> 
> 1. Multiple agent files: agents automatically read our rules, higher
> chance of comlpiance, doesn't require user to do anything manually.
> 
> 2. No agents files at all: this means that the user will need to
> explicitly trigger an action, otherwise all the tools I've tested it
> with will happily ignore the README file even when prompted to do other
> actions on the codebase (analyze code/write a patch/etc).
> 
> 3. Only "AGENTS.md" which seems like a few of the tools are trying to
> standardize on. We could also use it in the future to add prompt cues
> that might not be relevant within the README.

2 or 3 are the only options that seems reasonable. I agree with Greg. I
wouldn't want these files adding noise to the main directory for every
agent.

> 
> We could also start with most of these files, along with a statement
> that they will be removed within 12 months to give the various tools
> time to standardize around something.

Ideally, in 12 months they will all standardize on AGENTS.md and that's all
we will need. Let's not enable them to do their own thing in the mean time.
If we add this file, I would suspect it would help encourage the agents to
use it.

The best "standards" are the ones that are done in collaboration before
they are added to a specification ;-)

-- Steve