agentleFS
a-tokyoa-tokyo/aiworkspace/root-config/AGENTS.md

aiworkspace / root-config

AGENTS.md19 starsChanged 3 months agoApache-2.0View on GitHub

This is the workspace root -- the parent directory containing all project repos. Open this directory in your editor. Everything follows nearest-wins: the closer a file is to the code you're changing, the higher its priority. When guidance conflicts, the closest file to the code wins. Before working in a project, check for context nearest to the code first: - Read existing code before editing. Match the style and patterns already in use. - Use the nearest config file (linter,…

  • Reads credentials
  • 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 repository6 other files it gives its agents.

The file

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

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When guidance conflicts, the closest file to the code wins.

    line 24
  2. Distinctive:

    Before working in a project, check for context nearest to the code first:

    line 28
  3. Distinctive:

    Read existing code before editing.

    line 43
  4. Distinctive:

    Use the nearest config file (linter, formatter, tsconfig) to the code you are changing.

    line 44
  5. Distinctive:

    Run existing tests after changes.

    line 45
  6. Very specific:

    All tool configs are mirrored for every developer — Cursor, Claude Code, Codex, and VS Code.

    line 67
  7. Very specific:

    If you use HTTP Bearer MCP servers in Cursor or Claude Code, follow the env-loading step in <workspace-repo>/setup.md §4.1 …

    line 91
  8. Very specific:

    Check tokens and Cursor/Claude Code HTTP hints: npm run mcp:check-secrets

    line 94

≈ “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

Workspace

This is the workspace root -- the parent directory containing all project repos. Open this directory in your editor.

Projects

<!-- Add your projects here as you clone them alongside workspace/ -->
ProjectPurpose
workspace/AI agent skills, configs, and automation

Resolution Order

Everything follows nearest-wins: the closer a file is to the code you're changing, the higher its priority.

WhatWorkspace-wide (shared)Per-project (override)
InstructionsThis file (AGENTS.md at root)<project>/AGENTS.md
Skills.agents/skills/<project>/.agents/skills/
Rules.cursor/rules/<project>/.cursor/rules/
Docsdocs/ repo (sibling)<project>/docs/

When guidance conflicts, the closest file to the code wins.

Finding Context

Before working in a project, check for context nearest to the code first:

  1. Project-level: <project>/AGENTS.md, README, docs, and any project-specific skills or config
  2. Workspace-level: this file and shared skills/rules at the workspace root

Conventions

<!-- Replace these examples with your team's conventions -->
  • Branches: feature/description, bug/description, hotfix/description
  • Commits: lowercase imperative (add feature, fix bug, update config)
  • PRs: target default branch unless noted

Code Quality

  • Read existing code before editing. Match the style and patterns already in use.
  • Use the nearest config file (linter, formatter, tsconfig) to the code you are changing.
  • Run existing tests after changes. Don't skip or weaken tests to make code pass.
  • Handle errors explicitly. Don't swallow exceptions or ignore return values.
<!-- Add your team's baseline standards here (e.g., test coverage, logging, accessibility) -->

MCP servers

MCP servers give agents shared tools. The workspace ships with:

  • context7 — up-to-date documentation for libraries, frameworks, and tools (HTTP OAuth).

These are defined once and shared across tools, the same way AGENTS.md and skills are. The canonical config is .agents/mcp.json, written with bare ${VAR} placeholders — the syntax Claude Code resolves natively. Claude Code symlinks straight to it. Cursor requires ${env:VAR} instead (its own MCP client's requirement, incompatible with Claude Code's), and Codex (TOML) and VS Code (a different JSON schema) can't share the file at all — so Cursor, Codex, and VS Code all get derived twins regenerated from canonical on npm run sync.

.agents/mcp.json            canonical config (JSON, bare ${VAR})
.mcp.json        -> .agents/mcp.json      Claude Code
.cursor/mcp.json             Cursor (JSON twin, sync-derived, ${env:VAR})
.codex/config.toml           Codex (TOML twin, sync-derived)
.vscode/mcp.json             VS Code and Copilot (JSON twin, sync-derived)

To add or change a server, edit .agents/mcp.json using bare ${VAR} for any secret placeholder. npm run sync refreshes the Cursor, Codex, and VS Code twins from canonical automatically.

All tool configs are mirrored for every developer — Cursor, Claude Code, Codex, and VS Code. There is no opt-out; unused configs are inert. To override workspace-wide MCP for one repo, use <project>/.cursor/mcp.json (nearest-wins).

npm run sync refreshes bundled servers from the aiworkspace template when they are missing from canonical, and preserves servers you added that are not in the template. If canonical already defines context7, sync leaves it unchanged (any transport or URL) — customize it there. For other bundled defaults, use per-project MCP (<project>/.cursor/mcp.json, nearest-wins).

On first use in a project, the tool asks you to approve the project MCP servers. Approve them to enable the tools.

Editor-specific team vs personal settings (Cursor, Claude, VS Code, Codex) live in root-config/README.md. Edit MCP servers only in .agents/mcp.json, then npm run sync.

MCP authentication

Secret-bearing MCP servers load tokens from .env.local at the parent workspace root.

Server typeHow secrets load
Stdio with ${VAR}npm run sync wraps with mcp-load-env.mjs — reads .env.local automatically
HTTP OAuthEditor sign-in (Slack, Atlassian, etc.) — no .env.local
HTTP Bearer, Claude Codecanonical's bare ${VAR} resolves from the real process environment at connection time — no .env.local auto-load. Needs the one-time env load below just like Cursor.
HTTP Bearer, VS Codetwin gets envFile — reads .env.local directly
HTTP Bearer, Cursortwin gets ${env:VAR}; resolves from the real process environment at startup, not envFile — needs the one-time env load below

Setup (each developer, once):

  1. cp .env.example .env.local at the parent workspace root
  2. Fill in tokens (never commit .env.local)
  3. If you use HTTP Bearer MCP servers in Cursor or Claude Code, follow the env-loading step in <workspace-repo>/setup.md §4.1 (<workspace-repo> = this repo folder name)
  4. Restart your editor

Check tokens and Cursor/Claude Code HTTP hints: npm run mcp:check-secrets

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.