<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Charles Hasse</title>
    <description>The latest articles on DEV Community by Charles Hasse (@hassekf).</description>
    <link>https://dev.to/hassekf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4066141%2F222e7fd0-9c2f-4941-9da3-b88b7de5d9ab.jpg</url>
      <title>DEV Community: Charles Hasse</title>
      <link>https://dev.to/hassekf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hassekf"/>
    <language>en</language>
    <item>
      <title>CLAUDE.md and AGENTS.md in the same project - how to avoid maintaining two files</title>
      <dc:creator>Charles Hasse</dc:creator>
      <pubDate>Thu, 06 Aug 2026 16:04:57 +0000</pubDate>
      <link>https://dev.to/hassekf/claudemd-and-agentsmd-in-the-same-project-how-to-avoid-maintaining-two-files-4k9</link>
      <guid>https://dev.to/hassekf/claudemd-and-agentsmd-in-the-same-project-how-to-avoid-maintaining-two-files-4k9</guid>
      <description>&lt;p&gt;I spent two weeks with a CLAUDE.md and an AGENTS.md saying different things about the same repository.&lt;/p&gt;

&lt;p&gt;I found out the worst way: an agent did exactly what the rule forbade, and the rule was there. In the other file.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(abertura sugerida: confira se bate com a sua memória e ajuste para a sua voz antes de postar)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt;. Codex reads &lt;code&gt;AGENTS.md&lt;/code&gt;. Use both in one project and you have two files describing how to work in your code, with nothing forcing them to say the same thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why two drifting files cost you&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The problem is not the duplication, it is how quiet it is. You add a new rule (never touch this folder, always run that command before committing) to whichever file was open, and forget the other. Two weeks later an AI agent does exactly what the rule forbade, and the error does not say "I read the old version of your instructions". It says something else entirely, and you go looking in the wrong place.&lt;/p&gt;

&lt;p&gt;The more specific your rules, the worse it gets. Generic rules converge on their own; project rules do not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to keep both without duplicating the text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pick one file as the source and have the other point at it. A three-line &lt;code&gt;AGENTS.md&lt;/code&gt; does the job:&lt;/p&gt;

&lt;p&gt;`# Project instructions&lt;/p&gt;

&lt;p&gt;The rules for this repository live in CLAUDE.md. Read that file&lt;br&gt;
first and follow whatever it says.`&lt;/p&gt;

&lt;p&gt;It works because both tools read repository files on demand: the agent opens the one you pointed to and follows it. You get one place to edit, and the question "which of the two is right?" stops existing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does a symlink work?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It does, and it is the leanest option if your team is all Unix: &lt;code&gt;ln -s CLAUDE.md AGENTS.md&lt;/code&gt; and the two become one file. The caveat is Windows, where symlinks depend on permissions and Git has to be configured to preserve them. If someone clones on Windows without that, the file becomes a one-line text containing a path, and the AI agent reads that as your instructions.&lt;/p&gt;

&lt;p&gt;A text pointer has no such risk and costs three lines. That is what we prefer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to put in that file&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The part that changes outcomes is not the format, it is the content. What pays off, from running six AI agents in one repository:&lt;/p&gt;

&lt;p&gt;· &lt;strong&gt;What NOT to touch, with the reason attached.&lt;/strong&gt; "Do not edit this file" gets ignored; "do not edit this file because it is generated by X and your change disappears on the next build" gets obeyed.&lt;br&gt;
· &lt;strong&gt;The command that proves it is done.&lt;/strong&gt; An agent with no completion criteria delivers when it feels finished. With the command written down, it runs it and fixes things before calling you.&lt;br&gt;
· &lt;strong&gt;How work is isolated&lt;/strong&gt;, if you run more than one agent at a time. Without it, two agents edit the same file and one of them loses the work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if the rules genuinely differ per tool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It happens, and it is the one case where two separate files are justified: when the instruction is about the tool itself, not about the project. Keep the pointer to the shared rules and add only the tool-specific part below it. What must not happen is project rules living duplicated in both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does this apply to other AI agents?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It does, and it will get worse before it gets better: every new tool brings its own filename. One source file with pointers scales to however many appear, because adding another costs three lines instead of a copy of your entire manual.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to confirm both are being read&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ask the agent. "Which project instructions did you load?" at the start of a session answers in a second, and beats guessing. It is worth doing right after you move folders around: an instruction file in a subdirectory is not always found from wherever the tool was launched.&lt;/p&gt;




&lt;p&gt;I wrote the full version, with the parts that did not fit here:&lt;br&gt;
&lt;a href="https://canvascode.app/en/news/claude-md-vs-agents-md-in-the-same-project" rel="noopener noreferrer"&gt;https://canvascode.app/en/news/claude-md-vs-agents-md-in-the-same-project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
