[Doc] Add CLAUDE.md / AGENTS.md with contribution rules for AI agents#3686
Merged
vmoens merged 1 commit intopytorch:mainfrom Apr 28, 2026
Merged
[Doc] Add CLAUDE.md / AGENTS.md with contribution rules for AI agents#3686vmoens merged 1 commit intopytorch:mainfrom
vmoens merged 1 commit intopytorch:mainfrom
Conversation
…I agents Documents the house rules for LLM-driven contributions: import policy, implement_for / torchrl.timeit / torchrl_logger usage, TensorDict-first expectations, the _AcceptedKeys pattern for objectives, compile-friendliness guidance, test/doc/tutorial/benchmark requirements, the two-release deprecation schedule, and the canonical PR label set. AGENTS.md is symlinked to CLAUDE.md so Codex and Claude see the same rules and they cannot drift.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/3686
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 Awaiting Approval, 2 New Failures, 13 PendingAs of commit 5c6aa62 with merge base e479313 ( AWAITING APPROVAL - The following workflows need approval before CI can run:
NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.mddocumenting TorchRL's house rules for LLM-driven contributions, sitting on top ofCONTRIBUTING.md.AGENTS.mdas a symlink toCLAUDE.mdso Codex and Claude see the same rules and they cannot drift.The rules cover:
_has_<name> = importlib.util.find_spec(...)) or genuine circular imports (tryTYPE_CHECKINGfirst); no wildcard imports;from __future__ import annotationsat the top of new files.torchrl.implement_for(frompyvers) instead of hand-rolled version branching.torchrl_loggerinstead ofprint; usetorchrl.timeitinstead of ad-hoctime.time()._AcceptedKeyspattern for new objectives.torch.compile/ cudagraphs friendliness (encouraged, not mandatory): prefertorch.whereover Python control flow, avoid data-dependent shapes /.item()on hot paths.docs/source/reference/*.rst; Sphinx-style docstrings with runnable>>>examples; arXiv refs for paper-based features; no emojis.# prose commentsrather thanprint(...).sota-implementations/<algo>/plus asota-check/entry.0.X, default change in0.X+1, removal in0.X+2), usingDeprecationWarning/FutureWarningwith the target version named explicitly in the message.[Tag]set documented ([Algorithm] [BE] [BugFix] [CI] [Deprecation] [Doc] [Feature] [Minor] [Performance] [Quality] [Refactor] [Test] [Versioning]).No squash-commit requirement.
Test plan
CLAUDE.mdon GitHub and confirm the formatting reads well.AGENTS.mdresolves toCLAUDE.md(GitHub renders symlinks as a link to the target).timeit,_AcceptedKeys,implement_for, label set in recentgit log).