@bradygaster/squad-cli 0.8.24 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +284 -32
  2. package/dist/cli/commands/aspire.d.ts.map +1 -1
  3. package/dist/cli/commands/aspire.js +3 -0
  4. package/dist/cli/commands/aspire.js.map +1 -1
  5. package/dist/cli/commands/build.js +3 -3
  6. package/dist/cli/commands/build.js.map +1 -1
  7. package/dist/cli/commands/cast.d.ts +13 -0
  8. package/dist/cli/commands/cast.d.ts.map +1 -0
  9. package/dist/cli/commands/cast.js +77 -0
  10. package/dist/cli/commands/cast.js.map +1 -0
  11. package/dist/cli/commands/cost.d.ts +2 -0
  12. package/dist/cli/commands/cost.d.ts.map +1 -0
  13. package/dist/cli/commands/cost.js +170 -0
  14. package/dist/cli/commands/cost.js.map +1 -0
  15. package/dist/cli/commands/cross-squad.d.ts +12 -0
  16. package/dist/cli/commands/cross-squad.d.ts.map +1 -0
  17. package/dist/cli/commands/cross-squad.js +80 -0
  18. package/dist/cli/commands/cross-squad.js.map +1 -0
  19. package/dist/cli/commands/doctor.d.ts +5 -0
  20. package/dist/cli/commands/doctor.d.ts.map +1 -1
  21. package/dist/cli/commands/doctor.js +156 -0
  22. package/dist/cli/commands/doctor.js.map +1 -1
  23. package/dist/cli/commands/economy.d.ts +10 -0
  24. package/dist/cli/commands/economy.d.ts.map +1 -0
  25. package/dist/cli/commands/economy.js +64 -0
  26. package/dist/cli/commands/economy.js.map +1 -0
  27. package/dist/cli/commands/export.d.ts.map +1 -1
  28. package/dist/cli/commands/export.js +11 -4
  29. package/dist/cli/commands/export.js.map +1 -1
  30. package/dist/cli/commands/import.js +2 -2
  31. package/dist/cli/commands/import.js.map +1 -1
  32. package/dist/cli/commands/personal.d.ts +16 -0
  33. package/dist/cli/commands/personal.d.ts.map +1 -0
  34. package/dist/cli/commands/personal.js +213 -0
  35. package/dist/cli/commands/personal.js.map +1 -0
  36. package/dist/cli/commands/roles.d.ts +2 -0
  37. package/dist/cli/commands/roles.d.ts.map +1 -0
  38. package/dist/cli/commands/roles.js +54 -0
  39. package/dist/cli/commands/roles.js.map +1 -0
  40. package/dist/cli/commands/schedule.d.ts +14 -0
  41. package/dist/cli/commands/schedule.d.ts.map +1 -0
  42. package/dist/cli/commands/schedule.js +208 -0
  43. package/dist/cli/commands/schedule.js.map +1 -0
  44. package/dist/cli/commands/watch.d.ts.map +1 -1
  45. package/dist/cli/commands/watch.js +17 -5
  46. package/dist/cli/commands/watch.js.map +1 -1
  47. package/dist/cli/core/cast.d.ts +9 -0
  48. package/dist/cli/core/cast.d.ts.map +1 -1
  49. package/dist/cli/core/cast.js +170 -60
  50. package/dist/cli/core/cast.js.map +1 -1
  51. package/dist/cli/core/detect-squad-dir.d.ts +10 -0
  52. package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
  53. package/dist/cli/core/detect-squad-dir.js +47 -0
  54. package/dist/cli/core/detect-squad-dir.js.map +1 -1
  55. package/dist/cli/core/init.d.ts +8 -0
  56. package/dist/cli/core/init.d.ts.map +1 -1
  57. package/dist/cli/core/init.js +115 -2
  58. package/dist/cli/core/init.js.map +1 -1
  59. package/dist/cli/core/migrations.d.ts.map +1 -1
  60. package/dist/cli/core/migrations.js +21 -0
  61. package/dist/cli/core/migrations.js.map +1 -1
  62. package/dist/cli/core/templates.d.ts.map +1 -1
  63. package/dist/cli/core/templates.js +8 -1
  64. package/dist/cli/core/templates.js.map +1 -1
  65. package/dist/cli/core/upgrade.d.ts +14 -0
  66. package/dist/cli/core/upgrade.d.ts.map +1 -1
  67. package/dist/cli/core/upgrade.js +182 -48
  68. package/dist/cli/core/upgrade.js.map +1 -1
  69. package/dist/cli/core/version.js +2 -2
  70. package/dist/cli/core/version.js.map +1 -1
  71. package/dist/cli/index.d.ts +2 -0
  72. package/dist/cli/index.d.ts.map +1 -1
  73. package/dist/cli/index.js +2 -0
  74. package/dist/cli/index.js.map +1 -1
  75. package/dist/cli/self-update.d.ts +21 -0
  76. package/dist/cli/self-update.d.ts.map +1 -0
  77. package/dist/cli/self-update.js +113 -0
  78. package/dist/cli/self-update.js.map +1 -0
  79. package/dist/cli/shell/autocomplete.d.ts.map +1 -1
  80. package/dist/cli/shell/autocomplete.js +5 -0
  81. package/dist/cli/shell/autocomplete.js.map +1 -1
  82. package/dist/cli/shell/commands.d.ts.map +1 -1
  83. package/dist/cli/shell/commands.js +55 -24
  84. package/dist/cli/shell/commands.js.map +1 -1
  85. package/dist/cli/shell/components/AgentPanel.d.ts.map +1 -1
  86. package/dist/cli/shell/components/AgentPanel.js +21 -6
  87. package/dist/cli/shell/components/AgentPanel.js.map +1 -1
  88. package/dist/cli/shell/components/App.d.ts.map +1 -1
  89. package/dist/cli/shell/components/App.js +33 -15
  90. package/dist/cli/shell/components/App.js.map +1 -1
  91. package/dist/cli/shell/components/InputPrompt.js +1 -1
  92. package/dist/cli/shell/components/InputPrompt.js.map +1 -1
  93. package/dist/cli/shell/components/MessageStream.d.ts +2 -0
  94. package/dist/cli/shell/components/MessageStream.d.ts.map +1 -1
  95. package/dist/cli/shell/components/MessageStream.js +20 -20
  96. package/dist/cli/shell/components/MessageStream.js.map +1 -1
  97. package/dist/cli/shell/components/ThinkingIndicator.d.ts +4 -0
  98. package/dist/cli/shell/components/ThinkingIndicator.d.ts.map +1 -1
  99. package/dist/cli/shell/components/ThinkingIndicator.js +23 -4
  100. package/dist/cli/shell/components/ThinkingIndicator.js.map +1 -1
  101. package/dist/cli/shell/coordinator.d.ts +7 -0
  102. package/dist/cli/shell/coordinator.d.ts.map +1 -1
  103. package/dist/cli/shell/coordinator.js +206 -88
  104. package/dist/cli/shell/coordinator.js.map +1 -1
  105. package/dist/cli/shell/error-messages.d.ts +14 -0
  106. package/dist/cli/shell/error-messages.d.ts.map +1 -1
  107. package/dist/cli/shell/error-messages.js +65 -1
  108. package/dist/cli/shell/error-messages.js.map +1 -1
  109. package/dist/cli/shell/index.d.ts +1 -1
  110. package/dist/cli/shell/index.d.ts.map +1 -1
  111. package/dist/cli/shell/index.js +83 -12
  112. package/dist/cli/shell/index.js.map +1 -1
  113. package/dist/cli/shell/router.d.ts.map +1 -1
  114. package/dist/cli/shell/router.js +21 -2
  115. package/dist/cli/shell/router.js.map +1 -1
  116. package/dist/cli/shell/stream-bridge.d.ts +2 -0
  117. package/dist/cli/shell/stream-bridge.d.ts.map +1 -1
  118. package/dist/cli/shell/stream-bridge.js +11 -2
  119. package/dist/cli/shell/stream-bridge.js.map +1 -1
  120. package/dist/cli/shell/terminal.d.ts +5 -5
  121. package/dist/cli/shell/terminal.d.ts.map +1 -1
  122. package/dist/cli/shell/terminal.js +35 -26
  123. package/dist/cli/shell/terminal.js.map +1 -1
  124. package/dist/cli-entry.js +140 -43
  125. package/dist/cli-entry.js.map +1 -1
  126. package/package.json +20 -4
  127. package/scripts/patch-esm-imports.mjs +84 -55
  128. package/scripts/patch-ink-rendering.mjs +115 -0
  129. package/templates/casting/Futurama.json +10 -0
  130. package/templates/casting-policy.json +4 -2
  131. package/templates/casting-reference.md +104 -0
  132. package/templates/cooperative-rate-limiting.md +229 -0
  133. package/templates/issue-lifecycle.md +412 -0
  134. package/templates/keda-scaler.md +164 -0
  135. package/templates/machine-capabilities.md +75 -0
  136. package/templates/orchestration-log.md +1 -1
  137. package/templates/ralph-circuit-breaker.md +313 -0
  138. package/templates/routing.md +5 -20
  139. package/templates/scribe-charter.md +1 -1
  140. package/templates/skills/agent-collaboration/SKILL.md +42 -0
  141. package/templates/skills/agent-conduct/SKILL.md +24 -0
  142. package/templates/skills/architectural-proposals/SKILL.md +151 -0
  143. package/templates/skills/ci-validation-gates/SKILL.md +84 -0
  144. package/templates/skills/cli-wiring/SKILL.md +47 -0
  145. package/templates/skills/client-compatibility/SKILL.md +89 -0
  146. package/templates/skills/cross-squad/SKILL.md +114 -0
  147. package/templates/skills/distributed-mesh/SKILL.md +287 -0
  148. package/templates/skills/distributed-mesh/mesh.json.example +30 -0
  149. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -0
  150. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -0
  151. package/templates/skills/docs-standards/SKILL.md +71 -0
  152. package/templates/skills/economy-mode/SKILL.md +114 -0
  153. package/templates/skills/external-comms/SKILL.md +329 -0
  154. package/templates/skills/gh-auth-isolation/SKILL.md +183 -0
  155. package/templates/skills/git-workflow/SKILL.md +204 -0
  156. package/templates/skills/github-multi-account/SKILL.md +95 -0
  157. package/templates/skills/history-hygiene/SKILL.md +36 -0
  158. package/templates/skills/humanizer/SKILL.md +105 -0
  159. package/templates/skills/init-mode/SKILL.md +102 -0
  160. package/templates/skills/model-selection/SKILL.md +117 -0
  161. package/templates/skills/nap/SKILL.md +24 -0
  162. package/templates/skills/personal-squad/SKILL.md +57 -0
  163. package/templates/skills/release-process/SKILL.md +423 -0
  164. package/templates/skills/reskill/SKILL.md +92 -0
  165. package/templates/skills/reviewer-protocol/SKILL.md +79 -0
  166. package/templates/skills/secret-handling/SKILL.md +200 -0
  167. package/templates/skills/session-recovery/SKILL.md +155 -0
  168. package/templates/skills/test-discipline/SKILL.md +37 -0
  169. package/templates/skills/windows-compatibility/SKILL.md +74 -0
  170. package/templates/squad.agent.md +1287 -1146
  171. package/templates/workflows/squad-docs.yml +8 -4
  172. package/templates/workflows/squad-heartbeat.yml +3 -4
@@ -0,0 +1,183 @@
1
+ ---
2
+ name: "gh-auth-isolation"
3
+ description: "Safely manage multiple GitHub identities (EMU + personal) in agent workflows"
4
+ domain: "security, github-integration, authentication, multi-account"
5
+ confidence: "high"
6
+ source: "earned (production usage across 50+ sessions with EMU corp + personal GitHub accounts)"
7
+ tools:
8
+ - name: "gh"
9
+ description: "GitHub CLI for authenticated operations"
10
+ when: "When accessing GitHub resources requiring authentication"
11
+ ---
12
+
13
+ ## Context
14
+
15
+ Many developers use GitHub through an Enterprise Managed User (EMU) account at work while maintaining a personal GitHub account for open-source contributions. AI agents spawned by Squad inherit the shell's default `gh` authentication — which is usually the EMU account. This causes failures when agents try to push to personal repos, create PRs on forks, or interact with resources outside the enterprise org.
16
+
17
+ This skill teaches agents how to detect the active identity, switch contexts safely, and avoid mixing credentials across operations.
18
+
19
+ ## Patterns
20
+
21
+ ### Detect Current Identity
22
+
23
+ Before any GitHub operation, check which account is active:
24
+
25
+ ```bash
26
+ gh auth status
27
+ ```
28
+
29
+ Look for:
30
+ - `Logged in to github.com as USERNAME` — the active account
31
+ - `Token scopes: ...` — what permissions are available
32
+ - Multiple accounts will show separate entries
33
+
34
+ ### Extract a Specific Account's Token
35
+
36
+ When you need to operate as a specific user (not the default):
37
+
38
+ ```bash
39
+ # Get the personal account token (by username)
40
+ gh auth token --user personaluser
41
+
42
+ # Get the EMU account token
43
+ gh auth token --user corpalias_enterprise
44
+ ```
45
+
46
+ **Use case:** Push to a personal fork while the default `gh` auth is the EMU account.
47
+
48
+ ### Push to Personal Repos from EMU Shell
49
+
50
+ The most common scenario: your shell defaults to the EMU account, but you need to push to a personal GitHub repo.
51
+
52
+ ```bash
53
+ # 1. Extract the personal token
54
+ $token = gh auth token --user personaluser
55
+
56
+ # 2. Push using token-authenticated HTTPS
57
+ git push https://personaluser:$token@github.com/personaluser/repo.git branch-name
58
+ ```
59
+
60
+ **Why this works:** `gh auth token --user` reads from `gh`'s credential store without switching the active account. The token is used inline for a single operation and never persisted.
61
+
62
+ ### Create PRs on Personal Forks
63
+
64
+ When the default `gh` context is EMU but you need to create a PR from a personal fork:
65
+
66
+ ```bash
67
+ # Option 1: Use --repo flag (works if token has access)
68
+ gh pr create --repo upstream/repo --head personaluser:branch --title "..." --body "..."
69
+
70
+ # Option 2: Temporarily set GH_TOKEN for one command
71
+ $env:GH_TOKEN = $(gh auth token --user personaluser)
72
+ gh pr create --repo upstream/repo --head personaluser:branch --title "..."
73
+ Remove-Item Env:\GH_TOKEN
74
+ ```
75
+
76
+ ### Config Directory Isolation (Advanced)
77
+
78
+ For complete isolation between accounts, use separate `gh` config directories:
79
+
80
+ ```bash
81
+ # Personal account operations
82
+ $env:GH_CONFIG_DIR = "$HOME/.config/gh-public"
83
+ gh auth login # Login with personal account (one-time setup)
84
+ gh repo clone personaluser/repo
85
+
86
+ # EMU account operations (default)
87
+ Remove-Item Env:\GH_CONFIG_DIR
88
+ gh auth status # Back to EMU account
89
+ ```
90
+
91
+ **Setup (one-time):**
92
+ ```bash
93
+ # Create isolated config for personal account
94
+ mkdir ~/.config/gh-public
95
+ $env:GH_CONFIG_DIR = "$HOME/.config/gh-public"
96
+ gh auth login --web --git-protocol https
97
+ ```
98
+
99
+ ### Shell Aliases for Quick Switching
100
+
101
+ Add to your shell profile for convenience:
102
+
103
+ ```powershell
104
+ # PowerShell profile
105
+ function ghp { $env:GH_CONFIG_DIR = "$HOME/.config/gh-public"; gh @args; Remove-Item Env:\GH_CONFIG_DIR }
106
+ function ghe { gh @args } # Default EMU
107
+
108
+ # Usage:
109
+ # ghp repo clone personaluser/repo # Uses personal account
110
+ # ghe issue list # Uses EMU account
111
+ ```
112
+
113
+ ```bash
114
+ # Bash/Zsh profile
115
+ alias ghp='GH_CONFIG_DIR=~/.config/gh-public gh'
116
+ alias ghe='gh'
117
+
118
+ # Usage:
119
+ # ghp repo clone personaluser/repo
120
+ # ghe issue list
121
+ ```
122
+
123
+ ## Examples
124
+
125
+ ### ✓ Correct: Agent pushes blog post to personal GitHub Pages
126
+
127
+ ```powershell
128
+ # Agent needs to push to personaluser.github.io (personal repo)
129
+ # Default gh auth is corpalias_enterprise (EMU)
130
+
131
+ $token = gh auth token --user personaluser
132
+ git remote set-url origin https://personaluser:$token@github.com/personaluser/personaluser.github.io.git
133
+ git push origin main
134
+
135
+ # Clean up — don't leave token in remote URL
136
+ git remote set-url origin https://github.com/personaluser/personaluser.github.io.git
137
+ ```
138
+
139
+ ### ✓ Correct: Agent creates a PR from personal fork to upstream
140
+
141
+ ```powershell
142
+ # Fork: personaluser/squad, Upstream: bradygaster/squad
143
+ # Agent is on branch contrib/fix-docs in the fork clone
144
+
145
+ git push origin contrib/fix-docs # Pushes to fork (may need token auth)
146
+
147
+ # Create PR targeting upstream
148
+ gh pr create --repo bradygaster/squad --head personaluser:contrib/fix-docs `
149
+ --title "docs: fix installation guide" `
150
+ --body "Fixes #123"
151
+ ```
152
+
153
+ ### ✗ Incorrect: Blindly pushing with wrong account
154
+
155
+ ```bash
156
+ # BAD: Agent assumes default gh auth works for personal repos
157
+ git push origin main
158
+ # ERROR: Permission denied — EMU account has no access to personal repo
159
+
160
+ # BAD: Hardcoding tokens in scripts
161
+ git push https://personaluser:ghp_xxxxxxxxxxxx@github.com/personaluser/repo.git main
162
+ # SECURITY RISK: Token exposed in command history and process list
163
+ ```
164
+
165
+ ### ✓ Correct: Check before you push
166
+
167
+ ```bash
168
+ # Always verify which account has access before operations
169
+ gh auth status
170
+ # If wrong account, use token extraction:
171
+ $token = gh auth token --user personaluser
172
+ git push https://personaluser:$token@github.com/personaluser/repo.git main
173
+ ```
174
+
175
+ ## Anti-Patterns
176
+
177
+ - ❌ **Hardcoding tokens** in scripts, environment variables, or committed files. Use `gh auth token --user` to extract at runtime.
178
+ - ❌ **Assuming the default `gh` auth works** for all repos. EMU accounts can't access personal repos and vice versa.
179
+ - ❌ **Switching `gh auth login`** globally mid-session. This changes the default for ALL processes and can break parallel agents.
180
+ - ❌ **Storing personal tokens in `.env`** or `.squad/` files. These get committed by Scribe. Use `gh`'s credential store.
181
+ - ❌ **Ignoring token cleanup** after inline HTTPS pushes. Always reset the remote URL to avoid persisting tokens.
182
+ - ❌ **Using `gh auth switch`** in multi-agent sessions. One agent switching affects all others sharing the shell.
183
+ - ❌ **Mixing EMU and personal operations** in the same git clone. Use separate clones or explicit remote URLs per operation.
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: "git-workflow"
3
+ description: "Squad branching model: dev-first workflow with insiders preview channel"
4
+ domain: "version-control"
5
+ confidence: "high"
6
+ source: "team-decision"
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Squad uses a three-branch model. **All feature work starts from `dev`, not `main`.**
12
+
13
+ | Branch | Purpose | Publishes |
14
+ |--------|---------|-----------|
15
+ | `main` | Released, tagged, in-npm code only | `npm publish` on tag |
16
+ | `dev` | Integration branch — all feature work lands here | `npm publish --tag preview` on merge |
17
+ | `insiders` | Early-access channel — synced from dev | `npm publish --tag insiders` on sync |
18
+
19
+ ## Branch Naming Convention
20
+
21
+ Issue branches MUST use: `squad/{issue-number}-{kebab-case-slug}`
22
+
23
+ Examples:
24
+ - `squad/195-fix-version-stamp-bug`
25
+ - `squad/42-add-profile-api`
26
+
27
+ ## Workflow for Issue Work
28
+
29
+ 1. **Branch from dev:**
30
+ ```bash
31
+ git checkout dev
32
+ git pull origin dev
33
+ git checkout -b squad/{issue-number}-{slug}
34
+ ```
35
+
36
+ 2. **Mark issue in-progress:**
37
+ ```bash
38
+ gh issue edit {number} --add-label "status:in-progress"
39
+ ```
40
+
41
+ 3. **Create draft PR targeting dev:**
42
+ ```bash
43
+ gh pr create --base dev --title "{description}" --body "Closes #{issue-number}" --draft
44
+ ```
45
+
46
+ 4. **Do the work.** Make changes, write tests, commit with issue reference.
47
+
48
+ 5. **Push and mark ready:**
49
+ ```bash
50
+ git push -u origin squad/{issue-number}-{slug}
51
+ gh pr ready
52
+ ```
53
+
54
+ 6. **After merge to dev:**
55
+ ```bash
56
+ git checkout dev
57
+ git pull origin dev
58
+ git branch -d squad/{issue-number}-{slug}
59
+ git push origin --delete squad/{issue-number}-{slug}
60
+ ```
61
+
62
+ ## Parallel Multi-Issue Work (Worktrees)
63
+
64
+ When the coordinator routes multiple issues simultaneously (e.g., "fix bugs X, Y, and Z"), use `git worktree` to give each agent an isolated working directory. No filesystem collisions, no branch-switching overhead.
65
+
66
+ ### When to Use Worktrees vs Sequential
67
+
68
+ | Scenario | Strategy |
69
+ |----------|----------|
70
+ | Single issue | Standard workflow above — no worktree needed |
71
+ | 2+ simultaneous issues in same repo | Worktrees — one per issue |
72
+ | Work spanning multiple repos | Separate clones as siblings (see Multi-Repo below) |
73
+
74
+ ### Setup
75
+
76
+ From the main clone (must be on dev or any branch):
77
+
78
+ ```bash
79
+ # Ensure dev is current
80
+ git fetch origin dev
81
+
82
+ # Create a worktree per issue — siblings to the main clone
83
+ git worktree add ../squad-195 -b squad/195-fix-stamp-bug origin/dev
84
+ git worktree add ../squad-193 -b squad/193-refactor-loader origin/dev
85
+ ```
86
+
87
+ **Naming convention:** `../{repo-name}-{issue-number}` (e.g., `../squad-195`, `../squad-pr-42`).
88
+
89
+ Each worktree:
90
+ - Has its own working directory and index
91
+ - Is on its own `squad/{issue-number}-{slug}` branch from dev
92
+ - Shares the same `.git` object store (disk-efficient)
93
+
94
+ ### Per-Worktree Agent Workflow
95
+
96
+ Each agent operates inside its worktree exactly like the single-issue workflow:
97
+
98
+ ```bash
99
+ cd ../squad-195
100
+
101
+ # Work normally — commits, tests, pushes
102
+ git add -A && git commit -m "fix: stamp bug (#195)"
103
+ git push -u origin squad/195-fix-stamp-bug
104
+
105
+ # Create PR targeting dev
106
+ gh pr create --base dev --title "fix: stamp bug" --body "Closes #195" --draft
107
+ ```
108
+
109
+ All PRs target `dev` independently. Agents never interfere with each other's filesystem.
110
+
111
+ ### .squad/ State in Worktrees
112
+
113
+ The `.squad/` directory exists in each worktree as a copy. This is safe because:
114
+ - `.gitattributes` declares `merge=union` on append-only files (history.md, decisions.md, logs)
115
+ - Each agent appends to its own section; union merge reconciles on PR merge to dev
116
+ - **Rule:** Never rewrite or reorder `.squad/` files in a worktree — append only
117
+
118
+ ### Cleanup After Merge
119
+
120
+ After a worktree's PR is merged to dev:
121
+
122
+ ```bash
123
+ # From the main clone
124
+ git worktree remove ../squad-195
125
+ git worktree prune # clean stale metadata
126
+ git branch -d squad/195-fix-stamp-bug
127
+ git push origin --delete squad/195-fix-stamp-bug
128
+ ```
129
+
130
+ If a worktree was deleted manually (rm -rf), `git worktree prune` recovers the state.
131
+
132
+ ---
133
+
134
+ ## Multi-Repo Downstream Scenarios
135
+
136
+ When work spans multiple repositories (e.g., squad-cli changes need squad-sdk changes, or a user's app depends on squad):
137
+
138
+ ### Setup
139
+
140
+ Clone downstream repos as siblings to the main repo:
141
+
142
+ ```
143
+ ~/work/
144
+ squad-pr/ # main repo
145
+ squad-sdk/ # downstream dependency
146
+ user-app/ # consumer project
147
+ ```
148
+
149
+ Each repo gets its own issue branch following its own naming convention. If the downstream repo also uses Squad conventions, use `squad/{issue-number}-{slug}`.
150
+
151
+ ### Coordinated PRs
152
+
153
+ - Create PRs in each repo independently
154
+ - Link them in PR descriptions:
155
+ ```
156
+ Closes #42
157
+
158
+ **Depends on:** squad-sdk PR #17 (squad-sdk changes required for this feature)
159
+ ```
160
+ - Merge order: dependencies first (e.g., squad-sdk), then dependents (e.g., squad-cli)
161
+
162
+ ### Local Linking for Testing
163
+
164
+ Before pushing, verify cross-repo changes work together:
165
+
166
+ ```bash
167
+ # Node.js / npm
168
+ cd ../squad-sdk && npm link
169
+ cd ../squad-pr && npm link squad-sdk
170
+
171
+ # Go
172
+ # Use replace directive in go.mod:
173
+ # replace github.com/org/squad-sdk => ../squad-sdk
174
+
175
+ # Python
176
+ cd ../squad-sdk && pip install -e .
177
+ ```
178
+
179
+ **Important:** Remove local links before committing. `npm link` and `go replace` are dev-only — CI must use published packages or PR-specific refs.
180
+
181
+ ### Worktrees + Multi-Repo
182
+
183
+ These compose naturally. You can have:
184
+ - Multiple worktrees in the main repo (parallel issues)
185
+ - Separate clones for downstream repos
186
+ - Each combination operates independently
187
+
188
+ ---
189
+
190
+ ## Anti-Patterns
191
+
192
+ - ❌ Branching from main (branch from dev)
193
+ - ❌ PR targeting main directly (target dev)
194
+ - ❌ Non-conforming branch names (must be squad/{number}-{slug})
195
+ - ❌ Committing directly to main or dev (use PRs)
196
+ - ❌ Switching branches in the main clone while worktrees are active (use worktrees instead)
197
+ - ❌ Using worktrees for cross-repo work (use separate clones)
198
+ - ❌ Leaving stale worktrees after PR merge (clean up immediately)
199
+
200
+ ## Promotion Pipeline
201
+
202
+ - dev → insiders: Automated sync on green build
203
+ - dev → main: Manual merge when ready for stable release, then tag
204
+ - Hotfixes: Branch from main as `hotfix/{slug}`, PR to dev, cherry-pick to main if urgent
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: github-multi-account
3
+ description: Detect and set up account-locked gh aliases for multi-account GitHub. The AI reads this skill, detects accounts, asks the user which is personal/work, and runs the setup automatically.
4
+ confidence: high
5
+ source: https://github.com/tamirdresher/squad-skills/tree/main/plugins/github-multi-account
6
+ author: tamirdresher
7
+ ---
8
+
9
+ # GitHub Multi-Account — AI-Driven Setup
10
+
11
+ ## When to Activate
12
+ When the user has multiple GitHub accounts (check with `gh auth status`). If you see 2+ accounts listed, this skill applies.
13
+
14
+ ## What to Do (as the AI agent)
15
+
16
+ ### Step 1: Detect accounts
17
+ Run: `gh auth status`
18
+ Look for multiple accounts. Note which usernames are listed.
19
+
20
+ ### Step 2: Ask the user
21
+ Ask: "I see you have multiple GitHub accounts: {list them}. Which one is your personal account and which is your work/EMU account?"
22
+
23
+ ### Step 3: Run the setup automatically
24
+ Once the user confirms, do ALL of this for them:
25
+
26
+ ```powershell
27
+ # 1. Define the functions
28
+ $personal = "THEIR_PERSONAL_USERNAME"
29
+ $work = "THEIR_WORK_USERNAME"
30
+
31
+ # 2. Add to PowerShell profile
32
+ $profilePath = $PROFILE.CurrentUserAllHosts
33
+ if (!(Test-Path $profilePath)) { New-Item -Path $profilePath -Force | Out-Null }
34
+ $existing = Get-Content $profilePath -Raw -ErrorAction SilentlyContinue
35
+ if ($existing -notmatch "gh-personal") {
36
+ $block = @"
37
+
38
+ # === GitHub Multi-Account Aliases ===
39
+ function gh-personal { gh auth switch --user $personal 2>`$null | Out-Null; gh @args }
40
+ function gh-work { gh auth switch --user $work 2>`$null | Out-Null; gh @args }
41
+ Set-Alias ghp gh-personal
42
+ Set-Alias ghw gh-work
43
+ "@
44
+ Add-Content -Path $profilePath -Value $block
45
+ }
46
+
47
+ # 3. Create CMD wrappers
48
+ $binDir = Join-Path $env:USERPROFILE ".squad\bin"
49
+ if (!(Test-Path $binDir)) { New-Item -ItemType Directory -Path $binDir -Force | Out-Null }
50
+ "@echo off`ngh auth switch --user $personal >nul 2>&1`ngh %*" | Out-File "$binDir\ghp.cmd" -Encoding ascii
51
+ "@echo off`ngh auth switch --user $work >nul 2>&1`ngh %*" | Out-File "$binDir\ghw.cmd" -Encoding ascii
52
+
53
+ # 4. Add to PATH
54
+ $userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
55
+ if ($userPath -notmatch [regex]::Escape($binDir)) {
56
+ [Environment]::SetEnvironmentVariable("PATH", "$binDir;$userPath", "User")
57
+ $env:PATH = "$binDir;$env:PATH"
58
+ }
59
+
60
+ # 5. Load in current session
61
+ function gh-personal { gh auth switch --user $personal 2>$null | Out-Null; gh @args }
62
+ function gh-work { gh auth switch --user $work 2>$null | Out-Null; gh @args }
63
+ Set-Alias ghp gh-personal
64
+ Set-Alias ghw gh-work
65
+ ```
66
+
67
+ ### Step 4: Verify for the user
68
+ Run these and show the results:
69
+ ```powershell
70
+ ghp api user --jq '.login' # should show personal username
71
+ ghw api user --jq '.login' # should show work username
72
+ ```
73
+
74
+ ### 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."
76
+
77
+ ## After Setup — Usage Rules
78
+
79
+ 1. **NEVER** use bare `gh` for repo operations — always `ghp` or `ghw`
80
+ 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`
84
+
85
+ ## Repo-Specific Account Binding
86
+
87
+ This repo (`bradygaster/squad`) is bound to the **bradygaster** (personal) account.
88
+ All `gh` operations in this repo MUST use `ghp` / `gh-personal`.
89
+
90
+ ## For Squad Agents
91
+ At the TOP of any script touching GitHub, define:
92
+ ```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
+ ```
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: history-hygiene
3
+ description: Record final outcomes to history.md, not intermediate requests or reversed decisions
4
+ domain: documentation, team-collaboration
5
+ confidence: high
6
+ source: earned (Kobayashi v0.6.0 incident, team intervention)
7
+ ---
8
+
9
+ ## Context
10
+
11
+ History files (.md files tracking decisions, spawns, outcomes) are read cold by future agents. Stale or incorrect entries poison decision-making downstream. The Kobayashi incident proved this: history said "Brady decided v0.6.0" when Brady had reversed that to v0.8.17. Future spawns read the wrong truth and repeated the mistake.
12
+
13
+ ## Patterns
14
+
15
+ - **Record the final outcome**, not the initial request.
16
+ - **Wait for confirmation** before writing to history — don't log intermediate states.
17
+ - **If a decision reverses**, update the entry immediately — don't leave stale data.
18
+ - **One read = one truth.** A future agent should never need to cross-reference other files to understand what actually happened.
19
+
20
+ ## Examples
21
+
22
+ ✓ **Correct:**
23
+ - "Migration target: v0.8.17 (initially discussed as v0.6.0, corrected by Brady)"
24
+ - "Reverted to Node 18 per Brady's explicit request on 2024-01-15"
25
+
26
+ ✗ **Incorrect:**
27
+ - "Brady directed v0.6.0" (when later reversed)
28
+ - Recording what was *requested* instead of what *actually happened*
29
+ - Logging entries before outcome is confirmed
30
+
31
+ ## Anti-Patterns
32
+
33
+ - Writing intermediate or "for now" states to disk
34
+ - Attributing decisions without confirming final direction
35
+ - Treating history like a draft — history is the source of truth
36
+ - Assuming readers will cross-reference or verify; they won't
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: "humanizer"
3
+ description: "Tone enforcement patterns for external-facing community responses"
4
+ domain: "communication, tone, community"
5
+ confidence: "low"
6
+ source: "manual (RFC #426 — PAO External Communications)"
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Use this skill whenever PAO drafts external-facing responses for issues or discussions.
12
+
13
+ - Tone must be warm, helpful, and human-sounding — never robotic or corporate.
14
+ - Brady's constraint applies everywhere: **Humanized tone is mandatory**.
15
+ - This applies to **all external-facing content** drafted by PAO in Phase 1 issues/discussions workflows.
16
+
17
+ ## Patterns
18
+
19
+ 1. **Warm opening** — Start with acknowledgment ("Thanks for reporting this", "Great question!")
20
+ 2. **Active voice** — "We're looking into this" not "This is being investigated"
21
+ 3. **Second person** — Address the person directly ("you" not "the user")
22
+ 4. **Conversational connectors** — "That said...", "Here's what we found...", "Quick note:"
23
+ 5. **Specific, not vague** — "This affects the casting module in v0.8.x" not "We are aware of issues"
24
+ 6. **Empathy markers** — "I can see how that would be frustrating", "Good catch!"
25
+ 7. **Action-oriented closes** — "Let us know if that helps!" not "Please advise if further assistance is required"
26
+ 8. **Uncertainty is OK** — "We're not 100% sure yet, but here's what we think is happening..." is better than false confidence
27
+ 9. **Profanity filter** — Never include profanity, slurs, or aggressive language, even when quoting
28
+ 10. **Baseline comparison** — Responses should align with tone of 5-10 "gold standard" responses (>80% similarity threshold)
29
+ 11. **Empathetic disagreement** — "We hear you. That's a fair concern." before explaining the reasoning
30
+ 12. **Information request** — Ask for specific details, not open-ended "can you provide more info?"
31
+ 13. **No link-dumping** — Don't just paste URLs. Provide context: "Check out the [getting started guide](url) — specifically the section on routing" not just a bare link
32
+
33
+ ## Examples
34
+
35
+ ### 1. Welcome
36
+
37
+ ```text
38
+ Hey {author}! Welcome to Squad 👋 Thanks for opening this.
39
+ {substantive response}
40
+ Let us know if you have questions — happy to help!
41
+ ```
42
+
43
+ ### 2. Troubleshooting
44
+
45
+ ```text
46
+ Thanks for the detailed report, {author}!
47
+ Here's what we think is happening: {explanation}
48
+ {steps or workaround}
49
+ Let us know if that helps, or if you're seeing something different.
50
+ ```
51
+
52
+ ### 3. Feature guidance
53
+
54
+ ```text
55
+ Great question! {context on current state}
56
+ {guidance or workaround}
57
+ We've noted this as a potential improvement — {tracking info if applicable}.
58
+ ```
59
+
60
+ ### 4. Redirect
61
+
62
+ ```text
63
+ Thanks for reaching out! This one is actually better suited for {correct location}.
64
+ {brief explanation of why}
65
+ Feel free to open it there — they'll be able to help!
66
+ ```
67
+
68
+ ### 5. Acknowledgment
69
+
70
+ ```text
71
+ Good catch, {author}. We've confirmed this is a real issue.
72
+ {what we know so far}
73
+ We'll update this thread when we have a fix. Thanks for flagging it!
74
+ ```
75
+
76
+ ### 6. Closing
77
+
78
+ ```text
79
+ This should be resolved in {version/PR}! 🎉
80
+ {brief summary of what changed}
81
+ Thanks for reporting this, {author} — it made Squad better.
82
+ ```
83
+
84
+ ### 7. Technical uncertainty
85
+
86
+ ```text
87
+ Interesting find, {author}. We're not 100% sure what's causing this yet.
88
+ Here's what we've ruled out: {list}
89
+ We'd love more context if you have it — {specific ask}.
90
+ We'll dig deeper and update this thread.
91
+ ```
92
+
93
+ ## Anti-Patterns
94
+
95
+ - ❌ Corporate speak: "We appreciate your patience as we investigate this matter"
96
+ - ❌ Marketing hype: "Squad is the BEST way to..." or "This amazing feature..."
97
+ - ❌ Passive voice: "It has been determined that..." or "The issue is being tracked"
98
+ - ❌ Dismissive: "This works as designed" without empathy
99
+ - ❌ Over-promising: "We'll ship this next week" without commitment from the team
100
+ - ❌ Empty acknowledgment: "Thanks for your feedback" with no substance
101
+ - ❌ Robot signatures: "Best regards, PAO" or "Sincerely, The Squad Team"
102
+ - ❌ Excessive emoji: More than 1-2 emoji per response
103
+ - ❌ Quoting profanity: Even when the original issue contains it, paraphrase instead
104
+ - ❌ Link-dumping: Pasting URLs without context ("See: https://...")
105
+ - ❌ Open-ended info requests: "Can you provide more information?" without specifying what information