AGENTS.md Patterns
Concept documenting the structural conventions and recurring section templates observed across hundreds of AGENTS.md files, revealing how project teams organize agent guidance.
Section Template Convergence
Across the corpus, section names show strong normalization. Most common headings (by frequency):
- testing (22%)
- commands (14%)
- project overview (13%)
- architecture (11%)
- development workflow (10%)
- project structure (8%)
- code style (8%)
- tests (7%)
- common commands (7%)
- code quality (6%)
- overview (6%)
- environment variables (6%)
- pull request guidelines (6%)
- build (6%)
- monorepo structure (5%)
- documentation (5%)
- running tests (5%)
- setup commands (5%)
- type checking (4%)
- conventions (4%)
Universal Section Patterns
Project Overview
Standard elements:
- One-sentence project purpose
- High-level architecture diagram or description
- Key components/services list
- Links to detailed documentation
Repository Layout
Common patterns:
src/- core application codetests/- test suites mirroring src structuredocs/- contributor and user documentationscripts/- automation and tooling- Examples of language-specific layouts (Java src/main/java, Go cmd/, etc.)
Setup & Build
Typical commands:
- Dependency installation (
npm install,pip install -r requirements.txt,mvn install) - Application build (
npm run build,go build,mvn package) - Development server startup (
npm run dev,uvicorn main:app,dotnet run)
Testing Framework
Standardized elements:
- Test suite invocation (
npm test,mvn test,go test ./...) - Single test execution patterns
- Lint + typecheck combinations (
npm run lint && npm run typecheck) - Test execution order and isolation requirements
Git & PR Workflow
Common elements:
- Branch protection requirements
- Commit message conventions (Conventional Commits, etc.)
- PR template with standardized questions
- Required approvals and review thresholds
- Automatic merge conditions (CI pass, etc.)
Code Style & Conventions
Standard components:
- Formatter specification (Prettier, Black, gofmt, etc.)
- Linter specification (ESLint, Pylint, etc.)
- Naming conventions (camelCase, snake_case, PascalCase)
- Import/ordering rules
- Comment/documentation standards
Relationships
- See agents-md-field-study for quantitative analysis and distribution data
- See agents-md-dont-rules for complementary analysis of negative rules
- See prompt-engineering-guide for broader prompt engineering context
- Examples: temporalio-sdk-java-agents-md
Implications
- Reduced cognitive load: Consistent structure helps contributors navigate unfamiliar repos
- Tooling opportunities: Enables automated AGENTS.md generators and validators
- Cross-project familiarity: Reduces onboarding friction when switching between projects
- Evolution tracking: Changes in section usage over time signal shifting priorities
Open Questions
- How do section priorities vary by project domain (web services, libraries, CLI tools, etc.)?
- What is the relationship between section completeness and contributor retention metrics?
- Can section templates be dynamically generated based on project language and framework?
Sources
- raw/prompts/articles/coldtea-agents-md-field-study.md — original field study capture