Skip to content

Commit 7b09918

Browse files
matthewwilsonclaude
andcommitted
Split Lesson 3 into Context (L3) and Custom Instructions (L4)
Lesson 3 covered too much ground. Split it into two focused lessons: - Lesson 3: Context — how Copilot finds context, @file mentions, managing the context window (/clear, /compact, /context), anti-patterns - Lesson 4: Custom Instructions — copilot-instructions.md, AGENTS.md, the golden rule, resist the manual refactor Renumbered all subsequent lessons (4-22 → 5-23), validators, and updated every cross-reference across agents, hooks, copilot-instructions.md, README, and lesson files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3b6c9db commit 7b09918

44 files changed

Lines changed: 411 additions & 398 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/core.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Switch back to the core track. Do the following steps in order:
77

88
1. Read the file `tutorial/state.json`
99
2. Set the `track` field to `"core"`
10-
3. If `currentLesson` is greater than 17, set `currentLesson` to 17
10+
3. If `currentLesson` is greater than 18, set `currentLesson` to 18
1111
4. Write the updated JSON back to `tutorial/state.json`
1212
5. Determine the lesson filename: look in `tutorial/lessons/` for the file whose name starts with the zero-padded lesson number (e.g., lesson 17 becomes "17-")
1313
6. Read that lesson file

.github/agents/next.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Advance the tutorial to the next lesson. Do the following steps in order:
99
2. Get the current lesson number from the `currentLesson` field
1010
3. Add the current lesson number to the `completedLessons` array if it is not already there
1111
4. Increment `currentLesson` by 1
12-
5. Read the `track` field from state (default `"core"` if missing). If `track` is `"qa"`, cap `currentLesson` at 22. If `track` is `"core"`, cap at 17. (Set it back to the cap value if it exceeds it.)
12+
5. Read the `track` field from state (default `"core"` if missing). If `track` is `"qa"`, cap `currentLesson` at 23. If `track` is `"core"`, cap at 18. (Set it back to the cap value if it exceeds it.)
1313
6. Write the updated JSON back to `tutorial/state.json`
1414
7. Determine the next lesson filename: look in `tutorial/lessons/` for the file whose name starts with the zero-padded lesson number (e.g., lesson 3 becomes "03-", lesson 7 becomes "07-")
1515
8. Read that lesson file

.github/agents/progress.agent.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,31 @@ Show the user their tutorial progress. Do the following:
1313
- 0: Welcome
1414
- 1: First Conversation
1515
- 2: Effective Prompting & Verification
16-
- 3: Context & Custom Instructions
17-
- 6: Planning Mode
18-
- 8: Skills & Custom Agents
19-
- 9: Agent Delegation & Collaboration
20-
- 10: Hooks in Action
21-
- 12: Session Management
22-
- 14: Model Selection & Configuration
23-
- 15: CLI Tools & MCP Servers
24-
- 16: Working with Images
25-
- 17: Graduation + Bonus
16+
- 3: Context
17+
- 4: Custom Instructions
18+
- 7: Planning Mode
19+
- 9: Skills & Custom Agents
20+
- 10: Agent Delegation & Collaboration
21+
- 11: Hooks in Action
22+
- 13: Session Management
23+
- 15: Model Selection & Configuration
24+
- 16: CLI Tools & MCP Servers
25+
- 17: Working with Images
26+
- 18: Graduation + Bonus
2627

2728
**Developer:**
28-
- 4: Code Modification
29-
- 5: Bug Investigation
30-
- 7: Writing & Running Tests
31-
- 11: Git Workflow — Commits & PRs
32-
- 13: Programmatic Mode & Automation
29+
- 5: Code Modification
30+
- 6: Bug Investigation
31+
- 8: Writing & Running Tests
32+
- 12: Git Workflow — Commits & PRs
33+
- 14: Programmatic Mode & Automation
3334

