Module: 1
Duration: 25 minutes
Part: Advanced GitHub Copilot (Part 2)
By the end of this lab, you will:
- Understand the three primary interaction models in GitHub Copilot
- Know when to use Ask, Edit, and Agent modes
- Experience the differences through hands-on exercises
- Recognize Agent Mode as a distinct execution model
- Completion of Part 1 labs (or equivalent Copilot experience)
- VS Code with GitHub Copilot extension
- Access to the TaskManager workshop repository
GitHub Copilot in VS Code offers three distinct interaction models, each optimized for different workflows:
- Purpose: Learning, exploration, explanation
- Behavior: Provides answers without making changes
- Use when: You need to understand code, patterns, or concepts
- Purpose: Scoped, targeted code modifications
- Behavior: Makes direct edits to specific files
- Use when: You know exactly what to change and where
- Purpose: Complex, repository-level tasks
- Behavior: Plan → execute → review with human checkpoints
- Use when: Work spans multiple files or requires analysis
- Key trait: Human-in-the-loop by design
Before diving into the exercises, let's explore slash commands — quick ways to discover and access Copilot's features.
Slash commands start with / and help you find agents, skills, and other capabilities:
| Command | Purpose | Example Usage |
|---|---|---|
/help |
Show all available commands | Type /help in chat |
/agents |
List all available custom agents | /agents to see @architect, @planner, etc. |
/skills |
List all available skills | /skills to see #test-data-generator, etc. |
/init |
Start a new project or workspace | /init dotnet webapi |
/create-workspace |
Create new workspace | /create-workspace my-project |
/create-notebook |
Create new Jupyter notebook | /create-notebook data-analysis |
/create-file |
Create new file with AI assistance | /create-file readme.md |
/install-extension |
Install VS Code extension | /install-extension ms-python.python |
Once you know which agents exist (from /agents), you can invoke them with @:
@architect Review the domain model for this feature
@planner Create an implementation plan for user authentication
Skills are specialized knowledge modules invoked with #:
#test-data-generator Create sample order data for integration tests
Note: Skills and their differences from agents will be covered in Lab 06: Skills & Customization.
- Open Copilot Chat
- Type
/helpto see all available commands - Type
/agentsto see available custom agents - Type
/skillsto see available skills
Observation: What agents and skills are available in this workshop?
You'll perform the same task using all three modes to understand their strengths and limitations.
Scenario: You need to add a new property Priority to the Task entity in the Domain layer and ensure it's properly handled throughout the codebase.
- Open Copilot Chat in VS Code
- Ensure you're in Ask mode (default chat behavior)
- Enter this prompt:
I want to add a Priority property (Low, Medium, High) to the Task entity.
How should I implement this following Clean Architecture and DDD patterns?
- Review the response
Copilot will:
- Explain how to add the property
- Suggest using a Value Object for Priority
- Describe the pattern, but not make any changes
- Did Copilot provide enough detail to implement this yourself?
- What follow-up questions would you ask?
- When is this mode most valuable?
- Open the file:
src/TaskManager.Domain/Tasks/Task.cs - Open Copilot Chat and switch to Edit Mode
- Use this prompt:
Add a Priority property to this Task entity using a Priority value object.
Priority should have three levels: Low, Medium, High.
- Review the proposed changes
- Accept or modify the edits
Copilot will:
- Modify the current file directly
- Add the
Priorityproperty - May create or suggest a
Priorityvalue object
- Did Edit Mode make changes beyond the current file?
- What happens if the change requires updates elsewhere?
- When is Edit Mode the right choice?
Try using Edit Mode to:
- Create the
Priority.csvalue object file - Update the Task constructor to include Priority
Did it work smoothly for multi-file changes?
- Open Copilot Chat
- Switch to Agent Mode (look for the Agent mode toggle/button)
- Use this prompt:
Add a Priority property (Low, Medium, High) to the Task entity following DDD patterns.
Ensure the change is properly integrated across Domain, Application, and Api layers.
Alternative: If you want to use a custom agent (discovered via /agents):
@plan Add Priority property to Task entity with full integration
This invokes the @plan agent, which specializes in creating implementation plans.
-
Observe the Agent's process:
- Planning phase
- File analysis
- Proposed changes
- Checkpoints for your review
-
Review each step before proceeding
-
Accept or reject individual changes
Agent Mode will:
- Analyze the codebase structure
- Plan the changes across multiple files
- Propose changes in stages:
- Domain layer (value object + entity)
- Application layer (if needed)
- Api layer (request/response mapping)
- Wait for your approval at key checkpoints
- How did Agent Mode's approach differ from Edit Mode?
- What visibility did you have into the Agent's reasoning?
- When would you prefer Agent Mode over Edit Mode?
Create your own comparison based on the exercises:
| Aspect | Ask Mode | Edit Mode | Agent Mode |
|---|---|---|---|
| Speed | [Your observation] | [Your observation] | [Your observation] |
| Scope | [Your observation] | [Your observation] | [Your observation] |
| Control | [Your observation] | [Your observation] | [Your observation] |
| Best For | [Your observation] | [Your observation] | [Your observation] |
✅ Use for: Learning, exploration, gathering context
❌ Don't use for: Making changes, implementing features
✅ Use for: Localized, scoped changes you can clearly describe
❌ Don't use for: Multi-file refactors, exploratory work
✅ Use for: Complex workflows, repository-level analysis, staged changes
❌ Don't use for: Simple edits, quick fixes
- Which mode felt most natural for this task? Why?
- When would you deliberately choose Ask Mode over Agent Mode?
- What are the risks of using Agent Mode for everything?
- How does Agent Mode enforce "human-in-the-loop"?
In Lab 06: Skills & Customization, you'll learn about:
- The Skills system and how it differs from agents
- When to use instructions, agents, or skills
- How to leverage the customization hierarchy effectively
Then in Lab 07: Custom Agents Intro, you'll learn how to create specialized agents for specific workflows.