Skip to content

agents: add repository conventions as path-scoped rules - #787

Closed
ericholscher wants to merge 1 commit into
mainfrom
claude/agent-rules
Closed

ericholscher wants to merge 1 commit into
mainfrom
claude/agent-rules

Conversation

@ericholscher

@ericholscher ericholscher commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

The conventions that come up in review on this repository (Django template style, where Fomantic UI overrides live and how they are named, Knockout versus web components, the committed build assets) are not written down anywhere an agent reads them, so they get re-learned one review at a time. AGENTS.md can't hold them: it is the shared file synced from readthedocs/common, and anything repository-specific written there is overwritten on the next sync.

This puts them in .claude/rules/, which the sync never touches. Three of the files are scoped with a paths: front matter so they only load when working on templates, styles or JavaScript; the workflow file is unscoped. The content is distilled from Anthony's review comments on past pull requests here and from what the build and lint setup actually enforces, kept to the rules that caused a round of review, with the reason stated where it isn't obvious.

Two small things ride along to make the sync clean. The synced AGENTS.md had drifted from the common copy, partly because prettier reformats it on every commit, so it is restored to the common version and excluded from prettier. The common side is readthedocs/common#336, which adds this repository to the sync script and tells agents where repository-specific rules live.

Worth a look: whether the rules are the ones you'd want enforced, and whether anything in them is wrong or too strong. They are easy to edit after the fact.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XfbXavRE9UKS28VnSZikcL

Capture the template, style, JavaScript and build conventions that come
up in review as path-scoped rules under .claude/rules/, and restore the
synced AGENTS.md so it matches readthedocs/common again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XfbXavRE9UKS28VnSZikcL

Copy link
Copy Markdown
Member Author

Scaling this back to a small addition in the shared file instead, see readthedocs/common#336. Closing.


Generated by Claude Code

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.

2 participants