feat: remote squad mode, squad repos, and company of squads#131
feat: remote squad mode, squad repos, and company of squads#131spboyer wants to merge 2 commits intobradygaster:mainfrom
Conversation
Add three new capabilities to Squad CLI:
1. Remote Squad Mode: --mode remote --team-root <path> for init,
plus 'link' subcommand to connect existing projects to external
team state. Thin .squad/config.json pointer in project, full
team identity lives elsewhere.
2. Squad Repo: 'repo init' creates standalone squad repos with
manifest tracking. 'repo link' creates two-way project linking.
3. Company of Squads: 'hub init', 'hub add', 'hub list' for
managing multiple independent squads via directory convention
(squads/{project-name}/).
4. Doctor: 'doctor' subcommand validates setup integrity for
local, remote, and hub modes.
Foundation: resolveSquadPaths() dual-root resolver replaces
detectSquadDir() for all path resolution. Local mode behavior
is completely unchanged (backward compatible).
All 86 existing tests pass.
Relates-to: bradygaster#96, bradygaster#8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
16 new tests covering: - Remote init with --mode remote --team-root - link command for connecting projects to external teams - repo init and repo link for standalone squad repos - hub init, hub add, hub list for company of squads - doctor command validation for local, remote, and hub modes All 102 tests pass (86 existing + 16 new). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Session: 2026-02-23T0113-pr131-issues-created Coordinator created 4 GitHub issues (bradygaster/squad-pr #311–#314) from team review of PR #131. Changes: - Logged PR #131 review outcome with 4 issues created - Issues #311 (dual-root resolver), #312 (doctor command), #313 (remote mode CLI), #314 (SDK ensureSquadPath) - All issues credit @spboyer Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port features from @spboyer (Shayne Boyer)'s PR #131: - resolveSquadPaths() dual-root resolver (projectDir / teamDir) (#311) - squad doctor command — 9-check setup validation (#312) - squad link + squad init --mode remote (#313) - ensureSquadPathDual() / ensureSquadPathResolved() (#314) - Updated squad.agent.md with remote mode coordinator awareness - Updated CHANGELOG with Shayne credit Docs cleanup: - Removed 30 stale internal docs (blog, architecture, test-scripts, SquadUI alignment, launch artifacts, completed PRDs/proposals) - Kept user-facing guides, build tooling, migration docs 42 new tests, all passing. Co-authored-by: Shayne Boyer <spboyer@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thank you so much, Shayne! Your design for Remote Squad Mode has been the foundation that drove our implementation. We've ported the core concepts and features from PR #131 and they're now live in the main branch. Here's the mapping: Features Implemented✅ ✅ \squad doctor\ Command (#312) ✅ *\squad link \ & \squad init --mode remote* (#313) ✅ Dual-Root Write Guards (#314) Why We're ClosingThe team identity separation and remote mode architecture you proposed are now built into the SDK. The fundamental insight — that team state should be portable and separate from project decisions — is now the default pattern. The implementation has evolved (repo mode and hub mode specialized from your core design), but your contribution is threaded through every feature. Thanks for thinking ahead about how teams should work. Your work made it easy for us to scale to dedicated squad repos and company hubs. 🙏 |
|
Closing this in favor of the implementation that's now live in main. All the core features are in place and the team is scaling well with the patterns you pioneered. |
Summary
This PR adds three new opt-in deployment modes to the Squad CLI, enabling teams to run their squad outside the project repo, from a dedicated squad repo, or as a "company of squads" managing multiple projects from a central hub.
All modes are opt-in. The default
localmode (team state inside the project) is completely unchanged. All 102 tests pass (86 existing + 16 new).Relates to:
squadinto using GitHub #8 — Don't lock Squad into GitHub (remote mode decouples team state from project hosting)What's New
1. Unified Path Resolver (
resolveSquadPaths())Replaces
detectSquadDir()with a richer resolver returning dual roots:detectSquadDir()is preserved as a thin backward-compatible wrapper.2. Remote Squad Mode
Run team state outside the project repo. The project keeps a thin
.squad/with a config pointer and project-specific artifacts.Commands:
npx github:bradygaster/squad --mode remote --team-root <path>— init with remote teamnpx github:bradygaster/squad link --team-root <path>— link existing project to existing team3. Squad Repo Mode
Specialization of remote mode where the team lives in its own git repo with a manifest tracking managed projects.
Commands:
npx github:bradygaster/squad repo init— create standalone squad reponpx github:bradygaster/squad repo link <path>— two-way link (config in project + manifest entry in squad repo)4. Company of Squads (Hub Mode)
A hub repo manages multiple independent squads, each dedicated to a different project.
Commands:
npx github:bradygaster/squad hub init— create hub withsquads/directorynpx github:bradygaster/squad hub add <project-name>— scaffold a new squadnpx github:bradygaster/squad hub list— show all managed squads with member counts5. Doctor Command
Validates setup integrity for any mode:
Architecture Decisions
File Ownership Split
The key insight: team identity is team-scoped (portable), while decisions and logs are project-scoped (stay local).
No Symlinks
Config pointer uses a JSON file with relative paths instead of symlinks. This avoids Windows admin/dev-mode requirements and works cross-platform without special filesystem permissions.
Backward Compatible
When no
config.jsonexists,resolveSquadPaths()returnsprojectDir === teamDir— identical to the olddetectSquadDir()behavior. Zero changes for existing users.New CLI Commands
--mode remote --team-root <path>link --team-root <path>repo initrepo link <path>hub inithub add <project-name>hub listdoctorCross-Platform
path.resolve()andpath.join()— no string concatenationos.tmpdir()and cross-platform fs APIs in testsSetup Examples
Remote Squad (team outside project)
Link existing project to existing team
Squad Repo
Company Hub
Validate any setup
Test Coverage
test/remote-mode.test.js:What's Deferred
hub upgradecommand for batch-upgrading all squads (Automatic Squad update #96)