Skip to content

Commit bb9a1a4

Browse files
committed
Adding diagnostic checks in codespace and local terminal setups
1 parent 49f8337 commit bb9a1a4

8 files changed

Lines changed: 85 additions & 17 deletions

workshop/06a-install-terminal.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
## 🎯 What You'll Do
77

8-
You'll verify the `gh` CLI is authenticated, install the `gh-aw` extension, and confirm it is working in your Codespace terminal.
8+
You'll verify the `gh` CLI is authenticated, install the `gh-aw` extension, and run one quick diagnostic to confirm your Codespace terminal is ready for agentic workflow setup.
99

1010
## 📋 Before You Start
1111

@@ -57,6 +57,18 @@ gh aw --version
5757

5858
You should see output like `gh-aw version 0.81.6`.
5959

60+
## Run a quick diagnostic
61+
62+
Now run:
63+
64+
```bash
65+
gh aw doctor
66+
```
67+
68+
This verifies your GitHub CLI authentication using the same setup checks `gh-aw` expects before later authoring and compile steps.
69+
70+
Expected result: a success message confirming GitHub CLI authentication. If it fails, use [Side Quest: Install gh-aw Troubleshooting](side-quest-06-01-install-troubleshooting.md), then rerun `gh aw doctor`.
71+
6072
## Initialize [agentic workflow](https://github.github.com/gh-aw/introduction/overview/) skills
6173

6274
Before you author your first workflow, initialize and push the generated skill files:
@@ -84,6 +96,7 @@ Which one sub-command do you expect to use in Step 7 when you create and run you
8496

8597
- [ ] `gh auth status` shows you are logged in to github.com
8698
- [ ] `gh aw --version` returns a version number
99+
- [ ] `gh aw doctor` completes successfully
87100
- [ ] `gh aw init` has been run in your practice repository
88101
- [ ] All files generated by `gh aw init` are committed and pushed
89102
- [ ] You can name one `gh aw` sub-command from `gh aw --help`

workshop/06b-install-local.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
## 🎯 What You'll Do
77

8-
You'll verify the `gh` CLI is authenticated, install the `gh-aw` extension, and confirm it is working in your local terminal.
8+
You'll verify the `gh` CLI is authenticated, install the `gh-aw` extension, and run one quick diagnostic to confirm your local terminal is ready for agentic workflow setup.
99

1010
## 📋 Before You Start
1111

@@ -57,6 +57,18 @@ gh aw --version
5757

5858
You should see output like `gh-aw version 0.81.6`.
5959

60+
## Run a quick diagnostic
61+
62+
Now run:
63+
64+
```bash
65+
gh aw doctor
66+
```
67+
68+
This verifies your GitHub CLI authentication using the same setup checks `gh-aw` expects before later authoring and compile steps.
69+
70+
Expected result: a success message confirming GitHub CLI authentication. If it fails, use [Side Quest: Install gh-aw Troubleshooting](side-quest-06-01-install-troubleshooting.md), then rerun `gh aw doctor`.
71+
6072
## Initialize [agentic workflow](https://github.github.com/gh-aw/introduction/overview/) skills
6173

6274
Before you author your first workflow, initialize and push the generated skill files:
@@ -84,6 +96,7 @@ Which one sub-command do you expect to use in Step 7 when you create and run you
8496

8597
- [ ] `gh auth status` shows you are logged in to github.com
8698
- [ ] `gh aw --version` returns a version number
99+
- [ ] `gh aw doctor` completes successfully
87100
- [ ] `gh aw init` has been run in your practice repository
88101
- [ ] All files generated by `gh aw init` are committed and pushed
89102
- [ ] You can name one `gh aw` sub-command from `gh aw --help`

workshop/07c-your-first-workflow-copilot.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Open your practice repository in the GitHub Copilot app and start a session in *
1616
Paste this prompt:
1717

1818
```text
19-
Create `.github/workflows/daily-report-status.md` as a GitHub Agentic Workflow.
19+
Initialize this repository for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/install.md
2020
21-
Before authoring, run `gh aw init` from the repository root, then commit and push the generated `.github/skills/agentic-workflows/` files.
21+
Then create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
2222
2323
The workflow must:
2424
- Be named "Daily Report Status"
@@ -29,9 +29,7 @@ The workflow must:
2929
"This issue has the most community support! We'll prioritise it in our next planning session."
3030
- Create an issue titled "Community Voting Test" and post the same comment if no open issues exist
3131
32-
Run `gh aw compile --validate` in the session
33-
workspace, fix any errors, commit the source and generated lock file (plus the initialized skill files), and open a
34-
pull request. Show me the diff before merging.
32+
Run `gh aw compile --validate` in the session workspace, fix any errors, commit the source and generated lock file (plus any initialized skill files), and open a pull request. Show me the diff before merging.
3533
```
3634

3735
The agent runs validation in its isolated session workspace. You do not need a terminal for this path.

workshop/07d-confirm-model-access.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,19 @@ The workflow uses the organization subscription. You do not need a personal Copi
3333

3434
Use this path for a personal repository, or when the owning organization does not provide centralized Copilot billing.
3535

36-
1. Complete [Method 2: `COPILOT_GITHUB_TOKEN`](side-quest-06-03b-copilot-github-token.md), or use its [GitHub UI-only path](side-quest-06-03c-copilot-github-token-ui-only.md).
37-
2. Remove `copilot-requests: write` from `daily-report-status.md`.
38-
3. Recompile and commit `daily-report-status.lock.yml` as described in the method guide.
36+
1. Remove `copilot-requests: write` from `daily-report-status.md`.
37+
2. If you are using a terminal, run:
38+
39+
40+
```bash
41+
gh aw secrets bootstrap --engine copilot
42+
```
43+
44+
This guided flow checks whether `COPILOT_GITHUB_TOKEN` is needed, prompts for it if missing, and stores it as a repository secret.
45+
3. If you are staying in the browser, use [Method 2 (UI-only)](side-quest-06-03c-copilot-github-token-ui-only.md).
46+
4. Recompile and commit `daily-report-status.lock.yml`.
47+
48+
If you want the full manual PAT procedure, use [Method 2: `COPILOT_GITHUB_TOKEN`](side-quest-06-03b-copilot-github-token.md).
3949

4050
> [!IMPORTANT]
4151
> When `copilot-requests: write` is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference. Remove the permission and recompile when you choose personal billing.

workshop/10-choose-your-scenario.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ Use the **Agentic Workflows** agent in the GitHub Copilot app or Agents tab to c
121121
Describe your intent in plain language — the agent handles the workflow format, compilation, and pull request for you:
122122

123123
```
124-
Create a daily status workflow that posts a summary of open PRs and issues to an issue comment every day.
124+
Initialize this repository for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/install.md
125+
126+
Then create a workflow for GitHub Agentic Workflows using https://raw.githubusercontent.com/github/gh-aw/main/create.md
127+
128+
The purpose of the workflow is a daily status report on recent repository activity, delivered as an issue comment. Summarize open pull requests and open issues every day.
125129
```
126130

127131
The agent creates the workflow, compiles it, and opens a pull request. Review the diff and merge it into `main`.

workshop/11d-build-copilot-agents.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ The prompt below tells the agent two things:
6868
Copy and paste the following prompt into the Agents session input:
6969

