Problem
squad init --global creates the squad structure in the wrong location. Agents, casting, and skills end up at ~/.config/squad/.squad/ instead of ~/.config/squad/personal-squad/.
Expected behavior
Personal squad files should be at:
- ~/.config/squad/personal-squad/agents/
- ~/.config/squad/personal-squad/casting/
- ~/.config/squad/personal-squad/skills/
Actual behavior
Files end up at:
- ~/.config/squad/.squad/agents/ (WRONG - agents here)
- ~/.config/squad/personal-squad/agents/ (empty)
- ~/.config/squad/personal-squad/config.json (only file)
Root cause
In cli-entry.ts:274-275, dest is set to resolveGlobalSquadPath() which returns ~/.config/squad/ (the parent). The full init then creates .squad/ inside that parent. The personal-squad/ subdirectory is created separately by ensurePersonalSquadDir() but is nearly empty.
Fix: dest should point to the personal-squad/ subdirectory when --global is set, OR the init flow needs to use personal-squad/ as the teamRoot.
Files involved
| File |
Lines |
Issue |
| packages/squad-cli/src/cli-entry.ts |
274-275 |
dest points to parent, not personal-squad/ |
| packages/squad-cli/src/cli/core/init.ts |
156-310 |
Creates .squad/ at wrong level, then empty personal-squad/ |
| packages/squad-sdk/src/resolution.ts |
301-324 |
resolveGlobalSquadPath() returns parent |
Impact
- Personal agents are not discoverable by the ambient discovery system
- Ghost Protocol routing fails because agents aren't where resolvePersonalSquadDir() looks
- Users who run squad init --global get a broken personal squad that doesn't work with project squads
Classification
Product bug (not docs). The docs correctly describe the intended structure but the code creates files in the wrong location.
Problem
squad init --global creates the squad structure in the wrong location. Agents, casting, and skills end up at ~/.config/squad/.squad/ instead of ~/.config/squad/personal-squad/.
Expected behavior
Personal squad files should be at:
Actual behavior
Files end up at:
Root cause
In cli-entry.ts:274-275, dest is set to resolveGlobalSquadPath() which returns ~/.config/squad/ (the parent). The full init then creates .squad/ inside that parent. The personal-squad/ subdirectory is created separately by ensurePersonalSquadDir() but is nearly empty.
Fix: dest should point to the personal-squad/ subdirectory when --global is set, OR the init flow needs to use personal-squad/ as the teamRoot.
Files involved
Impact
Classification
Product bug (not docs). The docs correctly describe the intended structure but the code creates files in the wrong location.