feat: add support for AGENTS.local.md personal override files#11183
feat: add support for AGENTS.local.md personal override files#11183
Conversation
Review complete. No issues found. The latest commit (fb5d347) reverts the behavior back to preferring
All previously flagged issues have been resolved. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| expect(result).toContain("Local overrides from AGENTS.local.md") | ||
| }) | ||
|
|
||
| it("should not load AGENT.local.md (only AGENTS.local.md is supported)", async () => { |
There was a problem hiding this comment.
@roomote just remove this test, don't need to test AGENT.md
Review complete. The implementation is clean and well-structured.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Removed the unnecessary AGENT.md test as requested. All local checks passed. |
| expect(result).toContain("Local overrides from AGENTS.local.md") | ||
| }) | ||
|
|
||
| it("should not load AGENTS.local.md when base AGENTS.md does not exist", async () => { |
There was a problem hiding this comment.
@roomote it should load this even if AGENTS.md doesn't exist
Fixed the reported issue. AGENTS.local.md now loads even when AGENTS.md doesn't exist. All tests pass. |
…) when present - Remove break statement to load both AGENTS.md and AGENT.md if they exist - Update function documentation to clarify all files are loaded - Update test to verify both files are loaded when both exist
…local.md) when present" This reverts commit f17637d.
Related GitHub Issue
This PR was initiated from a Roo Code Cloud task request.
Roo Code Task Context (Optional)
View task on Roo Code Cloud
Description
This PR adds support for
AGENTS.local.mdfiles alongsideAGENTS.mdfiles, providing users with a place to put personal overrides or preferences that they might not want to check in to version control.Key implementation details:
loadAgentRulesFileFromDirectoryinsrc/core/prompts/sections/custom-instructions.tsto also look for.local.mdvariants after loading the base fileAGENTS.mdexists, the system now also checks forAGENTS.local.mdand appends its content (same forAGENT.md/AGENT.local.md).gitignorepatterns to excludeAGENTS.local.mdandAGENT.local.mdfrom version controlThe local file content is displayed with a distinct header (
# Agent Rules Local (AGENTS.local.md):) to differentiate it from the standard rules.Test Procedure
cd src && npx vitest run core/prompts/sections/__tests__/custom-instructions.spec.ts- all 42 tests passPre-Submission Checklist
Screenshots / Videos
N/A - No UI changes
Documentation Updates
AGENTS.local.mdfor personal overrides.Additional Notes
This feature provides a convenient way for developers to maintain personal agent rule overrides without affecting the shared
AGENTS.mdthat is checked into version control. The.local.mdfiles are automatically gitignored.Important
Adds support for
AGENTS.local.mdfiles for personal agent rule overrides, with tests and.gitignoreupdates.loadAgentRulesFileFromDirectoryincustom-instructions.tsnow loadsAGENTS.local.mdafterAGENTS.md.AGENTS.local.mdcontent if it exists, even ifAGENTS.mddoes not..gitignoreupdated to excludeAGENTS.local.mdandAGENT.local.md.custom-instructions.spec.tsfor loadingAGENTS.local.mdwith/withoutAGENTS.md.AGENTS.local.mdcontent displayed with header# Agent Rules Local (AGENTS.local.md):.This description was created by
for f17637d. You can customize this summary. It will automatically update as commits are pushed.