Unify repository agent guidance - #6167
Conversation
Keep repository-wide instructions in one source of truth so Claude and other agents no longer receive diverging copies.
There was a problem hiding this comment.
💡 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".
| - 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 |
There was a problem hiding this comment.
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 👍 / 👎.
| - 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. |
There was a problem hiding this comment.
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 👍 / 👎.
| - 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. |
There was a problem hiding this comment.
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 👍 / 👎.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 8188603 | Docs | Datadog PR Page | Give us feedback! |
What does this PR do?
Consolidates repository-wide guidance in
AGENTS.mdand reducesCLAUDE.mdto an@AGENTS.mdimport.Motivation:
The two root instruction files duplicated guidance and could drift apart.
Change log entry
None.
Additional Notes:
AGENTS_TODO.mdand the specialized personas under.cursor/rules/remain unchanged.How to test the change?
Run
git diff --checkand verify thatCLAUDE.mdcontains only@AGENTS.md; this change only modifies documentation.