Repository navigation
fix(remote): a project linked to a team repository uses that team (satellite repos) - #2500
Conversation
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 3 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 4 active Copilot thread(s) resolved (2 outdated skipped) |
| ❌ | CI passing | 1 check(s) still running |
Files Changed (16 files, +520 −289)
| File | +/− |
|---|---|
.changeset/claude-linked-team.md |
+6 −0 |
CHANGELOG.md |
+1 −0 |
docs/src/content/docs/reference/host-feature-matrix.md |
+17 −17 |
packages/squad-cli/src/cli/commands/client.ts |
+3 −1 |
packages/squad-cli/src/cli/core/clients.ts |
+19 −0 |
packages/squad-cli/src/cli/core/init.ts |
+11 −4 |
packages/squad-cli/src/cli/core/upgrade.ts |
+20 −6 |
packages/squad-cli/src/cli/shell/lifecycle.ts |
+4 −2 |
packages/squad-sdk/src/client/adapters/claude-members.ts |
+26 −6 |
packages/squad-sdk/src/client/adapters/coordinator.ts |
+1 −1 |
packages/squad-sdk/src/client/adapters/types.ts |
+6 −0 |
packages/squad-sdk/src/config/init.ts |
+219 −206 |
plugins/squad/agents/squad.md |
+1 −1 |
test-fixtures/spec/suite-v0.2/host-feature-matrix.json |
+40 −44 |
test/claude-linked-team.test.ts |
+143 −0 |
test/clients.test.ts |
+3 −1 |
Total: +520 −289
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟠 Impact Analysis — PR #2500Risk tier: 🟠 HIGH 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (1 file)
root (4 files)
squad-cli (5 files)
squad-sdk (4 files)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
🏗️ Architectural Review
Automated architectural review — informational only. |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved linked-team handling defects cause incomplete capability projection and roster discovery, inaccurate client status, and generated agents that can lack required context or ignore project-local settings.
6 open issues
Include linked-team context when reporting client status · New Handle linked members whose tool allowlist blocks bootstrap · New Read projection overrides from the satellite project's config · New Exclude the local-mode sentinel from linked-team digest rules · New Use the linked team's directory when syncing Copilot capabilities · New Resolve shell team reads through the effective squad directory · New
What changed in this PR
Makes satellite projects reuse their linked Squad team repository instead of creating a placeholder local team, addressing the Claude Code scenario in #2487.
Changes:
- Skip team-owned scaffolding during linked-project init and upgrade while preserving project-local state.
- Project Claude members from the linked team and add shared coordinator guidance for reading team files.
- Add regression coverage and update the generated plugin, capability matrix, and release notes.
| File | Description |
|---|---|
test/clients.test.ts |
Separates linked-team coverage from the remaining monorepo guidance gap. |
test/claude-linked-team.test.ts |
Tests linked initialization, projection, containment, and team preservation. |
test-fixtures/spec/suite-v0.2/host-feature-matrix.json |
Updates remote-mode support and validation evidence. |
plugins/squad/agents/squad.md |
Adds generated linked-team reading guidance. |
packages/squad-sdk/src/config/init.ts |
Adds an option to skip team-owned scaffolding. |
packages/squad-sdk/src/client/adapters/types.ts |
Adds the linked-team directory to client context. |
packages/squad-sdk/src/client/adapters/coordinator.ts |
Adds shared instructions for accessing linked teams. |
packages/squad-sdk/src/client/adapters/claude-members.ts |
Reads linked member definitions and adjusts bootstrap instructions. |
packages/squad-cli/src/cli/core/upgrade.ts |
Skips linked-team scaffolding and refreshes linked cast capabilities. |
packages/squad-cli/src/cli/core/init.ts |
Detects linked projects and passes that state into initialization. |
packages/squad-cli/src/cli/core/clients.ts |
Resolves and supplies the linked-team projection directory. |
docs/src/content/docs/reference/host-feature-matrix.md |
Publishes updated support status and live evidence. |
CHANGELOG.md |
Documents the linked-project behavior change. |
.changeset/claude-linked-team.md |
Records patch releases for the SDK and CLI. |
Review effort: Max (dynamic)
| * uses a team repository (`squad link`, `init --mode remote`), else null. | ||
| */ | ||
| export function linkedTeamSquadDir(dest: string): string | null { | ||
| const paths = resolveSquadPaths(dest); |
After `squad link` / `squad init --mode remote`, init and upgrade scaffolded a placeholder local team (empty roster, routing, built-ins, casting) and Claude Code's member subagents came from it, so the coordinator saw an empty team. - init/upgrade skip team files in a linked project; local state stays. - Claude member subagents are projected from the linked team (ClientContext.teamDir) and read their charters via squad_state. - Copilot's agent file advertises the linked team's cast. - Every coordinator digest gets a "Linked team" rule: read team files only through squad_state, never create a local roster. - Host matrix: dual-root-remote-mode supported on every host (Claude validated live); the monorepo TEAM_ROOT digest gap stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- squad client list expects the linked team's member files - a linked member's charter is carried in its subagent file; history via squad_state_read only when its authored tool list allows (never widened) - effort overrides come from the project's own config - teamRoot "." is not a linked team in the coordinator rule - init advertises the linked team's cast in Copilot's agent file - the interactive shell reads the linked team's roster Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8a0956c to
aba5f81
Compare

The last failing Claude Code scenario from #2487: a satellite project linked to a team repository.
Problem
After
squad link ../team(orsquad init --mode remote ../team),squad init --client claudeandsquad upgrade:team.md,routing.md, the built-ins' charters, casting, identity and ceremonies;Fix
config.json, the launcher, the decisions inbox, logs, sessions and memory. The SDK'sinitSquadgets alinkedTeamoption, and the CLI detects a linked project withlinkedTeamSquadDir().ClientContext.teamDirpoints the member projection at the team's squad directory. Charters are still read only inside it, so a linked charter outside the team is skipped. Each member reads its charter and history withsquad_state_read, which serves the linked team.config.jsonsetsteamRoot, read team files only throughsquad_state, never from.squad/directly, and never create a local roster.dual-root-remote-modeis now supported on every host, with Claude validated live. The shared digest gap is split in two: the linked-team half is closed, and the monorepoTEAM_ROOThalf stays an expected failure, since this change doesn't add that guidance.The team repository is never written by the linked project's init or upgrade.
Verification
test/claude-linked-team.test.ts:dallas.mdprojected from the team, the coordinator carries the rule, and the team repo is byte-identical afterwards;teamDirprojection with a symlinked charter outside the team;squad_state_read;dallassubagent readagents/dallas/charter.mdthroughsquad_state;Independent of #2496. Both touch coordinator step 1, so whichever merges second needs a one-line rebase and a plugin regeneration.
🤖 Generated with Claude Code