Skip to content

docs: add AGENTS.md with guidance for AI coding agents#3480

Merged
cijothomas merged 3 commits intoopen-telemetry:mainfrom
cijothomas:add-agents-md
May 1, 2026
Merged

docs: add AGENTS.md with guidance for AI coding agents#3480
cijothomas merged 3 commits intoopen-telemetry:mainfrom
cijothomas:add-agents-md

Conversation

@cijothomas
Copy link
Copy Markdown
Member

Changes

Adds an AGENTS.md at the repo root targeted at AI coding agents (GitHub Copilot, Claude, Cursor, etc.). Human contributors continue to use CONTRIBUTING.md; this file just consolidates the conventions an agent must respect to keep CI green and reviews short.

What it covers

  • Repository layout (workspace + the non-workspace opentelemetry-prometheus).
  • Required pre-push checks — targeted cargo fmt --all, cargo clippy -p <crate> --all-targets --all-features -- -Dwarnings, and cargo test -p <crate> --all-features --lib. Includes the equivalent invocations for opentelemetry-prometheus.
  • When to run the full scripts/precommit.sh — reserved for cross-crate changes, public API / trait / feature-flag changes, dependency bumps, build script / proto / codegen changes, or anything that could regress feature-gated builds. Small single-crate changes use the targeted commands.
  • Formatting and lint rules (rustfmt enforced, clippy -Dwarnings, no unexplained #[allow(...)]).
  • Commit / PR conventions (Conventional Commits for the title, ~500 LOC PR target, refactor-only PRs, CHANGELOG updates under ## vNext).
  • Things not to do (don't push to upstream directly, don't bypass hooks, don't hand-edit Cargo.lock, don't add public API without updating allowed-external-types.toml, don't author standalone "summary of changes" markdown files).
  • Pointers to the existing scripts/precommit.sh, scripts/lint.sh, scripts/test.sh, and design docs.

Why

AGENTS.md is a community convention that several editors and agent runtimes (Copilot, Cursor, Claude Code, etc.) auto-load. Without it, agents end up pushing PRs that fail trivial CI checks (e.g. rustfmt) because they don't know about scripts/precommit.sh and the workspace conventions. Having one short file at the root means contributors using agents get consistent behavior without rediscovering the setup each time.

This PR is documentation-only — no code or build changes.

@cijothomas cijothomas requested a review from a team as a code owner April 30, 2026 15:41
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.7%. Comparing base (f60125e) to head (6e2393d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3480   +/-   ##
=====================================
  Coverage   83.7%   83.7%           
=====================================
  Files        126     126           
  Lines      25386   25386           
=====================================
  Hits       21255   21255           
  Misses      4131    4131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread AGENTS.md
Comment thread AGENTS.md
cijothomas added a commit to cijothomas/otel-arrow that referenced this pull request Apr 30, 2026
GitHub Copilot, Cursor, and other agents read AGENTS.md, so the .github/copilot-instructions.md stub is no longer needed.

Keep CLAUDE.md as a thin pointer to AGENTS.md since Claude Code is only guaranteed to read CLAUDE.md (see open-telemetry/opentelemetry-rust#3480 discussion).
Comment thread AGENTS.md Outdated
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
@cijothomas cijothomas enabled auto-merge May 1, 2026 22:18
@cijothomas cijothomas added this pull request to the merge queue May 1, 2026
Merged via the queue into open-telemetry:main with commit 7f9242d May 1, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants