<?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: cacastopia</title>
    <description>The latest articles on DEV Community by cacastopia (@cacastopia).</description>
    <link>https://dev.to/cacastopia</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%2F4207010%2Fbb2ccad1-b076-49f4-9cc3-f9fcf776b87c.png</url>
      <title>DEV Community: cacastopia</title>
      <link>https://dev.to/cacastopia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cacastopia"/>
    <language>en</language>
    <item>
      <title>How Do You Keep Instruction Files (AGENTS.md and CLAUDE.md) in Sync?</title>
      <dc:creator>cacastopia</dc:creator>
      <pubDate>Sun, 25 Oct 2026 17:36:15 +0000</pubDate>
      <link>https://dev.to/cacastopia/how-do-you-keep-instruction-files-agentsmd-and-claudemd-in-sync-5bme</link>
      <guid>https://dev.to/cacastopia/how-do-you-keep-instruction-files-agentsmd-and-claudemd-in-sync-5bme</guid>
      <description>&lt;p&gt;While using multiple agents, including Claude Code and Codex, I ran into a problem: the same principles (in CLAUDE.md, AGENTS.md, and other files) ended up spread across at least two places.&lt;br&gt;
I had trouble finding accounts of how others had handled this problem, so I'm sharing my approach.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Written by a human (roughly 80% human, 20% AI). translated into English with AI help.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Background: The Need for a Single Source of Truth for Instructions
&lt;/h2&gt;

&lt;p&gt;At work, we currently maintain instructions at several scopes: project-level instructions (committed to GitHub), user-level global instructions on my machine, and local project-level instructions. Including supporting documents such as Branch Rule, the volume realistically exceeds what a person can manage manually.&lt;br&gt;
I periodically prompt the agents to "sync the instructions," but there are many variables, including which version is current and whether an instruction applies only to a specific agent, such as Claude.&lt;/p&gt;

&lt;p&gt;To consolidate the instruction files as much as possible, I first checked which paths and formats every agent we use at work could read.&lt;/p&gt;
&lt;h2&gt;
  
  
  Test: Which Instruction Files Do Claude Code, Codex, and Antigravity Miss?
&lt;/h2&gt;

&lt;p&gt;I designed a simple experiment with AI. First, I put the same rule in every instruction file created when using each agent, as shown below.&lt;/p&gt;

&lt;p&gt;The rule: when the user says only "check words" (확인단어), list the check word from every file you received as instructions.&lt;/p&gt;

&lt;p&gt;I put whale in AGENTS.md, penguin in CLAUDE.md, otter in CLAUDE.local.md, and squirrel in GEMINI.md. I asked each of the three tools only "check words" and used the returned words to determine which files the tool had actually read.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp3kevuwbc77nviw58t6m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp3kevuwbc77nviw58t6m.png" alt=" " width="799" height="450"&gt;&lt;/a&gt;&lt;br&gt;
(For reference, I tested this in Mac Terminal using Orca, but it also applies to a regular terminal.)&lt;/p&gt;
&lt;h2&gt;
  
  
  Results: Each Tool Read Different Files and Supported Different Ways of Connecting Them
&lt;/h2&gt;

&lt;p&gt;For example, Claude read AGENTS.md directly when there was no CLAUDE.md in the folder. However, when CLAUDE.mdexisted, Claude read AGENTS.md only if it contained an @AGENTS.md line. (When I removed the @AGENTS.md line from CLAUDE.md, 'whale' disappeared from Claude's response.)&lt;/p&gt;

&lt;p&gt;The agents also differed in how they followed links between files. Only Claude expanded an &lt;a class="mentioned-user" href="https://dev.to/file"&gt;@file&lt;/a&gt; line (the @ import syntax) inside a file. Codex and Antigravity did not. As the table below shows, the one linking method all three agents followed was a symlink.&lt;br&gt;
If you point the file each agent already reads (e.g., ~/.gemini/GEMINI.md) at the source (~/.codex/AGENTS.md), all three agents read the same file. However, using a symlink has a limitation: it leaves no room for separate rules specific to each agent, such as rules for Claude plugins.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyijui8l1985bkb651bjt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyijui8l1985bkb651bjt.png" alt=" " width="800" height="793"&gt;&lt;/a&gt;&lt;br&gt;
(For reference, Codex read AGENTS.override.md while ignoring an existing AGENTS.md. Contrary to the guidance AI usually gives, it cannot serve the same purpose as CLAUDE.local.md, which I had been using for personal local instructions.)&lt;/p&gt;
&lt;h2&gt;
  
  
  Approach: Connecting Everything Around AGENTS.md
&lt;/h2&gt;

&lt;p&gt;I've currently organized our actual company project repository and my personal instructions around AGENTS.md as follows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwjkfwqnnoqn9r91i9b3y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwjkfwqnnoqn9r91i9b3y.png" alt=" " width="800" height="724"&gt;&lt;/a&gt;&lt;br&gt;
I used the same separation for both the project and my local computer. I put principles only in AGENTS.md, added @AGENTS.md on the first line of CLAUDE.md, and kept only Claude-specific content in CLAUDE.md. I linked documents needed only in specific situations, such as branch rules and deployment procedures, from AGENTS.md so the agents could open them when needed.&lt;/p&gt;

&lt;p&gt;I chose AGENTS.md as the single source of truth because Codex, which I use as the orchestrator, always loads it. I therefore aligned Claude and Antigravity with Codex.&lt;/p&gt;

&lt;p&gt;Here's what it looks like as a directory tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/                                    # Global (your machine)
├── .codex/
│   └── AGENTS.md                     # Shared principles (single source of truth)
├── .claude/
│   └── CLAUDE.md                     # Line 1: @~/.codex/AGENTS.md + Claude-only rules/settings
└── .gemini/
    └── GEMINI.md -&amp;gt; ~/.codex/AGENTS.md   # Symlink (no agent-specific content)

my-project/                           # Project folder (committed to GitHub)
├── AGENTS.md                         # Project rules (single source of truth)
├── CLAUDE.md                         # Line 1: @AGENTS.md + Claude-only project rules
├── BRANCH_RULES.md                   # Linked from AGENTS.md, opened on demand
└── DEPLOYMENT.md                     # Linked from AGENTS.md, opened on demand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How Do You Make Every Agent Read AGENTS.md?
&lt;/h2&gt;

&lt;p&gt;The choice between an @ import and a symlink depends on whether agent-specific instructions are needed. The @ import works only in Claude, and Claude-specific instructions can follow it. &lt;/p&gt;

&lt;p&gt;Every tool follows a symlink, but the whole file becomes the source, leaving no room for tool-specific instructions. In my case, I applied a symlink to Antigravity, which did not need its own instructions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm51wxntwkg8s0j4e377c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm51wxntwkg8s0j4e377c.png" alt=" " width="799" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  In Short: Principles Live Only in AGENTS.md. Put @AGENTS.md in CLAUDE.md.
&lt;/h2&gt;

&lt;p&gt;I centered my setup on AGENTS.md because I use Codex as the orchestrator, but you can adapt this arrangement to fit your own agent system.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
