Rules / Drift between files

contradiction

Two lines in one file say opposite things.

warning by default Drift between files Inline suppression allowed

Source: Claude Code docs: How Claude remembers your project (code.claude.com), read 14 October 2026.

On GitHub: the rule doc and the tests.

All rules73

What it catches#

Two lines in one file say opposite things.

Two lines in one file that give the same instruction with opposite polarity: "always X" and "never X", "do X" and "do not X", "prefer X" and "avoid X". The action is compared after removing case, punctuation and emphasis, so the rule looks for the same wording, not for every logical conflict. Items under a heading or parent bullet that lists things to avoid ("Don'ts", "Anti-patterns") are read as negative.

Why it matters#

When rules conflict the agent may follow either one. Keep the one you mean.

Bad example#

- Always run the full test suite before pushing.
...
- Don't run the full test suite before pushing; CI does it.

The second line was added months later when CI got faster. Claude Code's docs say that when two instructions contradict, Claude may pick either one, so sometimes it runs the suite and sometimes it does not.

Good example#

- Run only the tests for the package you changed before pushing; CI runs the full suite.

How to fix#

Decide which rule is current, delete the other, and say why if the reason is not obvious. If both are right in different situations, state the condition in one line instead of keeping two rules.

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 contradiction -- why this one is fine -->

For a whole file:

<!-- asitis-disable-file contradiction -- why this file is an exception -->

For every file, turn it off or change its severity in .asitisrc.json:

{ "rules": { "contradiction": "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#

Claude Code docs: How Claude remembers your project, read on 14 October 2026.

Run the rule

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.