Add API Review Agent Skill#15359
Conversation
This skill allows us to automate parts of the API reviews that we do.
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15359Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15359" |
There was a problem hiding this comment.
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.mdplaybook 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. |
- 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). |
There was a problem hiding this comment.
Does this successfully find the initial person adding the change versus the last one who touched it? (given blame shows the latter I think)
There was a problem hiding this comment.
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.
joperezr
left a comment
There was a problem hiding this comment.
Tell-mode, infra only change
|
Note that merges from release branch are paused now, so we will need to backport this to main |
* 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>
Description
This skill allows us to automate parts of the API reviews that we do.