Skip to content

fix(cli): squad init --global creates files in personal-squad/ directory - #641

Closed
diberry wants to merge 6 commits into
bradygaster:devfrom
diberry:squad/53-fix-global-init
Closed

fix(cli): squad init --global creates files in personal-squad/ directory#641
diberry wants to merge 6 commits into
bradygaster:devfrom
diberry:squad/53-fix-global-init

Conversation

@diberry

@diberry diberry commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Global init was creating the full squad structure at ~/.config/squad/.squad/ instead of ~/.config/squad/personal-squad/. This broke personal agent discovery because resolvePersonalSquadDir() looks in personal-squad/.

  • Fix init.ts to early-return for global init, targeting personal-squad/
  • Simplify dest in cli-entry.ts (no dead code)
  • Sandbox all tests (env override to temp dir)
  • 7 new tests, 52 total pass

Team review: Flight ✅, FIDO ✅ (was ❌, fixed by CONTROL), Procedures ✅

Closes diberry#53

@diberry

diberry commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

@bradygaster Ready for your review — team-approved with 3-reviewer gate (Flight, FIDO, Procedures).

Copilot AI added 6 commits March 27, 2026 13:40
Fork-specific workflow skills for PR hygiene:
- fork-first-pipeline: review on fork before opening upstream PRs
- bleed-check: twice-daily cross-branch audit for stowaway files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds Step 5.5 REBASE with guidance on rebasing feature branches against origin/dev to avoid full-file rewrites on shared files. Includes Shared File Strategy for surgical additions and When Rebase Fails recovery steps. Updates anti-patterns table to flag 'Skip rebase before upstream'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…, conventions)

- Fork-first-pipeline: Added serial branch operations warning, force-add note for gitignored skills, stale comments check
- Bleed-check: Added high-risk shared files callout, convention gate checks, CI path debugging pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Dual Reviewer Gate: both Flight and FIDO must approve
- Convention Issues Are Blockers: /docs/ prefix, double blanks, table order, whitespace
- Review→Fix→Re-review Loop: both reviewers must re-review after fixes
- Reviewer Lockout: locked authors cannot self-fix after rejection
- Known PAO Quirks: watch for .squad/ files, /docs/ prefix, verification before push
- Review Comments: formal PR comment format and verdict options
- Tamir Reviewer Rule: only on upstream PRs with source material
- Commit Hygiene: one commit, amend fixups, force-push safely, verify before push

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a PR completes the full fork pipeline (Flight+FIDO approved, bleed check passed, squashed, rebased, moved to upstream targeting Brady's dev), the upstream PR should be undrafted immediately.

The upstream PR is the final presentation — draft PRs signal incomplete work, but at this stage all iteration is finished on the fork.

Add gh pr ready command to Step 7 (UPSTREAM) as the final action after opening the upstream PR.

Add anti-pattern entry for leaving upstream PRs in draft.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Global init was creating the full squad scaffold at ~/.config/squad/.squad/
instead of ~/.config/squad/personal-squad/. This broke personal agent
discovery because resolvePersonalSquadDir() looks in personal-squad/.

- Add early return in runInit() for isGlobal that bootstraps personal-squad/
  with agents/, casting/, skills/, and config.json via ensurePersonalSquadDir()
- Update dest in cli-entry.ts to target personal-squad/ for global init
- Skip full sdkInitSquad scaffold for global init (no .squad/ at global root)
- Add 7 tests verifying correct file placement and no .squad/ pollution
- Update cli-global.test.ts to match new routing logic

Closes #53

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
diberry force-pushed the squad/53-fix-global-init branch from 8f86f41 to 20f9f2e Compare March 27, 2026 21:12
@diberry

diberry commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing as duplicate — Brady merged the same fix in #620 (getPersonalSquadRoot).

@diberry diberry closed this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

squad init --global creates files in wrong location (.squad/ instead of personal-squad/)

2 participants