[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D0E5SJ8D7QCEZ0EAF2BR64":3,"skill-same:01M7D0E5SJ8D7QCEZ0EAF2BR64":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7D0E5SJ8D7QCEZ0EAF2BR64","find-untested-sources",null,"MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules without corresponding tests, or suggest test locations from repository structure. Invoke even for a tiny package; do not substitute manual globbing. Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or grading existing tests.","itsmejay18\u002FAI-Skills-for-My-Development-Stack","itsmejay18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167779943?v=4","01M7CZRFC6DDZA5V2CX8WDSZED","Jay Jemino Ababon ","01M7CZRFCVRNW1SFHSQXEJ3CQN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Ffind-untested-sources\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: find-untested-sources\ndescription: >\n  MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules\n  without corresponding tests, or suggest test locations from repository\n  structure. Invoke even for a tiny package; do not substitute manual globbing.\n  Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust,\n  Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real\n  line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or\n  grading existing tests.\nlicense: MIT\n---\n\n# Find Untested Sources\n\n## Purpose\n\nCoverage tools answer \"which lines were executed?\" — they require a green build\nand a passing test run, which is minutes-to-tens-of-minutes on a real repo. The\nquestion this skill answers is different and much cheaper:\n\n> _Which source files have no test file referencing any of their declared\n> types\u002Fsymbols?_\n\nThat's the question an agent asks **before** writing a new test — and it can be\nanswered statically in a few seconds by parsing source files, with **no build,\nno dependency resolution, and no compilation**. The output is a deterministic\ntest-pairing map that lets the agent pick the next file to test without reading\nthe entire codebase first.\n\n## Two engines — pick one\n\nThis skill ships two interchangeable analyzers with a compatible JSON contract:\n\n| Engine | Script | Use when |\n|--------|--------|----------|\n| **Roslyn (C#)** | `scripts\u002FFind-UntestedSources.cs` | The repo is **.NET-only**. Parses every `.cs` file with the Roslyn syntax API and does strict **namespace disambiguation**, so it is materially more accurate on duplicated short names like `Settings` or `Context`. |\n| **tree-sitter (polyglot)** | `scripts\u002Ffind_untested_sources.py` | The repo is **not exclusively C#**, or you want one tool across C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. |\n\nFor a .NET-only repository, **prefer the Roslyn engine** — its namespace-aware\npairing beats the polyglot engine's identifier overlap.\n\n## Required workflow\n\n1. Use the narrowest repository or package root named by the caller. Do not scan\n   a parent workspace when the request identifies a subdirectory.\n2. Execute the appropriate analyzer once. Do not replace analyzer execution with\n   manual globbing, filename matching, or visual inspection.\n   For polyglot analysis, pass `--include-tested` when the answer must distinguish\n   paired sources from unpaired sources.\n   \"Static pairing only\" prohibits compiling the target repository and running\n   its tests; it does not prohibit launching this skill's parse-only analyzer.\n   State that distinction briefly when the caller also says \"do not build.\"\n   Treat analyzer dependencies as environment prerequisites: do not install\n   packages, try the wrong engine, build the repository, or fall back to a manual\n   scan when an analyzer invocation fails. Report the prerequisite failure instead.\n3. Base the result on the analyzer's JSON. Preserve its paired\u002Funpaired\n   classification and suggested relative path; do not guess a different path.\n4. When the caller named a subdirectory, prefix analyzer-relative paths with\n   that subdirectory so reported paths are workspace-relative.\n5. Report the requested result plus the static-pairing coverage caveat. Do not\n   append build, package-install, test-run, or coverage commands. When paired\n   sources exist, name their covering test files so the unpaired classification\n   is auditable.\n\n## When to Use\n\n- User asks \"where should I add tests based on source pairing?\", \"which files\n  have no tests?\", \"find unpaired source files\", or \"give me a static test gap\n  list\".\n- Before invoking a test-generation agent, to produce a source-pairing worklist.\n- After generating tests, to verify each new test file pairs to a source file.\n- To enumerate \"weakly paired\" source files (only one referring test) for\n  follow-up depth checks.\n\n## When Not to Use\n\n- **Line\u002Fbranch coverage** — use `coverage-analysis`.\n- **Priorities derived from real coverage data** — use `coverage-analysis`.\n- **CRAP-score \u002F risk hotspots** — use `coverage-analysis`.\n- **Are existing tests strong?** — use `test-gap-analysis` (mutation reasoning)\n  or `assertion-quality`.\n\n## Roslyn engine (C#)\n\n### Prerequisites\n\n- .NET SDK that supports file-based apps (`dotnet run script.cs`). Pinned in the\n  repo's `global.json` (SDK 11 preview or later).\n- No internet access required beyond the initial NuGet restore of\n  `Microsoft.CodeAnalysis.CSharp` on first run.\n\n### Usage\n\n```powershell\n# From the skill folder\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> [--top N]\n\n# Save the report\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> > pairing.json\n\n# Iterate the untested list, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested | Select-Object -First 10 source, decl_count, suggested_test_path\n```\n\nDiagnostics go to stderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo\": \"\u003Cabsolute path>\",\n  \"elapsed_ms\": 8883,\n  \"counts\": {\n    \"source_files\": 3036,\n    \"test_files\": 867,\n    \"untested_files\": 1852,\n    \"paired_files\": 1184\n  },\n  \"untested\": [\n    {\n      \"source\": \"src\u002FFoo\u002FBar.cs\",\n      \"decl_count\": 8,            \u002F\u002F # of type declarations in the file\n      \"suggested_test_path\":      \u002F\u002F mirror of source under a discovered test project\n        \"tests\u002FFoo.Tests\u002FBar\u002FBarTests.cs\"\n    }\n  ],\n  \"source_to_tests\": {\n    \"src\u002FFoo\u002FBaz.cs\": [\n      \"tests\u002FFoo.Tests\u002FBazTests.cs\",\n      \"tests\u002FFoo.IntegrationTests\u002FScenarios\u002FBazScenarios.cs\"\n    ]\n  }\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning `bin\u002F`, `obj\u002F`, `node_modules\u002F`,\n   `.git\u002F`, `.vs\u002F`, `packages\u002F`, and any dotted subdir. Skips generated files\n   (`.g.cs`, `.Designer.cs`, `.AssemblyInfo.cs`).\n2. **Test vs source classification** — walks up to the nearest `.csproj` and\n   marks it a test project if the project name ends in `.Tests`, `.Test`,\n   `.UnitTests`, `.IntegrationTests`, `.E2E`, `.EndToEnd`, `.Spec`, `.Specs`, or\n   the content references `Microsoft.NET.Test.Sdk`, `MSTest.Sdk`,\n   `Microsoft.Testing.Platform`, `xunit`, `NUnit`, `TUnit`, or\n   `\u003CIsTestProject>true\u003C\u002FIsTestProject>`.\n3. **Source index (parallel)** — parse each source file with\n   `CSharpSyntaxTree.ParseText` (syntax only, no compilation); record every\n   `BaseTypeDeclarationSyntax` \u002F `DelegateDeclarationSyntax` as\n   `(ShortName, EnclosingNamespace, FilePath)`.\n4. **Test scan (parallel)** — parse each test file, collect `using` directives +\n   enclosing namespace, walk every `IdentifierToken`, look it up in the\n   short-name index, and **disambiguate strictly**: an identifier is attributed\n   only if the declaration's namespace matches one of the test file's `using`\n   directives, the enclosing namespace, or a prefix of them. This avoids noise\n   where common names like `Settings` or `Context` match every project.\n5. **Pairing & suggestion** — invert into `source → [tests]`. Build a\n   production-to-test project map from `\u003CProjectReference>` entries; for each\n   untested source, mirror its in-project relative path under the referencing\n   test project to suggest a path.\n6. **JSON emit** — ordered by declaration count desc, then alphabetical.\n\n## Polyglot engine (tree-sitter)\n\n### Prerequisites\n\n- Python 3.10+.\n- `pip install tree-sitter-language-pack` (single self-contained wheel that\n  bundles parsers for 300+ languages and the high-level `process()` API). No\n  native build, no per-language grammar install.\n\n### Usage\n\n```powershell\n# From the skill folder\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root>\n\n# Restrict to a language (repeatable)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --lang python --lang typescript\n\n# Truncate the report (top 20 by declared API surface)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --limit-untested 20 > pairing.json\n\n# Iterate, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested_sources | Select-Object -First 10 path, declaration_count, suggested_test_path\n```\n\nPass `--include-tested` to additionally emit `tested_sources` (omitted by\ndefault to keep the payload small for LLM consumption). Diagnostics go to\nstderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo_root\": \"\u003Cabsolute path>\",\n  \"summary\": {\n    \"source_files\": 3138,\n    \"test_files\": 761,\n    \"tested_source_files\": 1419,\n    \"untested_source_files\": 1719,\n    \"orphan_test_files\": 15,\n    \"languages\": [\"csharp\"]\n  },\n  \"untested_sources\": [\n    {\n      \"path\": \"src\u002FFoo\u002FBar.cs\",\n      \"language\": \"csharp\",\n      \"declaration_count\": 8,\n      \"declarations\": [\"Bar\", \"BarOptions\", \"IBar\", \"...\"],\n      \"suggested_test_path\": \"src\u002FFoo\u002FBarTests.cs\"\n    }\n  ],\n  \"orphan_tests\": [\n    { \"path\": \"tests\u002FSomeIntegrationTest.cs\", \"language\": \"csharp\" }\n  ]\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning common build\u002Fvendor dirs (`bin`,\n   `obj`, `node_modules`, `target`, `dist`, `build`, `vendor`, `__pycache__`,\n   `.venv`, `.git`, …) and generated files (`.d.ts`, `.g.cs`, `.Designer.cs`,\n   `_pb2.py`, `*.min.js`, `AssemblyInfo.cs`, …).\n2. **Language detection** — `detect_language_from_path` maps the extension to a\n   supported language; unknown extensions are skipped.\n3. **Test-vs-source classification** — per-language path heuristics:\n\n   | Language | Test rule |\n   |---|---|\n   | Python | path contains `tests\u002F`\u002F`test\u002F`; or filename starts with `test_` or ends `_test.py`; or `conftest.py`. |\n   | JS\u002FTS\u002FTSX | path contains `__tests__`, `tests`, `test`, `spec`, `e2e`; or filename contains `.test.`\u002F`.spec.`. |\n   | Go | filename ends `_test.go`. |\n   | Java | path contains `test`\u002F`tests`; or filename ends `Test.java`\u002F`Tests.java`. |\n   | Rust | path contains `tests\u002F`\u002F`benches\u002F`. |\n   | C# | path contains `tests\u002F`; or project segment ends `.Tests`\u002F`.Test`\u002F`.UnitTests`\u002F`.IntegrationTests`; or filename ends `Tests`\u002F`Test`. |\n   | Ruby | path contains `spec\u002F`\u002F`test\u002F`; or filename ends `_spec.rb`\u002F`_test.rb`. |\n   | Kotlin | path contains `test\u002F`\u002F`tests\u002F`\u002F`spec\u002F`; or filename ends `Test.kt`\u002F`Tests.kt`\u002F`Spec.kt`. |\n   | Swift | path contains `test\u002F`\u002F`tests\u002F`\u002F`uitests\u002F`\u002F`integrationtests\u002F` (case-insensitive); or filename ends `Test.swift`\u002F`Tests.swift`. |\n   | PowerShell | path contains `test\u002F`\u002F`tests\u002F`\u002F`pester\u002F`; or filename ends `.Tests.ps1`\u002F`.Test.ps1`. |\n   | C++ | path contains `test\u002F`\u002F`tests\u002F`\u002F`testing\u002F`; or filename starts `test_` or ends `_test.cpp`\u002F`_tests.cpp`. |\n\n4. **Per-file extraction** — `process(text, ProcessConfig(structure, imports,\n   symbols))` returns declared items, raw import statements, and a flat declared\n   -name list.\n5. **Pairing** — for each test file, union **import resolution** (per language,\n   e.g. Python `from pkg.mod import x` → `pkg\u002Fmod.py`; Java `import a.b.C;` →\n   `a\u002Fb\u002FC.java`; C# `using` is namespace-not-file, so a no-op) with **identifier\n   overlap** (word-like tokens, length ≥ 4, matched against declared names).\n6. **JSON emit** — `untested_sources` ordered by declaration count descending.\n\n## Limitations (be honest with the agent)\n\nBoth engines are static, parse-only heuristics that trade a little accuracy for\norders-of-magnitude lower cost than coverage. Known gaps:\n\n- **Reflection \u002F DI-resolved types** referenced only via a string name or\n  container resolution won't be detected — the type's short name never appears\n  in the test source.\n- **Extension methods** invoked as instance methods (C#): the declaring static\n  class is not named, so its file is not credited.\n- **`var`, target-typed `new()`, pattern matching** lose the type token; the\n  file-level union usually still catches it through other references.\n- **Short identifier names** (polyglot, \u003C 4 chars) are dropped to avoid noisy\n  pairings on names like `id`, `db`, `Tag`.\n- **Monorepo path aliases** (TS path mapping, Java module-info) are not\n  resolved; a suffix-match fallback may pick the wrong source if two files share\n  a trailing path segment.\n\nFor these cases, run actual coverage (`coverage-analysis`) on the unpaired\ncandidates the agent has already triaged.\n\nAlways label the final result as a static pairing heuristic, not evidence of\nline or branch coverage. Include that caveat even when every requested source\nfile has an obvious matching or missing test.\n\n## Outputs the agent should consume\n\n- `untested[*].source` \u002F `untested_sources[*].path` — pick the next source file\n  to test (highest declaration count first).\n- `*.suggested_test_path` — drop-in target for the new test file; the Roslyn\n  engine honors the test project that already `\u003CProjectReference>`s the source's\n  project, so `dotnet sln add` is not needed. The polyglot engine may suggest a\n  co-located test when no test root is discoverable. When a source sibling is\n  already paired, its test directory is the established convention and must be\n  reused for the missing sibling rather than falling back to source co-location.\n- `source_to_tests` (Roslyn) \u002F `--include-tested` `tested_sources` (polyglot) —\n  verify a newly written test file lands in the list for the intended source.\n- `orphan_tests` (polyglot) — tests that don't reference any same-language\n  source file; useful for triaging stale or integration-only tests.\n","# Find Untested Sources\n\n## Purpose\n\nCoverage tools answer \"which lines were executed?\" — they require a green build\nand a passing test run, which is minutes-to-tens-of-minutes on a real repo. The\nquestion this skill answers is different and much cheaper:\n\n> _Which source files have no test file referencing any of their declared\n> types\u002Fsymbols?_\n\nThat's the question an agent asks **before** writing a new test — and it can be\nanswered statically in a few seconds by parsing source files, with **no build,\nno dependency resolution, and no compilation**. The output is a deterministic\ntest-pairing map that lets the agent pick the next file to test without reading\nthe entire codebase first.\n\n## Two engines — pick one\n\nThis skill ships two interchangeable analyzers with a compatible JSON contract:\n\n| Engine | Script | Use when |\n|--------|--------|----------|\n| **Roslyn (C#)** | `scripts\u002FFind-UntestedSources.cs` | The repo is **.NET-only**. Parses every `.cs` file with the Roslyn syntax API and does strict **namespace disambiguation**, so it is materially more accurate on duplicated short names like `Settings` or `Context`. |\n| **tree-sitter (polyglot)** | `scripts\u002Ffind_untested_sources.py` | The repo is **not exclusively C#**, or you want one tool across C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. |\n\nFor a .NET-only repository, **prefer the Roslyn engine** — its namespace-aware\npairing beats the polyglot engine's identifier overlap.\n\n## Required workflow\n\n1. Use the narrowest repository or package root named by the caller. Do not scan\n   a parent workspace when the request identifies a subdirectory.\n2. Execute the appropriate analyzer once. Do not replace analyzer execution with\n   manual globbing, filename matching, or visual inspection.\n   For polyglot analysis, pass `--include-tested` when the answer must distinguish\n   paired sources from unpaired sources.\n   \"Static pairing only\" prohibits compiling the target repository and running\n   its tests; it does not prohibit launching this skill's parse-only analyzer.\n   State that distinction briefly when the caller also says \"do not build.\"\n   Treat analyzer dependencies as environment prerequisites: do not install\n   packages, try the wrong engine, build the repository, or fall back to a manual\n   scan when an analyzer invocation fails. Report the prerequisite failure instead.\n3. Base the result on the analyzer's JSON. Preserve its paired\u002Funpaired\n   classification and suggested relative path; do not guess a different path.\n4. When the caller named a subdirectory, prefix analyzer-relative paths with\n   that subdirectory so reported paths are workspace-relative.\n5. Report the requested result plus the static-pairing coverage caveat. Do not\n   append build, package-install, test-run, or coverage commands. When paired\n   sources exist, name their covering test files so the unpaired classification\n   is auditable.\n\n## When to Use\n\n- User asks \"where should I add tests based on source pairing?\", \"which files\n  have no tests?\", \"find unpaired source files\", or \"give me a static test gap\n  list\".\n- Before invoking a test-generation agent, to produce a source-pairing worklist.\n- After generating tests, to verify each new test file pairs to a source file.\n- To enumerate \"weakly paired\" source files (only one referring test) for\n  follow-up depth checks.\n\n## When Not to Use\n\n- **Line\u002Fbranch coverage** — use `coverage-analysis`.\n- **Priorities derived from real coverage data** — use `coverage-analysis`.\n- **CRAP-score \u002F risk hotspots** — use `coverage-analysis`.\n- **Are existing tests strong?** — use `test-gap-analysis` (mutation reasoning)\n  or `assertion-quality`.\n\n## Roslyn engine (C#)\n\n### Prerequisites\n\n- .NET SDK that supports file-based apps (`dotnet run script.cs`). Pinned in the\n  repo's `global.json` (SDK 11 preview or later).\n- No internet access required beyond the initial NuGet restore of\n  `Microsoft.CodeAnalysis.CSharp` on first run.\n\n### Usage\n\n```powershell\n# From the skill folder\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> [--top N]\n\n# Save the report\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> > pairing.json\n\n# Iterate the untested list, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested | Select-Object -First 10 source, decl_count, suggested_test_path\n```\n\nDiagnostics go to stderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo\": \"\u003Cabsolute path>\",\n  \"elapsed_ms\": 8883,\n  \"counts\": {\n    \"source_files\": 3036,\n    \"test_files\": 867,\n    \"untested_files\": 1852,\n    \"paired_files\": 1184\n  },\n  \"untested\": [\n    {\n      \"source\": \"src\u002FFoo\u002FBar.cs\",\n      \"decl_count\": 8,            \u002F\u002F # of type declarations in the file\n      \"suggested_test_path\":      \u002F\u002F mirror of source under a discovered test project\n        \"tests\u002FFoo.Tests\u002FBar\u002FBarTests.cs\"\n    }\n  ],\n  \"source_to_tests\": {\n    \"src\u002FFoo\u002FBaz.cs\": [\n      \"tests\u002FFoo.Tests\u002FBazTests.cs\",\n      \"tests\u002FFoo.IntegrationTests\u002FScenarios\u002FBazScenarios.cs\"\n    ]\n  }\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning `bin\u002F`, `obj\u002F`, `node_modules\u002F`,\n   `.git\u002F`, `.vs\u002F`, `packages\u002F`, and any dotted subdir. Skips generated files\n   (`.g.cs`, `.Designer.cs`, `.AssemblyInfo.cs`).\n2. **Test vs source classification** — walks up to the nearest `.csproj` and\n   marks it a test project if the project name ends in `.Tests`, `.Test`,\n   `.UnitTests`, `.IntegrationTests`, `.E2E`, `.EndToEnd`, `.Spec`, `.Specs`, or\n   the content references `Microsoft.NET.Test.Sdk`, `MSTest.Sdk`,\n   `Microsoft.Testing.Platform`, `xunit`, `NUnit`, `TUnit`, or\n   `\u003CIsTestProject>true\u003C\u002FIsTestProject>`.\n3. **Source index (parallel)** — parse each source file with\n   `CSharpSyntaxTree.ParseText` (syntax only, no compilation); record every\n   `BaseTypeDeclarationSyntax` \u002F `DelegateDeclarationSyntax` as\n   `(ShortName, EnclosingNamespace, FilePath)`.\n4. **Test scan (parallel)** — parse each test file, collect `using` directives +\n   enclosing namespace, walk every `IdentifierToken`, look it up in the\n   short-name index, and **disambiguate strictly**: an identifier is attributed\n   only if the declaration's namespace matches one of the test file's `using`\n   directives, the enclosing namespace, or a prefix of them. This avoids noise\n   where common names like `Settings` or `Context` match every project.\n5. **Pairing & suggestion** — invert into `source → [tests]`. Build a\n   production-to-test project map from `\u003CProjectReference>` entries; for each\n   untested source, mirror its in-project relative path under the referencing\n   test project to suggest a path.\n6. **JSON emit** — ordered by declaration count desc, then alphabetical.\n\n## Polyglot engine (tree-sitter)\n\n### Prerequisites\n\n- Python 3.10+.\n- `pip install tree-sitter-language-pack` (single self-contained wheel that\n  bundles parsers for 300+ languages and the high-level `process()` API). No\n  native build, no per-language grammar install.\n\n### Usage\n\n```powershell\n# From the skill folder\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root>\n\n# Restrict to a language (repeatable)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --lang python --lang typescript\n\n# Truncate the report (top 20 by declared API surface)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --limit-untested 20 > pairing.json\n\n# Iterate, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested_sources | Select-Object -First 10 path, declaration_count, suggested_test_path\n```\n\nPass `--include-tested` to additionally emit `tested_sources` (omitted by\ndefault to keep the payload small for LLM consumption). Diagnostics go to\nstderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo_root\": \"\u003Cabsolute path>\",\n  \"summary\": {\n    \"source_files\": 3138,\n    \"test_files\": 761,\n    \"tested_source_files\": 1419,\n    \"untested_source_files\": 1719,\n    \"orphan_test_files\": 15,\n    \"languages\": [\"csharp\"]\n  },\n  \"untested_sources\": [\n    {\n      \"path\": \"src\u002FFoo\u002FBar.cs\",\n      \"language\": \"csharp\",\n      \"declaration_count\": 8,\n      \"declarations\": [\"Bar\", \"BarOptions\", \"IBar\", \"...\"],\n      \"suggested_test_path\": \"src\u002FFoo\u002FBarTests.cs\"\n    }\n  ],\n  \"orphan_tests\": [\n    { \"path\": \"tests\u002FSomeIntegrationTest.cs\", \"language\": \"csharp\" }\n  ]\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning common build\u002Fvendor dirs (`bin`,\n   `obj`, `node_modules`, `target`, `dist`, `build`, `vendor`, `__pycache__`,\n   `.venv`, `.git`, …) and generated files (`.d.ts`, `.g.cs`, `.Designer.cs`,\n   `_pb2.py`, `*.min.js`, `AssemblyInfo.cs`, …).\n2. **Language detection** — `detect_language_from_path` maps the extension to a\n   supported language; unknown extensions are skipped.\n3. **Test-vs-source classification** — per-language path heuristics:\n\n   | Language | Test rule |\n   |---|---|\n   | Python | path contains `tests\u002F`\u002F`test\u002F`; or filename starts with `test_` or ends `_test.py`; or `conftest.py`. |\n   | JS\u002FTS\u002FTSX | path contains `__tests__`, `tests`, `test`, `spec`, `e2e`; or filename contains `.test.`\u002F`.spec.`. |\n   | Go | filename ends `_test.go`. |\n   | Java | path contains `test`\u002F`tests`; or filename ends `Test.java`\u002F`Tests.java`. |\n   | Rust | path contains `tests\u002F`\u002F`benches\u002F`. |\n   | C# | path contains `tests\u002F`; or project segment ends `.Tests`\u002F`.Test`\u002F`.UnitTests`\u002F`.IntegrationTests`; or filename ends `Tests`\u002F`Test`. |\n   | Ruby | path contains `spec\u002F`\u002F`test\u002F`; or filename ends `_spec.rb`\u002F`_test.rb`. |\n   | Kotlin | path contains `test\u002F`\u002F`tests\u002F`\u002F`spec\u002F`; or filename ends `Test.kt`\u002F`Tests.kt`\u002F`Spec.kt`. |\n   | Swift | path contains `test\u002F`\u002F`tests\u002F`\u002F`uitests\u002F`\u002F`integrationtests\u002F` (case-insensitive); or filename ends `Test.swift`\u002F`Tests.swift`. |\n   | PowerShell | path contains `test\u002F`\u002F`tests\u002F`\u002F`pester\u002F`; or filename ends `.Tests.ps1`\u002F`.Test.ps1`. |\n   | C++ | path contains `test\u002F`\u002F`tests\u002F`\u002F`testing\u002F`; or filename starts `test_` or ends `_test.cpp`\u002F`_tests.cpp`. |\n\n4. **Per-file extraction** — `process(text, ProcessConfig(structure, imports,\n   symbols))` returns declared items, raw import statements, and a flat declared\n   -name list.\n5. **Pairing** — for each test file, union **import resolution** (per language,\n   e.g. Python `from pkg.mod import x` → `pkg\u002Fmod.py`; Java `import a.b.C;` →\n   `a\u002Fb\u002FC.java`; C# `using` is namespace-not-file, so a no-op) with **identifier\n   overlap** (word-like tokens, length ≥ 4, matched against declared names).\n6. **JSON emit** — `untested_sources` ordered by declaration count descending.\n\n## Limitations (be honest with the agent)\n\nBoth engines are static, parse-only heuristics that trade a little accuracy for\norders-of-magnitude lower cost than coverage. Known gaps:\n\n- **Reflection \u002F DI-resolved types** referenced only via a string name or\n  container resolution won't be detected — the type's short name never appears\n  in the test source.\n- **Extension methods** invoked as instance methods (C#): the declaring static\n  class is not named, so its file is not credited.\n- **`var`, target-typed `new()`, pattern matching** lose the type token; the\n  file-level union usually still catches it through other references.\n- **Short identifier names** (polyglot, \u003C 4 chars) are dropped to avoid noisy\n  pairings on names like `id`, `db`, `Tag`.\n- **Monorepo path aliases** (TS path mapping, Java module-info) are not\n  resolved; a suffix-match fallback may pick the wrong source if two files share\n  a trailing path segment.\n\nFor these cases, run actual coverage (`coverage-analysis`) on the unpaired\ncandidates the agent has already triaged.\n\nAlways label the final result as a static pairing heuristic, not evidence of\nline or branch coverage. Include that caveat even when every requested source\nfile has an obvious matching or missing test.\n\n## Outputs the agent should consume\n\n- `untested[*].source` \u002F `untested_sources[*].path` — pick the next source file\n  to test (highest declaration count first).\n- `*.suggested_test_path` — drop-in target for the new test file; the Roslyn\n  engine honors the test project that already `\u003CProjectReference>`s the source's\n  project, so `dotnet sln add` is not needed. The polyglot engine may suggest a\n  co-located test when no test root is discoverable. When a source sibling is\n  already paired, its test directory is the established convention and must be\n  reused for the missing sibling rather than falling back to source co-location.\n- `source_to_tests` (Roslyn) \u002F `--include-tested` `tested_sources` (polyglot) —\n  verify a newly written test file lands in the list for the intended source.\n- `orphan_tests` (polyglot) — tests that don't reference any same-language\n  source file; useful for triaging stale or integration-only tests.\n",{"name":5,"license":15,"description":24},"MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules without corresponding tests, or suggest test locations from repository structure. Invoke even for a tiny package; do not substitute manual globbing. Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or grading existing tests.\n","main","30954af1dcd1a74b63f05deb2e2c41e5ecae4a82","02-CSharp-WPF-Desktop-Development\u002Ffind-untested-sources","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack","https:\u002F\u002Fgithub.com\u002Fitsmejay18","2026-09-18 16:06:36",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill find-untested-sources",{"tool":37,"command":38},"bunx","bunx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill find-untested-sources",{"tool":40,"command":41},"pnpm","pnpm dlx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill find-untested-sources","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Ffind-untested-sources\u002FSKILL.md",true,[45,51],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"scripts\u002Ffind_untested_sources.py","SCRIPT","脚本",27382,"https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Ffind-untested-sources\u002Fscripts\u002Ffind_untested_sources.py",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"scripts\u002FFind-UntestedSources.cs",16273,"https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F02-CSharp-WPF-Desktop-Development\u002Ffind-untested-sources\u002Fscripts\u002FFind-UntestedSources.cs",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7D2RKBHPZ3E1RNN5DWHT550","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including Vector\u003CT>, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7D2RDJ7RN3QK8GJR0QTER1D","resolve-project-references","Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries. Activate when ResolveProjectReferences appears as the most expensive target and developers are trying to optimize it directly. Explains that the reported time includes wait time for dependent project builds and is misleading. Guides users to focus on task self-time instead. Do not activate for general build performance -- use build-perf-diagnostics instead.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fresolve-project-references\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7D2R1H2GTNZYHG9YRX3JDQW","optimizing-ef-core-queries","Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster. Use whenever an EF Core or DbContext query or data-access path is slow or should be made faster — whether or not EF Core owns the database schema. For EF Core, not Dapper or raw ADO.NET.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Foptimizing-ef-core-queries\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7D2QREG04W1YT0NEBHEW5C9","microbenchmarking","Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks. Also activate when microbenchmarking .NET code would be useful and BenchmarkDotNet is the likely tool. Consider activating when answering a .NET performance question requires measurement and BenchmarkDotNet may be needed. Covers microbenchmark design, BDN configuration and project setup, how to run BDN microbenchmarks efficiently and effectively, and using BDN for side-by-side performance comparisons. Do NOT use for profiling\u002Ftracing .NET code (dotnet-trace, PerfView), production telemetry, or load\u002Fstress testing (Crank, k6).","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fmicrobenchmarking\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7D2QGE175XWPZVACVH2868Z","incremental-build","Guide for optimizing MSBuild incremental builds. USE FOR: builds slower than expected on subsequent runs, 'nothing changed but it rebuilds anyway', diagnosing why targets re-execute unnecessarily, fixing broken no-op builds. Covers 8 common causes: missing Inputs\u002FOutputs on custom targets, volatile properties in output paths (timestamps\u002FGUIDs), file writes outside tracked Outputs, missing FileWrites registration, glob changes, Visual Studio Fast Up-to-Date Check (FUTDC) issues. Key diagnostic: look for 'Building target completely' vs 'Skipping target' in binlog. DO NOT USE FOR: first-time build slowness (use build-perf-baseline), parallelism issues (use build-parallelism), evaluation-phase slowness (use eval-performance), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fincremental-build\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7D2Q1DQTC6K49R73WQTTPSB","eval-performance","Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Feval-performance\u002FSKILL.md",[],[]]