fix: stop adding agent context files to .gitignore - #84
Open
claytoncollie wants to merge 1 commit into
Open
claytoncollie wants to merge 1 commit into
claytoncollie wants to merge 1 commit into
Conversation
CLAUDE.md, .cursorrules, and .windsurfrules are human-authored context files that projects usually commit. The add-on only writes a marked section into them, so listing them in .gitignore is misleading and does nothing for a file that is already tracked. Keep only the machine- generated MCP config files ignored.
Coverage Report
File CoverageNo changed files found. |
Contributor
Author
|
@christianc1 Do you remember why we git ignoreed these rule files in the first place? |
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.
Problem
When Agent Tools is enabled, the add-on adds each agent's context file to the project
.gitignore, next to the MCP config:claude→.mcp.json,CLAUDE.mdcursor→.cursorruleswindsurf→.windsurfrulesThose context files are human-authored. Projects usually commit them (a shared
CLAUDE.md, a team.cursorrules). The add-on only writes a marked<!-- >>> Agent Tools -->section into the file. It does not own the whole file. Two problems follow:.gitignoreline does nothing. Git keeps tracking the file, so the entry is misleading.git rm --cached CLAUDE.md, which drops a shared project doc.I hit this on a WordPress project whose tracked
CLAUDE.mdlanded under the add-on's ignore block after an upgrade.Fix
Only the machine-generated MCP config files stay in
.gitignore. Context files leavegitignoreEntries:claude→['.mcp.json']cursor→[]windsurf→[]vscode→ unchanged ([])I also tightened the
gitignoreEntriesdoc comment so the intent is explicit.Tests
typecheck,eslint,prettier --check, andtest:unit(135 passing) are green. No test asserted the context-file ignore, so none needed changing.