Skip to content

Commit e85b4d5

Browse files
fix(cli): point runtime URLs and init templates at github/squad (#2412)
* fix(cli): point runtime URLs and init templates at github/squad - squad upgrade release URL, the .ai-team migration notice and the SDK's report URL - state-backend docs link (also fixes a pre-existing 404) - squad init templates: session-init-reference, gh-auth-isolation, pr-review-response, external-comms, tiered-memory, github-multi-account - test/repo-links.test.ts guards user-facing links Closes #2404 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs(skills): pick the gh alias by push access throughout github-multi-account This PR replaced the hardcoded repo binding with a push-permission check, but usage rule 3 still chose the alias by repo owner, and the Step 5 message to the user said the same, so the skill contradicted itself (flagged in Copilot review). Point rule 3 at the permission check and reword the Step 5 message to match. Synced to the root, CLI and SDK template mirrors and the repo-local copy. Refs #2404 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bf8136f commit e85b4d5

31 files changed

Lines changed: 334 additions & 163 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@bradygaster/squad-cli': patch
3+
'@bradygaster/squad-sdk': patch
4+
---
5+
6+
Point the CLI and SDK's user-facing links (release notes, issue and bug-report links, and the git-notes migration guide, which previously linked a page that didn't exist) and the templates `squad init` ships at the repository's new home, `github/squad`.

‎.copilot/skills/github-multi-account/SKILL.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,26 @@ ghw api user --jq '.login' # should show work username
7272
```
7373

7474
### Step 5: Tell the user
75-
"All set! From now on use `ghp` for personal repos and `ghw` for work repos. I'll use them too."
75+
"All set! `ghp` uses your personal account and `ghw` your work account. For each repo, I'll use whichever one can push to it."
7676

7777
## After Setup — Usage Rules
7878

7979
1. **NEVER** use bare `gh` for repo operations — always `ghp` or `ghw`
8080
2. **NEVER** manually `gh auth switch` — the aliases handle it
81-
3. Determine alias by repo owner:
82-
- Personal account repos → `ghp` / `gh-personal`
83-
- Work/EMU account repos → `ghw` / `gh-work`
81+
3. Pick the alias by which account can write to the repo, not by who owns it; see **Repo-Specific Account Binding** below.
8482

8583
## Repo-Specific Account Binding
8684

87-
This repo (`bradygaster/squad`) is bound to the **bradygaster** (personal) account.
88-
All `gh` operations in this repo MUST use `ghp` / `gh-personal`.
85+
Pick the alias by which account can write to the repo, not by the repo's name. Squad itself lives at `github/squad`, which the `github` organization owns, so don't assume your personal account. Check once before the first write and use the alias that prints `true` (gh fills in `{owner}` and `{repo}` from the current checkout):
86+
```powershell
87+
ghp api 'repos/{owner}/{repo}' --jq '.permissions.push'
88+
ghw api 'repos/{owner}/{repo}' --jq '.permissions.push'
89+
```
90+
If neither prints `true`, neither account can push there; work from a fork.
8991

9092
## For Squad Agents
91-
At the TOP of any script touching GitHub, define:
93+
At the TOP of any script touching GitHub, define the aliases with the usernames the user confirmed in Step 2:
9294
```powershell
93-
function gh-personal { gh auth switch --user bradygaster 2>$null | Out-Null; gh @args }
94-
function gh-work { gh auth switch --user bradyg_microsoft 2>$null | Out-Null; gh @args }
95+
function gh-personal { gh auth switch --user THEIR_PERSONAL_USERNAME 2>$null | Out-Null; gh @args }
96+
function gh-work { gh auth switch --user THEIR_WORK_USERNAME 2>$null | Out-Null; gh @args }
9597
```

‎.squad-templates/session-init-reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Do not mention the update check, the cache, or the mechanism. Just the notice.
149149
release notes:
150150

151151
```
152-
gh api repos/bradygaster/squad/releases --jq '[.[] | select(.tag_name | test("^v"))]'
152+
gh api repos/github/squad/releases --jq '[.[] | select(.tag_name | test("^v"))]'
153153
```
154154

155155
- Extract 3–6 bullet points from releases between `oldVersion` and
@@ -164,7 +164,7 @@ Do not mention the update check, the cache, or the mechanism. Just the notice.
164164
```
165165
- **Fallback chain:**
166166
- `gh` not authenticated → "See full release notes at:
167-
https://github.com/bradygaster/squad/releases"
167+
https://github.com/github/squad/releases"
168168
- No releases found → "No release notes found for this version range."
169169
- Network failure → link to releases page
170170

‎.squad-templates/skills/external-comms/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ We reproduced the issue in preview builds and we're checking the regression poin
229229
Let us know if you can share the command you ran right before the failure.
230230

231231
## Post Result (post, delete actions)
232-
https://github.com/bradygaster/squad/issues/426#issuecomment-123456
232+
https://github.com/github/squad/issues/426#issuecomment-123456
233233
```
234234

235235
### T1 — Welcome

‎.squad-templates/skills/gh-auth-isolation/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ git remote set-url origin https://github.com/personaluser/personaluser.github.io
139139
### ✓ Correct: Agent creates a PR from personal fork to upstream
140140

141141
```powershell
142-
# Fork: personaluser/squad, Upstream: bradygaster/squad
142+
# Fork: personaluser/squad, Upstream: github/squad
143143
# Agent is on branch contrib/fix-docs in the fork clone
144144
145145
git push origin contrib/fix-docs # Pushes to fork (may need token auth)
146146
147147
# Create PR targeting upstream
148-
gh pr create --repo bradygaster/squad --head personaluser:contrib/fix-docs `
148+
gh pr create --repo github/squad --head personaluser:contrib/fix-docs `
149149
--title "docs: fix installation guide" `
150150
--body "Fixes #123"
151151
```

‎.squad-templates/skills/github-multi-account/SKILL.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,26 @@ ghw api user --jq '.login' # should show work username
7272
```
7373

7474
### Step 5: Tell the user
75-
"All set! From now on use `ghp` for personal repos and `ghw` for work repos. I'll use them too."
75+
"All set! `ghp` uses your personal account and `ghw` your work account. For each repo, I'll use whichever one can push to it."
7676

7777
## After Setup — Usage Rules
7878

7979
1. **NEVER** use bare `gh` for repo operations — always `ghp` or `ghw`
8080
2. **NEVER** manually `gh auth switch` — the aliases handle it
81-
3. Determine alias by repo owner:
82-
- Personal account repos → `ghp` / `gh-personal`
83-
- Work/EMU account repos → `ghw` / `gh-work`
81+
3. Pick the alias by which account can write to the repo, not by who owns it; see **Repo-Specific Account Binding** below.
8482

8583
## Repo-Specific Account Binding
8684

87-
This repo (`bradygaster/squad`) is bound to the **bradygaster** (personal) account.
88-
All `gh` operations in this repo MUST use `ghp` / `gh-personal`.
85+
Pick the alias by which account can write to the repo, not by the repo's name. Squad itself lives at `github/squad`, which the `github` organization owns, so don't assume your personal account. Check once before the first write and use the alias that prints `true` (gh fills in `{owner}` and `{repo}` from the current checkout):
86+
```powershell
87+
ghp api 'repos/{owner}/{repo}' --jq '.permissions.push'
88+
ghw api 'repos/{owner}/{repo}' --jq '.permissions.push'
89+
```
90+
If neither prints `true`, neither account can push there; work from a fork.
8991

9092
## For Squad Agents
91-
At the TOP of any script touching GitHub, define:
93+
At the TOP of any script touching GitHub, define the aliases with the usernames the user confirmed in Step 2:
9294
```powershell
93-
function gh-personal { gh auth switch --user bradygaster 2>$null | Out-Null; gh @args }
94-
function gh-work { gh auth switch --user bradyg_microsoft 2>$null | Out-Null; gh @args }
95+
function gh-personal { gh auth switch --user THEIR_PERSONAL_USERNAME 2>$null | Out-Null; gh @args }
96+
function gh-work { gh auth switch --user THEIR_WORK_USERNAME 2>$null | Out-Null; gh @args }
9597
```

‎.squad-templates/skills/pr-review-response/SKILL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ gh api repos/{owner}/{repo}/pulls/{pr_number}/comments/{comment_id}/replies \
8686

8787
```bash
8888
# Specific and traceable
89-
gh api repos/bradygaster/squad/pulls/42/comments/18234/replies \
89+
gh api repos/github/squad/pulls/42/comments/18234/replies \
9090
-f body="Fixed in a1b2c3d — switched to path.dirname(squadDirInfo.path) for worktree consistency"
9191

9292
# When applying a suggested code change
93-
gh api repos/bradygaster/squad/pulls/42/comments/18235/replies \
93+
gh api repos/github/squad/pulls/42/comments/18235/replies \
9494
-f body="Applied suggestion — updated error message to include the file path for debuggability"
9595

9696
# When pushing back on a suggestion
97-
gh api repos/bradygaster/squad/pulls/42/comments/18236/replies \
97+
gh api repos/github/squad/pulls/42/comments/18236/replies \
9898
-f body="Considered but not applied — this path needs to stay absolute because worktree resolution depends on it. See detectSquadDir() in detect-squad-dir.ts."
9999
```
100100

@@ -186,7 +186,7 @@ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
186186
3. Commit: `fix: add null check for squadDir (PR #99 review)`
187187
4. Reply:
188188
```bash
189-
gh api repos/bradygaster/squad/pulls/99/comments/55123/replies \
189+
gh api repos/github/squad/pulls/99/comments/55123/replies \
190190
-f body="Fixed in f4e5d6c — added early return when squadDir is undefined, matching the pattern in loadConfig()"
191191
```
192192
5. Resolve the thread (Copilot → agent, safe to resolve)
@@ -211,13 +211,13 @@ git commit -m "fix: address 3 review comments on PR #99
211211
git push
212212

213213
# Reply to each thread individually
214-
gh api repos/bradygaster/squad/pulls/99/comments/55123/replies \
214+
gh api repos/github/squad/pulls/99/comments/55123/replies \
215215
-f body="Fixed — added early return when squadDir is undefined"
216216

217-
gh api repos/bradygaster/squad/pulls/99/comments/55124/replies \
217+
gh api repos/github/squad/pulls/99/comments/55124/replies \
218218
-f body="Fixed — switched to path.join(squadDir, 'config.json') for cross-platform consistency"
219219

220-
gh api repos/bradygaster/squad/pulls/99/comments/55125/replies \
220+
gh api repos/github/squad/pulls/99/comments/55125/replies \
221221
-f body="Fixed — changed from console.log to debug() so it only shows with --verbose flag"
222222
```
223223

@@ -235,13 +235,13 @@ const name = config?.agent?.name ?? 'default';
235235

236236
**Reply format when applying:**
237237
```bash
238-
gh api repos/bradygaster/squad/pulls/99/comments/55130/replies \
238+
gh api repos/github/squad/pulls/99/comments/55130/replies \
239239
-f body="Applied suggestion — using optional chaining with nullish coalescing"
240240
```
241241

242242
**Reply format when not applying:**
243243
```bash
244-
gh api repos/bradygaster/squad/pulls/99/comments/55130/replies \
244+
gh api repos/github/squad/pulls/99/comments/55130/replies \
245245
-f body="Not applied — config is guaranteed non-null at this point (validated on line 12). Optional chaining would mask errors."
246246
```
247247

@@ -250,7 +250,7 @@ gh api repos/bradygaster/squad/pulls/99/comments/55130/replies \
250250
Not every review comment should be accepted. When a suggestion is incorrect or doesn't apply:
251251

252252
```bash
253-
gh api repos/bradygaster/squad/pulls/99/comments/55140/replies \
253+
gh api repos/github/squad/pulls/99/comments/55140/replies \
254254
-f body="Considered but not applied — this file is in the zero-dependency bootstrap set (see copilot-instructions.md § Protected Files). Adding path.join() would require importing from the SDK, which breaks the bootstrap constraint."
255255
```
256256

‎.squad-templates/skills/tiered-memory/SKILL.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source: design proposal
88

99
# Skill: Tiered Agent Memory
1010

11-
> **Status (v0.10.0):** This skill describes a **design proposal**, not a shipped runtime. Skill files install via `squad init`/`upgrade`, but the underlying tier scaffolding (`.squad/memory/hot/`, `cold/`, `wiki/`), Scribe promotion logic, and spawn-template tier-aware reads are tracked in [bradygaster/squad#1264](https://github.com/bradygaster/squad/issues/1264). Until those land, agents continue to load full `history.md` + `decisions.md` on every spawn.
11+
> **Status (v0.10.0):** This skill describes a **design proposal**, not a shipped runtime. Skill files install via `squad init`/`upgrade`, but the underlying tier scaffolding (`.squad/memory/hot/`, `cold/`, `wiki/`), Scribe promotion logic, and spawn-template tier-aware reads are tracked in [bradygaster/squad#1264](https://github.com/github/squad/issues/1264). Until those land, agents continue to load full `history.md` + `decisions.md` on every spawn.
1212
1313
## Overview
1414

@@ -116,9 +116,9 @@ Until then, see the Scribe charter for current behavior: `.squad/agents/scribe/c
116116

117117
## References
118118

119-
- Tracking issue: [bradygaster/squad#1264](https://github.com/bradygaster/squad/issues/1264) — installation gap + runtime status
120-
- Original design spike: [bradygaster/squad#686](https://github.com/bradygaster/squad/issues/686) — tiered memory implementation plan
121-
- Related: [bradygaster/squad#600](https://github.com/bradygaster/squad/issues/600) — context payload growth
119+
- Tracking issue: [bradygaster/squad#1264](https://github.com/github/squad/issues/1264) — installation gap + runtime status
120+
- Original design spike: [bradygaster/squad#686](https://github.com/github/squad/issues/686) — tiered memory implementation plan
121+
- Related: [bradygaster/squad#600](https://github.com/github/squad/issues/600) — context payload growth
122122

123123
---
124124

@@ -217,4 +217,4 @@ If blocked or uncertain:
217217
- Hot tier is always included; keep it focused
218218
- Cold adds a summary; only include when history is relevant
219219
- Wiki adds variable size; only include specific relevant docs
220-
- Runtime backing is tracked in [bradygaster/squad#1264](https://github.com/bradygaster/squad/issues/1264) — until those changes land, this skill is design-only and agents continue to load full history.md + decisions.md on every spawn
220+
- Runtime backing is tracked in [bradygaster/squad#1264](https://github.com/github/squad/issues/1264) — until those changes land, this skill is design-only and agents continue to load full history.md + decisions.md on every spawn

‎packages/squad-cli/src/cli/core/init.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function showDeprecationWarning(): void {
161161
console.log();
162162
console.log(`${YELLOW}⚠️ DEPRECATION: .ai-team/ is deprecated and will be removed in v1.0.0${RESET}`);
163163
console.log(`${YELLOW} Run 'npx @bradygaster/squad-cli upgrade --migrate-directory' to migrate to .squad/${RESET}`);
164-
console.log(`${YELLOW} Details: https://github.com/bradygaster/squad/issues/101${RESET}`);
164+
console.log(`${YELLOW} Details: https://github.com/github/squad/issues/101${RESET}`);
165165
console.log();
166166
}
167167

‎packages/squad-cli/src/cli/upgrade.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export async function checkForUpdate(
210210

211211
return {
212212
newVersion: latest,
213-
releaseUrl: `https://github.com/bradygaster/squad/releases/tag/v${latest}`,
213+
releaseUrl: `https://github.com/github/squad/releases/tag/v${latest}`,
214214
changelog: `Update from ${currentVersion} to ${latest}`,
215215
};
216216
}

0 commit comments

Comments
 (0)