7070
```
71-
Read the agentic workflow creation guide at:
71+
Initialize this repository for GitHub Agentic Workflows using:
72+
https://raw.githubusercontent.com/github/gh-aw/main/install.md
73+
74+
Then read the agentic workflow creation guide at:
7275
https://github.com/github/gh-aw/blob/main/create.md
7376
7477
Then create a daily repository status report agentic workflow for this repository.
@@ -93,7 +96,10 @@ Commit the `.md` file and the generated `.lock.yml`, then open a pull request fo
9396
Copy and paste the following prompt into the Agents session input:
9497

9598
```
96-
Read the agentic workflow creation guide at:
99+
Initialize this repository for GitHub Agentic Workflows using:
100+
https://raw.githubusercontent.com/github/gh-aw/main/install.md
101+
102+
Then read the agentic workflow creation guide at:
97103
https://github.com/github/gh-aw/blob/main/create.md
98104
99105
Then create a daily documentation health report agentic workflow for this repository.
@@ -118,7 +124,10 @@ Commit the `.md` file and the generated `.lock.yml`, then open a pull request fo
118124
Copy and paste the following prompt into the Agents session input:
119125

120126
```
121-
Read the agentic workflow creation guide at:
127+
Initialize this repository for GitHub Agentic Workflows using:
128+
https://raw.githubusercontent.com/github/gh-aw/main/install.md
129+
130+
Then read the agentic workflow creation guide at:
122131
https://github.com/github/gh-aw/blob/main/create.md
123132
124133
Then create a pull request code reviewer agentic workflow for this repository.

workshop/side-quest-06-03-copilot-token.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111

1212
Agentic workflows call the GitHub Copilot API at runtime to run AI reasoning steps. Without a valid credential, every call returns `401 Unauthorized` and the workflow fails immediately. Configuring authentication once, before you run a workflow, ensures your agent can reach Copilot reliably on every future run.
1313

14+
If you are using a terminal, prefer the guided `gh-aw` setup flows where possible:
15+
16+
- `gh aw secrets bootstrap --engine copilot` after you choose personal billing
17+
- `gh aw add-wizard ...` when you are installing a curated workflow and want setup prompts inline
18+
19+
Use the manual guides below when you need or prefer the step-by-step browser procedure.
20+
1421
## Choose your method
1522

1623
Choose the method that fits your situation:

workshop/side-quest-06-03b-copilot-github-token.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,21 @@ If you want an all-UI path with no terminal commands, use [Method 2 (UI-only)](s
1111
- You have a GitHub account with an active Copilot subscription.
1212
- You have read [Side Quest: Configure GitHub Copilot Authentication](side-quest-06-03-copilot-token.md) and chosen Method 2.
1313

14-
## ✏️ Sub-exercise A: Generate the token
14+
## Shortest terminal path
15+
16+
If your workflow currently includes `copilot-requests: write`, remove that line first. When it is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference.
17+
18+
Then run:
19+
20+
```bash
21+
gh aw secrets bootstrap --engine copilot
22+
```
23+
24+
This guided flow checks whether the secret is missing, walks you through creating or pasting a valid fine-grained PAT, and stores it as `COPILOT_GITHUB_TOKEN`.
25+
26+
If you prefer to create and store the PAT manually, follow the full procedure below.
27+
28+
## ✏️ Sub-exercise A: Generate the token manually
1529

1630
1. Go to [github.com/settings/tokens](https://github.com/settings/tokens) and click **Generate new token (fine-grained)**.
1731
2. Name the token (for example, `gh-aw-copilot`) and set an expiry (90 days is a common default).
@@ -33,7 +47,7 @@ Replace `YYYY-MM-DD` with your token expiry date.
3347
- [ ] I copied the token value before leaving the page
3448
- [ ] I noted the token rotation date
3549

36-
## ✏️ Sub-exercise B: Store the secret
50+
## ✏️ Sub-exercise B: Store the secret manually
3751

3852
Store the token as a repository secret:
3953

@@ -56,7 +70,7 @@ You should see `COPILOT_GITHUB_TOKEN` in the output. Once confirmed, you can saf
5670

5771
## Select the token in your workflow
5872

59-
Remove `copilot-requests: write` from the source workflow. When that permission is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference.
73+
If you have not already done so, remove `copilot-requests: write` from the source workflow. When that permission is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference.
6074

6175
```bash
6276
gh aw compile

0 commit comments

Comments
 (0)