Skip to content

Add CLAUDE.md and move AGENTS.md detail into linked docs - #15222

Open
mattmillerai wants to merge 1 commit into
masterfrom
matt/core-366-slim-agents-md
Open

Add CLAUDE.md and move AGENTS.md detail into linked docs#15222
mattmillerai wants to merge 1 commit into
masterfrom
matt/core-366-slim-agents-md

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

ELI-5

AGENTS.md got long enough that the rules at the bottom stop getting read. This moves the deep detail into three linked docs and keeps the root file to the rules that should steer every change. Nothing is deleted. It also adds a CLAUDE.md so Claude Code actually sees these rules — it does not read AGENTS.md.

Opening as a draft because both calls are yours: whether core wants the split at all, and whether it wants a Claude-specific file.

Problem

  1. AGENTS.md is 355 lines. Rules near the end compete with everything above them for attention.
  2. Claude Code reads CLAUDE.md, not AGENTS.md, and does not fall back. Today it gets no project instructions in this repo.

Change

AGENTS.md 355 -> 167 lines. The detail moves to:

  • docs/agents/architecture.md — architecture boundaries, state ownership, interface contracts
  • docs/agents/models.md — dtype/device/memory, optimized ops, model detection, autograd
  • docs/agents/nodes.md — node conventions, inputs and outputs

The root keeps the rules that apply to any change: engineering style, the no-internet-requests guardrails, Python style, commit/review habits, and the highest-signal rule from each moved section with a link to the rest. A Commands section is new — lint and test invocations were not written down anywhere in this file.

About the previous CLAUDE.md

#14757 added CLAUDE.md as a symlink, which broke updates and was reverted in 7cf4e78. This adds it as a regular file (git mode 100644, not 120000) containing a one-line @AGENTS.md import. No symlink, so the packaging path that broke before is not involved.

Verification

  • All 97 rule bullets from the previous AGENTS.md verified present verbatim in the new set — scripted check, zero missing.
  • All nine internal doc links resolve.
  • CLAUDE.md confirmed a regular file, not a symlink.
  • LF endings on every touched file.
  • CODEOWNERS extended to cover /CLAUDE.md and /docs/agents/, matching the existing /AGENTS.md entry.

Docs only — no code paths touched.

Open question

@alexisrolland asked about adding native-node design rules (title verbs, categories, singular/plural inputs, widget naming). docs/agents/nodes.md is the intended home for those — it can grow without pushing the root file back over the line.

AGENTS.md had grown to 355 lines. Move the detailed architecture, model
and node sections into docs/agents/ and keep the root file to the rules
that should steer every change. All existing rules are preserved.

Add CLAUDE.md as a regular file containing an @AGENTS.md import so Claude
Code reads the same instructions. The previous attempt used a symlink,
which broke updates and was reverted in 7cf4e78.
@mattmillerai mattmillerai added the cursor-review Trigger multi-model Cursor code review label Aug 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

✅ No high-signal findings.

Panel: 8/8 reviewers contributed findings.

@mattmillerai

Copy link
Copy Markdown
Contributor Author

Verified the shim actually works rather than assuming it: ran a fresh Claude Code session in a checkout of this branch and asked it to answer from loaded instructions only, without reading or searching any files. It correctly recited the mascot rule and all five no-internet-requests bullets. So the one-line @AGENTS.md import does deliver the rules — Claude Code is no longer flying blind in this repo.

Also confirmed the file is a regular blob, not a symlink:

$ git ls-files -s CLAUDE.md
100644 43c994c2d3617f947bcb5adf1933e21dabe46bb5 0	CLAUDE.md

100644, not 120000. That is the only meaningful difference from #14757.

@mattmillerai
mattmillerai marked this pull request as ready for review August 2, 2026 06:45
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 646fa8d7-e5e9-4c3e-94ac-240798b00b88

📥 Commits

Reviewing files that changed from the base of the PR and between f06a187 and a88c055.

📒 Files selected for processing (6)
  • AGENTS.md
  • CLAUDE.md
  • CODEOWNERS
  • docs/agents/architecture.md
  • docs/agents/models.md
  • docs/agents/nodes.md

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added the Core Core team dependency label Aug 2, 2026
@alexisrolland

Copy link
Copy Markdown
Member

@mattmillerai how can we do if we wish to add more guidelines for agents considering the length restriction?

@mattmillerai

Copy link
Copy Markdown
Contributor Author

@mattmillerai how can we do if we wish to add more guidelines for agents considering the length restriction?

@alexisrolland good question. The general rule of thumb we are following is that anything beyond the AGENTS.md file has diminishing returns. You can reference other doc paths within AGENTS.md for the agents to look at when needing to add additional context but overall the AGENTS file itself shouldn't exceed the length restriction (200 lines); thus it's an exercise in deciding the most important/concise rules up front and referencing other docs for the remainder. Let me know if that helps answer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Core team dependency cursor-review Trigger multi-model Cursor code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants