An Architecture for Vendor-Neutral AI Context Configuration

Dawid Aleksander Walczak

Published Updated 7 min read

Context EngineeringAGENTS.mdCLAUDE.mdEnterprise Architecture

Four AI coding tools reading one canonical AGENTS.md file, one via a vendor-specific file

This article is part 1 of 5 in the AI Engineering Reading Path.

Introduction: Why a Vendor-Neutral AI Configuration Strategy

AI coding assistants such as GitHub Copilot, Claude Code, and Junie allow teams to provide reusable context. To provide this context consistently, AI coding tools and the broader AI ecosystem have introduced persistent context configuration files such as copilot-instructions.md, CLAUDE.md, and AGENTS.md.

However, these configuration file formats are not equally supported across heterogeneous AI coding environments. As a result, organizations may maintain multiple vendor-specific context configuration files, increasing the risk of duplicated knowledge, configuration drift, and vendor lock-in. Project knowledge, engineering conventions, and operational procedures should therefore not need to be rewritten when organizations adopt new AI coding tools.

This article presents an architecture for vendor-neutral AI context configuration derived from current industry practices.

Support Matrix: Which Context Configuration File as the Single Source of Truth?

A context configuration file intended to serve as a Single Source of Truth should remain usable across multiple AI coding environments without requiring shared operational knowledge to be duplicated.

Table 1 summarizes support for CLAUDE.md and AGENTS.md, two context configuration files with broad recognition, as documented by the vendors on 6 October 2026.

AI coding tool CLAUDE.md AGENTS.md
Claude Code

Claude Code

AGENTS.md: from version 2.1.277, and by default only when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md exists in the working directory or above. See Why the Adapter Pattern Matters for Claude Code.
Release at retrieval
2.1.291
Yes Conditional
GitHub Copilot

GitHub Copilot

CLAUDE.md and AGENTS.md: GitHub’s support matrix lists both files for the cloud agent and Copilot CLI, AGENTS.md alone for Copilot Chat in Visual Studio Code, and neither for Copilot Chat on GitHub.com or in Visual Studio, JetBrains IDEs, Eclipse and Xcode. Two vendor documents depart from that matrix: Microsoft documents the Visual Studio Code Local agent as reading CLAUDE.md by default, with nested AGENTS.md files experimental and off by default, and a GitHub changelog announced both files for agent workflows in JetBrains IDEs.
Releases at retrieval
Copilot CLI 1.0.92, Visual Studio Code 1.140
Conditional Conditional
OpenCode

OpenCode

CLAUDE.md: read by OpenCode V1 only when no AGENTS.md exists, and not read by OpenCode V2.
Releases at retrieval
1.18.34 (V1), 2.0.24 (V2)
Conditional Yes
Cursor

Cursor

Release at retrieval
3.23.23
Yes Yes
Junie

Junie

Release at retrieval
Junie CLI 26.10.5
No Yes
Codex

Codex

CLAUDE.md: read only when listed in the project_doc_fallback_filenames setting.
Release at retrieval
Codex CLI 0.160.1
No Yes
Antigravity

Antigravity

Release at retrieval
2.19.1
No Yes
Gemini CLI

Gemini CLI

CLAUDE.md and AGENTS.md: read only when the context.fileName setting names them; by default, Gemini CLI reads GEMINI.md. Since 18 June 2026, Google has offered Gemini CLI only to Gemini Code Assist Standard and Enterprise customers and paid API-key users, and has moved other users to Antigravity.
Release at retrieval
0.62.0
No No

Note. Surfaces are a tool’s agent and chat sessions. Yes: read by default on every documented surface, whether or not the other file exists. Conditional: read by default only on some surfaces or product lines, or only when the other file is absent. No: not read by default. The details button beside each tool lists its conditions, any setting that enables a file, the release current at retrieval and the sources.

Table 1. Whether eight AI coding tools read CLAUDE.md and AGENTS.md by default, according to vendor documentation retrieved on 6 October 2026.

Table 1 shows a difference in portability between the two formats. CLAUDE.md originated as a context configuration mechanism for Claude Code. While some tools have introduced varying degrees of compatibility, some major AI coding environments do not natively support it.

By contrast, AGENTS.md was created as an open format intended to work across AI coding environments. The project website describes it as:

A simple, open format for guiding coding agents […].

AGENTS.md(opens in a new tab)

The project’s stated goal is to provide a format that can be adopted across tools rather than introducing another proprietary instruction file. Furthermore, stewardship of AGENTS.md was transferred to the Agentic AI Foundation under the Linux Foundation, which positions itself as a neutral home for open AI infrastructure and interoperability standards.

Recent empirical evidence also suggests that AGENTS.md is emerging as an interoperable format across AI coding environments. In a study of 2,853 GitHub repositories, Galster et al. (2026, p. 11) found that Context Files ‘dominate the configuration landscape’ and observed AGENTS.md adoption across multiple agentic coding tools.

As a result, AGENTS.md provides a stronger foundation than CLAUDE.md and other vendor-specific context formats for establishing a portable Single Source of Truth across heterogeneous AI coding environments.

Context Configuration for Monorepositories

Portability is the primary criterion for selecting a canonical context configuration file. While hierarchical context configuration is not strictly required, it can simplify context management in monorepositories by allowing repository-wide guidance and subproject-specific instructions to be organized separately. This is particularly relevant where a single repository can contain multiple independently developed applications, libraries, or services with different technical conventions.

AGENTS.md and CLAUDE.md both support hierarchical configuration, but they use different resolution models, summarized in Table 2.

Characteristic AGENTS.md CLAUDE.md
Hierarchy Root and nested configuration Root and nested configuration
Resolution Tool-dependent hierarchical resolution Applicable files are layered
Subproject isolation Local file can define subproject-specific guidance Local file adds more specific guidance to the existing context
Table 2. Comparison of root and nested file resolution in AGENTS.md and CLAUDE.md.

With AGENTS.md, a subproject can define more specific instructions by placing an AGENTS.md in its directory, as shown in Figure 1. This allows individual subprojects to define more specific instructions tailored to their local requirements.

  • my-monorepo/
    • AGENTS.mdRepository-wide
    • billing-service/
      • AGENTS.mdMore specific
      • …
    • web-app/
      • AGENTS.mdMore specific
      • …
Figure 1. A monorepository with a root AGENTS.md for repository-wide guidance and a nested AGENTS.md in each subproject for more specific instructions.

Claude Code uses an additive model for applicable CLAUDE.md files. More specific files contribute additional instructions to the existing context.

Because both formats support hierarchical file structures, monorepositories can leverage nested files under either format.

Separating Shared Context from Tool-Specific Configuration

Using AGENTS.md as the Single Source of Truth does not eliminate the need for vendor-specific context configuration files. Instead, it establishes a clear separation between the source of shared operational knowledge and tool-specific configuration.

AGENTS.md should contain instructions that remain applicable across heterogeneous AI coding environments. Vendor-specific files such as CLAUDE.md should contain only instructions that depend on capabilities, workflows, or configuration mechanisms specific to a particular AI coding environment. Both files sit side by side, as shown in Figure 2.

  • my-project/
    • AGENTS.mdShared context
    • CLAUDE.mdTool-specific
    • …
Figure 2. A directory with the canonical AGENTS.md for shared context beside the vendor-specific CLAUDE.md.

The vendor-specific file acts as an adapter that references the canonical AGENTS.md configuration while providing tool-specific extensions. Where supported by the tool, a CLAUDE.md file can import AGENTS.md and add Claude Code-specific workflow instructions, as shown in Listing 1.

CLAUDE.mdMarkdown
@AGENTS.md

# Claude-Specific Extensions

...
Listing 1. A vendor-specific file that imports the canonical configuration and then adds only what has no portable equivalent.

This separation aligns with guidance from multiple AI coding ecosystems. Anthropic documents the shared-configuration pattern shown in Listing 1, in which teams import AGENTS.md into CLAUDE.md and place Claude-specific instructions below the import. This pattern allows teams to:

keep [AGENTS.md] as the one file every tool shares […].

Claude Code documentation(opens in a new tab), Share one file with other coding tools

Microsoft’s guidance for VS Code points in the same direction:

If your team uses multiple harnesses, use a shared format that they all support when possible.

Visual Studio Code documentation(opens in a new tab), Choose a format

Together, these recommendations support maintaining shared operational knowledge in a common configuration file while isolating tool-specific extensions.

When a vendor-specific configuration mechanism does not provide a native import directive, the vendor-specific configuration file may instead contain a best-effort reference, as shown in Listing 2. Unlike Listing 1, this approach does not guarantee that the referenced file will be loaded. It should therefore be viewed as a fallback mechanism rather than a substitute for native import or file-discovery capabilities.

Markdown
Adhere to the rules defined in AGENTS.md.
Listing 2. Best-effort reference to the canonical configuration for tools without native import mechanisms.

This adapter pattern, shown in Figure 3, keeps AGENTS.md as the canonical source for shared operational knowledge while allowing individual AI coding tools to extend the configuration with tool-specific capabilities.

The adapter pattern around a shared AGENTS.mdArchitecture diagram with arrows running from each file toward the tool that reads it. At the top, AGENTS.md holds the shared context and is the Single Source of Truth. Below it, a row of identical AI coding tools reads AGENTS.md directly, one hop each. One more tool of the same kind is reached in two hops, through a tool-specific adapter drawn in amber. In the import form, that tool is Claude Code: it reads CLAUDE.md, whose first line, @AGENTS.md, imports AGENTS.md, and whose remaining lines hold only Claude Code-specific instructions. In the reference-only form, for an AI coding tool with no native import directive, the adapter is a vendor-specific file holding one sentence: Adhere to the rules defined in AGENTS.md. In both forms the shared context stays in AGENTS.md alone. AGENTS.mdShared context · Single Source of TruthCLAUDE.mdTool-specific adapter@AGENTS.md+ Claude Code-specificinstructionsVendor-specific fileTool-specific adapterAdhere to the rulesdefined in AGENTS.md.AI coding toolsClaude CodeAI coding toolno native import directive
Figure 3. The adapter pattern. AGENTS.md holds the shared context once; where a tool reads a vendor-specific file, that file imports or references AGENTS.md and adds only what has no portable equivalent. Listings 1 and 2 show the two forms.

Why the Adapter Pattern Matters for Claude Code

As of version 2.1.277, Claude Code supports AGENTS.md directly(opens in a new tab). Under its default instruction-loading mode(opens in a new tab), however, Claude Code uses the AGENTS.md fallback only when no CLAUDE.md, .claude/CLAUDE.md, or CLAUDE.local.md exists in the working directory or any directory above it.

Claude Code’s native AGENTS.md support also has version- and environment-dependent conditions. The Claude Code documentation lists the situations in which Claude Code reads only CLAUDE.md files(opens in a new tab): builds before 2.1.277, sessions in which the built-in plugin that reads AGENTS.md is disabled and, in some cases, the first session after an upgrade from 2.1.276 or earlier. Before 2.1.281, sessions on Amazon Bedrock or with telemetry disabled were affected as well. In every one of these situations, a CLAUDE.md that imports AGENTS.md(opens in a new tab) still delivers the shared context, which is the fallback the documentation itself recommends.

For teams using AGENTS.md as the canonical configuration layer, these constraints make the adapter pattern particularly important.

Conclusion: One Canonical Source for Shared Context

Portability. AGENTS.md should serve as the Single Source of Truth for portable operational knowledge because it is defined as an open format and is supported across heterogeneous AI coding environments. Vendor-specific configuration files should not duplicate this knowledge.

Tool-specific extensibility. Vendor-specific files should reference and extend AGENTS.md where required, providing capabilities that have no portable equivalent. This preserves a single source for shared operational knowledge while allowing individual AI coding tools to provide tool-specific functionality.

Monorepository organization. The AGENTS.md format supports hierarchical configuration through nested files, allowing monorepositories to associate more specific guidance with subdirectories. However, the way individual AI coding tools discover, combine, order, or scope these files is implementation-specific. Some tools discover nested files automatically, while others provide additional configuration mechanisms such as path-specific rules or glob-based instruction patterns.

References

Dawid Aleksander Walczak, the article's author

Helping engineers make better technical decisions.

Dawid Aleksander Walczak