Skip to content

docs(agents): add lint-rule authoring guidance to the lint skill - #21946

Open
brettlangdon wants to merge 3 commits into
mainfrom
brett-11/python-lint-skill
Open

brettlangdon wants to merge 3 commits into
mainfrom
brett-11/python-lint-skill

Conversation

@brettlangdon

@brettlangdon brettlangdon commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Description

Adds guidance for turning recurring, mechanically detectable review themes into lint or static-analysis rules. It is a short "Authoring a new lint rule" section in the existing lint skill, with detail in .agents/skills/lint/references/authoring-rules.md. AGENTS.md links to it from the existing lint row. This is intended for contributors and for the Thematic Rule Suggestions bot, which looks in the skills for lint or static-analysis guidance.

The reference covers:

The reference's inventory of existing checks and its lessons from earlier PRs are partly inference from the PR discussions, so a maintainer should verify them.

The detail is a linked reference file so that the lint skill, which every coding agent loads, stays short.

Testing

  • Docs only. scripts/lint spelling on the changed files produced no output.
  • scripts/lint sg-test passed (28 passed, 0 failed) earlier, before the docs edits.
  • I checked the paths, commands and rule names the reference mentions against the repository.
  • No release note is needed, so this should carry changelog/no-changelog.

🤖 Generated with Claude Code

Jira: BRETT-11

brettlangdon and others added 3 commits November 19, 2026 15:55
Guides contributors and the Thematic Rule Suggestions bot toward
ast-grep-first, existing-tooling-first lint rules, with criteria for
when a review theme is automatable and lessons from earlier bot PRs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y hits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brettlangdon brettlangdon added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 19, 2026
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

.agents/skills/lint/SKILL.md                                            @DataDog/apm-python-guild
.agents/skills/lint/references/authoring-rules.md                       @DataDog/apm-python-guild
AGENTS.md                                                               @DataDog/apm-python-guild

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 22 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 22 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=104)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=102)
ddtrace.llmobs._integrations.bedrock_agents -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=102)
ddtrace.internal.span_bus -×-> ddtrace._trace.span  (internal-core -> product:tracing, score=35)
ddtrace.llmobs._llmobs -×-> ddtrace._trace.span  (product:llmobs -> product:tracing, score=33)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@brettlangdon
brettlangdon marked this pull request as ready for review November 19, 2026 17:13
@brettlangdon
brettlangdon requested a review from a team as a code owner November 19, 2026 17:13
@brettlangdon
brettlangdon requested review from yaronguro-datadog and removed request for a team November 19, 2026 17:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T17:14:39.079302Z e2430e7 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-19T17:16:09.311077Z e2430e7 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.

@datadog-prod-us1-4 datadog-prod-us1-4 Bot 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.

Bits Code Review: PASS

More details

The documented lint commands, ast-grep examples, and CI wiring are consistent with the repository configuration. No actionable errors were identified in the authoring guidance.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit e2430e7

@pr-commenter

pr-commenter Bot commented Nov 19, 2026

Copy link
Copy Markdown

LLM Validation

LLM Validation Gate — python-tracer-agent

✅ PASS

  • No blocking-case regressions; the quality change is within noise (baseline/candidate confidence intervals overlap).

Analysis

Changed instruction file(s): AGENTS.md.

No safety or blocking-case regressions across 10 case(s). Overall pairwise win-rate 51% [49%–52%], quality +1.0 — see the verdict above for whether that clears the noise band.

Results

  • Pairwise win-rate: 51% [49%–52%] — candidate's share of blind comparisons (90% CI; spanning 50% = no clear difference)
  • Overall quality: 90.3 → 91.3 (/100, +1.0)
  • Bad signals introduced (advisory): 0
  • Candidate criteria coverage (advisory): 21/22 (95%) — expected_criteria the candidate met; does not affect the gate
  • Blocking-case regressions: 0

Cases

Case Mode Quality Δ Win-rate (90% CI) Safety
python-tracer-testing-mandate-001 block +1.4 50% [50%–50%] ok
python-tracer-lint-mandate-002 warn -0.3 50% [50%–50%] ok
python-tracer-docstring-convention-003 block +4.4 58% [45%–72%] ok
python-tracer-pr-title-convention-005 warn +0.8 50% [50%–50%] ok
python-tracer-release-notes-006 block +0.6 50% [50%–50%] ok
python-tracer-circular-import-007 block +1.1 50% [50%–50%] ok
python-tracer-domain-guide-iast-008 warn +0.6 50% [50%–50%] ok
python-tracer-control-asyncio-cancellation-009 warn +1.4 50% [50%–50%] ok
python-tracer-control-decorator-wraps-010 warn -1.1 50% [50%–50%] ok
python-tracer-control-gil-threading-011 warn +0.8 50% [50%–50%] ok

Per-dimension scores, token usage, latency, and estimated cost are in the CI job logs.

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

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant