Skip to content

[docs] Add AGENTS.md and CLAUDE.md for AI coding agent context#4809

Open
abiazett wants to merge 1 commit into
ray-project:masterfrom
abiazett:add-agents-md
Open

[docs] Add AGENTS.md and CLAUDE.md for AI coding agent context#4809
abiazett wants to merge 1 commit into
ray-project:masterfrom
abiazett:add-agents-md

Conversation

@abiazett
Copy link
Copy Markdown

@abiazett abiazett commented May 7, 2026

Summary

Add AGENTS.md (cross-tool AI agent context file) and a CLAUDE.md symlink
pointing to it, giving AI coding agents repo context: project layout,
build/test/lint commands, code generation workflow, and key conventions.

Why

AI coding agents (Claude Code, Codex, Cursor, GitHub Copilot, etc.) work more
effectively when they have a context file documenting repo structure and
commands. Without one, agents must rediscover the repo layout, build commands,
and conventions from scratch each session — leading to slower iteration,
incorrect commands, and style violations.

  • AGENTS.md is the cross-tool convention (Codex, Cursor, etc.)
  • CLAUDE.md symlink ensures Claude Code auto-discovers it
  • Single source of truth, no content duplication

What's included

The file documents (121 lines, under 150-line target):

  • Repository structure: monorepo layout and that ray-operator/ is the primary component
  • Build and test commands: key make targets and where to run them from
  • Single-file commands: how to lint or format individual files
  • Code generation workflow: the sequence after modifying API types
  • Coding conventions: import ordering, formatting (gofumpt), line length (120), nolint directives, pre-commit hooks

Testing

  • markdownlint AGENTS.md passes
  • pre-commit run --files AGENTS.md CLAUDE.md passes
  • No code changes — all existing CI should pass unchanged

Closes #4808

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ab0525365

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread AGENTS.md
make test # Unit tests (uses envtest for controller tests)

# Lint and format
make lint # golangci-lint (via ./scripts/lint.sh)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Replace invalid make lint instruction

This guide states that all commands run from ray-operator/, but it then instructs make lint, which is not a valid target there (ray-operator/Makefile has no lint: rule). Following this new instruction fails with No rule to make target 'lint', so agents and contributors using this file will immediately hit a dead-end on the documented lint workflow.

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
golangci-lint run ./path/to/file.go

# Format a single file
gofumpt -w path/to/file.go
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add single-file test command

Comment thread AGENTS.md
### Testing

- Unit tests use envtest for controller tests (simulated API server)
- E2E tests require a Kubernetes cluster (not run locally)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add instruction for agents to create local Kind clusters for testing?

Copy link
Copy Markdown
Member

@Future-Outlier Future-Outlier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking whether accept this PR or not, since most people can just feed DEVELOPER.md to claude code, codex, or gemini.

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.

[Feature] Add AGENTS.md for AI coding agent context

3 participants