Skip to content

Unify repository agent guidance - #6167

Open
lloeki wants to merge 1 commit into
masterfrom
lloeki/unify-agent-guidance
Open

Unify repository agent guidance#6167
lloeki wants to merge 1 commit into
masterfrom
lloeki/unify-agent-guidance

Conversation

@lloeki

@lloeki lloeki commented Aug 7, 2026

Copy link
Copy Markdown
Member

What does this PR do?
Consolidates repository-wide guidance in AGENTS.md and reduces CLAUDE.md to an @AGENTS.md import.

Motivation:
The two root instruction files duplicated guidance and could drift apart.

Change log entry
None.

Additional Notes:
AGENTS_TODO.md and the specialized personas under .cursor/rules/ remain unchanged.

How to test the change?
Run git diff --check and verify that CLAUDE.md contains only @AGENTS.md; this change only modifies documentation.

Keep repository-wide instructions in one source of truth so Claude and other agents no longer receive diverging copies.
@lloeki
lloeki requested a review from a team as a code owner August 7, 2026 10:48
@lloeki lloeki added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Aug 7, 2026
@dd-octo-sts dd-octo-sts Bot added the docs Involves documentation label Aug 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8188603dbf

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CLAUDE.md
- Prefer `x.to_s` over `x || ''` for nil-safe string conversion
- Prefer `return unless x` over `return nil unless x` (implicit nil)
- Prefix unused method arguments with `_` (e.g., `_unused`) or use `**_opts` for intentionally ignored kwargs
@AGENTS.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent recursive imports from expanding repository source

When Claude Code loads this file, @AGENTS.md recursively evaluates import syntax in the imported document; AGENTS.md contains unquoted file references such as @tasks/github.rake, @lib/datadog.rb, and @lib/datadog/core/configuration/components.rb, so those source files are also pulled into every session instead of only the repository guidance. This unnecessarily consumes context and can make unrelated source content behave like persistent instructions; escape or backtick the @... path references before importing this document wholesale.

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
- Change versioning (`lib/datadog/version.rb`, `CHANGELOG.md`).
- Leave resources open (threads must be terminated, files must be closed).
- Make breaking Public API changes.
- AppSec integration tests need Ruby 3.4. Use Ruby 3.4 installed locally or `docker compose run --rm tracer-3.4 /bin/bash`, then run the rake task inside.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run AppSec integration tests on Ruby 3.3

For test:appsec:integration, the Matrixfile entry for rails-app marks Ruby 3.3 as supported and Ruby 3.4 as unsupported. On the instructed Ruby 3.4, the Rake matrix wrapper selects no candidates and exits without invoking spec:appsec:integration, so an agent can report successful verification after running zero integration specs; point this guidance and its container example at tracer-3.3 instead.

AGENTS.md reference: AGENTS.md:L138-L140

Useful? React with 👍 / 👎.

Comment thread AGENTS.md
- Write changelog entries for customers. Use `None.` for internal CI, tooling, and tracer telemetry consumed only by Datadog engineering.
- Telemetry that powers customer-facing Datadog product features, such as DI autocomplete, profiling, or AppSec, needs a customer-facing changelog entry even though its data flows through the Datadog backend.
- Start changelog entries with `Yes.` or `None.`: `Yes. Brief customer-facing summary.` or `None.`. Never provide a summary without the `Yes.` prefix.
- Add `--label "AI Generated"` when creating PRs; the label is sufficient, so do not mention AI in the description.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile the conflicting AI disclosure instructions

For code changes that lead to a pull request, agents are explicitly sent to .cursor/rules/code-style.mdc, whose “Commits and Pull Requests” section requires significant AI-generated code to be disclosed both with the label and at the top of the description. This new rule says the label is sufficient and forbids mentioning AI in the description, so a generated PR cannot satisfy both instructions; update the specialized persona during this consolidation or choose a single disclosure policy.

AGENTS.md reference: AGENTS.md:L251-L252

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 89.96% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8188603 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos docs Involves documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant