Skip to content

Add a code-review agent skill - #8788

Open
Damyan Pepper (damyanp) wants to merge 3 commits into
microsoft:mainfrom
damyanp:code-review-skill
Open

Add a code-review agent skill#8788
Damyan Pepper (damyanp) wants to merge 3 commits into
microsoft:mainfrom
damyanp:code-review-skill

Conversation

@damyanp

@damyanp Damyan Pepper (damyanp) commented Aug 17, 2026

Copy link
Copy Markdown
Member

Adds .github/skills/code-review/SKILL.md, an agent skill that Copilot code review picks up when reviewing pull requests in this repository.

Motivation

Copilot code review applies a confidence and usefulness filter to its findings. Comments that fall below the threshold are not posted inline; they are listed in a collapsed "Suppressed comments" block in the review summary, under a header that otherwise reads "generated no new comments".

In practice this means small wording problems in docs, templates, and comments are reported in a place nobody looks, and cannot be applied as one-click suggested changes. Typos, brand capitalization, and grammar slips in review-visible text routinely end up suppressed rather than surfaced.

We want that feedback, so this skill asks for it explicitly.

What the skill does

Sets review priorities first. The skill opens by stating that it augments rather than replaces the default review, then ranks what to look at: correctness and behavior, memory and lifetime safety, compatibility and compiler contracts, test coverage, design, project conventions, release notes, and only then wording. Wording is explicitly last, and the skill states that wording comments must never crowd out or delay a substantive finding.

Asks for wording findings inline rather than suppressed. Spelling, grammar, terminology, and within-block punctuation consistency, across docs, issue templates, code comments, identifiers, diagnostics and help text, and test comments.

Constrains the noise. Correctness first, Nit: prefix, one grouped comment when a pattern repeats more than three times in a file, changed lines only, and deference to the conventions already used in the file.

Adds a terminology table. NuGet, GitHub, SPIR-V, HLSL, DXIL, DXC, DirectX, LunarG, Vulkan, LLVM/Clang, macOS — with an explicit carve-out so URLs, file paths, extensions, identifiers, CLI flags, environment variables, and literal command invocations are left alone.

Defers on release notes. CONTRIBUTING.md and .github/copilot-instructions.md remain canonical; the skill points at them and states that they win on any disagreement, rather than restating the policy.

Notes for reviewers

  • The skill originally restated the release note policy, and review caught that the restatement had already drifted from .github/copilot-instructions.md — most importantly by saying not to comment at all when a pull request already updates docs/ReleaseNotes.md, when the instructions ask for the entry's placement and content to be reviewed in that case. That restatement is now replaced by a pointer to the canonical files, which should prevent the same drift recurring.
  • Copilot reads skills from the head branch, so any review on this pull request exercises the skill being added. If it works, this PR should get inline nits rather than suppressed ones.
  • No release note for this change: it is repository tooling with no user-visible compiler behavior change.

Assisted by GitHub Copilot.

Copilot code review currently routes spelling, grammar, terminology, and
punctuation findings into a collapsed "Suppressed comments" block in the
review summary rather than posting them as inline comments, so they are
easy to miss and cannot be applied as suggested changes.

Add .github/skills/code-review/SKILL.md, which:

- Sets explicit review priorities, led by correctness, memory and lifetime
  safety, and compiler compatibility, so the skill augments rather than
  narrows the default review.
- Asks for wording findings to be reported inline instead of suppressed,
  with guardrails: correctness first, Nit: prefix, grouped repeats, and
  changed lines only.
- Adds a DXC terminology table (NuGet, GitHub, SPIR-V, DXIL, LunarG), with
  a carve-out for URLs, paths, flags, and identifiers.
- Restates the CONTRIBUTING.md release notes policy, including the
  multi-PR, docs-only, and dependency bump exclusions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e8b5337d-516d-45c2-aa9d-2efb79ebaf86
Copilot AI balanced review requested due to automatic review settings August 17, 2026 18:48

Copilot AI 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.

Pull request overview

Adds repository-specific Copilot review guidance prioritizing substantive findings while surfacing minor wording issues inline.

Changes:

  • Defines review priorities and wording conventions.
  • Adds terminology and release-note guidance.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/skills/code-review/SKILL.md Outdated
Replace the illustrative spelling and grammar examples with generic ones
that are not drawn from any particular pull request.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e8b5337d-516d-45c2-aa9d-2efb79ebaf86
Copilot AI review requested due to automatic review settings August 17, 2026 19:52

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/skills/code-review/SKILL.md:124

  • This blanket instruction also suppresses feedback on an existing release-note entry, including entries placed under the wrong release or written contrary to CONTRIBUTING.md. The repository guidance in .github/copilot-instructions.md:18-28 instead skips only the request for an additional note and explicitly requires reviewing an existing entry's placement and content. Preserve that distinction here so loading this skill does not weaken release-note review.
Do **not** leave a release note comment when the pull request already updates
`docs/ReleaseNotes.md`, is docs-only, or is a dependency bump such as a
"Bump ..." pull request.

The skill restated the release note policy, which had already drifted from
.github/copilot-instructions.md. The restatement said not to comment when a
pull request already updates docs/ReleaseNotes.md, but the instructions ask
for the entry's placement and content to be reviewed in that case; it also
dropped the entry placement rules entirely.

Replace the restatement with a pointer to CONTRIBUTING.md and
.github/copilot-instructions.md as the canonical sources, stating that they
win on any disagreement, and restate only the two points that are easiest
to get wrong.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e8b5337d-516d-45c2-aa9d-2efb79ebaf86
Copilot AI review requested due to automatic review settings August 17, 2026 19:57

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants