<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged agentsmd</title>
<link>https://coderlegion.com/tag/agentsmd</link>
<description>Powered by Question2Answer</description>
<item>
<title>Stop bloating your AGENTS.md: reference your conventions instead of pasting them</title>
<link>https://coderlegion.com/32158/stop-bloating-your-agents-md-reference-your-conventions-instead-of-pasting-them</link>
<description>&lt;p&gt;Stop bloating your AGENTS.md: reference your conventions instead of pasting them&lt;/p&gt;
&lt;p&gt;Most AGENTS.md files I see are bloated walls of text. Here is the problem: your agent reads this file at the start of every task. Everything you put in there is passed to the LLM with every prompt. A 400-line AGENTS.md burns context tokens on every single action — even when the agent only needs one rule from it.&lt;/p&gt;
&lt;p&gt;The fix is simple: keep AGENTS.md as a thin index, move the details into separate docs, and reference them.&lt;/p&gt;
&lt;h3 id=&quot;what-it-looks-like-in-practice&quot;&gt;What it looks like in practice&lt;/h3&gt;
&lt;p&gt;Here is the real AGENTS.md from my current project (invoice management SPA):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;# AGENTS.md

## Project
IOD Invoice — invoice management SPA.
React 18 + TypeScript + Vite, Ant Design 6, Redux Toolkit (RTK Query),
styled-components, i18next (EN/RO), OIDC/Keycloak auth.

## Commands (npm; Node 18+)
- `npm run dev` — dev server
- `npm run build` — tsc + production build
- `npm run test` — vitest watch; `npm run test:ci` — run + coverage
- `npm run lint` — eslint, zero warnings tolerated

## Architecture
See `docs/architecture.md`

## TypeScript Conventions
See `docs/typescript-conventions.md`

## Style
See `docs/style-conventions.md`

## React Components
See `docs/react-components.md`
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And in &lt;code&gt;docs/&lt;/code&gt; live the actual conventions — architecture decisions, TypeScript rules, styling rules, component patterns.&lt;/p&gt;
&lt;p&gt;The agent loads the index plus &lt;strong&gt;only the docs it actually needs for the current task&lt;/strong&gt;. A TypeScript task? It reads one conventions file, not your entire wiki. That is the whole trick: your conventions stay detailed, your context stays clean.&lt;/p&gt;
&lt;h3 id=&quot;one-gotcha-the-claude-md-twin-problem&quot;&gt;One gotcha: the CLAUDE.md twin problem&lt;/h3&gt;
&lt;p&gt;Many of us run more than one agent. Claude Code reads &lt;code&gt;CLAUDE.md&lt;/code&gt;, everything else reads &lt;code&gt;AGENTS.md&lt;/code&gt; — and the two files slowly drift apart until each agent works from different rules.&lt;/p&gt;
&lt;p&gt;The fix is a symlink, so both names point at one file:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;macOS / Linux:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ln -s AGENTS.md CLAUDE.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Windows (order is reversed):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;mklink CLAUDE.md AGENTS.md
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Edit one file, both agents see the update. No drift, no duplicated maintenance.&lt;/p&gt;
&lt;h3 id=&quot;bonus-monorepos-want-nested-agents-md-files&quot;&gt;Bonus: monorepos want nested AGENTS.md files&lt;/h3&gt;
&lt;p&gt;In a monorepo, put an &lt;code&gt;AGENTS.md&lt;/code&gt; in each subfolder:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;app/
├── AGENTS.md          # shared rules
├── client/
│   └── AGENTS.md      # frontend-specific rules
└── backend/
    └── AGENTS.md      # backend-specific rules
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Working inside &lt;code&gt;client/&lt;/code&gt;, the agent loads &lt;strong&gt;both&lt;/strong&gt; — the root file and the subfolder file. Shared conventions live once, stack-specific rules live next to the code they govern.&lt;/p&gt;
&lt;h3 id=&quot;the-takeaway&quot;&gt;The takeaway&lt;/h3&gt;
&lt;p&gt;Your AGENTS.md is not documentation — it is a &lt;strong&gt;context budget&lt;/strong&gt;. Every line in it is paid on every task. Index + references keeps the rules detailed and the context cheap.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If this was useful:&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;More React + AI tips daily&lt;/strong&gt; in my Telegram channel: t.me/novamind_hub&lt;/p&gt;
&lt;p&gt;I'm building NovaMind — an AI assistant in Telegram that debugs errors from screenshots (the reason my AGENTS.md files matter so much): t.me/mindrorgebot_bot — 30 messages/day free.&lt;/p&gt;
&lt;p&gt;Building with coding agents? Drop your biggest AGENTS.md pain in the comments — curious which conventions you enforce first &lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/32158/stop-bloating-your-agents-md-reference-your-conventions-instead-of-pasting-them</guid>
<pubDate>Fri, 23 Oct 2026 08:07:25 +0000</pubDate>
</item>
</channel>
</rss>