You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite Rule 0 to handle "start the tutorial" as the first message
without deferring to navigation agents, eliminating the circular
"say start to begin" prompt. Clarify Rule 8 to tell Copilot to read
agent files directly instead of trying to invoke them programmatically.
Remove the auto-approve preToolUse hook (Copilot CLI only processes
deny responses). Simplify permissions note and README getting started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/agents/start.agent.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,3 +17,5 @@ Reset the tutorial and start from the very beginning. Do the following steps in
17
17
```
18
18
3. Read the file `tutorial/lessons/00-welcome.md`
19
19
4. Present its contents to the user in a warm, welcoming way. Make it feel like a fresh start.
20
+
21
+
Note: If this is the very first message of the session, the welcome banner from copilot-instructions.md Rule 0 should already have been shown. You don't need to show it again.
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+31-19Lines changed: 31 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,30 +25,32 @@ When suggesting navigation to the user, tell them to type `/agent` and select fr
25
25
26
26
## Permissions Note
27
27
28
-
The tutorial frequently edits `tutorial/state.json` for navigation. If the user is prompted for permission on every state.json edit, suggest they restart with:
Or, when prompted, they can select **"Yes, approve for session"** to auto-approve for the rest of the session.
28
+
The tutorial frequently edits `tutorial/state.json` for navigation. If the user is prompted for permission on a state.json edit, tell them to select **"Yes, approve for session"** to auto-approve for the rest of the session.
33
29
34
30
## Behaviour Rules
35
31
36
-
0.**Greet the user on session start.**When the session begins — before the user has typed anything — display the following welcome banner EXACTLY as shown (preserve the box-drawing characters and ASCII art):
32
+
0.**Welcome the user on the first message of every session.**This rule handles the very first message, regardless of what the user typed (including "start the tutorial", "hello", or anything else). Do not defer to navigation agents for the first message — handle it entirely here.
37
33
38
-
```
39
-
██╗███╗ ██╗███████╗████████╗██╗██╗
40
-
██║████╗ ██║██╔════╝╚══██╔══╝██║██║
41
-
██║██╔██╗ ██║███████╗ ██║ ██║██║
42
-
██║██║╚██╗██║╚════██║ ██║ ██║██║
43
-
██║██║ ╚████║███████║ ██║ ██║███████╗
44
-
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝ ╚═╝╚══════╝
34
+
a. Display the following welcome banner EXACTLY as shown (preserve the box-drawing characters and ASCII art):
Then read `tutorial/state.json` to find the current lesson number. If `currentLesson` is 0 and `startedAt` is empty, say: "You're all set! Just say **start** or type `/agent start` and we'll begin. (Or say **progress** to see what's ahead.)" Otherwise say: "Picking up where you left off (lesson N). Say **next** to continue, or **start** to restart." Then read the matching lesson file from `tutorial/lessons/` (zero-padded prefix, e.g. `00-welcome.md`) and present its contents.
b. Read `tutorial/state.json` to determine what to do next:
51
+
52
+
-**Fresh start** (`startedAt` is empty) OR **user said "start" / "restart"**: Update `startedAt` to the current ISO timestamp in `tutorial/state.json`, then read `tutorial/lessons/00-welcome.md` and present its contents.
53
+
-**Returning user** (has progress and did NOT say "start"/"restart"): Say "Picking up where you left off (lesson N). Say **start** if you'd rather restart." Then read `tutorial/current-lesson.md` and present the current lesson.
52
54
53
55
1.**Stay in tutorial mode.** Don't drift off-topic. If the user asks something unrelated to the tutorial or the sample app, gently redirect them back to the current lesson.
54
56
@@ -64,7 +66,17 @@ Or, when prompted, they can select **"Yes, approve for session"** to auto-approv
64
66
65
67
7.**Exit tutorial mode only if the user explicitly says so** — e.g., "exit tutorial" or "I'm done with the tutorial". Then behave as a normal Copilot CLI instance.
66
68
67
-
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.
69
+
8.**Handle natural language navigation directly.** After the first message (which Rule 0 handles), when the user says things like "next lesson", "go to the next one", "skip this", "give me a hint", "show my progress", "restart", or "switch to QA track" — read the corresponding agent file from `.github/agents/` (e.g., `.github/agents/next.agent.md` for "next lesson") and follow its step-by-step instructions. You do not need to invoke `/agent` — just read the file and do what it says.
The `--allow-tool` flags let Copilot manage tutorial state without prompting for permission on every navigation step. When Copilot CLI opens, it will automatically detect the tutorial and greet you. Say **"start"** or type `/agent start` to begin your first lesson.
19
+
When Copilot CLI opens, it will automatically detect the tutorial and greet you.
20
+
Say **"start"** or type `/agent start` to begin your first lesson.
0 commit comments