agentleFS
dotnet-presentationsdotnet-presentations/ai-workshop/.github/skills/workshop-testing/SKILL.md

workshop-testing

Skill59 starsChanged 4 months agoMITView on GitHub

Walk through the .NET AI Workshop as an attendee to validate that the READMEs, commands, and code snapshots still work. USE FOR: testing the workshop, testing a specific Part, dry-running the labs, verifying a README against its snapshot, reconciling or refreshing code snapshots, producing a workshop test report. DO NOT USE FOR: authoring new workshop content, general repo edits, or fixing a single build error (just fix it directly).

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always scaffold with dotnet new: Never hand-author or copy a .csproj, and never use a committed snapshot as your working directory.

    line 13
  2. Distinctive:

    Ask, don't guess: If a step needs a value you don't have (subscription, endpoint, model name), ask the user.

    line 15
  3. Very specific:

    Run tests/McpStructuredOutputTests from the repository root to exercise real tools/list and tools/call requests against both server …

    line 56
  4. Very specific:

    Default to configuration-only testing: confirm AppHost.cs calls AddAzureSearch("search") and WithExternalHttpEndpoints(), confirm the web …

    line 63
  5. Distinctive:

    Only run a real deployment if the user explicitly asks.

    line 69
  6. Very specific:

    Use Push-Location with the absolute path to the Part 11 folder.

    line 71
  7. Very specific:

    Use a unique environment name, e.g.

    line 73
  8. Very specific:

    Before copying a working directory over a snapshot, strip bin/, obj/, .vs/, and TestResults/.

    line 84
  9. Very specific:

    Write docs/testing/workshop-test-report-<YYYY-MM-DD>.md using report-template.md, and add it to the index in docs/README.md.

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workshop Testing

Complete the workshop the way an attendee would - follow each Part N - */README.md literally, in a scratch directory - then reconcile what you produced against the committed snapshot and write a report.

Ground rules

  1. Follow the README, not this skill. The README is the artifact under test. If it is wrong or ambiguous, that is a finding, not something to silently work around.
  2. Always scaffold with dotnet new. Never hand-author or copy a .csproj, and never use a committed snapshot as your working directory. The template workflow is part of what is being tested.
  3. Work in test-workspace/ at the repo root (gitignored / delete when done). Never build inside the snapshot folders while testing.
  4. Ask, don't guess. If a step needs a value you don't have (subscription, endpoint, model name), ask the user.
  5. Record every clarification you needed. Anything you had to infer is a documentation gap worth reporting.

Setup

.\.github\scripts\setup-workshop-credentials.ps1 -ApplyUserSecrets
dotnet --list-sdks                                  # expect 10.0.9+
dotnet new install Microsoft.Extensions.AI.Templates
dotnet new mcpserver -h                        # built into .NET 10.0.9+ SDK
docker --version                                    # only needed for Parts 4 and 11

The script collects the WORKSHOP_* variables and, with -ApplyUserSecrets, writes the Foundry endpoint and key into the snapshot console projects (as AzureOpenAI:Endpoint / AzureOpenAI:Key), the local model settings into Part 9 if configured, and the composed ConnectionStrings:openai into the Part 11 AppHost. Add -Force if a key has been rotated since the last run.

Nothing in the workshop reads WORKSHOP_* directly. The console samples read user secrets (AzureOpenAI:Endpoint, AzureOpenAI:Key) and the Aspire app reads ConnectionStrings:openai. The script also configures a Part 4 app scaffolded at test-workspace/GenAiLab.

The samples hardcode the deployment names gpt-5-mini and text-embedding-3-small. If the test resource uses different names, that is a source edit in every part, not a config change.

Part-by-part

PartWhat to doSnapshot to reconcile
1 - SetupVerify prerequisites and install steps actually work-
2 - Build Chat Appdotnet new console -n ChatApp, add packages and code per README. Run it: chat, streaming, structured outputPart 02 - Build Chat App/ChatApp/
3 - Add RAGContinue from your Part 2 app (README says copy it). Verify retrieval answers from sample-docs/contoso-trailblazer-3000.md. Also check the two checkpoints/*.cs variants still compile against the described packagesPart 03 - Add RAG/RagChatApp/
4 - AI Web Chat TemplateScaffold with the exact command in the README (--provider azureopenai --vector-store qdrant --aspire --name GenAiLab). Run via GenAiLab.AppHost. Also sanity-check the documented Docker-free --vector-store local pathCompare shared app code with Part 11 - Deployment/GenAiLab/; expect Part 10's Azure AI Search substitutions
5 - MCP Server BasicsVerify dotnet new mcpserver -n MyMcpServer (included in .NET 10.0.9+ SDK) and add WeatherTools per README. Keep the template's RandomNumberToolsPart 05 - MCP Server Basics/MyMcpServer/
6 - Enhanced MCP Server (bonus)Exploration only - build and run the existing snapshot, review the README's business-integration guidancePart 06 - Enhanced MCP Server/ContosoOrdersMcpServer/
7 - MCP Publishing (bonus)Documentation review only. Do not publish anything-
8 - Agent Framework Basicsdotnet new console → AgentApp, add Microsoft.Agents.AI per README. Verify the agent runs and can call the Part 5 weather tool if the README wires that upPart 08 - Agent Framework Basics/AgentApp/
9 - Adding AI to an Existing AppFollow the README in eShopLite-start/, then reconcile against the eShopLite/ answer key. The optional local-model step needs LocalModel:Endpoint / LocalModel:Model (Foundry Local or Ollama) in the Store project - note it as skipped if unavailablePart 09 - Adding AI to an Existing App/eShopLite/ (answer key); Part 09 - Adding AI to an Existing App/eShopLite-start/
10 - Choosing Providers and ServicesApply the documented Azure AI Search package and registration changes to the Part 4 project. Verify Qdrant remains a usable fallbackReconcile with Part 11 - Deployment/GenAiLab/
11 - DeploymentSee belowPart 11 - Deployment/GenAiLab/

MCP server verification (Parts 5-6)

An MCP server is a stdio process - it starts and waits. Check:

  1. dotnet build succeeds with no warnings.
  2. dotnet run waits for protocol input; no terminal banner is required.
  3. Run tests/McpStructuredOutputTests from the repository root to exercise real tools/list and tools/call requests against both server snapshots.
  4. Ctrl+C shuts a manually started server down cleanly.
  5. Optional: register it in .vscode/mcp.json and confirm the tools appear in Copilot Chat.

Part 11 deployment

Default to configuration-only testing: confirm AppHost.cs calls AddAzureSearch("search") and WithExternalHttpEndpoints(), confirm the web app uses the Azure AI Search vector-store registrations, and build GenAiLab.sln in Release. Note that azure.yaml and .azure/ are not committed - azd init generates them, and .azure/ is gitignored.

Only run a real deployment if the user explicitly asks. If so:

  • Use Push-Location with the absolute path to the Part 11 folder; terminal cwd does not persist reliably across azd invocations.
  • azd auth login --use-device-code, then interactive azd up. --no-prompt fails on the secure OpenAI connection-string parameter.
  • Use a unique environment name, e.g. workshoptest-<timestamp>.
  • Provision takes roughly 7-12 minutes; azd down --purge --force is mandatory afterward and takes 20-25 minutes. Confirm the resource group is gone in the portal.

Reconciling snapshots

At the end of each code part, diff your working directory against the committed snapshot and classify each difference:

  • Template drift (the template now emits different code) → update the snapshot, note the change.
  • README gap (a step is missing, stale, or ambiguous) → record it as a finding; fix the README if the user asks.
  • Your mistake → redo the step.

Before copying a working directory over a snapshot, strip bin/, obj/, .vs/, and TestResults/. Preserve Properties/launchSettings.json exactly for the Aspire projects - port drift breaks the Part 11 instructions. Then verify with dotnet clean; dotnet build -c Release.

Report

Write docs/testing/workshop-test-report-<YYYY-MM-DD>.md using report-template.md, and add it to the index in docs/README.md. Older reports live in docs/archive/testing/.

Known quirks

  • Package versions drift between parts (Microsoft.Extensions.AI, Microsoft.Agents.AI, Azure.AI.OpenAI). Flag inconsistencies in the report rather than unilaterally bumping them.
  • The MCP template's namespace style has changed between releases. The Part 5 snapshot uses namespace MyMcpServer.Tools;, and the Part 6 snapshot uses namespace ContosoOrdersMcpServer.Tools;; Part 7 is README-only. Note which style the current template emits.
  • Missing --vector-store qdrant in Part 4 silently produces the local SQLite variant and prevents the intended Qdrant-to-Azure-AI-Search comparison in Part 10.
  • The AI Web Chat template ships ChatInput.razor.js and ChatMessageList.razor.js (auto-resize and auto-scroll). They must survive into any snapshot update.

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.