So Cursor is told to use npm while Claude Code is told to use pnpm, and you find out when a PR shows a package-lock.json nobody asked for. agentdrift reads every agent instruction file in a repo and shows you exactly where they disagree.
Use pnpm for all installs.
Run tests with pytest before every push.
Format Python with ruff.
Use npm for all installs.
Run tests with pytest before every push.
Prefer TypeScript in new files.
Both files are committed. Both are current. Neither author knew the other existed.
The check
Exits 1 when it finds drift, so it drops straight into CI.
Agent instruction files (4) .cursor/rules/api.mdc .cursorrules .github/copilot-instructions.md CLAUDE.md Duplicated in 2+ files (2) safe to dedupe Never commit directly to main; open a PR. .github/copilot-instructions.md, CLAUDE.md Run the test suite with pytest before every push. .cursorrules, CLAUDE.md Only in one file (8) other agents never see these .cursor/rules/api.mdc:4 All FastAPI routes must declare a response_model. .cursorrules:4 Prefer TypeScript over plain JavaScript in new files. CLAUDE.md:10 Keep functions under 40 lines. ... 5 more Contradictions (2) .cursorrules:1 Use npm for all installs. CLAUDE.md:4 Use pnpm for all installs. .cursorrules:3 Format Python with black. CLAUDE.md:8 Format Python with ruff. 10 drift issue(s). Run `agentdrift sync --write`. exit 1
Three kinds of rot
Code blocks, headings and frontmatter are ignored, so only real instructions get compared.
Harmless today, drift tomorrow. Someone edits one copy and now you have a contradiction instead.
Your FastAPI response_model rule lives in a Cursor .mdc. Claude Code has never read it, so it never follows it.
npm vs pnpm vs yarn vs bun, black vs ruff, tabs vs spaces, rebase vs merge, pytest vs unittest. Flagged with file and line, never auto-resolved.
The fix
Every rule kept, deduped, attributed back to where it came from. Contradictions land in a \"Needs a human decision\" section, because picking npm over pnpm is your call.
pip install -e .Python 3.10+. No dependencies.agentdrift checkReport drift. Exit 1 if any.agentdrift syncPreview the merged AGENTS.md. Dry run by default.agentdrift sync --write --stubsWrite AGENTS.md, replace the others with pointers to it, keep a .bak of each.- run: pip install -e . && agentdrift check
Run it once after sync and it exits clean: the generated pointer files carry no rules to disagree about.