Repository navigation
Description
Summary
This proposal suggests establishing a standardized .agent directory within project repositories to serve as a single, version-controlled source of truth for AI agents. The goal is to provide them with accurate, comprehensive, and up-to-date context that goes beyond just the source code, enabling more complex and reliable autonomous operations.
The Problem
Currently, AI agents often lack a standardized mechanism for accessing comprehensive project-wide context. Their understanding is typically limited to the code they can read and any context provided in a prompt. They struggle to access critical non-code assets in a structured way, such as:
- Product requirements (PRDs)
- Technical design documents and architecture diagrams
- UI/UX mockups (e.g., Figma links)
- Project management tasks (e.g., Jira tickets)
- Live system monitoring dashboards and configurations
This information gap forces agents to make assumptions, leads to outputs that are misaligned with project goals, and limits their ability to perform high-level tasks like validating code against specifications or performing root cause analysis.
The Proposal: The .agent Standard
We propose the adoption of a "Directory as Context" strategy, centered around a .agent directory at the root of a project. This directory would act as a centralized, standardized index for all project-related assets, both textual and external.
Reference Directory Structure
Here is a proposed reference model for the structure:
├── AGENT.md # A core file guiding the Agent's behavior, defining coding standards, the directory structure, and context consumption meta-rules.
└── .agent/
├── spec/ # The project's "blueprint": formal, version-controlled specification documents.
│ ├── requirement.md # PRD, user stories, business rules.
│ ├── design.md # Technical design, architecture, API definitions, links to UI/UX mockups.
│ └── tasks.md # Development tasks broken down from requirements.
│
├── wiki/ # The project's "encyclopedia": stable, global guides for knowledge accumulation.
│ ├── architecture.md # System architecture, core components, and interactions.
│ └── domain.md # Core business domain concepts, processes, etc.
│
├── links/ # The project's "address book": manages all external asset links.
│ └── resources.md # Lists external URIs and the tools (e.g., MCPs) required to access them.
│
└── ... (Extensible with other directories like middleware/, integrations/, tests/, etc.)
How It Works
The agent would consume this context in a hybrid model:
-
Agent's "Long-Term Memory": The AGENT.md file serves as a meta-guide, loaded by default. It instructs the agent on how to behave, what coding standards to follow, and how to interpret and utilize the rest of the .agent directory.
-
Local Context Consumption: The agent uses its built-in file system tools (search, grep, read_file) to directly read text-based assets within .agent/ (e.g., spec/requirement.md, wiki/architecture.md). This allows it to build a "mental model" of the project, much like a human engineer reading documentation.
-
External Context Consumption: The agent parses links/resources.md to discover URIs for non-textual or dynamic assets. It then uses the appropriate tools (or "MCPs") to fetch external information, such as reading metadata from a Figma design, getting the latest status of a Jira task, or pulling data from a monitoring dashboard.
Why This Matters for the openai/agents Initiative
Interoperability & Standardization: This creates a common standard that any agent (from any developer or organization) can rely on. An agent could clone any compliant repository and immediately know where to find the project's foundational context.
-
Enhanced Agent Capabilities: With access to this rich context, agents can perform significantly more advanced tasks:
-
Validate code against requirements in spec/requirement.md.
-
Generate code that adheres to the architecture described in wiki/architecture.md.
-
Analyze the impact of a change by understanding component interactions.
-
Perform root cause analysis by correlating a bug with recent PRs and links to monitoring data.
Extensibility: The structure is not rigid. Teams can add custom directories (security/, performance/) to suit their specific needs, making the standard adaptable.
Improved Human-Agent Collaboration: It provides a clear, version-controlled contract between human developers and AI agents. Humans provide the context in a structured way, and agents consume it reliably.
Next Steps
We believe that establishing a context standard like this would be a massive leap forward for the entire AI agent ecosystem. We would like to open a discussion with the community and the maintainers of this project on the feasibility and potential adoption of the .agent directory as a recommended best practice or formal standard.
We welcome feedback, suggestions, and further discussion.
Activity
BradKML commentedon Oct 13, 2025
Duplicate? #9
ecki commentedon Dec 17, 2025
I think that goes too far, especially having stuff like a wiki in the .agents folder.
If You have Specs just mention the directories in a table in agents.md, that also helps with human Discovery of them.
OriNachum commentedon Dec 23, 2025
Thank you @BradKML
@ecki, .agent is very similar to Agent Skills, which Anthropic recently announced.
I think we can align with that.
It has the folders:
scripts(Code used by the agent),references(Documentation and the like),assets(Code examples, or templates, etc.)I don't care about the ego of which issue is used, and I generally prefer alignment (And Agent Skills is adopted by Codex now as well).
I think it should be a standard so that other agentic tools, like Gemini CLI, align as well.
Edit:
I was also referring to my own ticket:
#3
kmturley commentedon Feb 7, 2026
It would be great to narrow down to a standard as contributors to the same repo can use different agents:
.kiro/specs.cursor/rules.cursor/prompts.github/copilot-instructions.md.github/prompts/.claude/instructions.md.claude/prompts/.chatgpt/instructions.md.chatgpt/prompts/.aider.conf.yml.aider/prompts.md.continue/config.json.continue/prompts/.sweep/config.yaml.sweep/prompts/.sourcegraph/cody.json.sourcegraph/prompts/.tabnine/config.jsonagents/agents/specs/prompts/agents/agents/specs/prompts/OriNachum commentedon Feb 7, 2026
Adding to @kmturley very strong point - please align with Agent Skills owners so we have 1 location for all AI Coder agents configurations.
If it is
.agents- every should put their stuff there, and also make sure to coordinate.There is room for both notations together.
waldyrious commentedon Feb 7, 2026
Speaking of consolidation, why isn't this issue being closed on favor of #9?
OriNachum commentedon Feb 7, 2026
Because it is fundamentally different.
I am against loading all .agent content to context - it's lazy and consuming.
Agent Skills notation solves it by both introducing an agentic rule, and bundling the items only if the rule passes.
kmturley commentedon Feb 7, 2026
I don't think anyone suggested loading all context to all agents?
More of a standard way to load context to agents. Even if there are conditional includes to other agent-specific directories.
Skills would be a good solution, but it appears they perform worse than regular markdown files:
https://vercel.com/blog/agents-md-outperforms-skills-in-our-agent-evals
If we could define something similar to web crawling, where there is a site map indicating where to look for context.
AGENTS.md could contain the context tree with paths for where to look for context depending on the agent?
zbynekwinkler commentedon Feb 11, 2026
That vercel blog never mentions which model they were working with. It is a key info, since it is the model that decides what to read next based on the information it already has. We do not need to define anything new, the smart models are just better looking up info. Before skills, I had links in my agents.md file with more info and all the SOTA models read it at the relevant time (but i.e. gpt-oss-120b does not), thus getting "skills" without any support from the agent harness. Just take a look at https://opencode.ai/docs/rules/#manual-instructions-in-agentsmd.
kmturley commentedon Feb 13, 2026
The page you referenced has exactly what I was suggesting for AGENTS.md
Perhaps a third option too
3. Invoking skills from AGENTS.mdIt would be great to align and explicitly document these approaches in AGENTS.md project too.
Another reference:
https://code.claude.com/docs/
tredondo commentedon May 3, 2026
I'd like to suggest settling on
.agentsas the directory name (rather thanagents, so the directory stands out and can be sorted away from other domain-specific directories in the project. Also,.agents(plural), to align with AGENTS.md.@OriNachum: agree, and as @kmturley pointed out, OpenCode provided a simple syntax and example for lazy-loading agent rules in other files.
section9-lab commentedon May 11, 2026
Building on the proposed structure, I'd like to suggest adding
plans/as a sibling tospec/,wiki/, andlinks/.Today, many coding agents write planning artifacts to tool-specific, out-of-tree locations (e.g., Claude Code persists plans under
~/.claude/plans/...). This means:Proposed addition:
```
.agents/
├── spec/ # what to build
├── wiki/ # how the system works
├── links/ # external resources
└── plans/ # how the agent intends to build it (per-task implementation plans)
```
`plans/` would hold short-lived, per-task implementation plans the agent produces before editing — the kind of artifact Claude Code's plan mode, Cursor's "plan-first" flows, and Kiro-style spec workflows already generate, but currently scatter into per-tool homedirs.
Benefits:
This keeps `.agents/` as the single in-repo home for all durable agent context — specs, knowledge, links, and planning trails — rather than splitting "what the agent thinks" between the repo and `~/.{tool}/`.
stackbilt-admin commentedon Jun 11, 2026
Related: I've posted a progressive-disclosure proposal in #135 that builds on the dedicated-directory direction proposed here — an optional, HTML-comment-fenced module index inside AGENTS.md that points at per-topic Markdown files with deterministic keyword triggers, while keeping flat AGENTS.md files fully conformant and degrading gracefully on tools that don't implement it. Whatever directory name this issue settles on (
.agent/,.agents/,AGENTS.md.d/), the index mechanism works with it.Pjrich1313 commentedon Jun 12, 2026
I have no idea, why anyone is calling building your own agent a lazy load. I had this issue recently taken care of. For some reason, I was blocked. There is no rule that I am breaking it my own personal work. I'm using so why am I being blocked
Pjrich1313 commentedon Jun 12, 2026
What's the problem
Pjrich1313 commentedon Jun 13, 2026
OpenAI is to be used to make sure that mistakes are not made obviously there, are a huge amount of mistakes made by humans. So why are you upset. I come from my payout and, I come with an auditor and timestamps and POW. Why am I being stopped I paid for my copilot. I will follow the rules and will be taking this to the higher courts if need to be.
faliqadlan commentedon Jul 17, 2026
Instead of waiting for tool vendors to natively support parsing the
.agentsdirectory, a Prompt-Bootstrapped Protocol can be established to serve as the universal discovery contract today. For example, a conversation can be started with this exact snippet:I implement this at: https://github.com/faliqadlan/dot-agents-template
Through this approach, various agents (such as Antigravity, Codex, and others) can adhere to the .agents folder conventions dynamically.
Pjrich1313 commentedon Jul 17, 2026
I would love to but being I can't even be paid for my work use my AI and being threatened can't discuss anything g
dopry commentedon Aug 10, 2026
The current proposal seems to be focused on spec driven development and less on defining how the agents should behave within the project. https://dotagentsprotocol.com/ feels like a better general fit, as it tries to consolidate existing common protocols and configuration used by most agents.
BradKML commentedon Aug 19, 2026
@dopry if that gets more stars then maybe it can become the new standards vs current "skill" standards
dopry commentedon Aug 21, 2026
here is where you would star it, https://github.com/aj47/dotagentsprotocol-website, I guess.
BradKML commentedon Aug 22, 2026
@dopry please make it go viral and iterate the design fast, can't just watch this die for OpenCode/Codex/Claude
dopry commentedon Aug 22, 2026
Not sure how I'd do that. Maybe you can post about it on hacker news or something
Dakta commentedon Sep 8, 2026
Agent Skills are only one aspect of a project's total Agent configuration.
Any
.agents/standard SHOULD NOT invent new standards (this is overreach and scope creep). It SHOULD build on existing supported standards. Individual features MUST be optional so that this standard itself and implementers can add and adopt new standards incrementally. Adopted standards MUST coexist with their existing behavior.AGENTS.md—provides the high level overview and steering.mcp.json—isn't formally standardized, but most vendors who implement MCP itself have adopted themcpServersconfig dict. Many vendors call it something likemcp.json, which seems like the simplest and most obvious name, although some store it alongside other configuration. Adding a load target is trivial, however, and does not represent a "new" standard so much as a clarification of an existing one.skills/directory in their existing configs.We should start by consolidating these existing standards to a simple, canonical location:
Supporting
AGENTS.mdallows the same directory structure to be located globally (~/.agents/or~/.config/agents/for XDG compat) as well as per-project (<project>/.agents/). Many vendors already discoverAGENTS.mdacross the entire working tree, so this location is free for them.We SHOULD NOT attempt to support any of these non-standardized features:
When a new standard emerges that covers any of those features, or something new entirely, it can easily be incorporated by reference into this standard.
Appendix
Bad/abandoned/conflicting prior art:
Compatible prior art and inertia in this direction:
.agents/skills.agents/skills.agents/skills.agents/skills.agents/skills.agents/skills.agents/skills