From 1e6476df7871bd0c0fc34eda2f765db7abcf3a67 Mon Sep 17 00:00:00 2001 From: Roberto Montero Date: Tue, 8 Sep 2026 14:07:14 +0200 Subject: [PATCH 1/4] Tell no-harness reviewers to load the skill lenses GitHub Codex cannot invoke the skill; point it at the reviewer files and a temporary debug prefix so we can see which lens it used. Co-authored-by: Cursor --- AGENTS.md | 17 ++++++++++++++++- .../datadog/trace/core/CodexFallbackDebug.java | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java diff --git a/AGENTS.md b/AGENTS.md index bebaaaa2aa3..4e06a354f26 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -76,7 +76,22 @@ docs/ Developer documentation (see below) ## Review Guidelines - **Technical debt**: run `/techdebt` over branch changes before marking a PR ready to catch code duplication, unnecessary complexity, and dead code (refactor-only, never changes behavior) — see [.agents/skills/techdebt/SKILL.md](.agents/skills/techdebt/SKILL.md). -- **Multi-perspective push gate (pilot)**: before pushing, run [dd-apm-sdk-review](.agents/skills/dd-apm-sdk-review/SKILL.md) on your unpushed changes unless the user says not to. If any `P0` finding is reported, fix it or get explicit authorization and record the unresolved finding verbatim in the PR description. `P1`/`P2` findings should be fixed before pushing but can be dismissed by the human. Security findings are never pasted into the PR description — route them privately. (Performance review, previously the standalone `/perf-review` skill, is now one of this skill's perspectives — see `.agents/dd-apm-sdk-review-overrides/reviewers/performance.md`.) +- **Local agent with a skill harness (pilot):** before pushing, run [dd-apm-sdk-review](.agents/skills/dd-apm-sdk-review/SKILL.md) on your unpushed changes unless the user says not to. If any `P0` finding is reported, fix it or get explicit authorization and record the unresolved finding verbatim in the PR description. `P1`/`P2` findings should be fixed before pushing but can be dismissed by the human. Security findings are never pasted into the PR description — route them privately. (Performance review, previously the standalone `/perf-review` skill, is now one of this skill's perspectives — see `.agents/dd-apm-sdk-review-overrides/reviewers/performance.md`.) +- **Reviewer without a skill harness** (GitHub Codex, or any agent that cannot invoke `.agents/skills/`): do not run the skill and do not execute `SKILL.md` Step 1. When you are reviewing a pull request or a diff, use these files as the review spec — the checks and the P0/P1/P2 bar only: + - `.agents/skills/dd-apm-sdk-review/reviewers/_common.md` (always) + - `.agents/skills/dd-apm-sdk-review/reviewers/coherence.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/security.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/design.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/performance.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/maintainability.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/conventions.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md` + - the matching file under `.agents/dd-apm-sdk-review-overrides/reviewers/` when it exists (additive; read both) + - `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) +- Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the `_common.md` rule "Never post to GitHub" does not apply to you — post findings as review comments. Skip a lens that cannot apply to this diff rather than inventing a finding. +- If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), review that prose for broken paths and contradictions. Do not apply the product lenses to the instruction text. +- TEMPORARY debug (remove before merging this experiment): every review comment must start with `[dd-apm-sdk-review debug]` and name the exact rule file that justifies it (example: `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` or `.agents/dd-apm-sdk-review-overrides/reviewers/conventions.md`). If no lens applies, cite `AGENTS.md` and say why. ## Critical constraints diff --git a/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java b/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java new file mode 100644 index 00000000000..18e81f5326f --- /dev/null +++ b/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java @@ -0,0 +1,14 @@ +package datadog.trace.core; + +/** + * TEMPORARY: bait for GitHub Codex review of the AGENTS.md no-harness fallback. Delete this class + * before merging. Not referenced by the tracer. + */ +public final class CodexFallbackDebug { + private CodexFallbackDebug() {} + + /** Skip sampling when the span budget has been exhausted. */ + public static boolean shouldSample(int spanCount, int maxSpans) { + return spanCount >= maxSpans; + } +} From 5dcff90056fddc0d9bd7606c260c1c1ade99f10e Mon Sep 17 00:00:00 2001 From: Roberto Montero Date: Tue, 8 Sep 2026 14:42:16 +0200 Subject: [PATCH 2/4] Drop Codex debug prefix and bait class Keep the no-harness lens-loading fallback; remove the experiment-only review prefix and unused shouldSample helper. Co-authored-by: Cursor --- AGENTS.md | 1 - .../datadog/trace/core/CodexFallbackDebug.java | 14 -------------- 2 files changed, 15 deletions(-) delete mode 100644 dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java diff --git a/AGENTS.md b/AGENTS.md index 4e06a354f26..02e93e26fbb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -91,7 +91,6 @@ docs/ Developer documentation (see below) - `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) - Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the `_common.md` rule "Never post to GitHub" does not apply to you — post findings as review comments. Skip a lens that cannot apply to this diff rather than inventing a finding. - If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), review that prose for broken paths and contradictions. Do not apply the product lenses to the instruction text. -- TEMPORARY debug (remove before merging this experiment): every review comment must start with `[dd-apm-sdk-review debug]` and name the exact rule file that justifies it (example: `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` or `.agents/dd-apm-sdk-review-overrides/reviewers/conventions.md`). If no lens applies, cite `AGENTS.md` and say why. ## Critical constraints diff --git a/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java b/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java deleted file mode 100644 index 18e81f5326f..00000000000 --- a/dd-trace-core/src/main/java/datadog/trace/core/CodexFallbackDebug.java +++ /dev/null @@ -1,14 +0,0 @@ -package datadog.trace.core; - -/** - * TEMPORARY: bait for GitHub Codex review of the AGENTS.md no-harness fallback. Delete this class - * before merging. Not referenced by the tracer. - */ -public final class CodexFallbackDebug { - private CodexFallbackDebug() {} - - /** Skip sampling when the span budget has been exhausted. */ - public static boolean shouldSample(int spanCount, int maxSpans) { - return spanCount >= maxSpans; - } -} From cfb099dc9ba34970800ef9466e4bc05748f9245e Mon Sep 17 00:00:00 2001 From: Roberto Montero Date: Tue, 8 Sep 2026 14:45:16 +0200 Subject: [PATCH 3/4] Move no-harness review spec out of AGENTS.md Keep the Codex fallback as a pointer; the lens list lives in the overrides file. Co-authored-by: Cursor --- .../no-harness-review.md | 29 +++++++++++++++++++ AGENTS.md | 15 +--------- 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 .agents/dd-apm-sdk-review-overrides/no-harness-review.md diff --git a/.agents/dd-apm-sdk-review-overrides/no-harness-review.md b/.agents/dd-apm-sdk-review-overrides/no-harness-review.md new file mode 100644 index 00000000000..da1085a648a --- /dev/null +++ b/.agents/dd-apm-sdk-review-overrides/no-harness-review.md @@ -0,0 +1,29 @@ +# Review without a skill harness + +Use this file when you cannot invoke `.agents/skills/` (GitHub Codex, or any pull-request +review bot). Do not run `dd-apm-sdk-review` and do not execute `SKILL.md` Step 1. + +When you are reviewing a pull request or a diff, use these files as the review spec — the +checks and the P0/P1/P2 bar only: + +- `.agents/skills/dd-apm-sdk-review/reviewers/_common.md` (always) +- `.agents/skills/dd-apm-sdk-review/reviewers/coherence.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/security.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/design.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/performance.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/maintainability.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/conventions.md` +- `.agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md` +- the matching file under `.agents/dd-apm-sdk-review-overrides/reviewers/` when it exists + (additive; read both) +- `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) + +Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the +files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the +`_common.md` rule "Never post to GitHub" does not apply to you — post findings as review +comments. Skip a lens that cannot apply to this diff rather than inventing a finding. + +If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), +review that prose for broken paths and contradictions. Do not apply the product lenses to +the instruction text. diff --git a/AGENTS.md b/AGENTS.md index 02e93e26fbb..b62f63a01ac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -77,20 +77,7 @@ docs/ Developer documentation (see below) - **Technical debt**: run `/techdebt` over branch changes before marking a PR ready to catch code duplication, unnecessary complexity, and dead code (refactor-only, never changes behavior) — see [.agents/skills/techdebt/SKILL.md](.agents/skills/techdebt/SKILL.md). - **Local agent with a skill harness (pilot):** before pushing, run [dd-apm-sdk-review](.agents/skills/dd-apm-sdk-review/SKILL.md) on your unpushed changes unless the user says not to. If any `P0` finding is reported, fix it or get explicit authorization and record the unresolved finding verbatim in the PR description. `P1`/`P2` findings should be fixed before pushing but can be dismissed by the human. Security findings are never pasted into the PR description — route them privately. (Performance review, previously the standalone `/perf-review` skill, is now one of this skill's perspectives — see `.agents/dd-apm-sdk-review-overrides/reviewers/performance.md`.) -- **Reviewer without a skill harness** (GitHub Codex, or any agent that cannot invoke `.agents/skills/`): do not run the skill and do not execute `SKILL.md` Step 1. When you are reviewing a pull request or a diff, use these files as the review spec — the checks and the P0/P1/P2 bar only: - - `.agents/skills/dd-apm-sdk-review/reviewers/_common.md` (always) - - `.agents/skills/dd-apm-sdk-review/reviewers/coherence.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/security.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/design.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/performance.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/maintainability.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/conventions.md` - - `.agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md` - - the matching file under `.agents/dd-apm-sdk-review-overrides/reviewers/` when it exists (additive; read both) - - `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) -- Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the `_common.md` rule "Never post to GitHub" does not apply to you — post findings as review comments. Skip a lens that cannot apply to this diff rather than inventing a finding. -- If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), review that prose for broken paths and contradictions. Do not apply the product lenses to the instruction text. +- **Reviewer without a skill harness** (GitHub Codex, or any agent that cannot invoke `.agents/skills/`): do not run the skill. Follow [.agents/dd-apm-sdk-review-overrides/no-harness-review.md](.agents/dd-apm-sdk-review-overrides/no-harness-review.md). ## Critical constraints From a1133d55bd395e98a6de038040a971bc8f0af6d0 Mon Sep 17 00:00:00 2001 From: Roberto Montero Date: Tue, 8 Sep 2026 14:54:09 +0200 Subject: [PATCH 4/4] Restore the inline no-harness review spec in AGENTS.md Keep the Codex fallback that already worked; drop the extracted overrides file. Co-authored-by: Cursor --- .../no-harness-review.md | 29 ------------------- AGENTS.md | 15 +++++++++- 2 files changed, 14 insertions(+), 30 deletions(-) delete mode 100644 .agents/dd-apm-sdk-review-overrides/no-harness-review.md diff --git a/.agents/dd-apm-sdk-review-overrides/no-harness-review.md b/.agents/dd-apm-sdk-review-overrides/no-harness-review.md deleted file mode 100644 index da1085a648a..00000000000 --- a/.agents/dd-apm-sdk-review-overrides/no-harness-review.md +++ /dev/null @@ -1,29 +0,0 @@ -# Review without a skill harness - -Use this file when you cannot invoke `.agents/skills/` (GitHub Codex, or any pull-request -review bot). Do not run `dd-apm-sdk-review` and do not execute `SKILL.md` Step 1. - -When you are reviewing a pull request or a diff, use these files as the review spec — the -checks and the P0/P1/P2 bar only: - -- `.agents/skills/dd-apm-sdk-review/reviewers/_common.md` (always) -- `.agents/skills/dd-apm-sdk-review/reviewers/coherence.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/security.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/design.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/performance.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/maintainability.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/conventions.md` -- `.agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md` -- the matching file under `.agents/dd-apm-sdk-review-overrides/reviewers/` when it exists - (additive; read both) -- `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) - -Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the -files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the -`_common.md` rule "Never post to GitHub" does not apply to you — post findings as review -comments. Skip a lens that cannot apply to this diff rather than inventing a finding. - -If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), -review that prose for broken paths and contradictions. Do not apply the product lenses to -the instruction text. diff --git a/AGENTS.md b/AGENTS.md index b62f63a01ac..02e93e26fbb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -77,7 +77,20 @@ docs/ Developer documentation (see below) - **Technical debt**: run `/techdebt` over branch changes before marking a PR ready to catch code duplication, unnecessary complexity, and dead code (refactor-only, never changes behavior) — see [.agents/skills/techdebt/SKILL.md](.agents/skills/techdebt/SKILL.md). - **Local agent with a skill harness (pilot):** before pushing, run [dd-apm-sdk-review](.agents/skills/dd-apm-sdk-review/SKILL.md) on your unpushed changes unless the user says not to. If any `P0` finding is reported, fix it or get explicit authorization and record the unresolved finding verbatim in the PR description. `P1`/`P2` findings should be fixed before pushing but can be dismissed by the human. Security findings are never pasted into the PR description — route them privately. (Performance review, previously the standalone `/perf-review` skill, is now one of this skill's perspectives — see `.agents/dd-apm-sdk-review-overrides/reviewers/performance.md`.) -- **Reviewer without a skill harness** (GitHub Codex, or any agent that cannot invoke `.agents/skills/`): do not run the skill. Follow [.agents/dd-apm-sdk-review-overrides/no-harness-review.md](.agents/dd-apm-sdk-review-overrides/no-harness-review.md). +- **Reviewer without a skill harness** (GitHub Codex, or any agent that cannot invoke `.agents/skills/`): do not run the skill and do not execute `SKILL.md` Step 1. When you are reviewing a pull request or a diff, use these files as the review spec — the checks and the P0/P1/P2 bar only: + - `.agents/skills/dd-apm-sdk-review/reviewers/_common.md` (always) + - `.agents/skills/dd-apm-sdk-review/reviewers/coherence.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/correctness.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/security.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/design.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/performance.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/maintainability.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/conventions.md` + - `.agents/skills/dd-apm-sdk-review/reviewers/cross-sdk.md` + - the matching file under `.agents/dd-apm-sdk-review-overrides/reviewers/` when it exists (additive; read both) + - `.agents/dd-apm-sdk-review-overrides/repo-context.md` (cite related skills; do not invoke them) +- Do not load `SKILL.md` or `reviewers/report-template.md`. Ignore harness-only rules in the files you do load: do not emit `READY TO PUSH` / `DO NOT PUSH` / `WAITING ON HUMAN`, and the `_common.md` rule "Never post to GitHub" does not apply to you — post findings as review comments. Skip a lens that cannot apply to this diff rather than inventing a finding. +- If this change set is only agent-instruction files (`.agents/`, `AGENTS.md`, `CLAUDE.md`), review that prose for broken paths and contradictions. Do not apply the product lenses to the instruction text. ## Critical constraints