Skip to content

Commit e10fd53

Browse files
CopilotGeekTrainer
andauthored
Add scenario steps files, update scripts and docs for injection model
Co-authored-by: GeekTrainer <6109729+GeekTrainer@users.noreply.github.com>
1 parent 19ca11b commit e10fd53

33 files changed

Lines changed: 1886 additions & 147 deletions

docs/authoring/new-scenario-guide.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Skipped exercises are listed in `scenario.yml` and are omitted when the workshop
3333

3434
## Step 2 — Create the scaffolding
3535

36-
Run the scaffolding script from the repository root:
36+
Use the scaffolding script to get started:
3737

3838
```bash
3939
python scripts/new-scenario.py <scenario-id>
@@ -47,8 +47,8 @@ The script creates:
4747
scenarios/
4848
<scenario-id>/
4949
scenario.yml ← pre-filled template; edit this next
50-
overrides/
51-
README.md ← placeholder for exercise overrides
50+
steps/
51+
README.md ← placeholder for exercise steps files
5252
```
5353

5454
---
@@ -120,39 +120,53 @@ Add each exercise to be skipped to the `skip` list in `scenario.yml`.
120120

121121
---
122122

123-
## Step 5 — Write exercise overrides (as needed)
123+
## Step 5 — Write exercise steps files (as needed)
124124

125-
Each exercise in `workshop-content/` contains a `## Scenario` section that describes the task in the context of Tailspin Toys. You will need to override this section for any exercise where the Tailspin-specific context does not make sense for your application.
125+
The core exercises in `workshop-content/` are generic templates. Each contains a `## Scenario` section and other sections describing tasks in application-neutral language. When your scenario needs scenario-specific content — your company name, tech-stack details, feature descriptions — create a steps file.
126126

127-
Create the override file at:
127+
A steps file lives at:
128128

129129
```
130-
scenarios/<scenario-id>/overrides/<exercise-filename>.md
130+
scenarios/<scenario-id>/steps/<exercise-filename>.md
131131
```
132132

133-
The override file should be a **complete exercise file** structured identically to the original in `workshop-content/`, with the `## Scenario` section rewritten for your application and any Tailspin-specific references replaced.
133+
It contains **only the `## ` sections that differ from the core**. When exercises are rendered for your scenario, each matching section in the steps file replaces its counterpart in the core exercise. Sections not present in the steps file are taken unchanged from the core.
134134

135135
> [!TIP]
136-
> Start by copying the original exercise file, then search for "Tailspin" and replace every occurrence with your scenario's equivalent. Update code snippets and prompts to match your tech stack.
136+
> Only include the sections that genuinely differ. If only `## Scenario` needs to change, your steps file only needs that one section.
137137
138-
### Minimal override example
138+
### Minimal steps file example
139139

140-
If only the `## Scenario` section needs to change:
140+
If only the `## Scenario` section needs to change for exercise 1:
141141

142142
```markdown
143-
<!-- scenarios/my-scenario/overrides/1-mcp.md -->
144-
145-
# Exercise 1 - Setting up the backlog with Copilot agent mode and GitHub's MCP Server
146-
147-
...same content as workshop-content/1-mcp.md, except:...
148-
149143
## Scenario
150144

151145
You are a developer for <Company Name> — <company_description>. You've been
152146
assigned tasks to introduce new functionality. To file your backlog of issues
153147
you'll enlist the help of Copilot Chat in agent mode and the GitHub MCP server.
148+
```
149+
150+
### Multi-section steps file example
151+
152+
If exercises 3 needs a custom scenario description and application startup instructions:
153+
154+
```markdown
155+
## Scenario
156+
157+
As the list of <primary_entities> grows, <company_name> wants to allow users
158+
to filter by <filter_feature>. With the help of Copilot Agent Mode you'll add
159+
the new feature!
160+
161+
## Running the application
162+
163+
The <company_name> application is a <company_description>. It has two main
164+
components: a frontend written in <frontend_language> and a backend written
165+
in <backend_language>.
166+
167+
### Starting the application
154168

155-
...rest of file unchanged...
169+
...your tech-stack-specific startup steps here...
156170
```
157171

158172
---
@@ -169,8 +183,8 @@ The script checks:
169183

170184
- All required fields are present in `scenario.yml`.
171185
- Every exercise listed in `skip` exists in `workshop-content/`.
172-
- Every override file in `overrides/` corresponds to an exercise in `workshop-content/`.
173-
- No override exists for an exercise in the `skip` list (that would be a conflict).
186+
- Every steps file in `steps/` corresponds to an exercise in `workshop-content/`.
187+
- No steps file exists for an exercise in the `skip` list (that would be a conflict).
174188

175189
Fix any issues reported before continuing.
176190

@@ -220,7 +234,7 @@ Use this checklist to track your progress:
220234
- [ ] Created scaffolding with `scripts/new-scenario.py`
221235
- [ ] Completed all fields in `scenario.yml`
222236
- [ ] Identified exercises to skip
223-
- [ ] Written overrides for exercises with Tailspin-specific content
237+
- [ ] Written steps files for exercises with scenario-specific content
224238
- [ ] Validated with `scripts/validate-scenario.py` (zero errors)
225239
- [ ] Updated `scenarios/README.md` table
226240
- [ ] Tested the scenario end-to-end
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Exercise 0: Prerequisites
2+
3+
Before you get started on the lab, there's a few tasks you need to complete to get everything ready. You need to get a copy of the repository which includes the code, then spin up a [codespace][codespaces] to use to create your code.
4+
5+
## Setting up the Lab Repository
6+
7+
To create a copy of the repository for the code you'll create an instance from the [template][template-repository]. The new instance will contain all of the necessary files for the lab, and you'll use it as you work through the exercises.
8+
9+
1. In a new browser window, navigate to the GitHub repository for this lab: `https://github.com/github-samples/agents-in-sdlc`.
10+
2. Create your own copy of the repository by selecting the **Use this template** button on the lab repository page. Then select **Create a new repository**.
11+
12+
![Use this template button](images/ex0-use-template.png)
13+
14+
3. If you are completing the workshop as part of an event being led by GitHub or Microsoft, follow the instructions provided by the mentors. Otherwise, you can create the new repository in an organization where you have access to Copilot coding agent and can assign issues to Copilot.
15+
16+
![Input the repository template settings](images/ex0-repository-settings.png)
17+
18+
4. Make a note of the repository path you created (**organization-or-user-name/repository-name**), as you will be referring to this later in the lab.
19+
20+
## Creating a codespace
21+
22+
Next up, you'll be using a codespace to complete the lab exercises. [GitHub Codespaces][codespaces] are a cloud-based development environment that allows you to write, run, and debug code directly in your browser. It provides a fully-featured IDE with support for multiple programming languages, extensions, and tools.
23+
24+
1. Navigate to your newly created repository.
25+
2. Select the green **Code** button.
26+
27+
![Select the Code button](images/ex0-code-button.png)
28+
29+
3. Select the **Codespaces** tab and select the **+** button to create a new Codespace.
30+
31+
![Create a new codespace](images/ex0-create-codespace.png)
32+
33+
The creation of the codespace will take several minutes, although it's still far quicker than having to manually install all the services! That said, you can use this time to explore other features of GitHub Copilot, which we'll turn your attention to next!
34+
35+
> [!IMPORTANT]
36+
> You'll return to the codespace in a future exercise. For the time being, leave it open in a tab in your browser.
37+
38+
## Summary
39+
40+
Congratulations, you have created a copy of the lab repository! You also began the creation process of your codespace, which you'll use when you begin writing code.
41+
42+
## Next step
43+
44+
Let's explore how you can use Model Context Protocol (MCP) to interact with external services! You can do this by [setting up the backlog with Copilot agent mode and GitHub's MCP Server](./1-mcp.md).
45+
46+
[codespaces]: https://github.com/features/codespaces
47+
[template-repository]: https://docs.github.com/repositories/creating-and-managing-repositories/creating-a-template-repository

0 commit comments

Comments
 (0)