Improve dotnet-template-engine plugin: accuracy, dedup, and two new skills#745
Conversation
…kills Fix inaccurate reserved-shortName guidance, consolidate validation rules into a single skill, expand discovery mappings, add explicit CPM/version steps, and introduce template-comparison and template-smart-defaults skills. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the dotnet-template-engine agent/skills documentation to better route user intents, add new skills for comparison and smart defaults, and refine guidance around template validation and Central Package Management (CPM).
Changes:
- Added new skills:
template-comparison(side-by-side template comparison) andtemplate-smart-defaults(cross-parameter defaulting rules). - Refined template discovery mappings and agent routing to include comparison/smart-default intents.
- Updated template validation/authoring guidance around reserved
dotnet newsubcommand shortNames and expanded CPM post-create steps.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/dotnet-template-engine/skills/template-validation/SKILL.md | Updates reserved shortName guidance to focus on dotnet new subcommands and clarifies conflict rationale. |
| plugins/dotnet-template-engine/skills/template-smart-defaults/SKILL.md | Adds a new skill describing cross-parameter default heuristics during project creation. |
| plugins/dotnet-template-engine/skills/template-instantiation/SKILL.md | Expands post-creation CPM steps and adds optional “refresh stale versions” guidance. |
| plugins/dotnet-template-engine/skills/template-discovery/SKILL.md | Enhances intent→template/parameter mappings and routes detailed comparisons to a new skill. |
| plugins/dotnet-template-engine/skills/template-comparison/SKILL.md | Adds a new skill to compare templates side-by-side using dotnet new <template> --help. |
| plugins/dotnet-template-engine/skills/template-authoring/SKILL.md | Improves preservation checklist and delegates validation rules to template-validation. |
| plugins/dotnet-template-engine/agents/template-engine.agent.md | Updates intent routing and lists the skills inventory including the new skills. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Make .codex-plugin/plugin.json byte-consistent with plugin.json (2-space indent on the agents line). Add eval.yaml + eval.vally.yaml capability evals for the new template-comparison and template-smart-defaults skills. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Follow-up after rubber-duck review:
|
…workload/package availability, tighten version-refresh - Clarify the reserved shortName set is the current dotnet new subcommands (authoritative source: dotnet new --help); create is verified as a real subcommand (alias behind dotnet new <template>). - template-discovery: note that some mapped short names (maui, winui3, aspire, func, orleans) need workloads/template packages, with fallback to dotnet new list/search. - template-instantiation: keep template versions by default; if refreshing, use dotnet list package --outdated + user confirmation and constrain to same major/minor rather than always latest stable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rtion, reframe reserved list - smart-defaults evals: enforce --no-https absence (auth scenario), absence of minimal-API flag (controllers scenario), and no newer --framework TFM when net8.0 is explicitly required, using output_not_contains/output_not_matches. - comparison eval: split the combined (auth|aot|docker|controllers) check into four separate output_matches assertions so partial comparisons fail. - template-validation/authoring: reframe the reserved shortName list as non-exhaustive examples and source the authoritative set from dotnet new --help; drop the specific create-alias assertion in favor of parsing-ambiguity wording. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/evaluate |
Skill Validation Results
[1] Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
Switch the Blazor comparison scenario from blazorserver (absent in the CI SDK) to blazor (Blazor Web App) vs blazorwasm, both reliably present in .NET 8+, and instruct the agent to inspect each via --help. Update the SKILL.md example reference for currency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Iterating on the skill-validation eval resultsI dug into the artifacts from the eval run. Summary of what the verdicts actually show: The skill content is sound. Across every scenario, the With-Skill Plugin judge scored 4–4.7/5 — the agent loads the right skill, runs The ❌ verdicts come from the Isolated runner crashing, not from the skill. In the failing isolated transcripts the judge prose says the agent What I changed to make my evals more robust (688afff):
Not changed: the two |
The isolated eval runs failed because the agent ran 'dotnet new <t> --help', hit the template engine's global-mutex/persistence error (common when the command runs concurrently in a sandbox), and then returned no answer at all. Instruct both skills to run 'dotnet new' calls sequentially, retry once on a transient mutex/persistence error, and fall back to the intent/parameter mapping so a concrete answer is always produced instead of empty output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Follow-up: fixing the content root cause behind the discovery failuresYou asked me to actually fix the two That second half is a content gap the skill can close, so I fixed it (3ecd536):
This makes the agent produce a correct answer from the (authoritative-in-this-skill) intent mapping even when the sandbox's |
|
👋 @YuliiaKovalova — this PR has 7 unresolved review thread(s). When you're ready, please address the feedback and push an update; the triage bot will pick up the next state automatically. (Add the |
- template-smart-defaults SKILL.md: drop the non-existent --publish-aot flag. Clarify --aot is a dotnet new flag only on templates that expose it (console/worker/grpc, not webapi) and that publish-time AOT is the MSBuild PublishAot=true property, not a dotnet new flag. - template-discovery SKILL.md: replace the hardcoded --enable-docker mapping (not a real flag on common templates) with generic 'confirm with --help'. - smart-defaults evals: tighten the negative-assertion prompts to output only the command line and not mention unused flags, so a negated explanation can't trip output_not_contains/output_not_matches. Switch the AOT scenario from webapi to worker (which actually supports --aot). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lists - smart-defaults evals: anchor the negative assertions to the 'dotnet new' command line (same-line regex) instead of whole-output substring/regex, so a flag mentioned only in prose can't fail the test. - template-validation / template-authoring: mark the dotnet new subcommand examples as illustrative/version-dependent and tell readers not to hardcode them; the live 'dotnet new --help' output is canonical. - template-comparison: fix the example table's AOT row — webapi/webapp do not expose a --aot template flag; native AOT is publish-time via PublishAot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/evaluate |
Skill Validation Results
[1] Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
|
/evaluate |
Skill Validation Results
[1] Model: claude-opus-4.6 | Judge: claude-opus-4.6 🔍 Full Results - additional metrics and failure investigation steps
▶ Sessions Visualisation -- interactive replay of all evaluation sessions |
|
✅ Approved by @Evangelink. cc @dotnet/skills-merge-approvers — ready to merge. |
Summary
Improves the
dotnet-template-engineplugin: corrects factually wrong guidance, removes duplicated/divergent validation rules, expands the intent→template mappings, makes post-creation steps explicit, and adds two new skills. All changes are prompt/markdown-only — no code, scripts, or MCP/server concepts. The source of truth for the new content is thedotnet-template-mcpintent dictionary and tool reference; the skills continue to drive thedotnet newCLI.Changes
Correctness
template-validationandtemplate-authoring. The old list claimed top-leveldotnetverbs (build,run,test,publish,restore,clean,pack) conflict — they do not (dotnet new testdoes not collide withdotnet test). Replaced with the real collidingdotnet newsubcommands:install,uninstall,update,list,search,details,create, plus a one-line explanation and corrected pitfall rows/examples.Single source of truth
template-validation.template-authoringStep 2 no longer re-implements a shorter, divergent rule list — it now points totemplate-validationwith a brief summary. The valid-datatype list (string, bool, choice, int, float, hex, text) now appears in exactly one place.Discoverability & routing
template-discoveryStep 1 from a ~9-row table to full Intent → template and Keyword → parameter tables sourced from the MCPIntentSynonymDictionary, with a note to always confirm real parameter names viadotnet new <template> --help.template-validationreachable from the agent. Updated the Triage/Routing table so validation requests route totemplate-validation(previously orphaned) and added a Skills Inventory listing all six skills.Project creation guidance
template-instantiation(detectDirectory.Packages.props, strip inline versions, centralize as<PackageVersion>, optionally refresh stale versions via the NuGet V3 flat-containerindex.jsonwith an opt-out, then build).template-authoring(SDK type, analyzer/package reference metadata, key properties, CPM participation, custom build props/targets, repo conventions).New skills
template-smart-defaults— applies cross-parameter default rules (AOT → latest compatible framework; auth ≠ None → don't disable HTTPS; controllers → no minimal-API flag; never override explicit user values), with a rules table, validation checklist, and heuristics pitfall.template-comparison— compares 2+ templates side by side (parameters, feature support, frameworks, classifications). Cross-linked fromtemplate-discovery.Both new skills are auto-discovered via the existing
"skills": ["./skills/"]glob (consistent with all sibling plugins), and the agent routing table now references them.Verification
plugin.jsonfiles parse as valid JSON.name,description,license: MIT).namematches its folder name.build/run/test/publishreserved-name claims (only the corrected "do NOT conflict" notes).Notes
.codex-plugin/plugin.jsonfor this plugin (no sibling plugin uses that convention), so the requested manifest-formatting change was a no-op.