Repository navigation
Description
Part of #2438 (PR 3 of the epic's PR plan, Waves 2–3). Starts after PR 1 merges. Can be developed in parallel with PR 2; they don't touch the same files.
Goal
"Claude projection v2": Claude Code gets per-member subagents, skills, a slimmer coordinator, opt-in governance hooks and a squad watch preset. Bundled so the Claude projection version is bumped once (harness-adapters §5), with one rollback suite and one upgrade diff for users.
If this gets too big to review, split Phase 3 (hooks) into its own PR for the security review. Hooks are opt-in and advisory, so a split needs no extra version bump.
Settle before implementing
Record the answer in #2438 or the PR description:
- Open question 1: the charter extension namespace for host settings (charter §8): one per host (e.g.
X-claude-*) or a single Squad-registered namespace.squadis reserved for the spec project.
Phase 2: charters compile to Claude member subagents
Charter v0.1 §6 and Execution Preferences v0.1 §2 map onto Claude subagent frontmatter:
| Charter field | .claude/agents/<id>.md |
|---|---|
Identity: ID |
name |
Identity: Purpose |
description (plus routing ownership from routing.md) |
Model: Preferred |
model, omitted when auto (charter §6) |
Model: Reasoning Effort |
effort (low / medium / high / xhigh / max) |
Model: Context Tier |
long-context model where available; otherwise report the loss (exec-prefs §6) |
- Add a Claude target to
packages/squad-sdk/src/agents/charter-compiler.ts(today it emits onlySquadCustomAgentConfig). (Landed inclient/adapters/claude-members.ts, which usesparseCharterMarkdownfrom the compiler.) - Carry host-only settings in a charter extension: a
toolsallowlist (e.g. read-only Scribe and Fact Checker) andisolation: worktreefor implementers. These are runtime config, not authorization (charter §13.1). -
squad castandsquad upgrade --client claudewrite one managed.claude/agents/<id>.mdper member, plus the built-ins (Scribe, Ralph, Rai, Fact Checker). Only whenclaudeis inclients[]. If an unmanaged, user-authored file already exists, skip it and report; never overwrite. - The Claude dispatch section routes to named members, falling back to today's generic subagent with the pasted charter when a member file is missing.
- Extend harness-adapters §7.1 / §7.3
supportFileswith the member files.
Phase 4: skills projection and coordinator slimming
- Write
templates/skills/*into.claude/skills/. - Move on-demand sections (Ralph mode, PRD mode, ceremonies, Issues mode, casting) out of the Claude coordinator into skills. The shared core digest and
.github/agents/squad.agent.mddo not change. - Keep skill precedence (
.squad/skills/first) and the untrusted-content rule.
Phase 3: governance through Claude Code hooks
Off by default, behind a .squad/config.json flag. The first release runs lockout in advisory mode (log and warn, never deny).
- PreToolUse: reviewer lockout per governance-review §6. An
Edit/Writeby an author in the review subject's lockout set is flagged (advisory) with the reason fromsquad_state. (Advisory, as written: the reason comes from the durable lockout recordgovernance/lockouts.json, managed bysquad lockout.) - SessionStart: run the
squad_state_healthversion/dir handshake and inject roster and routing context. (Injects the roster, routing and the version and team dir thatsquad_state_healthmust report; the coordinator runs the handshake.) - SubagentStop / Stop: emit the coordination-handoff
resultenvelope, trigger Scribe's inbox merge when the inbox is non-empty, and apply the Ralph circuit breaker. (The envelope comes fromPostToolUseonAgent: Claude Code deliversSubagentStopcontext to the subagent, not the parent. A background launch is anacknowledgement, not aresult.Stophandles the Scribe inbox and the Ralph circuit breaker.) - Project the hooks into
.claude/settings.jsonas a Squad-owned, additively merged block (same rules as.mcp.json; never touch user hooks). This makes the advertisednative-hookstoken inpackages/squad-sdk/src/client/adapters/capabilities.tstrue. - Tests: lockout flag/denial path, an override recorded by an authority, the deadlocked state, and hook removal on rollback.
Phase 6: watch preset
- Add a built-in Claude preset for
squad watch --execute(packages/squad-cli/src/cli/commands/watch/), e.g.claude -p {prompt} --agent squad --mcp-config .mcp.json --output-format stream-json. Flipralph-cli-triage-watch.claudefromdegradedin the matrix. The default runner is unchanged. (--agent-preset claude. The MCP config holds onlysquad_state, resolved by the CLI, never the repository's.mcp.json.) - Separately, as research rather than code: find out whether gh-aw supports a Claude engine and record it in Epic: Claude Code as a first-class Squad 2.0 host, and the non-Copilot host that promotes the v0.2 profiles #2438. If it does, re-evaluate the
gh-aw.claudecell. (Recorded: Epic: Claude Code as a first-class Squad 2.0 host, and the non-Copilot host that promotes the v0.2 profiles #2438 (comment). Thegh-aw.claudecell was re-evaluated and staysn/a, with corrected notes.)
Projection version
- Bump the Claude projection version once for the member files, skills and
settings.jsonblock. (CLAUDE_PROJECTION_VERSION = 2.) - Byte-preserving rollback tests for every new file (harness-adapters §15.7).
Delivered in #2450.
Done when
- All checkboxes above are ticked (or Phase 3 is split out to its own PR).
- The new tests pass, and the regression guards from PR 1 stay green: Copilot output is byte-identical, and repos without
claudeinclients[]see no diff. - The matrix has no Claude cell
unsupportedordegradedwhere Claude Code has a native primitive (model selection, Ralph watch, hooks).
Activity
github-actions commentedon Nov 9, 2026
📋 Assigned to security-reviewer (Security Reviewer)
Issue: #2442 — Claude host PR 3: Claude projection v2 (member subagents, skills, hooks, watch preset) (#2438 Phases 2, 3, 4, 6)
security-reviewer will pick this up in the next Copilot session.
docs(claude): align Claude Code spec, docs and matrix with the code; …
docs(claude): align Claude Code spec, docs and matrix with the code; …
docs(claude): align Claude Code spec, docs and matrix with the code; …
bradygaster commentedon Nov 9, 2026
Settled: open question 1, the charter extension namespace for host settings
Host-only settings go in a single Squad-reserved namespace, with the host in the extension name:
Why: charter v0.1 §8 says third parties MUST use a namespace they control, and it reserves
squadfor the spec project. Squad doesn't controlclaude, so a per-host namespace likeX-claude-*would break that rule and could collide with someone else's extensions. UsingX-squad-host-<host>(namespacesquad, namehost-<host>) follows §8 exactly, and other hosts (X-squad-host-kiro, …) can be added without new namespaces. Field syntax matches the standard sections (- **Label:** value). Consumers that don't know the extension treat it as opaque, as §8 requires, and these values remain runtime config, not authorization (charter §13.1).docs(matrix): re-evaluate gh-aw.claude now that gh-aw has a Claude en…
feat(claude): Claude projection v2: member subagents, skills, governa…