Skip to content

docs: add AGENTS.md with PR quality rules - #199

Merged
lym953 merged 5 commits into
mainfrom
yiming.luo/agents-md-pr-quality
Oct 29, 2026
Merged

lym953 merged 5 commits into
mainfrom
yiming.luo/agents-md-pr-quality

Conversation

@lym953

@lym953 lym953 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Coding agents and review bots in this repository have no guidance on PR quality. The only instruction file is .github/copilot-instructions.md, and it covers only security.

On #169, the author ran several rounds of bot review, and they did not report the problems below. Our own review with Claude Code found them. That review used review rules from a personal configuration:

  • The PR had about 310 lines of core code and about 1,490 lines of tests.
  • Many tests checked cases that one table test already covered.
  • A test checked a setting that no code reads.
  • A new setting differed from the setting that the Lambda Extension uses for the same shared sampler.

This PR

  • Adds AGENTS.md with rules for code style, settings, tests, PR size and reviews. Three rules come from the AGENTS.md file of the Lambda Extension:

    • the 300-line limit for core code
    • short comments
    • a PR description that agrees with the code

    The other rules come from the review of [Traces] Add error sampling with opt-in tracer-drop rescue #169.

    These rules are a starting point. We can change them and add more as we learn what helps the reviews.

  • Adds CLAUDE.md, which loads AGENTS.md and CLAUDE_PERSONAL.md. This is the same setup as the Lambda Extension. Claude Code reads CLAUDE.md, so it gets the rules in AGENTS.md.

  • Changes .gitignore. It no longer ignores /AGENTS.md and /CLAUDE.md, so that the two files can be committed. It ignores /CLAUDE_PERSONAL.md, so that each person can keep personal instructions in that file.

Testing

This PR changes only documentation. I did not run a bot review with the new file.

If you have a local CLAUDE.md

Before this PR, .gitignore ignored /CLAUDE.md, so some people keep a local CLAUDE.md with personal instructions. After this PR merges, a pull fails while that file is in the repository root. Rename your file to CLAUDE_PERSONAL.md before you pull. The committed CLAUDE.md loads it.

The same applies to a local AGENTS.md. Move its content to CLAUDE_PERSONAL.md too.

🤖 Generated with Claude Code

lym953 and others added 3 commits October 28, 2026 16:32
Add guidance for coding agents and review bots on PR size, duplicate
tests, defensive checks, and settings shared with the Lambda Extension
and the Go Agent. Stop ignoring /AGENTS.md so the file can be committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow the Lambda Extension setup: commit CLAUDE.md, and ignore
/CLAUDE_PERSONAL.md for personal instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lym953
lym953 marked this pull request as ready for review October 29, 2026 14:59
@lym953
lym953 requested review from a team as code owners October 29, 2026 14:59
@lym953
lym953 requested review from apiarian-datadog and litianningdatadog and removed request for a team October 29, 2026 14:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T15:01:16.307223Z 534bd7d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread AGENTS.md Outdated
Comment on lines +20 to +21
- Do not add a defensive check unless you can name the input that makes it fail. For example,
do not check that an index is in range when the function that returns it cannot return an

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that something specific to this repo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. It's copied from lambda extension repo. Let me delete it for now. We can consider adding it when we actually see the problem.

@litianningdatadog litianningdatadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I’m okay with it, but generic content may offer limited value in the long run.

lym953 and others added 2 commits October 29, 2026 11:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lym953
lym953 merged commit d4225a4 into main Oct 29, 2026
26 of 27 checks passed
@lym953
lym953 deleted the yiming.luo/agents-md-pr-quality branch October 29, 2026 19:07
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