Skip to content

Commit 58544b8

Browse files
authored
Merge pull request #346 from jsturtevant/squad/343-fix-personal-squad-path-docs-v2
fix(docs): replace ~/.squad/ with platform-specific path references
2 parents 36ea599 + f0b1d51 commit 58544b8

7 files changed

Lines changed: 42 additions & 26 deletions

File tree

‎docs/src/content/docs/get-started/installation.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,15 @@ Want the same agents across all your projects?
108108
squad init --global
109109
```
110110

111-
This creates `~/.squad/` — a personal team root that any project can inherit from. See [Upstream Inheritance](../features/upstream-inheritance.md) for details.
111+
This creates your personal squad directory — a personal team root that any project can inherit from. See [Upstream Inheritance](../features/upstream-inheritance.md) for details.
112+
113+
**Personal squad location by platform:**
114+
115+
| Platform | Path |
116+
|----------|------|
117+
| Linux | `~/.config/squad/` |
118+
| macOS | `~/Library/Application Support/squad/` |
119+
| Windows | `%APPDATA%\squad\` |
112120

113121
---
114122

‎docs/src/content/docs/guide/personal-squad.md‎

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ This tutorial walks you through setup, explains what's happening behind the scen
1818

1919
Normally, Squad lives inside a single project — `.squad/` in your repo root. Your agents know that project. They don't know your other ones.
2020

21-
A personal squad flips that. Your team identity — agents, charters, skills, casting history — moves to a global directory (`~/.squad/`). Every project you work in can point to it.
21+
A personal squad flips that. Your team identity — agents, charters, skills, casting history — moves to your personal squad directory. Every project you work in can point to it.
22+
23+
**Personal squad location by platform:**
24+
25+
| Platform | Path |
26+
|----------|------|
27+
| Linux | `~/.config/squad/` |
28+
| macOS | `~/Library/Application Support/squad/` |
29+
| Windows | `%APPDATA%\squad\` |
2230

2331
What that means in practice:
2432

@@ -51,7 +59,7 @@ You'll see:
5159

5260
```
5361
✅ Personal squad initialized.
54-
~/.squad/ — your global team root
62+
{personal squad directory} — your global team root
5563
Agents, skills, and casting will be shared across projects.
5664
```
5765

@@ -65,7 +73,7 @@ squad status
6573

6674
```
6775
Squad Status
68-
Global squad: ~/.squad/
76+
Global squad: {personal squad directory}
6977
Agents: 0 (none cast yet — start a session to form your team)
7078
Skills: 0
7179
```
@@ -85,7 +93,7 @@ Squad detects your global team root and writes a pointer:
8593

8694
```
8795
✅ Squad initialized.
88-
.squad/config.json → teamRoot: ~/.squad/
96+
.squad/config.json → teamRoot: {personal squad directory}
8997
Team identity inherited from personal squad.
9098
Project-local state (decisions, logs) stays here.
9199
```
@@ -100,12 +108,12 @@ Repeat for any project you want connected.
100108

101109
Two things were created. Understanding the split is the key to personal squads.
102110

103-
### The global directory: `~/.squad/`
111+
### The global directory: your personal squad
104112

105113
This is your **team identity**. It contains:
106114

107115
```
108-
~/.squad/
116+
{personal squad directory}/
109117
agents/ — your agent charters and histories
110118
casting/ — who's been cast, role assignments
111119
skills/ — accumulated knowledge ("always use Zod", "prefer Tailwind")
@@ -120,7 +128,7 @@ Inside each connected project, `.squad/config.json` looks like this:
120128
```json
121129
{
122130
"version": 1,
123-
"teamRoot": "~/.squad/",
131+
"teamRoot": "{personal squad directory}",
124132
"projectKey": null
125133
}
126134
```
@@ -129,14 +137,14 @@ That `teamRoot` field is the magic. When Squad's resolution system sees it, the
129137

130138
| | **Local mode** (default) | **Remote mode** (personal squad) |
131139
|---|---|---|
132-
| Team identity | `.squad/` in project | `~/.squad/` (global) |
140+
| Team identity | `.squad/` in project | Personal squad directory (global) |
133141
| Decisions & logs | `.squad/` in project | `.squad/` in project |
134142
| Agents shared? | No — project only | Yes — across all connected projects |
135143
| Skills shared? | No | Yes |
136144

