Skip to content

Claude host PR 3: Claude projection v2 (member subagents, skills, hooks, watch preset) (#2438 Phases 2, 3, 4, 6) #2442

Closed

Description

@bradygaster

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. squad is 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 only SquadCustomAgentConfig). (Landed in client/adapters/claude-members.ts, which uses parseCharterMarkdown from the compiler.)
  • Carry host-only settings in a charter extension: a tools allowlist (e.g. read-only Scribe and Fact Checker) and isolation: worktree for implementers. These are runtime config, not authorization (charter §13.1).
  • squad cast and squad upgrade --client claude write one managed .claude/agents/<id>.md per member, plus the built-ins (Scribe, Ralph, Rai, Fact Checker). Only when claude is in clients[]. 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 supportFiles with 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.md do 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/Write by an author in the review subject's lockout set is flagged (advisory) with the reason from squad_state. (Advisory, as written: the reason comes from the durable lockout record governance/lockouts.json, managed by squad lockout.)
  • SessionStart: run the squad_state_health version/dir handshake and inject roster and routing context. (Injects the roster, routing and the version and team dir that squad_state_health must report; the coordinator runs the handshake.)
  • SubagentStop / Stop: emit the coordination-handoff result envelope, trigger Scribe's inbox merge when the inbox is non-empty, and apply the Ralph circuit breaker. (The envelope comes from PostToolUse on Agent: Claude Code delivers SubagentStop context to the subagent, not the parent. A background launch is an acknowledgement, not a result. Stop handles the Scribe inbox and the Ralph circuit breaker.)
  • Project the hooks into .claude/settings.json as a Squad-owned, additively merged block (same rules as .mcp.json; never touch user hooks). This makes the advertised native-hooks token in packages/squad-sdk/src/client/adapters/capabilities.ts true.
  • Tests: lockout flag/denial path, an override recorded by an authority, the deadlocked state, and hook removal on rollback.

Phase 6: watch preset

Projection version

  • Bump the Claude projection version once for the member files, skills and settings.json block. (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 claude in clients[] see no diff.
  • The matrix has no Claude cell unsupported or degraded where Claude Code has a native primitive (model selection, Ralph watch, hooks).

Activity

  1. added
    squadSquad triage inbox — Lead will assign to a member
    squad:agent-orchestration-devAssigned to agent-orchestration-dev (Agent Orchestration Engineer)
    squad:typescript-api-contract-designerAssigned to typescript-api-contract-designer (TypeScript API Contract Designer)
    squad:cli-devAssigned to cli-dev (CLI Engineer)
    squad:security-reviewerAssigned to security-reviewer (Security Reviewer)
    on Nov 9, 2026
  2. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    📋 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.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    security-reviewer, work on issue #2442

  3. bradygaster commented on Nov 9, 2026

    @bradygaster
    CollaboratorAuthor

    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:

    ## X-squad-host-claude
    - **Tools:** Read, Grep, Glob
    - **Isolation:** worktree

    Why: charter v0.1 §8 says third parties MUST use a namespace they control, and it reserves squad for the spec project. Squad doesn't control claude, so a per-host namespace like X-claude-* would break that rule and could collide with someone else's extensions. Using X-squad-host-<host> (namespace squad, name host-<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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    squadSquad triage inbox — Lead will assign to a membersquad:agent-orchestration-devAssigned to agent-orchestration-dev (Agent Orchestration Engineer)squad:cli-devAssigned to cli-dev (CLI Engineer)squad:security-reviewerAssigned to security-reviewer (Security Reviewer)squad:typescript-api-contract-designerAssigned to typescript-api-contract-designer (TypeScript API Contract Designer)type:featureNew capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions