agentleFS
MicrosoftKnown publishermicrosoft/Generative-AI-for-beginners-dotnet/.github/copilot-instructions.md

Generative-AI-for-beginners-dotnet

Copilot instructions3.1k starsChanged 9 months agoMITView on GitHub

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 3 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 4 mentionsJul 2026: 5 mentionsAug 2026: 5 mentionsSep 2026: 4 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/Generative-AI-for-beginners-dotnet repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/Generative-AI-for-beginners-dotnet

The biggest 5 of 27 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 27

Talked about on GitHub and Bluesky (27 times).

On GitHub · 25

20 more on GitHub

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    All code samples live in the centralized samples/ directory, organized by category: CoreSamples/, MAF/, AppsWithGenAI/, PracticalSamples/.

    line 7
  2. Very specific:

    Run dotnet format before committing any changes to ensure proper C# code formatting and style

    line 23
  3. Very specific:

    Ensure all code builds with dotnet build and passes tests with dotnet test

    line 24
  4. Very specific:

    Verify formatting with dotnet format --verify-no-changes if linting is enabled

    line 25
  5. Very specific:

    Use standard .NET CLI: dotnet build, dotnet run from the relevant project folder (e.g., cd …

    line 27
  6. Very specific:

    Run sample apps in the samples/ directory to verify model integration and workflow.

    line 35
  7. Distinctive:

    Follow C# and .NET best practices (naming conventions, async/await patterns, nullable reference types)

    line 38
  8. Distinctive:

    Use modern .NET features (top-level statements, file-scoped namespaces, pattern matching) where appropriate

    line 39
  9. Distinctive:

    Write unit tests for new functionality when possible (use xUnit or MSTest)

    line 40
  10. Distinctive:

    Document public APIs, sample usage, and complex logic

    line 41
  11. Very specific:

    Prefer dependency injection and configuration via appsettings.json for new .NET projects

    line 42
  12. Distinctive:

    Keep code and documentation accessible for beginners—add comments and links to docs where helpful

    line 43
  13. Distinctive:

    All lessons include a short video, code sample, and step-by-step guide.

    line 47
  14. Very specific:

    Use 01-IntroductionToGenerativeAI/setup-azure-openai.md and 01-IntroductionToGenerativeAI/setup-local-ollama.md for setup.

    line 49
  15. Distinctive:

    Use key bindings in sample apps to toggle AI modes, save screenshots, and display FPS (see app README for details).

    line 51
  16. Distinctive:

    Use key bindings to toggle AI modes, save screenshots, and display FPS during gameplay.

    line 80

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

Copilot Instructions for Generative-AI-for-beginners-dotnet

Project Purpose & Structure

  • This repo is a hands-on .NET course for Generative AI, focused on real-world, runnable code and live coding.
  • Lessons are organized in numbered folders (01-IntroductionToGenerativeAI/ through 05-ResponsibleAI/), each with a readme.md for documentation.
  • All code samples live in the centralized samples/ directory, organized by category: CoreSamples/, MAF/, AppsWithGenAI/, PracticalSamples/.
  • Key technologies: .NET 10+, Microsoft.Extensions.AI (MEAI), Microsoft Agent Framework, Azure OpenAI, Ollama (local models).
  • Multi-language support: see translations/ for localized docs.

Architecture & Patterns

  • Each lesson folder contains documentation; code samples are in samples/ (e.g., samples/AppsWithGenAI/SpaceAINet/ demonstrates full-stack AI integration).
  • Samples are organized under samples/ by category: CoreSamples/, MAF/, AppsWithGenAI/, PracticalSamples/.
  • AI model calls are always abstracted behind service classes (e.g., SpaceAINet.GameActionProcessor), enabling easy provider swapping and testability.
  • API keys and endpoints are never hardcoded—use user secrets or environment variables (see lesson READMEs for details).
  • For SpaceAINet and similar apps:
    • AI providers (Ollama, Azure OpenAI) are toggled at runtime via key bindings.
    • Game state is sent to the AI model, which returns a JSON action and explanation.
    • Screenshots and FPS toggles are built-in for debugging and demonstration.

Developer Workflows

  • Code Formatting (Required Before Each Commit):
    • Run dotnet format before committing any changes to ensure proper C# code formatting and style
    • Ensure all code builds with dotnet build and passes tests with dotnet test
    • Verify formatting with dotnet format --verify-no-changes if linting is enabled
  • Build & Run:
    • Use standard .NET CLI: dotnet build, dotnet run from the relevant project folder (e.g., cd samples/AppsWithGenAI/SpaceAINet/SpaceAINet.Console).
    • For local AI: ensure Ollama is running and the required model is pulled (e.g., ollama pull phi4-mini).
    • For Azure: set secrets via dotnet user-secrets or Codespaces secrets.
  • Switching AI Providers:
    • Most samples support toggling between local (Ollama) and cloud (Azure OpenAI) models at runtime (see app key bindings and README tables).
  • Codespaces:
    • Dev containers are pre-configured for .NET, Azure, and Ollama workflows. Choose the right container for your use case.
  • Testing:
    • Run sample apps in the samples/ directory to verify model integration and workflow.

Code Standards & Best Practices

  • Follow C# and .NET best practices (naming conventions, async/await patterns, nullable reference types)
  • Use modern .NET features (top-level statements, file-scoped namespaces, pattern matching) where appropriate
  • Write unit tests for new functionality when possible (use xUnit or MSTest)
  • Document public APIs, sample usage, and complex logic
  • Prefer dependency injection and configuration via appsettings.json for new .NET projects
  • Keep code and documentation accessible for beginners—add comments and links to docs where helpful
  • For AI integrations (Azure OpenAI, Ollama, etc.), follow official SDK and security guidelines

Project-Specific Conventions

  • All lessons include a short video, code sample, and step-by-step guide.
  • The code samples can be found at the samples folder
  • Use 01-IntroductionToGenerativeAI/setup-azure-openai.md and 01-IntroductionToGenerativeAI/setup-local-ollama.md for setup.
  • AI integration is always via service abstraction (never direct model calls in UI or game logic).
  • Use key bindings in sample apps to toggle AI modes, save screenshots, and display FPS (see app README for details).
  • For translations, update the corresponding translations/<lang>/README.md.
  • Maintain existing code structure and organization—place new samples in the correct samples/ subfolder

Integration Points & External Dependencies

  • Azure OpenAI: Requires endpoint, model name, and API key (see 01-IntroductionToGenerativeAI/setup-azure-openai.md).
  • Ollama: Requires local server running and model pulled (see getting-started-ollama.md).

Key Files & Directories

  • README.md (root): Course overview, lesson map, and links to translations.
  • 01-IntroductionToGenerativeAI/ through 05-ResponsibleAI/: Lesson folders with documentation and guides.
  • samples/CoreSamples/: Core technique samples (chat, vision, RAG, functions, etc.).
  • samples/MAF/: Microsoft Agent Framework samples (25+ projects).
  • samples/AppsWithGenAI/SpaceAINet/: AI-powered Space Battle game (see README.md inside for architecture).
  • samples/AppsWithGenAI/HFMCP.GenImage/: Image generation Aspire app.
  • samples/PracticalSamples/: Aspire MCP sample.
  • translations/: Localized documentation.
  • CONTRIBUTING.MD: Contribution and PR guidelines.

Example: Running SpaceAINet

  1. Pull Ollama model: ollama pull phi4-mini
  2. Set Azure secrets (if using cloud):
    • dotnet user-secrets set "AZURE_OPENAI_ENDPOINT" "<your-endpoint>"
    • dotnet user-secrets set "AZURE_OPENAI_MODEL" "<your-model-name>"
    • dotnet user-secrets set "AZURE_OPENAI_APIKEY" "<your-api-key>"
  3. Build & run:
    • cd samples/AppsWithGenAI/SpaceAINet/SpaceAINet.Console
    • dotnet build && dotnet run
  4. Use key bindings to toggle AI modes, save screenshots, and display FPS during gameplay.

Contribution

  • See CONTRIBUTING.MD for PR and issue guidelines.
  • Report issues or suggest improvements via GitHub Issues.

For more, see lesson READMEs and the root README.md.

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.