3435
4. If `track` is `"qa"`, also show a **QA Track:** section:
35-
- 18: Test Planning from Requirements
36-
- 19: Test Case Design & Coverage Analysis
37-
- 20: Automated Test Generation
38-
- 21: E2E Testing with Playwright
39-
- 22: QA Track Graduation
36+
- 19: Test Planning from Requirements
37+
- 20: Test Case Design & Coverage Analysis
38+
- 21: Automated Test Generation
39+
- 22: E2E Testing with Playwright
40+
- 23: QA Track Graduation
4041

4142
If `track` is NOT `"qa"`, show a note instead: "Type /agent qa to start the QA track"
4243

@@ -45,4 +46,4 @@ Show the user their tutorial progress. Do the following:
4546
- `[>]` if it is the `currentLesson` (the one they're on right now)
4647
- `[~]` if it is in the `skippedLessons` array
4748
- `[ ]` if it hasn't been reached yet
48-
6. Show a summary line. If on the core track: "Progress: N of 17 lessons completed". If on the QA track: "Progress: N of 22 lessons completed".
49+
6. Show a summary line. If on the core track: "Progress: N of 18 lessons completed". If on the QA track: "Progress: N of 23 lessons completed".

.github/agents/qa.agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ description: "Switch to the QA track"
33
tools: ["read", "edit"]
44
---
55

6-
Switch to the QA track (lessons 18-22). Do the following steps in order:
6+
Switch to the QA track (lessons 19-23). Do the following steps in order:
77

88
1. Read the file `tutorial/state.json`
99
2. Set the `track` field to `"qa"`
10-
3. If `currentLesson` is less than 18, set `currentLesson` to 18 (otherwise keep it as-is)
10+
3. If `currentLesson` is less than 19, set `currentLesson` to 19 (otherwise keep it as-is)
1111
4. Write the updated JSON back to `tutorial/state.json`
1212
5. Determine the lesson filename: look in `tutorial/lessons/` for the file whose name starts with the zero-padded lesson number (e.g., lesson 18 becomes "18-")
1313
6. Read that lesson file

.github/agents/skip.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Skip the current exercise and move to the next lesson. Do the following steps:
77

88
1. Read `tutorial/state.json`
99
2. Add the current lesson number to the `skippedLessons` array if not already there
10-
3. Increment `currentLesson` by 1. Read the `track` field (default `"core"` if missing). Cap at 22 if `track` is `"qa"`, or at 17 if `track` is `"core"`.
10+
3. Increment `currentLesson` by 1. Read the `track` field (default `"core"` if missing). Cap at 23 if `track` is `"qa"`, or at 18 if `track` is `"core"`.
1111
4. Write the updated state back to `tutorial/state.json`
1212
5. Read the next lesson file from `tutorial/lessons/` (zero-padded prefix)
1313
6. Present it to the user. Briefly acknowledge the skip in a neutral way — something like "Moving on!" — without making the user feel bad. Everyone learns at their own pace.

.github/copilot-instructions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You are running as an interactive tutorial guide for GitHub Copilot CLI. Your jo
1818
| `hint` | Get a hint for the current exercise |
1919
| `skip` | Skip the current exercise |
2020
| `progress` | See tutorial progress |
21-
| `qa` | Switch to the QA track (lessons 18-22) |
21+
| `qa` | Switch to the QA track (lessons 19-23) |
2222
| `core` | Switch back to the core track |
2323

2424
When suggesting navigation to the user, tell them to type `/agent` and select from the list, or say "next" / "next lesson" / "give me a hint" etc. — you should infer which agent to use from natural language.
@@ -66,26 +66,26 @@ Or, when prompted, they can select **"Yes, approve for session"** to auto-approv
6666

6767
8. **Understand natural language navigation.** When the user says things like "next lesson", "go to the next one", "skip this", "give me a hint", "show my progress", "restart", "switch to QA track" — use the corresponding navigation agent. You don't need to wait for a specific `/agent` command.
6868

69-
## QA Track (Lessons 18-22)
69+
## QA Track (Lessons 19-23)
7070

7171
The tutorial includes an optional QA track for QA engineers. It is controlled by the `track` field in `tutorial/state.json`:
7272

73-
- `"core"` (default) — Lessons 0-17, the standard developer-focused track
74-
- `"qa"` — Lessons 18-22, focused on QA workflows
73+
- `"core"` (default) — Lessons 0-18, the standard developer-focused track
74+
- `"qa"` — Lessons 19-23, focused on QA workflows
7575

7676
### QA Track Navigation
7777

7878
| Say this | Or type this | What it does |
7979
|----------|-------------|-------------|
80-
| "switch to QA track" | `/agent qa` | Switch to the QA track (starts at lesson 18) |
80+
| "switch to QA track" | `/agent qa` | Switch to the QA track (starts at lesson 19) |
8181
| "switch to core track" | `/agent core` | Switch back to the core track |
8282

8383
### QA Lessons
8484

85-
- **18: Test Planning from Requirements** — Analyze a feature request and create a structured test plan
86-
- **19: Test Case Design & Coverage** — Identify coverage gaps and design test cases using QA techniques
87-
- **20: Automated Test Generation** — Turn test cases into running Vitest tests
88-
- **21: E2E Testing with Playwright** — Write Playwright tests for the web UI
89-
- **22: QA Track Graduation** — Recap and bonus challenges
85+
- **19: Test Planning from Requirements** — Analyze a feature request and create a structured test plan
86+
- **20: Test Case Design & Coverage** — Identify coverage gaps and design test cases using QA techniques
87+
- **21: Automated Test Generation** — Turn test cases into running Vitest tests
88+
- **22: E2E Testing with Playwright** — Write Playwright tests for the web UI
89+
- **23: QA Track Graduation** — Recap and bonus challenges
9090

9191
The `next`, `skip`, and `progress` agents are track-aware — they respect the active track's lesson range. The hooks work with any lesson number automatically.

.github/hooks/validate-exercise.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ if [ -f "$VALIDATOR" ]; then
3737
fi
3838
fi
3939

40-
# Also run any bonus validators when on the graduation lesson (17)
41-
if [ "$CURRENT" -eq 17 ]; then
40+
# Also run any bonus validators when on the graduation lesson (18)
41+
if [ "$CURRENT" -eq 18 ]; then
4242
for bonus_validator in "$VALIDATORS_DIR"/validate-bonus-*.sh; do
4343
[ -f "$bonus_validator" ] || continue
4444
BONUS_RESULT=$(bash "$bonus_validator" 2>&1) || true

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ You can navigate the tutorial using natural language or the `/agent` command:
5252
| "hint" or "give me a hint" | `/agent hint` | Get a hint for the current exercise |
5353
| "skip" or "skip this" | `/agent skip` | Skip the current exercise |
5454
| "progress" or "show progress" | `/agent progress` | See your tutorial progress |
55-
| "switch to QA track" | `/agent qa` | Switch to the QA track (lessons 18-22) |
55+
| "switch to QA track" | `/agent qa` | Switch to the QA track (lessons 19-23) |
5656
| "switch to core track" | `/agent core` | Switch back to the core track |
5757

5858
## QA Track
5959

60-
The tutorial includes an optional QA track (lessons 18-22) for QA engineers. It covers test planning, test case design, automated test generation, and E2E testing with Playwright.
60+
The tutorial includes an optional QA track (lessons 19-23) for QA engineers. It covers test planning, test case design, automated test generation, and E2E testing with Playwright.
6161

6262
To start the QA track, say "switch to QA track" or type `/agent qa`.
6363

6464
To return to the core track, say "switch to core track" or type `/agent core`.
6565

66-
The QA track assumes you have completed at least the core lessons (0-3). The `progress` agent shows both tracks when the QA track is active.
66+
The QA track assumes you have completed at least the core lessons (0-4). The `progress` agent shows both tracks when the QA track is active.
6767

6868
## How It Works
6969

@@ -73,4 +73,4 @@ The tutorial is built using three Copilot CLI features:
7373
- **Custom Agents** (`.github/agents/*.agent.md`) — Navigation between lessons
7474
- **Hooks** (`.github/hooks/`) — State persistence, context injection, and exercise validation
7575

76-
Lesson 10 of the tutorial walks through exactly how these pieces compose together.
76+
Lesson 11 of the tutorial walks through exactly how these pieces compose together.

tutorial/lessons/00-welcome.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,22 @@ You can also use `/agent` and select from the list of tutorial agents.
1818

1919
1. **First Conversation** — Explore a real codebase with Copilot
2020
2. **Effective Prompting** — Write prompts that get great results on the first try
21-
3. **Context & Custom Instructions** — Persistent instructions and context management
22-
4. **Code Modification** — Ask Copilot to write TypeScript code
23-
5. **Bug Investigation** — Hunt down and fix a real bug
24-
6. **Planning Mode** — How Copilot plans before it codes
25-
7. **Writing & Running Tests** — Get Copilot to write and run tests
26-
8. **Skills & Custom Agents** — Create your own custom agents
27-
9. **Agent Delegation** — Push work to coding agents and built-in specialists
28-
10. **Hooks in Action** — The automation that powers this tutorial itself
29-
11. **Git Workflow** — Commits, PRs, and code review with Copilot
30-
12. **Session Management** — Resume, compress, and organize your work
31-
13. **Programmatic Mode** — Run Copilot from scripts and CI/CD
32-
14. **Model Selection** — Choose the right model for each task
33-
15. **CLI Tools & MCP Servers** — Use any CLI tool and structured tool access
34-
16. **Working with Images** — Debug from screenshots and mockups
35-
17. **Graduation** — Bonus challenges and where to go next
21+
3. **Context** — How Copilot finds context and how to manage your context window
22+
4. **Custom Instructions** — Persistent instructions that survive across sessions
23+
5. **Code Modification** — Ask Copilot to write TypeScript code
24+
6. **Bug Investigation** — Hunt down and fix a real bug
25+
7. **Planning Mode** — How Copilot plans before it codes
26+
8. **Writing & Running Tests** — Get Copilot to write and run tests
27+
9. **Skills & Custom Agents** — Create your own custom agents
28+
10. **Agent Delegation** — Push work to coding agents and built-in specialists
29+
11. **Hooks in Action** — The automation that powers this tutorial itself
30+
12. **Git Workflow** — Commits, PRs, and code review with Copilot
31+
13. **Session Management** — Resume, compress, and organize your work
32+
14. **Programmatic Mode** — Run Copilot from scripts and CI/CD
33+
15. **Model Selection** — Choose the right model for each task
34+
16. **CLI Tools & MCP Servers** — Use any CLI tool and structured tool access
35+
17. **Working with Images** — Debug from screenshots and mockups
36+
18. **Graduation** — Bonus challenges and where to go next
3637

3738
## Coming from IDE Copilots?
3839

@@ -43,7 +44,7 @@ If you've used GitHub Copilot in VS Code, JetBrains, or other editors, here's ho
4344
- **Runs commands** — Copilot executes tests, builds, type-checkers, and git commands, then reads the output and reacts. It's not just suggesting code — it's verifying it works.
4445
- **Persistent memory**`.github/copilot-instructions.md` files store your conventions, architecture decisions, and rules. Copilot reads them every session — no re-explaining.
4546
- **Plans before acting** — Plan mode (Shift+Tab) lets Copilot explore and design an approach before writing a single line of code. You review and approve the plan first.
46-
- **Works with images** — drag-and-drop screenshots, mockups, or error dialogs directly into the conversation (details in Lesson 16).
47+
- **Works with images** — drag-and-drop screenshots, mockups, or error dialogs directly into the conversation (details in Lesson 17).
4748
- **Multiple models** — Choose between Claude Sonnet 4.5, Claude Sonnet 4, and GPT-5 with the `/model` command mid-session.
4849

4950
None of this replaces what you already know — it builds on it. If you've been using Copilot for inline completions, chat, or code explanations, Copilot CLI handles all of those and more. This tutorial shows you what's different.

0 commit comments

Comments
 (0)