When you ask AI to write code, many tools read "instruction files" placed in the repository. If you write rules such as "run tests with this command" or "do not touch this folder," the agent works from them every time. The problem arises when a team uses several tools at once. If you prepare a file for each tool, such as CLAUDE.md for Claude Code and copilot-instructions.md for GitHub Copilot, the same rules end up written in several places.
Each file may look plausible when read alone, yet they may disagree when placed side by side. Independent researcher Aditi Patodiya, based in the United States, manually counted how often such "cross-tool instruction conflicts" occur in public repositories. She also tested whether lightweight automatic detectors can find them [1]. The paper is available on arXiv, and its comment field states that it was accepted at the SAC 2027 conference.
What this study examined
The study asks two questions. First, what share of repositories have per-tool instruction files that contradict each other? Second, can an automatic detector tell contradictions apart from statements that are legitimately different from tool to tool?
The second question is hard because text that differs is not the same as text that contradicts. Differences can be legitimate: only one file may contain settings for a specific tool, or commands may differ because they target different subpackages. The study defined a "conflict" only as a case where the files concern the same subject, their scope of application overlaps, and even a capable agent could not follow both at the same time.
Method: two people read every file in 128 repositories
The starting point was an existing public dataset that compiles a sampling frame of 40,585 public GitHub projects. From it, the study selected repositories that have files for two or more tools among five types: AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, and .cursorrules. The conditions were that the files be readable, non-empty, and written in English. This yielded 516 repositories.
From these, 128 repositories were drawn by probability sampling so that no bias arises across tool combinations (for example, the pair of AGENTS.md and CLAUDE.md). The 241 file pairs they contain were read in full by two people, the author and an external software engineer, who each judged them independently. Their judgments agreed on 89.63% of pairs. The 25 disagreements were reconsidered on the basis of what the files say. In the end, 38 pairs were conflicts and 203 had no conflict. The results were weighted to account for sampling probabilities and are estimated as a share of all 516 repositories.
Finding 1: About one in five has conflicts; command mismatches are the most common
The estimated share was 20.83% (95% confidence interval 12.87–29.44%). The author had set a criterion in advance: "at least 10%." The one-sided lower bound is 14.01%, which exceeds this criterion. Using the judgments of either rater alone, the share was 17.30% (author) and 21.88% (external annotator). Both lower bounds exceed 10%. Of the 128 sampled repositories, conflicts were actually found in 28.
| Tool combination | Pairs reviewed / pairs in population | Share with conflicts (estimate) [95% CI] |
|---|---|---|
| AGENTS.md and CLAUDE.md | 49 / 232 | 21.77% [8.84, 36.77] |
| AGENTS.md and Copilot | 40 / 178 | 20.22% [7.50, 34.87] |
| CLAUDE.md and Copilot | 42 / 165 | 18.43% [7.14, 32.10] |
| CLAUDE.md and Cursor | 23 / 24 | 12.50% (interval not computable) |
| AGENTS.md and Cursor | 21 / 22 | 9.66% [4.55, 19.89] |
Estimates by tool combination. The three main combinations are all around 20%, but the confidence intervals are wide. Created by ScienSeeds based on Table 3 of the original paper.
Source: Created by ScienSeeds (figures from Table 3 of the original paper)
The most common type of conflict was a mismatch in commands or toolchains (16 of 58 mentions). Next came coding style and API specifications (11), followed by polarity clashes (8), where "don't" and "always do" are exact opposites. Examples given in the paper include the following [1].
- One file prohibits the use of a certain test command, while another specifies "use this without exception."
- For the same browser test, one file says to run
yarn test-e2e, while the other saysmake test-e2e. - For backend tests, one file instructs writing them in xUnit, while the other says TUnit.
- For documentation-only changes, one file says "no tests needed," while the other says "always run tests after changes."
In an exploratory analysis, repositories with longer instruction files tended to have conflicts found more often (odds ratio 2.38 per one standard deviation increase in average length). A larger number of tools used and an uneven number of updates across files were also associated with conflicts. No association was found with repository size or age. However, these were not hypotheses specified and tested in advance. The author also notes that the association with the number of tools includes a mechanical effect: more files mean more combinations.
Finding 2: Lightweight detectors find almost none of the conflicts
Next, the study compared three kinds of detectors.
- Lexical similarity: judges by how similar the statements in two files are.
- NLI (natural language inference): uses a language model trained to judge whether two sentences contradict each other (DeBERTa-v3 base).
- Structured atom model: breaks instructions into small units such as "command" and "version," then judges with a statistical model that uses eight features.
Evaluation used 77 repositories separate from those used in development (149 pairs, of which 23 were conflicts). On the development data, the study searched for a threshold at which "80% of alerts are genuine," in order to reduce false alarms. However, no method reached that level.
| Detector | Conflicts found (out of 23) | False alarms | Precision | AUROC [95% CI] |
|---|---|---|---|---|
| Lexical similarity | 0 | 0 | ― | 0.526 [0.410, 0.629] |
| NLI | 1 | 6 | 0.143 | 0.736 [0.601, 0.835] |
| Structured atoms | 1 | 2 | 0.333 | 0.606 [0.479, 0.724] |
Detection performance on the held-out test. AUROC indicates whether a detector gives pairs with conflicts a higher score than pairs without (0.5 is the same as guessing, 1.0 is perfect). Created by ScienSeeds based on Table 7 of the original paper.
Source: Created by ScienSeeds (figures from Table 7 of the original paper)
With the setting that raises alerts, none of the three methods caught more than one conflict. The author had hypothesized that "the structured atom model outperforms the other methods," and this was not supported either. The AUROC of lexical similarity is 0.526, about the same as guessing. Whether the surface wording is similar had almost no relation to whether the files conflict. The earlier example, "the same command is prohibited in one file and mandatory in the other," was also missed by all three methods.
On the other hand, NLI showed some ability in ranking "which pairs look suspicious." The top 37 pairs by NLI score (the top 25% overall) contained 13 of the 23 conflicts. Conflicts made up 35.1% of these 37 pairs, a little more than double the overall conflict share of 15.4%. From this, the author says that although NLI cannot be used for automatic alerts, it may help decide the order in which people review pairs. However, this is an exploratory analysis conducted after seeing the results. It rests on the small number of 23 conflicts and is not an established conclusion.
What to consider when using this
What this study established is that conflicts between the texts of instruction files are not rare in public repositories that meet the conditions. It did not examine how conflicts change the actual behavior of AI agents or the quality of their outputs. It also did not observe which files were actually loaded. This study cannot support the claim that "conflicts make outputs worse."
The range to which the estimate applies also has conditions. The target is active public GitHub projects that have English instruction files for two or more tools. The author herself writes that results may differ for private projects, teams that manage settings outside the repository, and monorepos. Because the data is a snapshot at one point in time, it also cannot tell when or why the conflicts arose.
As countermeasures, the author proposes the following practices (their effectiveness was not tested in this study) [1].
- Consolidate shared policy into a single source of truth, and generate the per-tool files from it as thin layers.
- Assign an owner to the remaining duplicates, and review related files together in the same pull request.
- In CI, flag a change as "needs review" when commands, versions, paths, or expressions such as "must" and "prohibited" change, without asserting that it is a "conflict."
Regarding the detectors, the author states explicitly that they are no basis for blocking commits or automatically rewriting files.
Implementation guide
- Task: Judge whether two instruction files (for different tools) in the same repository contradict each other. Binary classification for each file pair
- Compared methods: Lexical similarity, NLI (cross-encoder/nli-deberta-v3-base), structured atom model (L2-regularized logistic regression with 8 features) (original paper, Section 3.5)
- Evaluation metrics: Precision, recall, F1, AUROC, average precision (AP). The held-out test has 77 repositories, 149 pairs, and 23 conflicts, and is separated from the development set at the repository level (original paper, Section 4.2, Table 7)
- Data: The original sampling frame is a public dataset (Zenodo record 20090356). The labeled benchmark from this study (38 conflict pairs, 203 non-conflict pairs) is included in the replication package
- Code: The replication package (Zenodo, DOI: 10.5281/zenodo.24599998) contains the codebook, adjudicated labels, sampling and split records, held-out test scores, sensitivity analyses, and code. The licenses for the code and data are unconfirmed
- Compute environment: Unconfirmed. An OpenAI model was used for atom extraction, but the model name is not given in the text
Conditions and limitations
- Scope examined: The population is 516 repositories (513 analyzed) among active public GitHub projects that have non-empty English instruction files for two or more tools; 128 repositories and 241 pairs were judged manually. The target files are of five types (AGENTS.md, CLAUDE.md, GEMINI.md, copilot-instructions.md, .cursorrules)
- Not measured: Actual agent behavior, output quality, what was loaded at runtime, maintainers' intent
- Uncertainty: The held-out test has only 23 conflicts, so the power to distinguish between detectors is weak. The result for the top 37 NLI pairs is a post-hoc exploratory analysis
- Judgment bias: The author adjudicated the disagreements. However, the conclusion that prevalence exceeds 10% holds with either annotator's labels
- Conditions that make replication difficult: The definition of "engineered project" is not given. The data extraction date and the breakdown of the 10 languages are not given. The name of the LLM used for atom extraction is missing, and its output is not consistent. Raw model logs and annotator information are not public