How to Manage Your AI Coding Rule Files
Sorting out a pile of AGENTS.md and CLAUDE.md
After a while with tools like Claude Code, Codex, and Cursor, you've probably accumulated a pile of rules files: AGENTS.md, CLAUDE.md, .cursorrules, .github/copilot-instructions.md… one set per project, and sometimes several in a single project.
The problem isn't "what they are"—it's where to place them, how to organize them, and how to be sure the AI actually read them. Files scatter around, content keeps growing, and every new tool means another file, until you can't tell which one is even in effect.
This article is about exactly that: first get clear on what you have and which tool owns which, then a "no duplication, no clutter, actually readable" way to organize them, and finally how to open each one in your browser, read it clearly, and save it back locally.
If you're not yet sure what these files even are, read What Are AGENTS.md / CLAUDE.md first—this will read more smoothly afterward.
Why you end up with a pile of rules files
It's not that you're messy—this convention naturally sprouts a lot of files. Three reasons stack up:
- Each tool reads its own filename: Claude Code tends to read
CLAUDE.md, Cursor reads.cursorrules, Copilot reads.github/copilot-instructions.md. Switch tools, and you gain another file. - One set per project: rules travel with the project, so however many projects you have, that's how many sets you get.
- Temporary files creep in: the one-off
plan.mdorspec.mdan AI generates is also markdown, and piled together it blurs with your standing rules.
So "lots of files" is normal. The goal isn't to merge them into one—it's to keep each in the place it belongs, short enough to read, and free of duplication.
First, get clear on what you have and who owns which
Before organizing, square the accounts. Here are the common ones—always defer to the official docs of the tool you're actually using, since this area changes fast. For what each file is, see What Are AGENTS.md / CLAUDE.md.
| Filename | Roughly who it's for | Where | In one line |
|---|---|---|---|
CLAUDE.md | Claude Code | Project root | The project memory Claude Code reads before every task |
AGENTS.md | Codex and others (a general convention) | Project root | Use it when you want one set of instructions "most agents can read" |
.cursorrules / .cursor/rules/ | Cursor | Project root | Cursor's project rules |
.github/copilot-instructions.md | GitHub Copilot | Inside .github/ | Copilot's project-level instructions |
Once you've read this table, you can match the pile of .md files on your disk to their owners: which one is for which tool, and where it's meant to live. The ones you can't match, or that sit in the wrong place, are what you'll tidy next.
How to tidy them up: five rules that are enough
No need for an elaborate folder system. Hold to these five, and a pile of rules files won't keep growing into a mess.
| Rule | What to do | Why |
|---|---|---|
| Keep them with the project, not piled together | Rules files go in each project root and into version control | Tools find them; nothing is lost across machines or teammates |
| One file per tool, no duplication | Don't write the same rules across several files | Change one place, and rules never contradict each other |
| Keep standing rules short | A screen or two—only the most important, most error-prone points | The tool, and you, are more likely to actually read and use them |
| Put one-off content elsewhere | Move a particular plan or draft into a separate file like plan.md | Standing rules don't get diluted by temporary content |
| Re-read them periodically | Delete or fix outdated conventions | Rules stay current with the project and don't mislead the tool |
The core is one line: keep rules files with the project, never duplicated, short enough to finish reading. If what you want is the more general "how to tidy scattered .md notes," see How to Organize .md Files; this article only targets dev-scenario rules files.
How to be sure the AI read it, so the rules file isn't just for show
Plenty of people write a stack of rules but aren't sure the tool actually followed them. A few practical checkpoints:
- Put it in the right place, with the right filename: a tool only reads it under specific paths and filenames. Defer to the official docs—don't place it on a hunch.
- Keep the content short: rules readable within a screen or two are more likely to be used; hundreds of lines get skipped.
- Write specific, verifiable conventions: "write commit messages in English" or "don't touch that config file" beats a vague "keep the code clean"—and it's easier to check afterward whether the tool followed it.
- It's a suggestion, not a lock: a rules file is a strong suggestion; the tool generally takes it into account but won't necessarily follow every line. Review the important changes yourself.
In the end, "readable" is the prerequisite—rules you can't be bothered to finish reading won't get much care from the tool either. So first you need a way to open these files quickly and read them clearly.
Open these rules files across projects with NoteLoom
Whether these files were generated by an AI or written by you, once they land on your disk they're just local .md files. NoteLoom is an editor that reads and writes local md files right in the browser, which makes it a good fit for opening, reading, and editing these rules files.
Let's be clear about the boundaries up front: NoteLoom has no AI whatsoever, and it doesn't integrate with Claude Code, Codex, Cursor, or git. It won't organize them for you, won't generate or summarize, won't carry out what's in a rules file, and can't make an AI "listen to you better." All it does is let you open these files, read them clearly, edit them, and save them back to your disk.
For the "pile of rules files" problem, two things come in handy:
- Mount multiple folders: bring in several project folders at once and open each project's
CLAUDE.md/AGENTS.mdfrom one interface, without hunting through directories in your file system. - Three views for the same file:
| View | How it helps you read / edit a rules file |
|---|---|
reading | Renders the rules file as formatted text so you can read it calmly and see how many sections there are and what each covers (read-only, no edits) |
live | Edit while seeing the formatting—handy for adding a line to a rule or deleting an outdated one |
source | See the raw Markdown symbols—use it to check that lists, code blocks, and paths are written correctly |
Here's roughly how you use it:
- Open
app.noteloom.ccin Chrome, Edge, or Arc. - Mount the local project folders that hold your rules files (NoteLoom has to mount a folder before it can read or write); mount several for several projects.
- Open a project's
CLAUDE.md/AGENTS.md/copilot-instructions.mdfrom the file tree. - Use the
readingview to read it clearly first; switch toliveorsourceto trim or add. - When you're done, it writes straight back to the original local file—no account involved, nothing goes to the cloud.
What a good-enough rules file looks like
The other half of tidying is "don't write it too long." A first version that clearly covers "what the project is, how to run it, and what not to touch" is plenty. Here's what good-enough looks like:
# CLAUDE.md
## What this project is
A marketing site written in Astro, deployed on Cloudflare Pages.
## How to run it
- Install dependencies: npm install
- Local preview: npm run dev
- Build: npm run build
## Rules to follow when writing code
- Use TypeScript, don't use any
- Put components in src/components/, one component per file
- Write commit messages in English, one line that clearly says what changed
## What not to do
- Don't change the deployment config in src/config.ts
- Don't write secrets into the code A few key points:
- Use plain language, don't pile on jargon. It should read clearly to both people and the AI.
- Write specific conventions that are easy to get wrong—those are far more useful than vague principles.
- Keep it short—ideally readable within a screen or two; if it's too long, both the AI and you will tend to skip it.
- To get symbols like
#,-, and code blocks right, see How to Write Markdown.
While writing, just use the live view to type and watch the formatting at the same time; which rules you set is entirely up to you—NoteLoom won't generate anything for you, it has no AI.
Common pitfalls
- Moving several projects' rules into one folder: tools look in each project's own root, so moving them away means they can't be read. To view them together, just mount the project folders in the editor—don't move the files.
- Writing the same rules across several files: change one and forget the other, and the rules contradict each other. Keep one file per tool, and have the rest point to it.
- Mixing standing rules with one-off plans: move the one-off
plan.mdout, and keep only the long-lived rules in the rules file. For reading a plan, see How to Read Codex plan.md. - Letting it grow until no one reads it: a rules file of hundreds of lines is as good as none. Keep the few most important points and re-read to prune the stale ones.
- Expecting NoteLoom to understand or execute it: it won't. NoteLoom only opens, reads, edits, and saves these local files—it doesn't connect to any AI tool and doesn't run the rules inside.
FAQ
Should I put AGENTS.md or CLAUDE.md in a project?
Should I keep all my projects' rules files in one place?
How do I confirm an AI coding tool actually read my rules file?
What if the rules file keeps getting longer?
Can NoteLoom organize or generate these rules files for me?
Can I open these files with NoteLoom on my phone or in Safari?
Mount your projects and read the rules files clearly
Open NoteLoom in Chrome / Edge / Arc, mount the project folders holding your CLAUDE.md and AGENTS.md, read each one in the reading view, and switch to live to edit and save back locally—no software to install and no account to sign up for.