agentleFS
andrefigueiraandrefigueira/.context/AGENTS.md

.context

AGENTS.md253 starsChanged 10 months agoMITView on GitHub

Research-backed entry point. Research: .context/research.md. Full methodology: .context/substrate.md. Claude Code reads CLAUDE.md automatically. This file is for Cursor, GitHub Copilot, Windsurf, ChatGPT, and any other AI tool. Two files, every time: Load only when touching matching files. Full rule files live in .claude/rules/. This table mirrors CLAUDE.md. That file is the source of truth. Keep the two in sync. When a file matches multiple rows, load every matching rule file. .cursor/rules/ with globs: frontmatter. Example: Repeat for each rule in…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a file matches multiple rows, load every matching rule file.

    line 20
  2. Very specific:

    Create .github/copilot-instructions.md for the always-loaded set:

    line 50
  3. Very specific:

    Do not paste everything. The research in .context/research.md measures why that is worse.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md (For AI Tools Other Than Claude Code)

Research-backed entry point. Research: .context/research.md. Full methodology: .context/substrate.md.

Claude Code reads CLAUDE.md automatically. This file is for Cursor, GitHub Copilot, Windsurf, ChatGPT, and any other AI tool.

Always loaded

Two files, every time:

  • .context/ai-rules.md: project-wide hard constraints
  • .context/glossary.md: terminology

Path-scoped rules

Load only when touching matching files. Full rule files live in .claude/rules/.

This table mirrors CLAUDE.md. That file is the source of truth. Keep the two in sync.

When a file matches multiple rows, load every matching rule file.

TouchingRule file
src/api/**, src/routes/**, src/handlers/**, app/api/**.claude/rules/api.md
src/auth/**, src/middleware/auth*, src/security/**.claude/rules/auth.md
src/models/**, src/db/**, src/repositories/**, migrations/**, *.sql.claude/rules/database.md
src/components/**, app/** (non-page), *.tsx, *.jsx, *.vue, *.svelte.claude/rules/ui.md
src/app/**/page.*, src/pages/**, public/sitemap*, public/robots*, src/head/**.claude/rules/seo.md
**/*.test.*, **/*.spec.*, tests/**, __tests__/**.claude/rules/testing.md

Tool-specific wiring

Cursor

.cursor/rules/ with globs: frontmatter. Example:

# .cursor/rules/api.mdc
---
description: API development patterns
globs: src/api/**,src/routes/**,src/handlers/**,app/api/**
---
@.claude/rules/api.md

Repeat for each rule in the table above.

GitHub Copilot

Create .github/copilot-instructions.md for the always-loaded set:

Follow rules in .context/ai-rules.md.
Use terminology from .context/glossary.md.

For path-scoped rules, create .github/instructions/<domain>.instructions.md with applyTo: frontmatter pointing at the matching rule file.

Windsurf

.windsurfrules is not path-aware. Keep it tight. Reference the always-loaded set and the most commonly used rule file for this project:

Follow .context/ai-rules.md.
Use terminology from .context/glossary.md.
For the domain you are touching, read the matching file under .claude/rules/.

ChatGPT / generic LLM

Paste the always-loaded set, plus the single path-scoped rule file matching the task, plus any on-demand Tier 2 file the task explicitly needs.

Do not paste everything. The research in .context/research.md measures why that is worse.

On-demand (Tier 2)

Load only when the task explicitly needs depth:

  • .context/api/, .context/auth/, .context/database/, .context/ui/, .context/seo/: domain deep-dives
  • .context/anti-patterns.md, .context/boundaries.md, .context/debt.md
  • .context/errors.md, .context/performance.md, .context/testing.md, .context/versioning.md
  • .context/decisions/: Architecture Decision Records
  • .context/prompts/: pre-built task prompts

Why this shape

Long prompts hurt accuracy (13-85%). Models reliably follow ~150-200 instructions, not more. Middle-of-document content gets ignored. Path-scoping cuts rule-token usage per turn sharply because most rules are inactive for most tasks. Evidence in .context/research.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.