Skip to content

Add API Review Agent Skill#15359

Merged
joperezr merged 4 commits intomicrosoft:release/13.2from
eerhardt:ApiReview
Mar 19, 2026
Merged

Add API Review Agent Skill#15359
joperezr merged 4 commits intomicrosoft:release/13.2from
eerhardt:ApiReview

Conversation

@eerhardt
Copy link
Member

Description

This skill allows us to automate parts of the API reviews that we do.

This skill allows us to automate parts of the API reviews that we do.
@eerhardt eerhardt requested review from Copilot and mitchdenny and removed request for Copilot March 18, 2026 16:58
@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15359

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15359"

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “api-review” agent skill to automate reviewing Aspire’s generated .NET API surface diffs (src/**/api/*.cs) against design guidelines and repo conventions.

Changes:

  • Registers the new api-review skill in AGENTS.md.
  • Adds a detailed .github/skills/api-review/SKILL.md playbook covering diff extraction, review rules, git attribution, and posting review comments via the GitHub API.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
AGENTS.md Lists the new api-review skill among available specialized skills.
.github/skills/api-review/SKILL.md Defines the workflow, ruleset, and posting mechanics for automated API review.

eerhardt and others added 2 commits March 18, 2026 13:45
- Fix description to say 'developer who introduced each API (via git blame)'
  instead of 'PR author' to avoid misdirected attribution
- Replace broken gh api --jsonArray bash example with Python script using
  json.dump + gh api --input (--jsonArray is not a real gh flag)
- Provide non-empty review body instead of empty string to avoid API rejection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Before posting review comments, the skill now checks for existing
API review comments by the current user on the PR. If found, it
skips duplicates, updates changed findings, and only posts net-new
findings. This prevents duplicate comments when the skill runs
against the same PR multiple times.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

**Every finding MUST include author attribution before posting to the PR.** This is critical — it routes feedback to the right person and ensures accountability.

For each finding, identify who introduced the API change using `git blame` on the **source file** (not the auto-generated `api/*.cs` file).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this successfully find the initial person adding the change versus the last one who touched it? (given blame shows the latter I think)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will find the person who last changed the API, which at least gets us close.

So if you introduced void Foo() and I changed it to int Foo(int a), I would get tagged.

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell-mode, infra only change

@joperezr joperezr added the Servicing-approved Approved for servicing release label Mar 18, 2026
@joperezr
Copy link
Member

Note that merges from release branch are paused now, so we will need to backport this to main

@joperezr joperezr merged commit ec9a2ea into microsoft:release/13.2 Mar 19, 2026
7 of 8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 19, 2026
Copilot AI pushed a commit that referenced this pull request Mar 19, 2026
* Add API Review Agent Skill

This skill allows us to automate parts of the API reviews that we do.

* updates - tag the original author in the comment

* Address PR review feedback on api-review skill

- Fix description to say 'developer who introduced each API (via git blame)'
  instead of 'PR author' to avoid misdirected attribution
- Replace broken gh api --jsonArray bash example with Python script using
  json.dump + gh api --input (--jsonArray is not a real gh flag)
- Provide non-empty review body instead of empty string to avoid API rejection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add deduplication check to api-review skill

Before posting review comments, the skill now checks for existing
API review comments by the current user on the PR. If found, it
skips duplicates, updates changed findings, and only posts net-new
findings. This prevents duplicate comments when the skill runs
against the same PR multiple times.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants