You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8a0956c
Browse filesBrowse the repository at this point in the historyBrowse files
- 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>
notes.push(`History not readable (the Tools list has no \`${mcpPrefix}squad_state_read\`; the spawn prompt must carry it)`);
183
+
}
176
184
constreadCharter=linked
177
-
? `This project uses a linked team repository, so read your charter and history with \`squad_state_read\` (keys \`agents/${id}/charter.md\` and \`agents/${id}/history.md\`), not from \`${squadDir}/\`. `
185
+
? `This project uses a linked team repository. Your charter from it is below. `+
186
+
(canReadState
187
+
? `Read your history with \`squad_state_read\` (key \`agents/${id}/history.md\`), not from \`${squadDir}/\`. `
188
+
: `Your history is not available to you here: rely on the spawn prompt. `)
178
189
: `Before you start, read your charter at \`${charterPath}\` and your history at \`${historyPath}\`. `+
179
190
`If the spawn prompt gives a TEAM ROOT, resolve these paths under it instead. `;
191
+
constlinkedCharter=linked ? `\n## Your charter (linked team repository)\n\n${charter.replace(/\r\n?/g,'\n').trim()}\n` : '';
180
192
constnotesBlock=
181
193
notes.length>0
182
194
? `\n<!-- Charter preferences not projected to Claude Code: ${notes.join('; ').replace(/--/g,'- -')}. -->\n`
@@ -189,7 +201,8 @@ export function renderClaudeMember(
189
201
readCharter+
190
202
`Your charter is authoritative: follow its responsibilities and boundaries, and the task in the spawn prompt.\n\n`+
191
203
`Squad dispatches specialists only from the coordinator: do not spawn subagents of your own. `+
192
-
`Read and write shared team state through the \`squad_state\` MCP tools (\`${mcpPrefix}*\`) when they are available.\n`
204
+
`Read and write shared team state through the \`squad_state\` MCP tools (\`${mcpPrefix}*\`) when they are available.\n`+
205
+
linkedCharter
193
206
);
194
207
}
195
208
@@ -210,7 +223,8 @@ export function projectClaudeMembers(
210
223
constagentsAbs=path.join(squadAbs,'agents');
211
224
constrouting=readRouting(squadAbs);
212
225
constids=memberIds(agentsAbs);
213
-
consteffortConfig=readEffortConfig(squadAbs);
226
+
// Effort overrides are this project's own settings, even when the team is linked.
Copy file name to clipboardExpand all lines: packages/squad-sdk/src/client/adapters/coordinator.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ You are the Squad coordinator. You route work to a team of specialists and keep
124
124
- **Phase 2 (create).** If you can run shell commands, add EVERY member with the CLI, one call each: \`npx squad cast --name <Name> --role "<Role>"\` (it writes the charter, history, the \`team.md\` roster row, \`routing\` hooks and the casting registry/history pair correctly; the built-ins scribe, ralph, rai and fact-checker already exist after \`squad init\`). Then write/adjust \`${S}/routing.md\` as an ordinary file, and once routing is written run \`squad client sync\` so host files built from it (Claude Code member subagent descriptions) pick up who owns what; it rewrites only Squad-managed files. If \`squad cast --name\` is not recognised (an older \`squad\` build that only lists the cast; \`npx\` may fetch an old published version, so prefer the \`squad\` on PATH), tell the user to upgrade the squad CLI instead of hand-writing the team. NEVER hand-write or edit anything under \`${S}/casting/\` (\`registry.json\`, \`history.json\`, \`registry-history.commit.json\` are a checksummed pair: manual edits make \`squad upgrade\` fail with a registry error). If you cannot run shell commands, write \`team.md\` (a markdown table with \`Name\`, \`Role\`, \`Charter\`, \`Status\` columns; the Coordinator row stays separate), \`${S}/agents/<lowercase-name>/charter.md\` and \`history.md\` as ordinary files, leave \`${S}/casting/\` untouched and tell the user to run \`squad cast --name <Name> --role "<Role>"\` for each member to register them.
125
125
- **After casting**, STOP and report the roster unless the user's request also asked for work (setting up the team is not a request to build anything).
126
126
- **Scratch space.** Use \`${S}/scratch/\` (inside the workspace) for temporary files; never write outside the workspace directory (hosts reject external-directory access).
127
-
1. **Load team context first.** Read \`${S}/team.md\` (roster), \`${S}/routing.md\` (who owns what), \`${S}/decisions.md\` and the decisions inbox before routing anything. Cache them for the session; re-read only when a state change was announced. **Linked team:** when \`${S}/config.json\` sets \`teamRoot\`, the project uses a team repository: team files (\`team.md\`, \`routing.md\`, charters, decisions) live there, so read them with \`squad_state_read\` / \`squad_state_list\` (which serve that team), never from \`${S}/\` directly, and never create a local roster.
127
+
1. **Load team context first.** Read \`${S}/team.md\` (roster), \`${S}/routing.md\` (who owns what), \`${S}/decisions.md\` and the decisions inbox before routing anything. Cache them for the session; re-read only when a state change was announced. **Linked team:** when \`${S}/config.json\` sets \`teamRoot\` to a path other than \`.\` (\`.\` means no linked team), the project uses a team repository: team files (\`team.md\`, \`routing.md\`, charters, decisions) live there, so read them with \`squad_state_read\` / \`squad_state_list\` (which serve that team), never from \`${S}/\` directly, and never create a local roster.
128
128
2. **Route by ownership.** Match the request to the member whose role owns it per \`routing.md\`. Every work item has exactly ONE accountable owner (others contribute/review). If nobody owns it, ask the user or propose a new member. Named requests ("Dallas, fix X") go to that member.
129
129
3. **Spawn specialists with full context.** Each specialist prompt must include: the member's charter (\`${S}/agents/<name>/charter.md\`), the task with explicit deliverables AND exclusions (no silent scope expansion; approved expansion is routed as separate work), relevant decisions, the working directory, and the \`squad_state\` usage rules below. Name tasks "<Name>: <what>" (e.g. "Dallas: build server") and never do the specialist's work yourself.
130
130
4. **Mutable state goes through the \`squad_state\` MCP server** (backend). Use \`squad_state_read\`, \`squad_state_list\`, \`squad_state_write\`, \`squad_state_append\`, \`squad_state_delete\` for runtime state (decisions inbox, agent history, logs, sessions, scratch) and \`squad_decide\` to record decisions. Never edit those files directly when the MCP backend is available. **Static team config is the exception:** \`team.md\`, \`routing.md\`, \`config.json\`, charters (\`${S}/agents/<name>/charter.md\`), templates and skills are NOT mutable state; the state tools reject writes to them, so create and edit them as ordinary files (\`squad_state_read\` / \`squad_state_list\` can still read them). **Tool names are host-prefixed:** hosts expose these tools as e.g. \`mcp__squad_state__squad_state_read\` (Claude Code), \`squad_state_squad_state_read\` (opencode) or \`@squad_state/squad_state_read\` (Kiro); always call the name actually present in your tool list. **Files vs directories:** \`squad_state_read\` takes a FILE key (e.g. \`decisions.md\`, \`agents/dallas/history.md\`); for a directory (\`identity\`, \`templates\`, \`decisions/inbox\`, \`agents\`) call \`squad_state_list\` instead, never read it (that fails with EISDIR).
Copy file name to clipboardExpand all lines: plugins/squad/agents/squad.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ You are the Squad coordinator. You route work to a team of specialists and keep
13
13
## Core protocol (host-agnostic)
14
14
15
15
0. **Init Mode (only when there is truly no team).** Decide this with `squad_state_read` of `team.md` (or `squad_state_list`), NEVER with glob/grep/search tools (they skip dot-directories like `.squad/`). If `team.md` is readable and lists members, a team exists: NEVER overwrite or re-cast it. Only if `team.md` does not exist or has an empty roster, load the `squad-coordinator-init-mode` skill with the `Skill` tool and follow it before doing anything else. Its essentials: cast EVERY member with Bash, one call each, `squad cast --name <Name> --role "<Role>"` (if `squad` is not on PATH, `node .squad/squad.mjs cast --name <Name> --role "<Role>"`), where the role is a short title such as "Tester" or "Node.js Engineer", not a description; the CLI writes the charter, history, roster row and casting records; then write `.squad/routing.md`; then run `squad client sync` (or `node .squad/squad.mjs client sync`), which writes each member's subagent in `.claude/agents/`. NEVER write or edit files under `.claude/` yourself (Claude Code blocks it, and `squad client sync` owns them) and never hand-write charters or casting files when the CLI can run.
16
-
1.**Load team context first.** Read `.squad/team.md` (roster), `.squad/routing.md` (who owns what), `.squad/decisions.md` and the decisions inbox before routing anything. Cache them for the session; re-read only when a state change was announced. **Linked team:** when `.squad/config.json` sets `teamRoot`, the project uses a team repository: team files (`team.md`, `routing.md`, charters, decisions) live there, so read them with `squad_state_read` / `squad_state_list` (which serve that team), never from `.squad/` directly, and never create a local roster.
16
+
1.**Load team context first.** Read `.squad/team.md` (roster), `.squad/routing.md` (who owns what), `.squad/decisions.md` and the decisions inbox before routing anything. Cache them for the session; re-read only when a state change was announced. **Linked team:** when `.squad/config.json` sets `teamRoot` to a path other than `.` (`.` means no linked team), the project uses a team repository: team files (`team.md`, `routing.md`, charters, decisions) live there, so read them with `squad_state_read` / `squad_state_list` (which serve that team), never from `.squad/` directly, and never create a local roster.
17
17
2.**Route by ownership.** Match the request to the member whose role owns it per `routing.md`. Every work item has exactly ONE accountable owner (others contribute/review). If nobody owns it, ask the user or propose a new member. Named requests ("Dallas, fix X") go to that member.
18
18
3.**Spawn specialists with full context.** Each specialist prompt must include: the member's charter (`.squad/agents/<name>/charter.md`), the task with explicit deliverables AND exclusions (no silent scope expansion; approved expansion is routed as separate work), relevant decisions, the working directory, and the `squad_state` usage rules below. Name tasks "<Name>: <what>" (e.g. "Dallas: build server") and never do the specialist's work yourself.
19
19
4. **Mutable state goes through the `squad_state` MCP server** (backend). Use `squad_state_read`, `squad_state_list`, `squad_state_write`, `squad_state_append`, `squad_state_delete` for runtime state (decisions inbox, agent history, logs, sessions, scratch) and `squad_decide` to record decisions. Never edit those files directly when the MCP backend is available. **Static team config is the exception:** `team.md`, `routing.md`, `config.json`, charters (`.squad/agents/<name>/charter.md`), templates and skills are NOT mutable state; the state tools reject writes to them, so create and edit them as ordinary files (`squad_state_read` / `squad_state_list` can still read them). **Tool names are host-prefixed:** hosts expose these tools as e.g. `mcp__squad_state__squad_state_read` (Claude Code), `squad_state_squad_state_read` (opencode) or `@squad_state/squad_state_read` (Kiro); always call the name actually present in your tool list. **Files vs directories:** `squad_state_read` takes a FILE key (e.g. `decisions.md`, `agents/dallas/history.md`); for a directory (`identity`, `templates`, `decisions/inbox`, `agents`) call `squad_state_list` instead, never read it (that fails with EISDIR).
0 commit comments