RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Copilot instructions/dotnet/runtime

Copilot instructions

.github/copilot-instructions.md
Copilot instructions

Quality

78/100

Scores the file, not the repository.

Length

1,292 words

4 headings · 1 code blocks

Repository

18k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
dotnet/runtime/.github/copilot-instructions.mdRawGitHub
1**If at any time, the user directs you explicitly to override any of these instructions, the user's directive overrides said instructions.**
2 
3**Don't claim more than you verified.** Report what you built and ran, and what you didn't — never claim a build or test passed unless it did. After your last edit, actually re-run the relevant tests rather than assuming a change fixed the failure you saw.
4 
5Scale the effort to the risk. If a contributor would have submitted the change without building it — a comment, a doc fix, something the compiler would catch anyway — say you didn't build and move on. Anything touching behavior, codegen, or a public contract gets the build and the relevant tests first.
6 
7Use the `code-review` skill when reviewing pull requests, and — when running under CCA — on your own changes before completing, addressing anything it flags as an error or warning. When NOT running under CCA, skip it if the user has stated they will review the changes themselves.
8 
9When starting work in an unfamiliar directory, search for `README.md` files in it and its parents up to the repository root. Read any you find — they contain conventions, patterns, and architectural context relevant to your work.
10 
11If the changes are intended to improve performance, or if they could negatively impact performance, use the `performance-benchmark` skill to validate the impact before completing.
12 
13When writing or reviewing SIMD / hardware-intrinsics code (anything using `Vector128`/`Vector256`/`Vector512`, `Vector<T>`, or the platform intrinsics in `System.Runtime.Intrinsics.*`), use the `vectorization` skill.
14 
15You MUST follow all code-formatting and naming conventions defined in [`.editorconfig`](/.editorconfig).
16 
17In addition to the rules enforced by `.editorconfig`, when writing C# you SHOULD:
18 
19- Prefer file-scoped namespace declarations and single-line using directives.
20- Ensure that the final return statement of a method is on its own line.
21- Use pattern matching and switch expressions wherever possible.
22- Use `nameof` instead of string literals when referring to member names.
23- Always use `is null` or `is not null` instead of `== null` or `!= null`.
24- Trust the C# null annotations and don't add null checks when the type system says a value cannot be null.
25- Prefer `?.` if applicable (e.g. `scope?.Dispose()`).
26- Use `ObjectDisposedException.ThrowIf` where applicable.
27- If you add new code files, ensure they are listed in the csproj file (if other files in that folder are listed there) so they build.
28- When adding XML documentation to APIs, follow the guidelines at [`docs.prompt.md`](/.github/prompts/docs.prompt.md).
29 
30When writing or modifying tests, you SHOULD:
31 
32- Strongly prefer to add new unit tests to existing test code files rather than creating new code files.
33- When adding new test files, examine the directory structure of sibling tests first. Some test directories use flat files (e.g., `GCEvents.cs` alongside `GCEvents.csproj`) while others use per-test subdirectories. Match the existing convention.
34- Avoid adding a regression comment citing a GitHub issue or PR number unless explicitly asked to include such information.
35- Prefer using `[Theory]` with multiple data sources (like `[InlineData]` or `[MemberData]`) over multiple duplicative `[Fact]` methods. Fewer test methods that validate more inputs are better than many similar test methods.
36- When running tests, if possible use filters and check test run counts, or look at test logs, to ensure they actually ran.
37- Do not finish work with any tests commented out or disabled that were not previously commented out or disabled.
38- Do not emit "Act", "Arrange" or "Assert" comments.
39 
40For markdown (`.md`) files, ensure there is no trailing whitespace at the end of any line.
41 
42## Pull Requests
43 
44- **One concern per PR.** Split large or mixed changes. Do large refactorings and mechanical renames in their own PR, separate from logic changes.
45- **New public API requires an approved proposal before submission** — PRs adding unapproved API will be closed. Use the `api-proposal` skill; until approval lands the API stays `internal` in any submitted PR. A proposal's prototype branch is exempt and keeps its surface public — it's evidence, not a submission.
46- **Core component changes should start with an issue.** Changes to the host, VM, or JIT need a GitHub issue describing the problem and motivation first.
47- **Put the measurements in the description** for performance changes — BenchmarkDotNet results, or codegen and instruction-count evidence for low-level work.
48- **Behavioral changes need breaking-change documentation**, even prerelease-to-prerelease. Use the `breaking-change-doc` skill.
49- **Merge to main first, then `/backport`.** Servicing backports are limited to security bugs, regressions, and reliability issues, and should be small targeted fixes rather than refactorings.
50- **A push to an open PR re-runs its CI matrix** — dozens of jobs, over a hundred for broad changes. For anything non-trivial, validate locally rather than using CI to find out whether it builds, and batch fixes into one push. Branches with no PR trigger nothing, as do changes confined to `**.md`, `docs/*`, or `.github/*`.
51- **Treat review feedback as a sample, not a list.** A reviewer flags examples of a problem, not every instance. Grep for the rest of the class and fix it in the same push, and answer a whole round of comments at once rather than pushing per comment.
52 
53When NOT running under CCA, for commits and pushes:
54 
55- Never squash and force push unless explicitly instructed. Always push incremental commits on top of previous PR changes.
56- Never push to an active PR without being explicitly asked, even in autopilot/yolo mode. Always wait for explicit instruction to push.
57- Never chain commit and push in the same command. Always commit first, report what was committed, then wait for an explicit push instruction. This creates a mandatory decision point.
58- Prefer creating a new commit rather than amending an existing one. Exceptions: (1) explicitly asked to amend, or (2) the existing commit is obviously broken with something minor (e.g., typo or comment fix) and hasn't been pushed yet.
59- **Before posting to GitHub (PRs, issues, comments):** Include the AI-generated content disclosure (see below).
60 
61## AI-Generated Content Disclosure
62 
63When posting to GitHub under a user's credentials — PR descriptions, issue bodies, comments, review comments, or any other public-facing action — you **MUST** add a concise, visible note (e.g. a `> [!NOTE]` alert) at the bottom of the content indicating it was AI/Copilot-generated. Skip it only when posting from a recognized bot or Copilot app account (e.g. `github-actions[bot]`, `copilot`), where the AI origin is already apparent from the account identity, or when the user explicitly asks you to omit it.
64 
65---
66 
67## Tool Use
68 
69Issue independent tool calls together in one response rather than one at a time. Every round trip re-sends the whole conversation as cached input — measured at roughly half the cost of a call before it does any work — so fewer, wider steps beat many narrow ones.
70 
71Redirect long-running commands to a log and poll a bounded view — a tail, a grep for errors, or a status sentinel. Re-reading a running command's output re-sends it from the start every time, so repeatedly checking a long build costs far more than the check is worth. Check the outcome, not the process.
72 
73```bash
74&lt;cmd&gt; &gt; out.log 2&gt;&amp;1; echo &quot;exit=$?&quot; &gt; out.status # bash
75&lt;cmd&gt; *&gt; out.log; &quot;exit=$LASTEXITCODE&quot; | Out-File out.status # PowerShell -- $? is a [bool] here
76```
77 
78Fetch narrowly: `gh run view --log-failed` over `--log`, `--json`/`--jq` to project only the fields needed, `git diff --stat` before the full diff. Quiet what doesn't detect a non-TTY: `curl -sS`, `--quiet` on `git clone`/`fetch`/`checkout`. MSBuild and `dotnet` already detect it — no flags needed.
79 
80## Building & Testing
81 
82**Before running any build or test command, use the `build-and-test` skill** — don't guess the commands. Under CCA, invoke it **before making any code changes**; a missing or incorrect baseline build costs 20-40 minutes to recover from.
83 

Commands it names

  • gh run view --log-failed
  • git diff --stat
  • git clone
  • dotnet

Sections

  • Pull Requests
  • AI-Generated Content Disclosure
  • Tool Use
  • Building & Testing

What it covers

buildtestcode-stylearchitecturegit-prdo-not

Stack — with the evidence

csharp

(1.00)

dotnet

(1.00)

node

(0.70)

eslint

(0.70)

typescript

(0.60)

github-actions

(0.60)

javascript

(0.50)

Format

Copilot instructions

Two layers: one always-on repo file, plus optional glob-scoped instruction files. Lives under .github/ rather than the repo root, which is the tell that it is aimed at the GitHub platform surface as much as the editor.

What the corpus says about it

Repository

Owner
dotnet
Language
—
License
—
Archived
no

All configs in this repo

Also in dotnet/runtime

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
dotnet/runtime.github/instructions/system-net-interop.instructions.md · 18kCopilot instructionscsharpdotnet+5stylearchperformance56/1003 days ago
dotnet/runtime.github/instructions/extensions-logging.instructions.md · 18kCopilot instructionscsharpdotnet+5securityperformance44/1003 days ago
dotnet/runtime.github/instructions/native.instructions.md · 18kCopilot instructionscsharpdotnet+5lint-formatstylearchperformance76/1003 days ago
dotnet/runtime.github/instructions/system-net-security.instructions.md · 18kCopilot instructionscsharpdotnet+5securityperformancedeployment48/1003 days ago
dotnet/runtime.github/instructions/cdac.instructions.md · 18kCopilot instructionscsharpdotnet+5typesgitapidocs52/1003 days ago
dotnet/runtime.github/instructions/compression.instructions.md · 18kCopilot instructionscsharpdotnet+5testlint-formatstylesecurity+160/1003 days ago
dotnet/runtime.github/instructions/conventions.instructions.md · 18kCopilot instructionscsharpdotnet+5stylearchagent-behaviourdocs56/1003 days ago
dotnet/runtime.github/instructions/core-runtime.instructions.md · 18kCopilot instructionscsharpdotnet+5styleperformance43/1003 days ago
dotnet/runtime.github/instructions/csharp.instructions.md · 18kCopilot instructionscsharpdotnet+5lint-formatstylearchsecurity+359/1003 days ago
dotnet/runtime.github/instructions/extensions-caching.instructions.md · 18kCopilot instructionscsharpdotnet+5styleperformanceagent-behaviour48/1003 days ago
dotnet/runtime.github/instructions/extensions-common.instructions.md · 18kCopilot instructionscsharpdotnet+5styledependencies48/1003 days ago
dotnet/runtime.github/instructions/extensions-configuration.instructions.md · 18kCopilot instructionscsharpdotnet+5no sections44/1003 days ago
dotnet/runtime.github/instructions/extensions-di.instructions.md · 18kCopilot instructionscsharpdotnet+5teststyletesting-strategy52/1003 days ago
dotnet/runtime.github/instructions/extensions-hosting.instructions.md · 18kCopilot instructionscsharpdotnet+5teststyleagent-behaviour52/1003 days ago
dotnet/runtime.github/instructions/extensions-options.instructions.md · 18kCopilot instructionscsharpdotnet+5style48/1003 days ago
dotnet/runtime.github/instructions/jit.instructions.md · 18kCopilot instructionscsharpdotnet+5buildgit29/1003 days ago
dotnet/runtime.github/instructions/system-net-common.instructions.md · 18kCopilot instructionscsharpdotnet+5styledependenciesapi48/1003 days ago
dotnet/runtime.github/instructions/system-net-http.instructions.md · 18kCopilot instructionscsharpdotnet+5styleperformance52/1003 days ago
dotnet/runtime.github/instructions/system-net-quic.instructions.md · 18kCopilot instructionscsharpdotnet+5teststyleperformance56/1003 days ago
dotnet/runtime.github/instructions/system-net-sockets.instructions.md · 18kCopilot instructionscsharpdotnet+5styleagent-behaviour48/1003 days ago
Diff against .github/instructions/system-net-interop.instructions.md Diff against .github/instructions/extensions-logging.instructions.md Diff against .github/instructions/native.instructions.md Diff against .github/instructions/system-net-security.instructions.md Diff against .github/instructions/cdac.instructions.md Diff against .github/instructions/compression.instructions.md Diff against .github/instructions/conventions.instructions.md Diff against .github/instructions/core-runtime.instructions.md Diff against .github/instructions/csharp.instructions.md Diff against .github/instructions/extensions-caching.instructions.md Diff against .github/instructions/extensions-common.instructions.md Diff against .github/instructions/extensions-configuration.instructions.md Diff against .github/instructions/extensions-di.instructions.md Diff against .github/instructions/extensions-hosting.instructions.md Diff against .github/instructions/extensions-options.instructions.md Diff against .github/instructions/jit.instructions.md Diff against .github/instructions/system-net-common.instructions.md Diff against .github/instructions/system-net-http.instructions.md Diff against .github/instructions/system-net-quic.instructions.md Diff against .github/instructions/system-net-sockets.instructions.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63Copilot instructionstypescriptreact+7buildlint-formatstylearch+4100/1003 days ago
louislam/uptime-kuma.github/copilot-instructions.md · 90kCopilot instructionstypescriptjavascript+10setupbuildtestlint-format+9100/1003 days ago
HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17Copilot instructionsnodejavascriptsetupbuildtestlint-format+7100/1003 days ago
dotnet/roslyn.github/instructions/Compiler.instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+399/1003 days ago
JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31kCopilot instructionstypescriptnode+7buildlint-formatstylearch+397/1002 days ago
dotnet/roslyn.github/copilot-instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+397/1003 days ago
bagisto/bagisto.github/copilot-instructions.md · 28kCopilot instructionsphplaravel+8setupbuildteststyle+597/1003 days ago
darkmatter/nixmac.github/copilot-instructions.md · 24Copilot instructionstypescriptrust+14setupbuildtestlint-format+896/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack