Manuscript Offprint

arXiv:2611.02383

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

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Mehedi Hasan Shanto · Md. Anaytul Islamδ^{\delta} · Muhammad Asaduzzaman · Alioune Ngom

Received: date / Accepted: date

Abstract AI coding agents rely on repository-level instruction files to understand project conventions, development workflows, and constraints. However, different agents support different instruction formats, and limited empirical evidence exists about how these files are adopted, what information they contain, whether coexisting formats provide consistent guidance, and how they are maintained. We conduct an empirical study of 3,387 instruction files from 1,000 GitHub repositories across four formats: AGENTS.md, CLAUDE.md, GitHub Copilot instructions, and Cursor rules. We find that 42.2% of instruction-bearing repositories in the higher-popularity cohort maintain multiple formats. Among 386 manually examined pairs of corresponding sections, 16.1% provide divergent guidance. Our maintenance analysis further shows that 40.4% of the analyzed files have only one recorded modification event and that maintenance patterns differ across formats. Based on category prevalence and category addition ratios (CAR), we derive an evidence-based template containing ten Required, four Gap, and two Recommended categories. In an exploratory generation experiment, explicit template guidance increases structural category coverage from 18.7% to 82.8%. We further introduce AGIT-Instruct, a benchmark for evaluating instruction-file generation through structural coverage and content alignment. Across four generation configurations, retrieval-augmented generation achieves the highest full-file ROUGE-1 F1 of 0.459. A manual assessment of 278 generated category instances finds that 19.4% fully preserve and 61.2% partially preserve developer-written intent. Our findings provide empirical guidance for organizing and maintaining agent instruction

Mehedi Hasan Shanto · Muhammad Asaduzzaman · Alioune Ngom School of Computer Science University of Windsor, Ontario, Canada E-mail: {shanto1, masaduzz, angom }@uwindsor.ca

Md. Anaytul Islam Independent Researcher E-mail: mislam44@lakeheadu.ca files and demonstrate that structural completeness alone is insufficient for evaluating automatically generated instructions. Our replication package is available at https://github.com/mehedisresearch/AGIT-Template.

Keywords agent instruction files, agentic coding, context engineering, empirical software engineering, software maintenance, text generation, mining software repositories

1 Introduction

Large language models (LLMs) are increasingly integrated into software development through AI coding agents that can inspect repositories, modify source code, execute tests, and create pull requests with limited human intervention [26, 37]. These agents perform multi-step development tasks that require knowledge of repository-specific practices, including build procedures, testing workflows, coding conventions, architectural constraints, and restrictions on code changes. Much of this information is distributed across source code, documentation, configuration files, and development workflows. Providing agents with the appropriate repository context has therefore become an important concern in agentic software engineering [45].

One mechanism for providing this context is the agent instruction files. Such files contain repository-specific guidance that coding agents can consult when performing development tasks. These files commonly describe build and test commands, coding conventions, repository structure, and restrictions on code modifications [9, 10]. Different coding tools have introduced different instruction-file formats, including AGENTS.md, CLAUDE.md, GitHub Copilot instructions, and Cursor rules. Although these formats serve similar purposes, they differ in their conventions and configuration mechanisms [19, 32]. Consequently, repositories that use multiple coding agents may need to maintain several instruction files simultaneously.

The coexistence of multiple instruction file formats introduces a potential maintenance challenge. Galster et al. [19] found that developers configure coding agents through different repository-level artifacts, with distinct configuration practices emerging across tools. Different files may legitimately contain agent-specific guidance, and their presence alone does not imply duplication or inconsistency. However, when multiple files describe the same repository practice, their instructions must remain aligned as the project evolves. For example, a repository may maintain both an AGENTS.md file containing general development conventions and a CLAUDE.md file providing guidance for Claude Code. If both files describe the repository's testing practices, differences in their instructions could leave agents with different information about the same development task. If one representation changes while another does not, different agents may receive different guidance for the same development activity. Conversely, apparently different sections may provide complementary information rather than conflicting instructions. Such differences may reflect tool-specific requirements rather than errors. Understanding multi-format repositories therefore requires examining not only whether instruction files co-exist, but also what information they contain, how their guidance relates across formats, and how these artifacts are maintained over time.

Recent empirical studies have begun to characterize agent instruction files and related configuration artifacts. Chatlatanagulchai et al. [10] investigated Claude Code manifests and characterized the information developers provide to coding agents. Their subsequent work examined agent instruction files more broadly [9]. Galster et al. [19] studied configuration practices for agentic AI, while Jiang and Nam [32] investigated Cursor rules. Other studies have examined instruction file quality and maintenance. Ardic et al. [4] investigated issues in AGENTS.md files, and Voria et al. [58] studied how developers maintain and evolve agent instructions. These studies establish an important foundation for understanding agent instruction practices.

Despite this progress, several questions remain. First, prior studies often focus on individual formats, configuration mechanisms, or aspects of instruction quality, leaving limited evidence about how different instruction formats coexist within the same repository. Second, the presence of similar topics does not establish that corresponding sections provide equivalent guidance. Two files may both contain a testing section while prescribing different commands or constraints. Third, existing work has provided limited comparative evidence about how instruction files are maintained across formats and which categories are predominantly added or removed during their evolution. Finally, content prevalence and maintenance behavior have rarely been considered together when determining which instruction categories should be included in a reusable template. These gaps also affect automated instruction generation. Prior research has investigated the role of repository context and instructions in agent behavior [23, 39, 45]. However, generating an instruction file requires more than producing plausible text. The generated file should cover relevant instruction categories and communicate guidance that is consistent with developers' intentions. A model may produce fluent instructions while omitting important categories. Conversely, a generated instruction file may cover many expected categories while providing generic, incomplete, or inaccurate content. Therefore, evaluating instruction generation requires considering both structural coverage and content alignment. In particular, the presence of a category does not establish that its instructions preserve the complete developer intent.

To investigate the above-mentioned issues, we conduct an empirical study of 3,387 agent instruction files from 1,000 GitHub repositories selected from the AIDev dataset [37]. We examine four instruction formats: AGENTS.md, CLAUDE.md, GitHub Copilot instructions, and Cursor rules. We formulate three research questions (RQs) to understand their adoption, content, and maintenance practices.

RQ1: How are agent instruction files adopted across repositories and formats? Understanding adoption is important to determine how widely developers use agent instruction files and whether multiple formats coexist within repositories. We find that instruction files are more com-mon in high-popularity repositories (66.2%) than in low-popularity repositories (50.2%). Among high-popularity repositories containing instruction files, 42.2% maintain multiple formats, indicating that developers often provide guidance for more than one coding agent.

RQ2: What information do agent instruction files contain, and how consistent are they across formats? Examining their content and consistency is important to identify what guidance developers provide and whether different agents receive compatible instructions within the same repository. We manually code instruction files using the taxonomy of Chat-latanagulchai et al. [9] and find that files within the same repository often cover similar topics. However, 16.1% of 386 manually examined section pairs provide divergent guidance. We also identify underrepresented categories, including security, ownership, maintenance, and performance requirements.

RQ3: How do developers maintain agent instruction files over time? Investigating maintenance is important to understand how developers update instruction files as repositories evolve. We analyze modification frequency, ownership concentration, churn ratio, lifecycle patterns, and update triggers. We find that 40.4% of the analyzed files have only one recorded modification event. Maintenance patterns also differ across formats, particularly in whether instruction updates occur independently or alongside other repository changes.

Based on the results of these research questions, we derive an evidence-based template containing 16 categories organized into ten Required, four Gap, and two Recommended categories. The tier assignment combines category prevalence with the category addition ratio (CAR), which captures whether observed category-change events are dominated by additions or deletions. The template is intended as an empirically motivated authoring aid rather than a universally optimal instruction structure: its tiers reflect patterns in the analyzed corpus and do not imply that every category is necessary for every repository. We then examine how the template can support automated instruction generation. In an exploratory comparison, explicit template guidance increases structural category coverage from 18.7% to 82.8%. To evaluate generation more systematically, we introduce AGIT-Instruct, a benchmark constructed with 1,815 eligible instruction files across 522 repositories. Its repository-disjoint evaluation set contains 62 files and 556 reference category instances. We evaluate GPT-4o-mini using zero-shot prompting and retrieval-augmented generation (RAG), together with CodeLlama-13B in base and QLoRA-adapted configurations. GPT-4o-mini zero-shot achieves the highest structural coverage (82.8%), while RAG achieves the highest full-file ROUGE-1 F1 (0.459). QLoRA improves CodeLlama-13B's full-file embedding similarity from 0.373 to 0.608 despite substantially lower structural coverage. These results demonstrate that category presence and content alignment capture different properties of generated instructions. We further manually examine 278 RAG-generated category instances from 16 instruction categories.

Of these, 19.4% fully preserve the developer-written reference intent, 61.2% preserve it only partially, and 19.4% are missing. The predominance of partial matches indicates that generated instructions can capture the general purpose of a section while omitting individual requirements, conditions, or constraints.

Based on our findings, we provide actionable recommendations for developers, tool providers, and researchers. Developers can use our proposed template to document essential repository guidance and coordinate instructions across multiple formats. Tool providers can develop automated mechanisms to identify overlapping guidance, detect potential inconsistencies, and support timely updates. Researchers can further improve instruction generation by focusing on preserving developer intent rather than merely achieving structural coverage or semantic similarity.

Paper Organization. The remainder of this paper is organized as follows. Section 2 presents a motivating example, and Section 3 describes the dataset and research methodology. Section 4 reports the empirical findings. Section 5 introduces the evidence-based template and maintenance protocol. Section 6 presents AGIT-Instruct and the generation evaluation. Section 7 discusses the findings and their implications, followed by related work in Section 8, threats to validity in Section 9, and conclusions in Section 10.

References (59)

  • Springer New York, New York, NY, 2008
  • An exploratory study of agent plans for agentic AI coding tools in open-source software
  • Can we enhance bug report quality using llms?: An empirical study of llm-based bug report generation
  • Uncovering AGENTS.md: What testing guidance open source projects provide to coding agents
  • Understanding the factors that impact the popularity of github repositories
  • Rule taxonomy and evolution in ai ides: A mining and survey study, 2026
  • Readmeready: Free and customizable code documentation with LLMs - a fine-tuning approach
  • On the Maintenance and Co-evolution of Agent Plugins: An Empirical Study of Claude Code Plugin Marketplaces
  • Agent readmes: An empirical study of context files for agentic coding
  • On the use of agentic coding manifests: An empirical study of claude code
  • AgentReport: A multi-agent LLM approach for automated and reproducible bug report generation
  • Evolution context gap: An empirical study of agent manifests
  • Qlora: efficient finetuning of quantized llms
  • Common mistakes in configuring coding agents (opens arXiv in a new tab)
  • Enhancing large language models with retrieval augmented generation for software testing and inspection automation
  • Configuring agentic ai coding tools: An exploratory study
  • Adapting installation instructions in rapidly evolving software ecosystems
  • The introduction of readme and contributing files in open source software development
  • Can llms write ci? a study on automatic generation of github actions configurations, 2025
  • Evaluating agents.md: Are repository-level context files helpful for coding agents?, 2026
  • *An Empirical Study of Tests in Agentic Pull Requests*, page 929–933
  • P. Chen, Y. Kashiwa, D. Qiu, H. Zhang, and M. Watanabe
  • Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projects, page 181–193
  • Agentic refactoring: An empirical study of ai coding agents, 2025
  • Lora: Low-rank adaptation of large language models, 2021
  • Repo2run: Automated building executable environment for code repository at scale, 2025
  • Back to the basics: Rethinking issue-commit linking with llm-assisted retrieval
  • Beyond the Prompt: An Empirical Study of Cursor Rules, page 397–409
  • SWE-bench: Can language models resolve real-world github issues? In The Twelfth International Conference on Learning Representations, 2024
  • Scanning the Harness: An Empirical Study of Supply-Chain Defects in AI Coding-Agent Configurations
  • Behind agentic pull requests: An empirical study on developer interventions in ai agent-authored pull requests
  • Yih, T. Rocktäschel, S. Riedel, and D. Kiela
  • Aidev: Studying ai coding agents on github
  • On the impact of AGENTS.md files on the efficiency of AI coding agents
  • Automatic dockerfile generation with large language models
  • How do ai coding agents contribute to software development? an empirical study of agentic pull requests (opens arXiv in a new tab)
  • An empirical study of build maintenance effort
  • A large-scale empirical study of the relationship between build technology and build maintenance
  • Context Engineering for AI Agents in Open-Source Software, page 194–198
  • Girt-model: Automated generation of issue report templates
  • Categorizing the content of github readme files
  • Exploring the limits of transfer learning with a unified text-to-text transformer
  • Sentence-BERT: Sentence embeddings using siamese BERT-networks
  • Code llama: Open foundation models for code
  • Generating stack overflow post edits with llms: A taxonomy-driven evaluation
  • Rag-reflect: Agentic retrieval-augmented generation with reflections for comment-driven code maintenance on stack overflow, 2026
  • Security in the age of ai teammates: An empirical study of agentic pull requests on github
  • Improving llm-assisted secure code generation through retrieval-augmented-generation and multi-tool feedback, 2026
  • A study of cursorrules files in github open source projects, 2026
  • Almeida, T. Zimmermann, and I. Ahmed
  • An empirical study on correlation between readme content and project popularity, 2022
  • How do developers maintain and evolve their agents' instructions? an empirical study, 2026
  • CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation
  • On the use of agentic coding: An empirical study of pull requests on github
  • Readme.llm: A framework to help llms understand your library, 2025
  • Who Writes the Docs in SE 3.0? Agent vs. Human Documentation Pull Requests, page 974–978
  • Let's Make Every Pull Request Meaningful: An Empirical Analysis of Developer and Agentic Pull Requests, page 747–751
  • Chen, A. Bukharin, N. Karampatziakis, P. He, Y. Cheng, W. Chen, and T. Zhao
  • Context-aware code review automation: A retrieval-augmented approach