← Back to Pull requests

chore(agents): add /sdk-review lens-based review skill #22070

Closed
unknown closed this pull request without merging on Nov 25, 2026 17:10 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 16:59 UTC
Author

Description

Implements a lens-based review skill, /sdk-review, which can be run locally, in addition to the built-in /review and similar generic skills.

This PR just adds the structure, similar to https://github.com/DataDog/dd-trace-dotnet/pull/9471. It's inspired by previous efforts, as well as existing implementations, but is fundamentally meant to be _simple_. We expect models to do the heavy lifting, and the goal is that we just have a place to put very-targeted rules, that are specific to this repo (see follow up in #22071).

The corpus of rules added to #22071 were extracted from ~300 comments left on human-authored PRs over the last 6 months, which were then de-duped, negative results removed (suggestions weren't implemented/not clearly actionable/status unknown), grouped, and categorized. These was then used to generate suggested rules. The rules were then tested to confirm reproducibility, and any that weren't reproducible were removed.

These rules are intended to evolve over time - the initial set is simply a starting point, and are expected to evolve over time. Feel free to adjust/remove/replace/add new rules based on your experience!

Customer impact

None

Testing

The skill has been tested extensively already in the dd-trace-dotnet repo, the rules added in # were validated for reproduction.

Risks

The main risk is "irritation" caused by adding this to the standard ## Code Review Rules section. Codex looks for this, and uses it to customize reviewing, and will also encourage doing a _local_ review, prior to push. This isn't enforced, but it's something to be aware of, and an intentional part of this velocity initiative.

Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Diff: 257 lines (+192 / -65) across 3 files Reviewer: gnufede Review duration: 1450m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 257 lines diff across 3 files
0.39
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.332
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #22070"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.1% (MEDIUM) · Higher = larger blast radius
39.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.5% · Safe to merge
15.5%