137145
In remote mode:
138146

139-
- **Team identity** (agents, charters, skills, casting) → loaded from `~/.squad/`
147+
- **Team identity** (agents, charters, skills, casting) → loaded from your personal squad directory
140148
- **Project-local state** (decisions, logs, orchestration-log) → stays in this project's `.squad/`
141149

142150
The resolution system walks up directories looking for `.squad/`. When it finds one with a `teamRoot` in `config.json`, it switches to remote mode — pulling team identity from the external path while keeping project state local.
@@ -251,20 +259,20 @@ Set a directive once:
251259
📌 Captured. Linting required before task completion.
252260
```
253261

254-
That directive is now in `~/.squad/` — every project, every session. Your agents enforce it everywhere. You set the standard once and it sticks.
262+
That directive is now in your personal squad directory — every project, every session. Your agents enforce it everywhere. You set the standard once and it sticks.
255263

256264
Over time, your personal squad becomes an opinionated workflow engine. Not because you configured it that way — because you worked with it and it learned.
257265

258266
---
259267

260268
## 8. Use Case: Skills That Grow Everywhere
261269

262-
Skills accumulate in `~/.squad/skills/`. Every project contributes.
270+
Skills accumulate in your personal squad directory under `skills/`. Every project contributes.
263271

264272
After a few weeks:
265273

266274
```
267-
~/.squad/skills/
275+
{personal squad directory}/skills/
268276
always-use-zod.md
269277
prefer-tailwind.md
270278
cursor-pagination.md
@@ -292,7 +300,7 @@ What works well today:
292300
- **Consult mode** — bring your team to projects you don't own, invisibly ([docs](../features/consult-mode.md))
293301

294302
What's still rough:
295-
- No sync mechanism between machines yet — `~/.squad/` is local to your machine
303+
- No sync mechanism between machines yet — your personal squad directory is local to your machine
296304
- Project keys aren't used for anything yet (that `null` in config.json)
297305
- No UI for browsing your global skills or agent histories (it's files for now)
298306

@@ -303,10 +311,10 @@ We're building in the open. If something feels off, [open an issue](https://gith
303311
## Tips
304312

305313
- **Start with one project.** Get comfortable with the personal squad on one repo before connecting others. The value compounds, but so does confusion if something's misconfigured.
306-
- **Commit project `.squad/` but not global `~/.squad/`.** The project-local state (decisions, logs) belongs in version control. Your global identity is personal — keep it out of repos.
314+
- **Commit project `.squad/` but not personal squad directory.** The project-local state (decisions, logs) belongs in version control. Your global identity is personal — keep it out of repos.
307315
- **Check status anytime.** `squad status` shows your global squad directory and which projects are connected.
308316
- **Skills are the payoff.** The more projects you work across, the more skills accumulate. After a month, your agents have a real knowledge base tailored to how *you* build software.
309-
- **It's just files.** `~/.squad/` is a directory on your machine. You can browse it, edit it, back it up, copy it to another machine manually. No magic, no cloud, no lock-in.
317+
- **It's just files.** Your personal squad directory is a folder on your machine. You can browse it, edit it, back it up, copy it to another machine manually. No magic, no cloud, no lock-in.
310318
- **Global install matters.** `npm install -g @bradygaster/squad-cli` gives you the `squad` command everywhere. Without it, you'd need `npx` in each project. Global CLI + global squad = full portability.
311319

312320
---

‎docs/src/content/docs/reference/api-reference.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const squadPath = resolveSquad('/home/user/project/src');
5151

5252
### `resolveGlobalSquadPath(): string`
5353

54-
Get path to global personal squad (`~/.squad/` on Unix, `%USERPROFILE%\.squad\` on Windows).
54+
Get path to global personal squad. Returns platform-specific path: `~/.config/squad/` on Linux, `~/Library/Application Support/squad/` on macOS, `%APPDATA%\squad\` on Windows.
5555

5656
### `ensureSquadPath(startPath?: string): string`
5757

‎docs/src/content/docs/reference/cli.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ squad init
2828
|---------|-------------|:------------------:|
2929
| `squad` | Enter interactive shell (no args) | No |
3030
| `squad init` | Initialize Squad in the current repo (idempotent — safe to run multiple times) | No |
31-
| `squad init --global` | Create a personal squad at `~/.squad/` | No |
31+
| `squad init --global` | Create a personal squad in your platform-specific directory | No |
3232
| `squad init --mode remote <path>` | Initialize linked to a remote team root (dual-root mode) | No |
3333
| `squad start [--tunnel] [--port N] [--command cmd]` | Start Copilot with remote phone access via PTY and WebSocket | No |
3434
| `squad status` | Show which squad is active and why | Yes |
@@ -239,7 +239,7 @@ When Squad starts, it looks for `.squad/` in this order:
239239

240240
1. Current directory (`./.squad/`)
241241
2. Parent directories (walk up to project root)
242-
3. Home directory (`~/.squad/`)
242+
3. Personal squad directory (platform-specific: `~/.config/squad/` on Linux, `~/Library/Application Support/squad/` on macOS, `%APPDATA%\squad\` on Windows)
243243
4. Global CLI default (fallback only)
244244

245245
First match wins.

‎docs/src/content/docs/reference/config.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Squad finds `.squad/` by walking up:
145145

146146
1. Current directory (`./.squad/`)
147147
2. Parent directories (up to project root)
148-
3. Home directory (`~/.squad/`)
148+
3. Personal squad directory (platform-specific: `~/.config/squad/` on Linux, `~/Library/Application Support/squad/` on macOS, `%APPDATA%\squad\` on Windows)
149149
4. Global CLI default (fallback)
150150

151151
First match wins.

‎docs/src/content/docs/reference/sdk.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ Find `.squad/` directories on disk.
2424
| Function | Description |
2525
|----------|-------------|
2626
| `resolveSquad(startPath?)` | Find `.squad/` walking up from `startPath` (throws if not found) |
27-
| `resolveGlobalSquadPath()` | Get `~/.squad/` path (`%USERPROFILE%\.squad\` on Windows) |
27+
| `resolveGlobalSquadPath()` | Get personal squad directory path (platform-specific) |
2828
| `ensureSquadPath(startPath?)` | Like `resolveSquad`, but creates `.squad/` if missing |
2929

3030
```typescript
3131
const squadPath = resolveSquad(); // '/home/user/project/.squad'
32-
const globalPath = resolveGlobalSquadPath(); // '/home/user/.squad'
32+
const globalPath = resolveGlobalSquadPath(); // Platform-specific: ~/.config/squad/ (Linux), ~/Library/Application Support/squad/ (macOS), %APPDATA%\squad\ (Windows)
3333
const safePath = ensureSquadPath(); // Creates if needed
3434
```
3535

‎packages/squad-sdk/src/sharing/consult.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,8 @@ function extractSkillName(content: string): string | null {
10061006
/**
10071007
* Merge staged learnings into personal squad.
10081008
*
1009-
* Routes skills to ~/.squad/skills/{name}/SKILL.md
1010-
* Routes decisions to ~/.squad/decisions.md (with smart merge)
1009+
* Routes skills to personal squad directory via resolveGlobalSquadPath() to skills/{name}/SKILL.md
1010+
* Routes decisions to decisions.md in personal squad directory (with smart merge)
10111011
*
10121012
* @param learnings - Staged learnings to merge
10131013
* @param personalSquadRoot - Path to personal squad root
@@ -1035,7 +1035,7 @@ export async function mergeToPersonalSquad(
10351035
}
10361036
}
10371037

1038-
// Route skills to ~/.squad/skills/{name}/SKILL.md
1038+
// Route skills to personal squad directory (via resolveGlobalSquadPath()) at skills/{name}/SKILL.md
10391039
const skillsDir = path.join(personalSquadRoot, 'skills');
10401040
for (const skill of skills) {
10411041
const skillName = extractSkillName(skill.content) || skill.filename.replace('.md', '');
@@ -1053,7 +1053,7 @@ export async function mergeToPersonalSquad(
10531053
skillsAdded++;
10541054
}
10551055

1056-
// Route decisions to ~/.squad/decisions.md
1056+
// Route decisions to personal squad directory at decisions.md
10571057
if (decisions.length > 0) {
10581058
const decisionsPath = path.join(personalSquadRoot, 'decisions.md');
10591059
const newContent = decisions.map(d => d.content.trim()).join('\n\n');

0 commit comments

Comments
 (0)