agentleFS
pedrosakumapedrosakuma/dotnet-diagnostics/.github/copilot-instructions.md

dotnet-diagnostics

Copilot instructions4 starsChanged 57 days agoMITView on GitHub

The canonical agent guide for this repository is AGENTS.md at the repo root. Read it before making changes — it covers conventions (diagnostic socket UID, .dockerignore re-includes, EventPipe timing, MCP tool-surface budgeting), the active Phase 16 roadmap, and the full build/test surface.

  • In this repositoryOne other file it gives its agents.

The file

Files
copilot-instructions.md

GitHub Copilot instructions

The canonical agent guide for this repository is AGENTS.md at the repo root. Read it before making changes — it covers conventions (diagnostic socket UID, .dockerignore re-includes, EventPipe timing, MCP tool-surface budgeting), the active Phase 16 roadmap, and the full build/test surface.

Critical facts (do not re-derive these)

  • SDK is pinned by global.json to 10.0.201 (rollForward: latestFeature). Use that SDK.
  • Build: dotnet build DotnetDiagnostics.slnx -c Release
  • Test: dotnet test DotnetDiagnostics.slnx -c Release --no-build (live Core tests spawn a real sample process and need ~10s each)
  • Warnings are errors in source projects (Directory.Build.props → TreatWarningsAsErrors=true). Fix analyzer warnings; do not suppress globally.
  • Central package management: package versions live in Directory.Packages.props; project files reference packages without a Version attribute.
  • Bearer token: server reads MCP_BEARER_TOKEN; if unset, generates and logs an ephemeral token. No hard-coded default.
  • Diagnostic socket UID: MCP sidecar must run as the same UID as the target app (locally --user 0). Otherwise ServerNotAvailableException: Permission denied.
  • Three deliverables: the MCP server (DotnetDiagnostics.Mcp), the standalone dotnet-diagnostics-cli (DotnetDiagnostics.Cli, assembly dotnet-diagnostics) — a Core-only CLI (one-shot + session REPL, no HTTP/bearer/daemon) — and the BenchmarkDotNet diagnoser (DotnetDiagnostics.BenchmarkDotNet). CLI docs live in docs/cli-reference.md; keep it Core-only (asserted by NoServerReferenceTests).
  • Shell escapes for gh / git: ! in gh ... --title "..." silently fails (bash history expansion); use single quotes. Non-trivial bodies and commit messages go via --body-file / -F file — inline strings with backticks/$/! hang. Don't pipe output of gh ... create (| tail, 2>&1 | …) — failures become invisible. See AGENTS.md → "Shell escapes when driving gh / git".

Where to work

  • Phase 16 tracking issue #551 — current priorities + external capability gaps
  • docs/ — tool reference, CLI reference, investigation playbooks, sidecar walkthroughs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.