Skip to content

AGENTS.md: add a mechanical comment-budget gate for agent sessions - #924

Merged
jbachorik merged 1 commit into
mainfrom
agents-comment-gate
Oct 30, 2026
Merged

jbachorik merged 1 commit into
mainfrom
agents-comment-gate

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

What does this PR do?:
Adds a comment budget gate to AGENTS.md (Development Guidelines): before finishing any change, every comment and javadoc the agent wrote gets a prune pass — each comment ≤3 lines, one distinct constraint per line; anything longer requires per-line justification in the task summary. The same cut applies to doc/ pages and PR descriptions.

Motivation:
The existing comment rules ("lean", "state each fact once") are review criteria: they fire only if the agent spontaneously re-judges its draft, which does not reliably happen on fresh sessions. During PR #921 a 9-line comment block was written where 3 lines carried the constraint. Rules that hold across sessions in this repository are mechanical — countable limits checked at write time, anchored to an always-occurring step (compare the LOC limits enforced via wc -lc). This gate follows that pattern: numeric budget, prune pass anchored to the finish step, explicit escalation for exceptions.

Additional Notes:
Complements the existing comment rules; replaces nothing. Reverted out of #921 so repo-infra guidance rides its own PR.

How to test the change?:
Docs-only change (AGENTS.md); no code paths affected.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a security review (run the dd:platform-security-review
    skill, or file a request via the PSEC review form).
    bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

Style rules ('lean', 'state each fact once') are review criteria that only
fire on self-re-judgment; agents skip them on fresh sessions. Add a
mechanical gate of the kind that already works in this file (the LOC
limits): <=3 lines per comment, one distinct constraint per line, prune
pass anchored to the finish step, per-line justification required beyond
the budget.
@jbachorik jbachorik added the AI label Oct 30, 2026
@jbachorik
jbachorik marked this pull request as ready for review October 30, 2026 13:01
@jbachorik
jbachorik requested a review from a team as a code owner October 30, 2026 13:01
@jbachorik
jbachorik merged commit ab5c600 into main Oct 30, 2026
106 of 129 checks passed
@jbachorik
jbachorik deleted the agents-comment-gate branch October 30, 2026 13:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-30T13:03:09.192626Z cfbc4e4 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.

@github-actions github-actions Bot added this to the 1.53.0 milestone Oct 30, 2026
@dd-octo-sts

dd-octo-sts Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #41059256508 | Commit: 4b4e64f | Duration: 19m 59s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-10-30 13:19:29 UTC

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant