Skip to content

centricconsulting/ai-coding-workshop

Repository files navigation

Workshop: Using AI for Application Development with GitHub Copilot (.NET Edition)

This repository contains materials for a 3-hour workshop. Participants will use Visual Studio Code, .NET 9, and GitHub Copilot to experience how AI can support application development with modern practices including Clean Architecture and OpenTelemetry observability.

Prerequisites

Before attending this workshop, participants should have:

  • GitHub Copilot: Active subscription and extension installed in VS Code
  • .NET 9 SDK: Installed and verified with dotnet --version
  • Visual Studio Code: Latest version with C# Dev Kit extension
  • Git: Basic familiarity with git commands
  • C# Experience: Comfortable with basic C# syntax and concepts
  • GitHub Account: For cloning repositories and accessing Copilot

Environment Check

Run these commands to verify your setup:

dotnet --version          # Should show 9.x.x
git --version            # Any recent version
code --version           # VS Code version

Pre-Workshop Preparation

Participants: Please complete the Pre-Workshop Environment Checklist before attending the workshop to ensure your environment is fully configured. This will allow us to maximize hands-on learning time.


Learning Objectives

By the end of this workshop, participants will be able to:

  • Leverage repository-level Copilot Instructions (.github/copilot-instructions.md) for team-wide consistent code generation
  • Transform requirements into backlog items, acceptance criteria, and working code using AI assistance
  • Generate and refactor .NET code following Clean Architecture and DDD principles
  • Create comprehensive tests and documentation with AI support
  • Apply conventional commits and generate professional PR descriptions
  • Identify anti-patterns and best practices when working with AI coding assistants

Schedule

0. Kickoff & Setup (15 min)

  • Goals and environment check
  • Clone starter repo and checkout starter-projects branch
  • Copilot instructions automatically configured via .github/copilot-instructions.md

0.5. GitHub Copilot Features Tour (15 min)

  • Inline completions, Chat panel, and Inline Chat
  • Slash commands: /explain, /fix, /tests, /doc, /refactor
  • Chat participants: @workspace, @vscode, @terminal
  • Context variables: #file, #selection, #editor
  • Quick hands-on practice with each feature

1. Controlling Context with Copilot Instructions (30 min)

  • Understand repository-level Copilot Instructions (.github/copilot-instructions.md)
  • Emphasis on TDD workflow: Write tests before implementation
  • Lab 1: Create NotificationService following Red-Green-Refactor cycle (interface → tests → implementation)

2. Requirements → Backlog → Code (45 min)

  • Turn requirements into backlog items, tests, and code
  • Lab 2: Backlog items → acceptance criteria → TaskService.AddTask

3. Code Generation & Refactoring (45 min)

  • Scaffold APIs, refactor legacy methods with slash commands
  • Lab 3: Minimal API with @workspace, refactor with /refactor, generate tests with /tests

4. Testing, Documentation, Workflow (15 min)

  • Generate tests, docs, commit/PR messages using Copilot features
  • Lab 4: /tests for unit tests, /doc for documentation, conventional commits

5. Wrap-Up & Discussion (15 min)

  • Lessons learned
  • Anti-patterns to avoid
  • Next steps and Q&A

Workshop Materials

Documentation

Lab Guides 📚

Comprehensive walkthroughs available in docs/labs/:

Each lab includes:

  • ✅ Clear learning objectives and prerequisites
  • ✅ Step-by-step instructions with prompts
  • ✅ Expected code outputs and examples
  • ✅ Troubleshooting guidance
  • ✅ Extension exercises for advanced participants
  • ✅ Success criteria checklist

Starter Projects ✅

Available in the starter-projects branch:

  • Complete Solution: Clean Architecture with Domain/Application/Infrastructure/API layers
  • Console Application: .NET 9 console app with DI and logging for initial exercises
  • Web API: Minimal API with extension methods and OpenTelemetry integration
  • Legacy Code Sample: LegacyTaskProcessor for refactoring exercises
  • Test Infrastructure: xUnit test stubs with FakeItEasy ready for implementation

Reference Implementation 🔍

Stuck or need examples? A complete reference implementation with all labs solved is available in the test-lab-walkthrough branch:

git checkout test-lab-walkthrough

This branch contains:

  • ✅ All 4 labs fully implemented
  • ✅ NotificationService with complete test suite (Lab 1)
  • ✅ CreateTaskCommandHandler with CQRS pattern (Lab 2)
  • ✅ Full CRUD API endpoints and refactored legacy code (Lab 3)
  • ✅ Comprehensive unit and integration tests (Lab 4)

Use this branch to:

  • Compare your solution with a working implementation
  • Get unstuck if you encounter issues
  • See best practices in action
  • Review after the workshop for continued learning

Getting Started

  1. Clone this repository:

    git clone https://github.com/centricconsulting/ai-coding-workshop.git
    cd ai-coding-workshop
    
  2. Checkout the starter projects branch:

    git checkout starter-projects
    
  3. Open in VS Code:

    code .
    

    That's it! Copilot instructions are automatically configured via .github/copilot-instructions.md - no manual setup needed.

  4. Verify your environment:

    dotnet --version    # Should show 8.x.x or later
    dotnet build        # Verify solution builds
    dotnet test         # Verify tests run
    
  5. Ready to start! Follow along with your facilitator or work through the labs independently

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages