๐Ÿ’ก Not just Claude Code. A rules file is the "persistent context file" pattern, and it has a shared standard: AGENTS.md. Codex, Cursor, GitHub Copilot, Antigravity, Hermes and other agents read it on their own. Claude Code has its own CLAUDE.md, so that file holds one line, @AGENTS.md, which imports the shared file. The concept is universal: context lives in a file, the agent reads it at session start.

โšก Activation

๐Ÿ’ญ in your head ยท nothing to type

When you start a new Claude Code session โ€” what do you re-explain every time?

Don't think of it as "instructions" โ€” picture it as a tree's growth rings. Every season leaves its mark directly in the wood โ€” drought, growth, frost โ€” all encoded into the structure, not stored in a separate archive. The tree doesn't "remember" last year; it's made of it.

Run your work with the agent through your head: what from your experience has already grown into the project's structure? What hasn't taken root yet โ€” still spoken aloud each time, as if for the first time?

๐Ÿ‘ Reflection

๐Ÿ’ญ in your head ยท nothing to type

Explaining the same thing every time burns time and tokens.

But there's the opposite problem too: an AGENTS.md with a thousand lines is worse than a short one โ€” up to ~200 lines. The longer it is, the worse the agent follows instructions.

Don't picture this as a short summary โ€” picture yourself as a weaver at the loom. The warp threads are pulled taut and precise โ€” that tension is what holds the whole fabric. Add too many threads at once and the cloth sags, the loops tangle.

Notice your memory system: where is the tension just right, and where is it already sagging under extra threads? What holds the shape, and what loosens the weave?

๐Ÿ’ก Concept

Memory files: three you write, one Claude writes

AGENTS.md โ€” project context and rules (the main one)

One file for everything the agent must know in every session. It holds who you are, what the project is, how to work and what not to do. Any agent reads it. Claude Code imports it through a CLAUDE.md with the single line @AGENTS.md.

# AGENTS.md

## My role
[Profile, expertise]

## Project
[What this is, why it exists]

## Stack
- Node.js 18, TypeScript, React

## Structure
- /src โ€” code
- /tests โ€” tests

## How to run
npm install && npm run dev

## What to delegate
- Writing code, tests, docs

## What I decide myself
- Architecture, final review

## Rules
- Write tests alongside code
- Show a plan before a big change

## What to avoid
- Don't change architecture without sign-off

Limit: up to ~200 lines. More than that and instruction-following degrades.

In a big project you can put a separate AGENTS.md into a subfolder. In Claude Code it works with CLAUDE.md in the same subfolder (@AGENTS.md); Codex reads AGENTS.md on its own. For a first project one file in the root is enough.