Skip to content

docs: AGENTS.md for every agent; CLAUDE.md imports it - #409

Merged
foxnne merged 1 commit into
mainfrom
docs/agents-md
Oct 14, 2026
Merged

foxnne merged 1 commit into
mainfrom
docs/agents-md

Conversation

@foxnne

@foxnne foxnne commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Other coding agents can now read the repo's instructions.

  • Content moves to AGENTS.md. The instructions in the root and in sdk/, app/, core/, backend/, plugins/, tests/ and web/ now live in AGENTS.md, the file Codex, Cursor and other agents read.
  • Each directory keeps a one-line CLAUDE.md stub. It reads @AGENTS.md. The root stub imports CONTRIBUTING.md too, since other agents don't follow @ imports and the root AGENTS.md now tells them to read it.
  • Why stubs rather than relying on Claude Code's own AGENTS.md support: since 2.1.277 Claude Code reads AGENTS.md, but only when no CLAUDE.md exists in the directory chain. That support also depends on Claude Code's feature flags: on Bedrock, Vertex or Foundry, or with telemetry off, it isn't there. A stub that imports the file loads it every time, while the content stays in one place. The root AGENTS.md says to edit the AGENTS.md and leave the stubs alone.
  • References follow the move:
    • CONTRIBUTING.md;
    • docs/PITFALLS.md;
    • the area files' cross-references;
    • code comments that said "see CLAUDE.md" (build.zig, build.zig.zon, sdk/, app/layout/, src/editor/Editor.zig);
    • bench-markdown, which embedded the root CLAUDE.md as its medium sample and would otherwise have measured a two-line stub.

core/fuzzy.zig's tests keep the string "CLAUDE.md". It's a test input for case-folding, not a reference to the file.

SDK impact

  • None. sdk/AGENTS.md and sdk/CLAUDE.md aren't in sdk/build.zig.zon's .paths. core/ is vendored whole into the tarball, stub included, and the stub resolves there too.

Verified

  • scripts/check-fmt.sh passes.
  • zig build -l configures.
  • zig build bench-markdown runs on the new sample ("medium (AGENTS.md), 19106 bytes").
  • A grep finds no CLAUDE.md reference left outside the stubs, the root AGENTS.md's note about them, and core/fuzzy.zig's test strings.

🤖 Generated with Claude Code

Base automatically changed from docs/pitfalls to main October 14, 2026 14:55
The repo's agent instructions move from CLAUDE.md to AGENTS.md, the file Codex, Cursor and
other agents read, in the root and each area. Each directory keeps a one-line CLAUDE.md that
imports it (`@AGENTS.md`; the root's imports CONTRIBUTING.md too): Claude Code reads AGENTS.md
only as a fallback, which a CLAUDE.md overrides and which needs its feature flags. References in
docs, code comments and the markdown bench's sample follow the move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne marked this pull request as ready for review October 14, 2026 17:26
@foxnne
foxnne merged commit 3e07125 into main Oct 14, 2026
15 checks passed
@foxnne
foxnne deleted the docs/agents-md branch October 14, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant