Skip to content

Commit 329d731

Browse files
GeekTrainerCopilot
andcommitted
Address awesome-copilot PR review comments in course content
Reworks the permission story away from full YOLO mode and fixes the grammar, path, and safety issues raised in review of the Learning Hub mirror PR (github/awesome-copilot#2800). - Module 1: document that approvals persist in permissions-config.json and can be pre-approved with --allow-tool; note the course codespace ships pre-approved local tools - Modules 5/6/7: replace `copilot --yolo` launches with plain `copilot` (Module 5 uses `--allow-tool playwright`) plus a consistent lead-in explaining the codespace's scoped, pre-approved local tools - Module 0: add the "Include all branches" template step so the start-of-module catch-up branches are copied - Module 4: pin the hook script download to an immutable commit and add curl --fail; drop the stray parenthesis - Module 7: remove the auto-merge instruction in favor of a human review gate; fix the malformed steps list, article, verb agreement, and colon - Module 2: correct the repo-scoped skills path to .github/skills/ - Fix duplicated articles and grammar in Modules 2 and 6 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d0214c7e-f75b-4aa8-991d-277a9d941cc4
1 parent 900b4b0 commit 329d731

7 files changed

Lines changed: 38 additions & 29 deletions

‎content/00-prerequisites.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ When doing standard development, the first step is often to fork or clone the re
3535
3. Select **Create a new repository**.
3636
4. Under **Owner**, select your personal GitHub account.
3737
5. For **Repository name**, enter `AssetTrack`.
38-
6. Leave the remaining options at their defaults.
39-
7. Select **Create repository**.
40-
8. Once the new repository has been created, select the **Code** button.
41-
9. Switch to the **Codespaces** tab.
42-
10. Select **Create codespace on main**.
38+
6. Select **Include all branches** so the module catch-up branches (`start-of-module-02` through `start-of-module-07`) are copied to your repository.
39+
7. Leave the remaining options at their defaults.
40+
8. Select **Create repository**.
41+
9. Once the new repository has been created, select the **Code** button.
42+
10. Switch to the **Codespaces** tab.
43+
11. Select **Create codespace on main**.
4344

4445
> [!NOTE]
4546
> The first launch of the codespace will take a few minutes. AssetTrack uses a custom devcontainer that includes the runtimes for all four stacks (Java, Node/Astro, .NET, Python/FastAPI), and the container image needs to be built the first time the codespace starts. Subsequent launches will be much faster.

‎content/01-working-with-copilot-cli.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ As you likely expected, there's quite a bit going on behind the scenes with Copi
196196

197197
Selecting **Yes** will allow for the first call only, and the next two will require separate approvals. **Yes, and don't ask again for `gh issue` in this repo (*path*)** will allow Copilot CLI to always call the `gh issue` CLI tool for this repository.
198198

199+
> [!NOTE]
200+
> "Don't ask again" choices are saved per folder in `~/.copilot/permissions-config.json`, so they carry across sessions in that repository. You can also pre-approve tools when you launch with `--allow-tool` — for example, `copilot --allow-tool write --allow-tool 'shell(git:*)'` — which skips the prompt for exactly those tools while still asking about anything else. The codespace for this course ships with a set of local tools already approved this way, so later modules start Copilot without stopping for permission on routine local work.
201+
199202
> [!IMPORTANT]
200203
> Ensure you always consider the implications of granting Copilot or any AI tool permissions to perform actions on your behalf.
201204

‎content/02-building-ai-infrastructure.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Now let's add a reusable `Accessibility Expert` custom agent and use it against
179179
1. Ask Copilot to work with the Accessibility Expert agent to produce an accessibility report for the Astro frontend with recommendations
180180
181181
```text
182-
Work with the the accessibility expert to review the Astro frontend code and produce an accessibility report with specific recommendations for improvements based on WCAG 2.2 AA standards.
182+
Work with the accessibility expert to review the Astro frontend code and produce an accessibility report with specific recommendations for improvements based on WCAG 2.2 AA standards.
183183
```
184184
185185
Notice that the main agent passes the task to the Accessibility Expert agent, which then finds the custom instructions for Astro/React you created earlier, tracks the relevant files and produces a report with specific, actionable recommendations that reference WCAG success criteria and specific selectors in the code.
@@ -192,7 +192,7 @@ Now let's add a reusable `Accessibility Expert` custom agent and use it against
192192
193193
## Agent skills
194194
195-
Custom agents introduce *specialized personas*. **Agent skills** change what Copilot *knows* to do. A skill is a packaged capability, could include an instruction set, optional scripts and resources - that the agent can invoke **at runtime** when the task matches its trigger. Skills live in `.copilot/skills/` (for repo-scoped) or `~/.copilot/skills/` (for user-scoped) and in Copilot CLI, you use `/skills` to view and manage them.
195+
Custom agents introduce *specialized personas*. **Agent skills** change what Copilot *knows* to do. A skill is a packaged capability, could include an instruction set, optional scripts and resources - that the agent can invoke **at runtime** when the task matches its trigger. Skills live in `.github/skills/` (for repo-scoped) or `~/.copilot/skills/` (for user-scoped) and in Copilot CLI, you use `/skills` to view and manage them.
196196
197197
The new AI infrastructure for Contoso is coming together nicely, but there's one more piece to add. Now that you have a baseline for how copilot should approach making updates locally, we want to bootstrap the contribution standards that should be followed to land these updates through channels that integrate with the team's existing workflows for enhanced collaboration, human-in-the-loop review and auditability.
198198

‎content/04-lifecycle-hooks.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The harness emits named events across the session lifecycle and your hook config
6767
For the test-and-lint feedback loop in this module, the events that matter most are:
6868
6969
- `postToolUse` - to run checks after each file edit and feed results back to the agent loop
70-
- `agentStop` - to optionally block the agent from finishing a turn if checks are red).
70+
- `agentStop` - to optionally block the agent from finishing a turn if checks are red.
7171
7272
### Reading hook input and writing hook output
7373
@@ -192,8 +192,8 @@ AssetTrack's checks span four different stacks - .NET, Java, Python, TypeScript,
192192
3. Download `.github/hooks/scripts/test-router.sh`, which reads the edited file path from the `postToolUse` payload, runs the right test runner for that stack and emits the result as `additionalContext`. The same script also handles `agentStop` by looking at changed files and blocking only when the relevant stack's tests fail:
193193
194194
```bash
195-
curl -o .github/hooks/scripts/test-router.sh \
196-
https://raw.githubusercontent.com/github-samples/advanced-copilot-cli/main/assets/04/.github/hooks/scripts/test-router.sh
195+
curl --fail -o .github/hooks/scripts/test-router.sh \
196+
https://raw.githubusercontent.com/github-samples/advanced-copilot-cli/1af928893a2e180dc3b2a469b22712a78b1f74a7/assets/04/.github/hooks/scripts/test-router.sh
197197
```
198198
199199
4. Make the script executable:

‎content/05-add-feature-barcode.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ Two of those need help from outside the agent's own reasoning. Exploring the run
6262
Let's start by registering the Playwright MCP server for the quality assurance agent to be able to use later.
6363
6464
> [!NOTE]
65-
> You'll start Copilot CLI with `--yolo`, which auto-approves every edit, command, and tool call so the work doesn't stop for permission on each step — useful once the `/fleet` build is running. That's appropriate here because a codespace is the kind of sandboxed, disposable container that [Module 1][m01] called out as the right home for YOLO mode. Treat it as the exception: on your own machine, or anywhere near real credentials or unreviewed code, start Copilot with plain `copilot` and approve actions deliberately.
65+
> This codespace comes with a collection of approved local tools for Copilot to be able to use, like being able to create files, run builds, and other local operations. It's scoped to just the codespace, and not any external services. When it comes time to use other services Copilot will ask for approval, or you'll use a command to add it to its list of approved tools. Here you'll register the Playwright MCP server, so you'll start Copilot with `--allow-tool playwright` to add it to that approved list up front — the `/fleet` build can then drive the browser without stopping for permission mid-run.
6666
6767
1. Return to your codespace. If you closed it, navigate to your repository on GitHub.com, select **Code** > **Codespaces**, then reopen your existing codespace.
6868
2. Open a terminal window by selecting <kbd>Ctrl</kbd> + <kbd>`</kbd>.
6969
3. Create and switch to a feature branch with `git switch -c feat/barcode-support`.
70-
4. Start Copilot CLI in YOLO mode from the repository root:
70+
4. Start Copilot CLI from the repository root, adding the Playwright server you'll register next to its list of approved tools:
7171
7272
```bash
73-
copilot --yolo
73+
copilot --allow-tool playwright
7474
```
7575
7676
5. In Copilot CLI, run the command `/mcp add` to open the MCP registration panel.
@@ -265,7 +265,6 @@ The throughline is the loop itself: research and planning make the parallel buil
265265
266266
[previous-lesson]: ./04-lifecycle-hooks.md
267267
[next-lesson]: ./06-modernize-apps.md
268-
[m01]: ./01-working-with-copilot-cli.md
269268
[m02]: ./02-building-ai-infrastructure.md
270269
[m04]: ./04-lifecycle-hooks.md
271270
[copilot-plan]: https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli

‎content/06-modernize-apps.md‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ GitHub Copilot provides access to numerous models of various levels, including t
6464
As you work through the application modernization flow, you'll move back and forth between higher-end tasks, like planning and research, to lower-end tasks, like writing code and generating tests. With `/model` you can switch to an appropriate model depending on the needs of the current ask, both saving time and reducing the credit usage necessary to complete the operation. For example, you might choose Claude Opus 4.8 to build the plan, then assign an agent using MAI-Flash-1 to implement the code as defined in the plan.
6565
6666
> [!NOTE]
67-
> During our exploration here we're going to use `auto` as our model choice, which allows Copilot to choose the model it thinks is most appropriate for the task. This is both to streamline the lesson and to allow for completion of the course with reduced credit usage. When it comes time to being complex operations on your production codebase, you can deploy various strategies to choose the right model at the right time.
67+
> During our exploration here we're going to use `auto` as our model choice, which allows Copilot to choose the model it thinks is most appropriate for the task. This is both to streamline the lesson and to allow for completion of the course with reduced credit usage. When it comes time to perform complex operations on your production codebase, you can deploy various strategies to choose the right model at the right time.
6868
6969
## Giving Copilot better signal: LSP and documentation MCP
7070
@@ -86,8 +86,11 @@ You'll give Copilot structured intelligence for AssetTrack's Java code and a fir
8686
8787
Start with the code signal: install the Eclipse JDT language server through the `lsp-setup` skill and commit its configuration so the whole team shares the same view of the code.
8888
89+
> [!NOTE]
90+
> This codespace comes with a collection of approved local tools for Copilot to be able to use, like being able to create files, run builds, and other local operations. It's scoped to just the codespace, and not any external services. When it comes time to use other services — like the documentation MCP server you'll add later in this module — Copilot will ask for approval, or you'll use a command to add it to its list of approved tools.
91+
8992
1. Return to your codespace. If you closed it, navigate to your repository on GitHub.com, select **Code** > **Codespaces**, then reopen your existing codespace.
90-
2. Open a terminal by selecting <kbd>Ctrl</kbd> + <kbd>\`</kbd>, then start Copilot CLI from the repository root by running `copilot --yolo`.
93+
2. Open a terminal by selecting <kbd>Ctrl</kbd> + <kbd>\`</kbd>, then start Copilot CLI from the repository root by running `copilot`.
9194
3. If prompted, trust the project folder by selecting **Yes, and remember this folder for future sessions**.
9295
4. Run `/models`, select **Auto** from the list, and select <kbd>Enter</kbd>.
9396
5. Ask Copilot to install the skill directly from the [Awesome GitHub Copilot][awesome-copilot] collection by entering the prompt:
@@ -126,7 +129,7 @@ Start with the code signal: install the Eclipse JDT language server through the
126129
> [!NOTE]
127130
> The committed `.github/lsp.json` tells Copilot how to launch `jdtls`, but each environment still needs the server installed — that's what the `lsp-setup` skill does. A teammate who clones the repo runs the same skill once to install `jdtls` locally. It runs on the Java 21 JDK the AssetTrack devcontainer provides, which both builds `audit-svc` and `auth-svc` — they target Java 17 — and analyzes their source without trouble.
128131
129-
9. To complete the installation, exit Copilot CLI by using the command `/exit`, then `/exit` again, then re-open Copilot by running `copilot --yolo`.
132+
9. To complete the installation, exit Copilot CLI by using the command `/exit`, then `/exit` again, then re-open Copilot by running `copilot`.
130133
131134
With `.github/lsp.json` committed and `jdtls` installed, every contributor now gets the same compiler-backed view of AssetTrack's Java code.
132135
@@ -259,7 +262,7 @@ As highlighted previously, app modernization follows a cycle of research, coding
259262
1. Turn what you just learned into a short playbook so the next service reuses the recipe. Ask Copilot to write it from the actual work, not from theory, by sending the following prompt:
260263
261264
```text
262-
Using the the learnings and process we just followed, let's create an updated migration-playbook.md file that will supersede the original. Bring over anything applicable generalized from the original research, and any lessons from the upgrade you just performed.
265+
Using the learnings and process we just followed, let's create an updated migration-playbook.md file that will supersede the original. Bring over anything applicable generalized from the original research, and any lessons from the upgrade you just performed.
263266
```
264267
265268
2. Ask Copilot to update the agent with any learnings it has that might improve the process by using the following prompt:
@@ -293,7 +296,7 @@ Modernizing the first service was the expensive part. The second one is where bu
293296
Modernize services/auth-svc following the guidelines provided in the agent, and give me a final status report at the end. The baseline test suite from the previous exercise is already in place, so confirm it passes and start from the toolchain phase.
294297
```
295298
296-
The agent performs the upgrade, following the steps lessons from your research and the first migration process.
299+
The agent performs the upgrade, following the steps and lessons from your research and the first migration process.
297300
298301
5. Once the work is complete, ask Copilot to create a PR with your new agent, playbook, and newly upgraded services by using the following prompt:
299302

0 commit comments

Comments
 (0)