Skip to content

feat: Machine capability routing — K8s-style node affinity for agent workloads #599

Closed

Description

@tamirdresher

Problem

Multi-machine squad deployments waste rounds when agents pick up work they can't complete (e.g., browser automation on a headless server, corp-network access from a cloud runner).

Proposal

K8s node affinity pattern for Squad:

Machine side: ~/.squad/machine-capabilities.json

{
  "machineId": "MY-MACHINE",
  "capabilities": ["browser", "personal-gh", "emu-gh", "teams-mcp"]
}

Workload side: GitHub issue labels with needs:* prefix (e.g., needs:browser, needs:kusto, needs:corp-network)

Matching: Before Ralph picks up any issue, check: does this machine have all required capabilities? If not, skip silently — another Ralph on a capable machine will handle it.

Multi-Ralph coordination: Claim issues via GitHub assignees before working. Branch names include machineId to prevent collisions. Heartbeat files for stale claim detection.

Prior Art

Running in production with 2 machines (local dev + DevBox). Successfully routes WhatsApp monitoring to local machine, Kusto queries to DevBox, and GitHub work to either.

Deliverables

  • machine-capabilities.json schema + squad init auto-detection
  • Test-MachineCapability function for ralph-watch
  • Docs: multi-machine setup guide
  • needs:* label convention in routing docs

Activity

  1. tamirdresher commented on Mar 24, 2026

    @tamirdresher
    CollaboratorAuthor

    Closing — this already exists in the SDK: packages/squad-sdk/src/ralph/capabilities.ts (loadCapabilities, extractNeeds, canHandleIssue, filterByCapabilities), CLI watch loop integration, and docs at docs/features/capability-routing.md. Nice work Brady 👍

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions