Back to all rules / Drift between files
instruction-drift
Mirrored instruction files share most rules but not all.
Source: agents.md (agents.md), read 14 October 2026.
On GitHub: the rule doc and the tests.
Jump to another rule89
What it catches#
Mirrored instruction files share most rules but not all.
Two files that are meant to say the same thing (AGENTS.md and CLAUDE.md, say) and mostly do, but one has rules the other lacks. Each file of the pair gets one note, on its first rule the other file lacks, with a count and up to three examples. A pair that agents-md-shadowed already reports is skipped, since importing AGENTS.md fixes both. The files must sit in the same folder, and the check stays silent unless at least three rules match and the matching rules are at least half of all the rules in the two files, so unrelated documents do not alert. A pair where one file imports the other is skipped. Both files have to be in the same lint run: a whole-folder lint, or both passed as paths.
Why it matters#
Two files that are meant to say the same thing (AGENTS.md and CLAUDE.md, say) have drifted. Fires when at least half of their rules match (Jaccard) and at least three are shared; silent below that so unrelated files do not alert. Lists up to 10 differing rules per pair.
Bad example#
<!-- AGENTS.md: 41 rules -->
...
- Run `pnpm lint` before opening a PR.
<!-- CLAUDE.md: the same 40 rules, copied in March -->
...
The lint rule was added to AGENTS.md in June. Claude Code users never got it.
How to fix#
Replace the copy with an @AGENTS.md import, a symlink, or a generator such as rulesync that writes every variant from one source. If both files must exist separately, copy the missing rules across now and pick which file is the source for next time.
Suppress or configure#
For one finding, put a comment on the line above it. The reason after -- is optional but worth writing:
<!-- asitis-disable-next-line instruction-drift -- why this one is fine -->
For a whole file:
<!-- asitis-disable-file instruction-drift -- why this file is an exception -->
For every file, turn it off or change its severity in .asitisrc.json:
{ "rules": { "instruction-drift": "off" } }
A .asitisrc.json overrides entry limits a change to some paths, and a baseline (asitis lint --format json --write-baseline) accepts today's findings so only new ones fail the build.
Source#
agents.md, read on 14 October 2026.
See what an agent changed in your CLAUDE.md. Keep or revert each change.
The linter is free and needs no signup. I'm also building a desktop editor for the markdown your agents write and read. It shows what an agent changed since you last looked, lets you keep or revert each change, and never touches a line you didn't edit. No release date yet. One email to confirm, one when the paid beta opens, one when 1.0 ships. $29 once for a founding licence, with 24 months of updates.
Or add the linter to CI, no email needed.
Your address is stored with Cloudflare, which hosts this site. No IP address is kept. See the privacy policy.
Related guides
Run the rule
- In your browser, on one file
- In Claude Code, on the project
- In CI, on every pull request
This page is generated from the plugin's rule registry. Edit it on GitHub. False positive? Open an issue with the line it fired on.