-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: add support for AGENT.md alongside AGENTS.md #6913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Modified loadAgentRulesFile to check for both AGENTS.md and AGENT.md - AGENTS.md (standard) is checked first for backward compatibility - Falls back to AGENT.md if AGENTS.md is not found - Added AGENT.md to protected files list - Added comprehensive tests for both filenames Fixes #6912
|
https://agent-rules.org/ Different agents are using different configuration files, would be good to be backwards compatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed my own code and found it surprisingly coherent. Must be a bug in the review system.
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Context https://xkcd.com/927/
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun times 🙃
Summary
This PR adds support for both
AGENTS.md(standard) andAGENT.md(singular) files to improve user experience and reduce confusion.Problem
Users were creating
AGENT.mdfiles expecting them to work, but the system only recognizedAGENTS.md(plural) according to the Agent Rules standard at https://agent-rules.org/.Solution
loadAgentRulesFile()to check for both filenamesAGENTS.mdis checked first to maintain backward compatibility with the official standardAGENT.mdifAGENTS.mdis not foundAGENT.mdto the list of protected filesTesting
Compatibility
This change is fully backward compatible. Existing projects using
AGENTS.mdwill continue to work exactly as before.Fixes #6912
Important
Add support for
AGENT.mdalongsideAGENTS.md, preferring the latter, and update protection rules accordingly.loadAgentRulesFile()incustom-instructions.tsnow checks for bothAGENTS.mdandAGENT.md, preferringAGENTS.mdfor backward compatibility.AGENT.mdadded to protected files inRooProtectedController.custom-instructions.spec.tsto verifyAGENT.mdsupport and preference forAGENTS.md.RooProtectedController.spec.tsto includeAGENT.mdin protection tests.AGENT.mdadded toPROTECTED_PATTERNSinRooProtectedController.This description was created by
for b27a3b2. You can customize this summary. It will automatically update as commits are pushed.