Skip to content

[doc] add agent context for Ray documentation#63227

Open
dstrodtman wants to merge 7 commits into
ray-project:masterfrom
dstrodtman:doc-879-ray-doc-claude-md
Open

[doc] add agent context for Ray documentation#63227
dstrodtman wants to merge 7 commits into
ray-project:masterfrom
dstrodtman:doc-879-ray-doc-claude-md

Conversation

@dstrodtman
Copy link
Copy Markdown
Contributor

Why

Ray's per-library .claude/CLAUDE.md convention is in place for data, serve, train, tune, rllib, and src/ray. doc/ is missing this file. Agents working on docs (Claude Code sessions, OSS contributors using AI assistants) have no in-repo signal about how Ray's CI is configured for documentation changes or how to scope PRs to land cleanly.

What

Adds doc/.claude/CLAUDE.md with concise pointers to:

Under 50 lines per the existing per-library convention. Wording can iterate.

Verification

  • find ray/doc -path '*/.claude/CLAUDE.md' returns the new file.
  • File loads when a Claude Code session is rooted at doc/ (a session under doc/source/ will pick this up alongside the top-level .claude/CLAUDE.md).

Context

Tracked under DOC-879 in anyscale/docs Jira (private). Captures the test-rule discipline that emerged during the docs-infra mapping work in #63132.

@dstrodtman dstrodtman requested a review from a team as a code owner May 8, 2026 13:15
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new CLAUDE.md file in the doc/ directory to provide context and guidelines for AI agents working on Ray documentation. The reviewer suggested removing the /rebuild skill from the documentation-specific instructions to maintain focus on documentation tasks and avoid misleading agents about the scope of their work.

Comment thread doc/.claude/CLAUDE.md Outdated
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels May 8, 2026
Copy link
Copy Markdown
Contributor

@ronny-anyscale ronny-anyscale left a comment

Choose a reason for hiding this comment

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

lgtm

@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label May 8, 2026
dstrodtman and others added 5 commits May 18, 2026 13:02
## Why

Ray's per-library `.claude/CLAUDE.md` convention is in place for `data`,
`serve`, `train`, `tune`, `rllib`, and `src/ray`. `doc/` is missing this
file. Agents working on docs have no in-repo signal about how Ray's CI
is configured for documentation changes or how to scope PRs to land
cleanly.

## What

Adds `doc/.claude/CLAUDE.md` with concise pointers to:

- How `.buildkite/test.rules.txt` maps file patterns to tag sets, and
  which patterns the `doc` tag covers (post-ray-project#63132 shape).
- Scope discipline for docs-only PRs: take the lightest path; don't
  bundle in non-doc changes.
- When to revise test rules vs. work around them (precedent: ray-project#63132).
- Existing skills (`/lint`, `/fetch-buildkite-logs`, `/rebuild`).

Under 50 lines per the existing per-library convention.

## Context

Tracked under `DOC-879` in anyscale/docs Jira (private). Captures the
test-rule discipline that emerged during the docs-infra mapping work in
ray-project#63132.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Follows up ray-project#63057 (ban new .rst lint check) by documenting
the policy in two places contributors and agents will read first:

- doc/README.md: new "Contributing new documentation pages" section.
- doc/.claude/CLAUDE.md: new "File format for new pages" section,
  including the deliberate `git mv` allowance for renames and directory
  reorganization.

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
The previous commit had a typo (workstrees) so the directory was not
actually ignored. Also adds a trailing newline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
@dstrodtman dstrodtman force-pushed the doc-879-ray-doc-claude-md branch from 9306c14 to 08ed644 Compare May 18, 2026 17:02
dstrodtman and others added 2 commits May 18, 2026 13:14
Add four sections capturing authoring gotchas surfaced during the
DOC-932 dependency-upgrade probe work and during PR review of the
initial agent-context add (ray-project#63227):

- **DCO sign-off.** Every commit on a ray-project/ray PR needs a
  Signed-off-by trailer or the DCO check fails the PR.
- **Cross-references between .md and .rst sources.** Use the {doc}
  role, not bare [text](path.md), because MyST-Parser 2.0's
  cross-extension resolution emits myst.xref_missing on .rst targets,
  which fail_on_warning turns into a build failure.
- **Comparing PR previews against /en/master vs /en/latest.** Use
  /en/master to isolate regressions attributable to the PR. /en/latest
  mixes in unreleased upstream churn.
- **Editing the docs lockfile.** Hand-edit additive bumps; regenerate
  via raydepsets when a package's direct deps change. Precedent:
  ray-project#63344 caught stale via-comments after the pydata-sphinx-theme bump
  dropped packaging as a direct dep.

Folds the net-new content from ray-project#63354 (doc-943-claude-md-followups)
into this PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants