Skip to content

Instantly share code, notes, and snippets.

View danmoseley's full-sized avatar
:shipit:

Dan Moseley danmoseley

:shipit:
  • Microsoft
  • Jackson, WY
  • 01:18 (UTC -07:00)
View GitHub Profile
@danmoseley
danmoseley / copilot-instructions.md
Last active February 23, 2026 21:02
dotnet/runtime copilot-instructions.md

NEVER post comments to GitHub PRs or issues (via gh, API, or any other mechanism) without first showing the exact text to the user and getting explicit approval.

NEVER push to a remote without explicit approval. Prefer new commits over amending (exceptions: asked to amend, or minor fix to an unpushed broken commit). Never squash or force-push unless explicitly told.

When creating PR/issue comments or descriptions containing non-ASCII characters (em-dashes, μ, etc.), write the content to a temp file with the create tool and use --body-file to avoid UTF-8/codepage corruption on Windows. Use | entity for literal | inside markdown table cells. Avoid PowerShell expandable strings (@"..."@) for markdown with backticks; use literal here-strings (@'...'@).

Objective: Using MCP tools as appropriate I want you to analyze active issues in dotnet/runtime repo to perform a detailed analysis, categorization, scoring, frustration analysis, and generate a roadmap. The categorization should be based on keyword matching, semantic understanding of the issue description, and comment analysis. The content of the issue bodies and comments should not be included in the output, aside from the metadata used for categorization.
Final Engagement Score Formula
Use the following formula to calculate the Engagement Score for each issue:
[
S = \frac{w_c \cdot C^{1.5} \cdot C_{penalty} \cdot w_d \cdot (D + 0.1) \cdot (1 + w_l \cdot A) \cdot (1 + w_u \cdot U)}{1 + w_a \cdot \sqrt{A + \epsilon}}
]
Where:
C:\git\aspnetcore\src\Components\Components\src\Routing\Router.cs:95 -
C:\git\aspnetcore\src\Components\Components\src\Routing\Router.cs:74 -
C:\git\aspnetcore\src\Components\Web\src\Forms\InputFile\RemoteBrowserFileStreamOptions.cs:12 - public class RemoteBrowserFileStreamOptions
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:19 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:35 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:51 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:67 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:83 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:99 -
C:\git\aspnetcore\src\Components\Web\src\Web\WebEventCallbackFactoryEventArgsExtensions.cs:115 -
@danmoseley
danmoseley / triage.ps1
Last active July 22, 2025 19:22
triage query (no milestone+rc1+p7)
# GitHub Issue Label Counter for dotnet/aspnetcore
# Counts issues by label in 10.0-rc1, 10.0-preview7 milestones, or no milestone
# GitHub Personal Access Token (set this to your token)
$GitHubToken = $env:GITHUB_TOKEN
if (-not $GitHubToken) {
$GitHubToken = Read-Host "Enter your GitHub Personal Access Token" -AsSecureString
$GitHubToken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($GitHubToken))
}
@echo off
setlocal enabledelayedexpansion
set "inputfile=combos"
for /f "usebackq delims=" %%a in ("%inputfile%") do (
rd /s/q Foo
echo ========================
md Foo
pushd Foo
echo Running: ########## %%a #############
AspNetCore.HealthChecks.Azure.Data.Tables,AspNetCore.HealthChecks.Azure.KeyVault.Secrets,AspNetCore.HealthChecks.Azure.Storage.Blobs,AspNetCore.HealthChecks.Azure.Storage.Queues,AspNetCore.HealthChecks.AzureServiceBus,AspNetCore.HealthChecks.Kafka,AspNetCore.HealthChecks.MongoDb,AspNetCore.HealthChecks.MySql,AspNetCore.HealthChecks.NpgSql,AspNetCore.HealthChecks.Rabbitmq,AspNetCore.HealthChecks.Redis,AspNetCore.HealthChecks.SqlServer,AWS.Messaging,AWSSDK.CloudFormation,AWSSDK.Core,AWSSDK.Extensions.NETCore.Setup,AWSSDK.SimpleNotificationService,AWSSDK.SQS,Azure.AI.OpenAI,Azure.Data.Tables,Azure.Extensions.AspNetCore.Configuration.Secrets,Azure.Identity,Azure.Messaging.EventHubs.Processor,Azure.Messaging.ServiceBus,Azure.Messaging.WebPubSub,Azure.Provisioning,Azure.Provisioning.AppConfiguration,Azure.Provisioning.ApplicationInsights,Azure.Provisioning.CognitiveServices,Azure.Provisioning.CosmosDB,Azure.Provisioning.EventHubs,Azure.Provisioning.KeyVault,Azure.Provisioning.OperationalInsights,Azure.Provisioning.
@danmoseley
danmoseley / gist:eeb38412d74c3eb22bc69472940b1f95
Created July 17, 2023 20:05
regex writer stringTable sizes
| Row Labels | Count of 1 |
| ----------- | ---------- |
| 0 | 12647 |
| 1 | 62735 |
| 2 | 43475 |
| 3 | 27852 |
| 4 | 17408 |
| 5 | 11870 |
| 6 | 8788 |
| 7 | 7623 |
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
namespace compressionspeed
{
internal class Program
{
static TimeSpan last = TimeSpan.Zero;
static long lastSize = 0;
@danmoseley
danmoseley / chisquared.cs
Last active December 30, 2022 19:59
test random with chi squared
using System.Diagnostics;
using System.Linq;
using System.Numerics;
internal class Program
{
public static void Main(string[] args)
{
// Check for an off-by-one type error causing us to consistently not generate values
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
[MemoryDiagnoser]