feat(drift): add tool-config-sync checker#37
Merged
theDakshJaitly merged 1 commit intotheDakshJaitly:mainfrom Apr 24, 2026
Merged
feat(drift): add tool-config-sync checker#37theDakshJaitly merged 1 commit intotheDakshJaitly:mainfrom
theDakshJaitly merged 1 commit intotheDakshJaitly:mainfrom
Conversation
setup.sh copies identical content to CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, and .github/copilot-instructions.md. If a user installs more than one AI tool and edits one file in place, the other copies silently drift out of sync. Add a structural checker that scans the project root for those files, compares content, and emits TOOL_CONFIG_DRIFT warnings for any file that no longer matches the first-seen reference. No-op when fewer than two are installed. .opencode/opencode.json is intentionally excluded because it's a different format (per .tool-configs/README.md). Wired into runDriftCheck like the other structural checkers (index-sync, script-coverage). 6 new tests in test/checkers.test.ts cover the no-op cases, the drift case, multiple drifted files, and the nested .github/copilot-instructions.md path. Fixes theDakshJaitly#8
theDakshJaitly
approved these changes
Apr 24, 2026
Owner
theDakshJaitly
left a comment
There was a problem hiding this comment.
LGTM — verified locally, all 194 tests pass.
Owner
|
Thanks again, Matt — clean scope, good tests, and the opencode exclusion call-out saved me a question. Merging now. Happy to take that |
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.
Fixes #8
What changed
setup.shcopies identical content toCLAUDE.md,AGENTS.md,.cursorrules,.windsurfrules, and.github/copilot-instructions.md. If someone installs more than one tool and then edits one of those files in place, the copies silently drift. Nothing inmex checksurfaced that before.Adds a structural checker at
src/drift/checkers/tool-config-sync.ts:TOOL_CONFIG_DRIFTwarning for any file that doesn't match the first one seen..opencode/opencode.json— per.tool-configs/README.md, that file is a different format pointing at.mex/AGENTS.mdrather than sharing content with the others.Wired into
runDriftCheck()next to the existing structural checkers (index-sync,script-coverage).TOOL_CONFIG_DRIFTadded to theIssueCodeunion.Tests
6 new cases in
test/checkers.test.ts:.github/copilot-instructions.mdis picked upFull suite:
npx vitest run→ 118 tests passing.Out of scope
Left
mex sync-configs(the "bonus" suggestion in the issue) out of this PR so the checker can land standalone. Happy to follow up if the checker looks good.