Sources#
Summary#
A repository that works with more than one coding agent usually carries more than one instruction file: AGENTS.md for Codex and most others, CLAUDE.md for Claude Code, .github/copilot-instructions.md for Copilot, .cursorrules for Cursor. Shanto, Islam, Asaduzzaman & Ngom (University of Windsor, arXiv 2611.02383 v1, 2026-11-02, empirical) mine 3,387 such files from 1,000 GitHub repositories and ask four questions. How often do the formats coexist? Do coexisting files say the same thing? How are they maintained? And what should a file contain?
- Coexistence is routine. 42.2% of instruction-bearing repositories in the higher-star cohort carry two or more formats (21.6% in the lower), and
AGENTS.md+CLAUDE.mdis the most common pair (231 repositories). - Same topics, different headings, rarely a conflict. Coexisting
AGENTS.mdandCLAUDE.mdfiles cover nearly the same categories (median category Jaccard 0.929) under different headings (heading Jaccard 0.273). Of 386 hand-labelled same-category section pairs, 83.9% are equivalent or compatible, 16.1% diverge and 0% contradict. - Few recorded edits, one owner, mostly additions. In the agent-PR histories the study can see, 40.4% of files have one recorded modification, the median file has one author, and the top author makes 0.885–0.962 of edits depending on format. Heading changes run about 3.9 additions per deletion. The formats are revised in different contexts:
CLAUDE.mdalongside code,AGENTS.mdon its own, Copilot instructions after a failed or heavily reviewed agent PR. - A template, then a generator. Mean prevalence and a category addition ratio (CAR) sort the 16 categories of the Chatlatanagulchai taxonomy into ten Required, four Gap and two Recommended. Listing those categories in the prompt lifts GPT-4o-mini's category coverage from 18.7% to 82.8%. Hand-checked against the developer's own sections, only 19.4% of generated sections keep the full intent, 61.2% keep part of it and 19.4% are missing.
What the study does not measure is any effect on an agent. The template is drawn from what developers write, and Khatri's null finds that the commonest content (conventions, structure) buys no correctness. The authors cite Gloaguen et al.'s finding that extra context can raise cost without raising success, and call the tiers "an empirically motivated authoring aid rather than a universally optimal instruction structure."
Evidence note.
empirical, preprint, not peer reviewed; no funding, no declared conflict. Four scope limits apply to everything below. (1) The population is agent-using repositories. The 1,000 repositories are sampled from AIDev, a dataset of 932,791 agent-authored pull requests across 116,211 repositories, split at the median star count, so adoption rates are rates among repositories that already take agent PRs, not GitHub base rates. (2) The maintenance history is agent-PR history. RQ3 reads 5,396 heading-level edit events on 448 files from 283 repositories, covering 943 pull requests in AIDev. A human commit outside an agent PR is not a recorded touch, and a file with no agent-PR edit is not in the subset. (3) Detection is four filenames. Matching usesAGENTS.md,CLAUDE.md,.github/copilot-instructions.mdand.cursorrules. The directory form of Cursor rules (.cursor/rules/) is not among them, so the Cursor figures (65 files, 4.6% / 2.8% adoption) are a floor (wiki inference; Kapner et al.'s path-based scan detects Cursor in about as many repositories as Copilot, 315 against 324). (4) The generators are small and old. GPT-4o-mini and CodeLlama-13B, not 2026 frontier models, so the generation results describe the benchmark rather than current capability.
Adoption#
Overall adoption is 66.2% in the higher-star cohort and 50.2% in the lower. Across star quartiles it is 50.4%, 50.0%, 62.8% and 69.6%, not strictly monotonic, with a logistic odds ratio of 1.171 on log stars. AGENTS.md leads in both cohorts (50.0% / 31.6%), then CLAUDE.md (40.4% / 24.6%), Copilot instructions (23.2% / 17.6%) and .cursorrules (4.6% / 2.8%). The exception is C#, where Copilot instructions lead at 53.4%, which the authors attribute to Copilot's place in the Visual Studio ecosystem.
The file count is high relative to the repository count. About 582 repositories carry any file (331 + 251), so 3,387 files is roughly 5.8 per instruction-bearing repository (wiki arithmetic). Each detected file, including nested per-directory copies, is a separate observation. This matters for the consistency result: half the sampled section pairs come from files with different directory scopes.
The figures sit beside Kapner et al.'s census of 3,171 repositories with any agent configuration, where 17.5% of setups configure more than one assistant. The denominators differ: Kapner divides by repositories with any harness component, while Shanto's 42.2% / 21.6% divides by instruction-bearing repositories within an agent-PR sample. The two do not conflict; agent-PR repositories are the ones most likely to run several agents.
Same topics, different headings, and how often they disagree#
Topic overlap. For coexisting AGENTS.md and CLAUDE.md, the median category-level Jaccard is 0.929 and the heading-level Jaccard 0.273: one file's "Running tests" is the other's "Test commands", and "Setup" is "Build and run". The authors draw the maintenance consequence: when a developer updates one section, nothing at the heading level signals that a differently named section in the sibling file covers the same practice. .cursorrules is the outlier, with heading-vocabulary Jaccard below 0.015 against every other format, because its compact rule syntax has few headings.
Instruction-level consistency (Table 1). From all same-category section pairs across formats within a repository, 386 were sampled (the Cochran size for 95% confidence, ±5%) and two annotators labelled them (κ = 0.85):
| Label | Count | % |
|---|---|---|
| Same guidance, different words | 126 | 32.6 |
| Compatible, complementary | 198 | 51.3 |
| Divergent (an agent following one would act differently) | 62 | 16.1 |
| Contradictory (cannot both be followed) | 0 | 0.0 |
The motivating case is Dawarich (~10,600 stars): AGENTS.md says to check JavaScript formatting with Prettier, CLAUDE.md says to run Biome. Both can be run, so this is divergence, not contradiction. Only 48.2% of the sampled pairs share a scope (repository-wide or the same directory), 50.0% have different directory or component scopes, and 1.8% are unclear. The paper does not cross-tabulate divergence by scope, so it cannot say whether the 62 divergent pairs are inconsistencies or legitimate per-component differences. Its stated implication follows from that: the maintenance task is to keep guidance that applies to the same context aligned, not to make the files identical. A consolidation tool also has to keep the 51.3% of pairs that are complementary.
This is the second census to reach the same negative result on cross-format drift. Kapner et al.'s cross-assistant context-file drift rule counted in 29 of 71 flagged pairs and failed on consequence, "a difference between two assistants' files is more often intended than not" (Harness Configuration Defects). The two instruments differ: Kapner adjudicates pairs a rule flagged, Shanto labels a random sample of same-category sections. Both find that drift between instruction files is common and rarely a true conflict. Neither tests what an agent does when it reads two divergent files.
What is rarely written. Category prevalence (Table 2, unweighted mean across the four formats) is highest for Do/Don't rules (81.2%), Build/run/install (71.0%) and Repository structure (70.7%). It is lowest for Ownership/contacts (18.8%), Maintenance/when to update (26.6%), Security/secrets (29.9%), Performance (33.6%) and Project overview (38.5%). These are the same gaps Chatlatanagulchai et al. found in 2,303 files, extended here to four formats and both cohorts.
Maintenance, as recorded in agent PRs#
- Frequency. The median file has 2.0 recorded touches. 40.4% have exactly one: Copilot instructions 47.7%,
.cursorrules42.0%,CLAUDE.md34.4%.CLAUDE.mdalso has the largest continuously updated share, 32.0% (Figure 4a, viewed). The headline 40.4% equals theAGENTS.mdbar in Figure 4a exactly. That is possible ifAGENTS.mddominates the subset, but per-format file counts are not given, so it cannot be checked. - Ownership. The median author count is 1.0 for every format. The top author's mean share is 0.962 (
AGENTS.md), 0.910 (CLAUDE.md), 0.908 (.cursorrules) and 0.885 (Copilot). The difference across formats is significant but small (Kruskal–Wallis H = 12.48, p = 0.006; Cliff's d = 0.167,AGENTS.mdvs Copilot). The authors decline to link concentrated ownership to the divergence result. - Churn. The median deleted-line share per update is 0.0 for
AGENTS.mdand Copilot, 0.014 forCLAUDE.mdand 0.399 for.cursorrules(H = 31.02, p < 0.001; Cliff's δ = −0.578 forAGENTS.mdvs.cursorrules, large, Figure 4b).AGENTS.mdgrows by accumulation, and Cursor rules are rewritten. - What an update accompanies. 52.5% of
AGENTS.mdupdates are standalone and proactive, with no code change or agent failure attached.CLAUDE.mdupdates mostly ride with code: its co-change rate with non-instruction files is 0.845, and proactive co-change is 65.2% of its updates in the prose (69.5% in Figure 4c). 48.2% of Copilot-instruction updates follow, within 14 days, a failed or heavily reviewed agent PR..cursorrulesco-change is 54.2% in the prose (57.0% in the figure). Feature PRs are the most common context overall (33.9% of events). Two prose-vs-figure disagreements (65.2 vs 69.5, 54.2 vs 57.0). The figure's bar geometry matches its labels, and both readings carry the same conclusion.
CLAUDE.md co-changing with code is the instruction-file instance of Gao & Chen's trace finding on the same AIDev corpus: agent PRs change documentation at a high rate, and code usually lands first. The Copilot pattern is the closest field analogue the vault has to Anthropic's mistake-twice rule on Agent Context Files (a correction goes into the file after a repeated failure). It is a 14-day temporal association, not a coded cause, and the authors say they cannot recover why developers edited.
Heading additions outnumber deletions in every category (Table 3). Summed over the table, 4,297 heading additions against 1,099 deletions, about 3.9:1 (overall ratio 0.796), and the total matches the 5,396 events (wiki arithmetic). By category, CAR runs from 1.000 (Ownership, 7 of 7 events additions) to 0.709 (Domain models, 156 additions / 64 deletions). Build/run/install has the most additions (959). This is the complexity ratchet again on a third artefact: SKILL.md diffs run 2.7:1 overall and 6.1:1 in place in Gao et al.'s hand-coded sample, and pruning is 4.3% of maintained-skill edits on Human-Governed Skill Maintenance. The paper warns that CAR counts headings, not section survival or correctness.
The template, and how its tiers are drawn#
The tier rule (§5.1): Required if mean prevalence ≥ 50%. Otherwise Gap if CAR ≥ 0.80. Otherwise Recommended.
| Tier | Categories (mean prevalence %, CAR) |
|---|---|
| Required (10) | Do/Don't rules (81.2, 0.825) · Build/run/install (71.0, 0.801) · Repository structure (70.7, 0.812) · Tooling/agent config (64.2, 0.720) · Examples (63.3, 0.793) · Domain models (61.0, 0.709) · Test/CI (59.1, 0.821) · API/interface contracts (56.0, 0.804) · Architecture (54.6, 0.791) · Code style (52.6, 0.790) |
| Gap (4) | Git/PR conventions (43.8, 0.858) · Security/secrets (29.9, 0.866) · Maintenance/when to update (26.6, 0.875) · Ownership/contacts (18.8, 1.000) |
| Recommended (2) | Project overview (38.5, 0.742) · Performance (33.6, 0.794) |
The reasoning behind the Gap tier: these categories are seldom present, but when they change they are mostly added, which the authors read as guidance developers come to want. They call the thresholds heuristic, and two limits are visible in the table. The cutoff splits a cluster. Nine of the sixteen CARs fall between 0.790 and 0.825, and Performance misses Gap by 0.006 (wiki reading of Table 3). The two most extreme Gap ratios rest on 7 and 8 events, which the authors flag. "Required" is defined as what most developers already write, so it encodes what developers write rather than what helps an agent. The paper says as much: Required "does not imply an obligation to fabricate," and developers should omit what the repository cannot establish.
The template ships with a maintenance protocol drawn from RQ3, with three review triggers: agent errors (with the caution that a failure should not become a new rule until the instructions are shown to have contributed), repository changes to build, test, structure, dependencies or interfaces (check every format that describes the practice), and periodic accuracy checks at a frequency set by repository activity. The protocol is recorded in the Maintenance and Ownership categories, which makes upkeep part of the file. It is a recommendation, not a tested intervention. One of its triggers has since been measured in a single repository: a monthly LLM documentation audit found about half of 47 known stale statements per pass (Sonnet 5.5, 49.6%) with almost no false alarms, and 2 of the 5 that only git history reveals (Harness Lesson Retirement, case-study). The first trigger's caution also has support there: in a replay of past failures, a prose rule written after one was no longer needed on the current model. It sits beside the vendor maintenance disciplines and gives the stale-file failure on Stale Instruction File Precedence a named owner and trigger.
Generating the file: coverage is not intent#
AGIT-Instruct. Files with at least two sections (2,853 from 552 repositories) were filtered and split by repository into 1,432 training, 321 validation and 62 evaluation files (1,815 from 522 repositories). The evaluation set was chosen so that every category has at least 25 reference instances (556 in total), so its category mix is not the natural one. Before scoring, GPT-4o-mini rewrites both reference and output into generic intents, so a specific test command becomes "run the project's tests before committing".
- Template guidance (Table 5). With and without the category checklist, same model and inputs: overall coverage 0.187 → 0.828 (3.00 → 13.25 categories per file). Required 0.168 → 0.737, Gap 0.080 → 0.977, Recommended 0.500 → 0.990. The "with" arm is the zero-shot configuration of Table 6: its per-category values average to exactly these tier means (checked).
- Configurations (Table 6). Coverage is 0.828 zero-shot, 0.786 RAG (three retrieved training files), 0.645 CodeLlama-13B base and 0.166 CodeLlama-13B QLoRA. Domain models appear in only 31% of GPT files. Ownership/contacts appears in 100% of zero-shot and 97% of RAG files, against 18.8% prevalence in human files. The authors note that presence does not show the owners named are real.
- Alignment (Table 7, reconciled against
pdftotext -layout). RAG has the best full-file ROUGE-1 F1, 0.459 (zero-shot 0.423), with cosine similarity nearly equal (0.683 / 0.681). QLoRA raises CodeLlama's full-file cosine from 0.373 to 0.608 while ROUGE falls from 0.304 to 0.273, and its coverage is a quarter of the base model's. Overlap-only: zero-shot 0.386 / 0.710, RAG 0.433 / 0.708, base 0.309 / 0.434, QLoRA 0.347 / 0.647. - Manual check. Of 278 RAG category instances, about ten or more per category, 54 (19.4%) fully preserve the reference intent, 170 (61.2%) partially, 54 (19.4%) are missing and none are wrong. Partial matches are omissions: a project overview without its stack, a structure section without its navigation rules.
The authors' conclusion: coverage, lexical overlap and embedding similarity measure different things, and fluent output covering the categories can still drop the requirements. The generic-intent step has a cost for this corpus. It abstracts away the specific command, path or identifier, which Wang et al. find is the part of a rule that moves agent behaviour (a rule naming a new token lifts compliance; generic advice does not). So AGIT-Instruct's alignment scores are blind to the content most likely to matter, and the manual check is the more informative number. In practice the template points the other way from the vendor rule on Agent Context Files ("keep it under a page", generate with /init and then cut): a checklist that takes a generated file from 3 to 13 sections makes it longer. Neither the template nor the cut-it-down rule has a downstream measurement, and Gloaguen's finding is that more context can raise cost without raising success.
Connections#
- Agent Context Files — the artifact class, measured across its four main filenames: how often they coexist, how much they diverge, and the 16-category content map. Also where the correctness null sits that the template's prevalence-based Required tier does not address
- Agentic Technical Debt — the cadence half of the CLAUDE.md-rot question:
CLAUDE.mdis the format most often revised alongside code, yet two in five files in the agent-PR subset carry one recorded edit, and heading changes ratchet up at ~3.9:1 - Harness Configuration Defects — the second census with the same negative result on cross-assistant drift. Kapner's adjudicated pairs are "more often intended than not"; Shanto's random sample finds 16.1% divergent and 0% contradictory, with half the pairs at different scopes
- Human-Governed Skill Maintenance — the same maintenance questions asked of
SKILL.md: single-owner upkeep, additive growth and near-zero pruning, with Shen & Hruschka's transfer null as the downstream test this paper lacks - Stale Instruction File Precedence — what a file left behind costs once it is wrong: agents follow a stale file over the code 90.1% of the time. The template's Maintenance and Ownership categories are the authoring-time answer to who notices
- Agent Documentation Behavior — the same AIDev corpus read from traces: agent PRs rewrite instruction files at scale and code lands first, and
CLAUDE.md's 0.845 co-change rate is that pattern for one format - Harness Lesson Retirement — the maintenance protocol's periodic accuracy check, run as a monthly LLM audit in one repository: about half of known drift per pass at ≥93% precision. Also a test for the protocol's agent-error trigger: replaying a past failure without its rule shows whether the rule still changes anything
- Skill Revision Effects — why AGIT-Instruct's generic-intent scoring misses what matters: a rule that names a specific command or path moves agent behaviour, and the benchmark abstracts exactly those tokens away before it scores
Open Questions#
- Does a template-completed file change agent outcomes, or only file length and cost? Settler: a with/without ablation on AGIT-Instruct's evaluation repositories, comparing the developer's file against the same file completed to the template's Gap and Recommended tiers, scoring task pass rate and tokens (Khatri's or Gloaguen's design).
- Are the 62 divergent section pairs concentrated in pairs that share a scope, where they would be real inconsistencies, or in different-scope pairs, where they would be legitimate per-component guidance? Settler: cross-tabulate the released 386-pair labels by the scope coding (replication package public).
Sources#
- Toward an Evidence-Based Template for Agent Instruction Files: An Empirical Study of Adoption, Consistency, and Maintenance — Mehedi Hasan Shanto, Md. Anaytul Islam, Muhammad Asaduzzaman & Alioune Ngom (University of Windsor; Islam independent), Toward an Evidence-Based Template for Agent Instruction Files: An Empirical Study of Adoption, Consistency, and Maintenance, arXiv 2611.02383 v1, 2026-11-02, 39pp,
empirical. Sections used: §2 (Dawarich), §3 (sampling, detection, coding at κ = 0.80), §4.1–4.3 (RQ1–RQ3, Tables 1–3, Figure 4 viewed), §5 (tier rule, Table 4, maintenance protocol), §6 (AGIT-Instruct, Tables 5–7, manual evaluation), §9 (threats). Parse warning: PDF-derived (docling 2.126.0 / docling-mlx 0.1.1). Tables 1–6 are clean and their arithmetic was checked (Table 3 sums to the 5,396 events; Table 6's zero-shot column reproduces Table 5's tier means). Table 7's overlap-only header is split and its values sit in shifted columns. The values here are taken frompdftotext -layoutand the prose. The prose and Figure 4c disagree on two trigger shares (CLAUDE.mdco-change 65.2 vs 69.5,.cursorrules54.2 vs 57.0), and both are given where cited - Lessons Outlive Their Failures: A Case Study of Rules for AI Coding Agents — Hassan Hassanzadeh Aliabadi (independent), arXiv 2610.32578 v1, 2026-10-23,
case-study. Cited for §5.2 (audit recall and precision) and §5.3 (the superseded-decision replay). Full treatment on Harness Lesson Retirement
Cited by 10
- Agentic Technical Debt×4
Does the playbook's session-by-session updating happen — how often is a CLAUDE.md actually revised…
- Agent Context Files×3
evidence based template agent instruction files — Shanto, Islam, Asaduzzaman & Ngom (University of…
- Harness Configuration Defects×3
Instruction Files Across Formats — the cross-assistant drift result from a random sample instead of…
- Stale Instruction File Precedence×3
One more figure comes from a source the vault has ingested, and it has a different denominator. In…
- Agent Documentation Behavior×2
Instruction Files Across Formats — the co-change half for one file class, on the same AIDev corpus:…
- Harness Lesson Retirement×2
Shanto et al.'s template prescribes "periodic accuracy checks" as one of three maintenance triggers…
- Human-Governed Skill Maintenance×2
evidence based template agent instruction files — Shanto, Islam, Asaduzzaman & Ngom (University of…
- Skill Revision Effects×2
evidence based template agent instruction files — Shanto, Islam, Asaduzzaman & Ngom (University of…
- AI Coding Practice
Instruction Files Across Formats — Shanto et al. (University of Windsor, arXiv 2611.02383): 3,387…
- Open Questions Backlog
Instruction Files Across Formats ×2 (oldest 0d) — Does a template-completed file change agent…
Related articles
- Agent Context Files
The cross-vendor markdown-as-control-plane pattern: repo-versioned plaintext (CLAUDE.md / AGENTS.md / SOUL.md / WORKFLO…
- Harness Lesson Retirement
Aliabadi (arXiv 2610.32578, `case-study`): six weeks of one plain-markdown repository edited daily by three agent tools…
- Human-Governed Skill Maintenance
Shen & Hruschka (Megagon Labs, arXiv 2609.05677): the first longitudinal measurement of who maintains public SKILL.md f…
- Agentic Technical Debt
Debt that *compounds* (not just accumulates) because each agentic-coding session re-derives architectural decisions wit…
- Agentic Work Systematization
OpenAI Codex study's 'systematization' margin: the shift from ad-hoc agent use (describe task → agent does it → done) t…
