Skip to content

Agentics: Add Extensions & Compression review agent and instructions#126638

Merged
T-Gro merged 9 commits into
dotnet:mainfrom
T-Gro:agentic/extensions-reviewer
Apr 10, 2026
Merged

Agentics: Add Extensions & Compression review agent and instructions#126638
T-Gro merged 9 commits into
dotnet:mainfrom
T-Gro:agentic/extensions-reviewer

Conversation

@T-Gro

@T-Gro T-Gro commented Apr 8, 2026

Copy link
Copy Markdown
Member

Add Copilot agentic artifacts for Microsoft.Extensions.* and System.IO.Compression libraries — a review agent, a writing skill, and
folder-scoped instruction files for various extensions areas.

Includes a follow-up review pass, explicitly invokable as a separate agent.

T-Gro and others added 3 commits March 20, 2026 17:58
Add three types of Copilot artifacts for Microsoft.Extensions.* and
System.IO.Compression code review and development guidance:

1. Review Agent (.github/agents/extensions-reviewer.md):
   - 12 overarching principles for Extensions/Compression review
   - 20 review dimensions with 106 CHECK items
   - Routing table mapping feature areas to dimensions
   - 5-wave review workflow

2. Skill (.github/skills/extensions-review/SKILL.md):
   - Decision trees for DI lifetime, config binding, options validation
   - Code examples for common patterns
   - Testing guidance specific to Extensions/Compression
   - Delegates to @extensions-reviewer for full code review

3. Instruction files (.github/instructions/):
   - 8 folder-specific instruction files with applyTo globs
   - Configuration, DI, Logging, Hosting, Caching, Options,
     Compression, and common Extensions libraries
   - Concise, actionable bullet points per area

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- D1: Replace generic naming rule with Extensions naming taxonomy
- D4: Broaden SafeHandle to cover ChangeToken/ICacheEntry/FileWatcher disposal
- D5: Name actual hot paths per library (DI resolution, Logger.Log, etc.)
- D9: Replace misplaced platform-error-codes with domain-specific exceptions
- D15: Replace factually wrong health-check rule with IHostedLifecycleService ordering
- D18: Replace generic dead-code/accidental-files with shared-code and test patterns
- Skill: Narrow trigger words to avoid overtriggering on Extensions.AI etc.
- Instructions: Remove 5 duplicated rules across instruction files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Applied 7 consensus fixes from 3-model review (Opus, Codex, Gemini):
1. Strip all vote/weight/PR-count statistics (zero runtime value)
2. Deduplicate SKILL.md key-rules that repeated instruction files
3. Remove generic C#/.NET rules already known to model/copilot-instructions
4. Fix factual errors: CompressionLevel, agent name, interceptor, encryption
5. Make CHECKs principle-based not implementation-specific
6. Add HybridCache .NET 9+ availability note
7. Trim redundant trigger words (23 -> 10, one per area)

Net: -88 lines, 868 total (from 956). Zero contamination verified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 11:24
@T-Gro T-Gro marked this pull request as draft April 8, 2026 11:24
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

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 Copilot agentic assets for reviewing and authoring changes in Microsoft.Extensions.* and System.IO.Compression within dotnet/runtime, including a dedicated review agent, a writing skill, and folder-scoped instruction files.

Changes:

  • Introduces a new “Extensions & Compression” review agent (extensions-reviewer) with dimension-based checks.
  • Adds a writing skill for Extensions/Compression implementation guidance.
  • Adds folder-scoped instruction files for key Extensions areas (DI, Configuration, Logging, Hosting, Options, Caching, Common libs) plus Compression.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/skills/extensions-review/SKILL.md Adds a writing skill with implementation guidance and examples for Extensions + Compression.
.github/instructions/extensions-options.instructions.md Adds Options-specific folder guidance (validation, monitor, generator parity).
.github/instructions/extensions-logging.instructions.md Adds Logging-specific guidance (LoggerMessage generator, security, performance).
.github/instructions/extensions-hosting.instructions.md Adds Hosting lifecycle and test reliability guidance.
.github/instructions/extensions-di.instructions.md Adds DI lifetimes, resolution, trim/AOT, and test guidance.
.github/instructions/extensions-configuration.instructions.md Adds Configuration binding and source-generator parity guidance.
.github/instructions/extensions-common.instructions.md Adds combined guidance for Http, FileProviders, and Primitives.
.github/instructions/extensions-caching.instructions.md Adds caching correctness/perf guidance (keys, eviction, stampede prevention).
.github/instructions/compression.instructions.md Adds Compression guidance (format correctness, security, perf, interop testing).
.github/agents/extensions-reviewer.md Adds a dedicated review agent with principles, dimensions, routing, and workflow.

Comment thread .github/skills/extensions-review/SKILL.md Outdated
Comment thread .github/skills/extensions-review/SKILL.md
Comment thread .github/skills/extensions-review/SKILL.md
Comment thread .github/instructions/extensions-hosting.instructions.md Outdated
@T-Gro T-Gro marked this pull request as ready for review April 8, 2026 12:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 12:37

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 10 out of 10 changed files in this pull request and generated 8 comments.

Comment thread .github/instructions/extensions-options.instructions.md Outdated
Comment thread .github/instructions/extensions-logging.instructions.md Outdated
Comment thread .github/instructions/extensions-hosting.instructions.md Outdated
Comment thread .github/instructions/extensions-di.instructions.md Outdated
Comment thread .github/instructions/extensions-configuration.instructions.md Outdated
Comment thread .github/instructions/extensions-common.instructions.md Outdated
Comment thread .github/instructions/extensions-caching.instructions.md Outdated
Comment thread .github/instructions/compression.instructions.md Outdated
T-Gro and others added 2 commits April 8, 2026 14:43
Drop all (Dx, Dy) dimension pointers that could drift from the agent
doc, and replace the verbose Microsoft.Extensions.* package listing
in the description with a single wildcard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 'writing-extensions-code' skill name no longer exists (renamed to
extensions-review). Rather than update the pointers, remove the
'For deeper guidance' footer lines entirely from all 8 instruction files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 12:56

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 10 out of 10 changed files in this pull request and generated 5 comments.

Comment thread .github/instructions/extensions-common.instructions.md
Comment thread .github/skills/extensions-review/SKILL.md
Comment thread .github/instructions/extensions-di.instructions.md Outdated
Comment thread .github/instructions/extensions-common.instructions.md
Comment thread .github/instructions/extensions-configuration.instructions.md
T-Gro and others added 2 commits April 8, 2026 15:04
Instruct the extensions-reviewer agent to launch one claude-opus-4.6
sub-agent per dimension in Wave 1, running all dimensions in parallel.
Each sub-agent gets the full briefing pack plus its assigned dimension
and CHECK items.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 13:14

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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread .github/skills/extensions-review/SKILL.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 13:55

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 10 out of 10 changed files in this pull request and generated 3 comments.

Comment thread .github/agents/extensions-reviewer.md
Comment thread .github/skills/extensions-review/SKILL.md
Comment thread .github/instructions/extensions-hosting.instructions.md
@T-Gro T-Gro merged commit 41fae17 into dotnet:main Apr 10, 2026
27 checks passed
@T-Gro T-Gro deleted the agentic/extensions-reviewer branch April 10, 2026 08:13
@github-actions github-actions Bot locked and limited conversation to collaborators May 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants