fix: personal squad init via npx discovers ~/.config/squad/ (#576)#580
Merged
bradygaster merged 3 commits intodevfrom Mar 24, 2026
Merged
fix: personal squad init via npx discovers ~/.config/squad/ (#576)#580bradygaster merged 3 commits intodevfrom
bradygaster merged 3 commits intodevfrom
Conversation
e0e3ff6 to
9ac7360
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When running `init --global` (e.g. via npx), the personal-squad/ directory was never created, so subsequent `init` in a repo could not discover the user's personal agents. Changes: - SDK: add ensurePersonalSquadDir() — idempotent helper that creates personal-squad/agents/ and config.json if missing. - CLI init --global: suppress workflows (no CI needed in global dir) and call ensurePersonalSquadDir() after scaffolding. - CLI repo-level init: detect existing personal squad and inform user. - personal.ts: reuse ensurePersonalSquadDir() instead of inline logic. - Tests: 3 new tests for ensurePersonalSquadDir(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9ac7360 to
a609176
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Personal squad init via npx discovers ~/.config/squad/ (#576)
Closes #576
Root Cause
init --globalcreated.squad/in the global config dir but never created thepersonal-squad/subdirectory thatresolvePersonalSquadDir()depends on. This meant subsequent repo-level inits couldn't discover the personal squad.Changes
SDK (squad-sdk)
ensurePersonalSquadDir()toresolution.ts— idempotent function that createspersonal-squad/agents/andconfig.jsonif missingCLI (squad-cli)
init.ts: AddedisGlobaloption toRunInitOptions; global init now callsensurePersonalSquadDir(); repo-level init detects and reports existing personal squadpersonal.ts: RefactoredpersonalInit()to useensurePersonalSquadDir()instead of inline directory creationcli-entry.ts: PassesisGlobal: hasGlobaltorunInit()Tests
test/personal-squad-init.test.tscovering platform path resolution, kill-switch behavior, init structure, repo-level discovery, edge casestest/resolution.test.tsforensurePersonalSquadDir()Verification
Working as EECOM (Systems) and FIDO (QA)