Skip to content

Add Cursor rules from AGENTS.md#5280

Open
qgallouedec wants to merge 2 commits intomainfrom
cursor
Open

Add Cursor rules from AGENTS.md#5280
qgallouedec wants to merge 2 commits intomainfrom
cursor

Conversation

@qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented Mar 12, 2026

Adds .cursor/rules/agents.mdc so Cursor users get the same repository guidelines as Claude Code / Codex agents.

Note: this duplicates AGENTS.md, which isn't ideal, a cleaner solution is being tracked in #5268


Note

Low Risk
Low risk: adds a documentation-only Cursor rule file with no runtime or library behavior changes.

Overview
Adds .cursor/rules/agents.mdc to mirror the repository’s contribution/engineering guidelines (currently in AGENTS.md) so Cursor users automatically see the same rules (duplication/consistency expectations, docstring format, and paper-link conventions).

Written by Cursor Bugbot for commit 2759d06. This will update automatically on new commits. Configure here.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

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

Thanks, @qgallouedec, having clear guidelines for automated coding agents is definitely valuable.

However, I have a few concerns about this approach.

Cursor already supports AGENTS.md: From my understanding, Cursor already recognizes AGENTS.md as a source of repository guidance. If that is the case, duplicating its contents into .cursor/rules/agents.mdc may not be necessary.

Prefer repository-agnostic conventions: Introducing tool-specific configuration files can make the repository gradually accumulate rules tailored to individual frameworks or editors. While supporting developer tooling is helpful, it may be better to rely on agnostic and broadly supported conventions (such as AGENTS.md) rather than adding files tied to a specific tool like Cursor.

This keeps the repository cleaner and avoids implicitly favoring one development environment over others.

@qgallouedec
Copy link
Member Author

Cursor already supports AGENTS.md: From my understanding, Cursor already recognizes AGENTS.md as a source of repository guidance. If that is the case, duplicating its contents into .cursor/rules/agents.mdc may not be necessary.

Do you have any pointer for this? I felt like the guidelines were ignored. Let me open a pr with a clear violation of to rule and see.

@qgallouedec
Copy link
Member Author

See: #5287

agents.md explicitly asks for replacing arXiv with HF papers, and cursor outputs:


Note

Low Risk
Low risk: documentation-only change that adds an academic reference and does not modify runtime behavior.

Overview
Adds a citation to the DeepSeekMath paper in the accuracy_reward docstring to document the origin of the reward/verification approach, without changing any logic.

Written by Cursor Bugbot for commit dca45db. This will update automatically on new commits. Configure here.

@albertvillanova
Copy link
Member

Do you have any pointer for this?

Just googling it: https://cursor.com/docs/rules#agentsmd

Cursor supports four types of rules:
...

  • AGENTS.md: Agent instructions in markdown format. Simple alternative to .cursor/rules.

@albertvillanova
Copy link
Member

albertvillanova commented Mar 14, 2026

I felt like the guidelines were ignored. Let me open a pr with a clear violation of to rule and see.

Oh, I see you are talking about Cursor Bugbot, not local Cursor.

My understanding is that Cursor Bugbot operates somewhat separately from the normal editor agent, so it may not ingest repository guidance files the same way the interactive agent does. In other words, even if Cursor itself reads AGENTS.md (or .cursor/rules/*.mdc) during coding, Bugbot’s automated PR summaries may be generated with a different prompt/configuration, which could explain why the rule was ignored.

So the behavior you observed in #5287 might indicate that Bugbot does not read AGENTS.md.

It could be worth checking Cursor’s docs or configuration options to see whether Bugbot supports:

  • repository rule ingestion (AGENTS.md or .cursor/rules)
  • or a separate configuration surface (dashboard/project settings) where those policies must be defined.

If Bugbot indeed ignores repo-level rules entirely, then this PR may not change its behavior. It would mostly affect interactive Cursor agents, which (as far as I know) already have some support for AGENTS.md.

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.

3 participants