Skip to content

Add location-gated AGENTS.md guidance for key src and test subtrees#55198

Open
mthalman wants to merge 6 commits into
dotnet:mainfrom
mthalman:mthalman-agent-recipes-restructure
Open

Add location-gated AGENTS.md guidance for key src and test subtrees#55198
mthalman wants to merge 6 commits into
dotnet:mainfrom
mthalman:mthalman-agent-recipes-restructure

Conversation

@mthalman

@mthalman mthalman commented Jul 8, 2026

Copy link
Copy Markdown
Member

Add nested, auto-loaded AGENTS.md files that give agents area-specific guidance only when editing the relevant subtree, keeping the root instructions lean.

Add nested, auto-loaded AGENTS.md files that give agents area-specific
guidance only when editing the relevant subtree, keeping the root
instructions lean.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 15:42
@mthalman mthalman requested a review from lbussell as a code owner July 8, 2026 15:42
@mthalman mthalman mentioned this pull request Jul 8, 2026
42 tasks

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 subtree-scoped AGENTS.md files to provide area-specific guidance for agents when working under key src/ and test/ directories, keeping root agent instructions shorter while still documenting important local conventions.

Changes:

  • Introduces a test/AGENTS.md with test-tree conventions (parallelism, skips, Verify snapshots, Helix partitioning).
  • Adds component-specific agent guidance under src/ for Tasks, Resolvers, Layout, CLI, Containers, dotnet-watch, and NetAnalyzers.
  • Documents a few area-specific invariants (e.g., diagnostic conventions in Tasks, resolver build gating, layout versioning flow).

Reviewed changes

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

Show a summary per file
File Description
test/AGENTS.md Adds test-area guidance (parallelism defaults, skips, Verify snapshots, Helix partitioning).
src/Tasks/AGENTS.md Documents Tasks layout and diagnostics conventions (NETSDK messages, resx/xlf workflow).
src/Resolvers/AGENTS.md Describes resolver projects and key constraints (linked sources, target frameworks, hostfxr interop, dependency pinning).
src/Microsoft.CodeAnalysis.NetAnalyzers/AGENTS.md Adds guidance for analyzer development and release tracking conventions.
src/Layout/AGENTS.md Documents layout’s role and versioning/bundling invariants.
src/Dotnet.Watch/AGENTS.md Adds guidance for dotnet-watch structure, shared projitems, and test parallelism expectations.
src/Containers/AGENTS.md Documents container feature structure, diagnostics code scheme, env var conventions, and test types.
src/Cli/AGENTS.md Documents CLI project split, where code lives, and Verify snapshot test workflow.

Comment thread test/AGENTS.md Outdated
Comment thread src/Dotnet.Watch/AGENTS.md Outdated
Comment thread src/Dotnet.Watch/AGENTS.md Outdated
Comment thread src/Microsoft.CodeAnalysis.NetAnalyzers/AGENTS.md Outdated
mthalman and others added 4 commits July 9, 2026 10:19
Drop the misleading claim that Microsoft.NET.TestFramework namespaces are
exposed as global usings; those usings are xUnit-only and will be removed as
the repo completes the MSTest transition.

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

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

Comment thread src/Tasks/AGENTS.md Outdated
Comment on lines +7 to +15
Four projects, all multi-targeted (`net472` + current .NET) so tasks load in both
full-framework and .NET Core MSBuild:

| Project | Role |
|---------|------|
| `Microsoft.NET.Build.Tasks` | The core `Microsoft.NET.Sdk` task assembly **and** the targets that compose `dotnet build`. Ships in the SDK. |
| `Common` | Common shared source **linked into** both task assemblies — not its own package. |
| `Microsoft.NET.Build.Extensions.Tasks` | Tasks/targets for desktop/.NET Framework projects built **outside** the SDK. |
| `sdk-tasks` | Build-time-only tasks for **this repo's own** build/packaging — never shipped to users. |

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e2a0e02

Frame the ''Where things live'' intro around the actionable rule: code added to
Microsoft.NET.Build.Tasks or Microsoft.NET.Build.Extensions.Tasks must stay
net472-compatible. Common is linked shared source that inherits the constraint,
and sdk-tasks is current-.NET-only.

Co-authored-by: Copilot App <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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants