@bradygaster/squad-sdk 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +296 -296
- package/dist/agents/history-shadow.js +30 -30
- package/dist/build/github-dist.js +42 -42
- package/dist/config/init.js +173 -173
- package/dist/sharing/consult.js +78 -78
- package/package.json +1 -1
- package/templates/casting/Futurama.json +9 -9
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +37 -37
- package/templates/casting-reference.md +104 -104
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/cooperative-rate-limiting.md +229 -229
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/issue-lifecycle.md +412 -412
- package/templates/keda-scaler.md +164 -164
- package/templates/machine-capabilities.md +74 -74
- package/templates/mcp-config.md +90 -90
- package/templates/multi-agent-format.md +28 -28
- package/templates/plugin-marketplace.md +49 -49
- package/templates/ralph-circuit-breaker.md +313 -313
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +39 -39
- package/templates/run-output.md +50 -50
- package/templates/schedule.json +19 -19
- package/templates/scribe-charter.md +119 -119
- package/templates/skill.md +24 -24
- package/templates/skills/agent-collaboration/SKILL.md +42 -42
- package/templates/skills/agent-conduct/SKILL.md +24 -24
- package/templates/skills/architectural-proposals/SKILL.md +151 -151
- package/templates/skills/ci-validation-gates/SKILL.md +84 -84
- package/templates/skills/cli-wiring/SKILL.md +47 -47
- package/templates/skills/client-compatibility/SKILL.md +89 -89
- package/templates/skills/cross-squad/SKILL.md +114 -114
- package/templates/skills/distributed-mesh/SKILL.md +287 -287
- package/templates/skills/distributed-mesh/mesh.json.example +30 -30
- package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
- package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
- package/templates/skills/docs-standards/SKILL.md +71 -71
- package/templates/skills/economy-mode/SKILL.md +114 -114
- package/templates/skills/external-comms/SKILL.md +329 -329
- package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
- package/templates/skills/git-workflow/SKILL.md +204 -204
- package/templates/skills/github-multi-account/SKILL.md +95 -95
- package/templates/skills/history-hygiene/SKILL.md +36 -36
- package/templates/skills/humanizer/SKILL.md +105 -105
- package/templates/skills/init-mode/SKILL.md +102 -102
- package/templates/skills/model-selection/SKILL.md +117 -117
- package/templates/skills/nap/SKILL.md +24 -24
- package/templates/skills/personal-squad/SKILL.md +57 -57
- package/templates/skills/project-conventions/SKILL.md +56 -56
- package/templates/skills/release-process/SKILL.md +423 -423
- package/templates/skills/reskill/SKILL.md +92 -92
- package/templates/skills/reviewer-protocol/SKILL.md +79 -79
- package/templates/skills/secret-handling/SKILL.md +200 -200
- package/templates/skills/session-recovery/SKILL.md +155 -155
- package/templates/skills/squad-conventions/SKILL.md +69 -69
- package/templates/skills/test-discipline/SKILL.md +37 -37
- package/templates/skills/windows-compatibility/SKILL.md +74 -74
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +54 -54
- package/templates/workflows/squad-heartbeat.yml +171 -171
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -120
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- package/templates/workflows/sync-squad-labels.yml +169 -169
package/templates/keda-scaler.md
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
# KEDA External Scaler for GitHub Issue-Driven Agent Autoscaling
|
|
2
|
-
|
|
3
|
-
> Scale agent pods to zero when idle, up when work arrives — driven by GitHub Issues.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
When running Squad on Kubernetes, agent pods sit idle when no work exists. [KEDA](https://keda.sh) (Kubernetes Event-Driven Autoscaler) solves this for queue-based workloads, but GitHub Issues isn't a native KEDA trigger.
|
|
8
|
-
|
|
9
|
-
The `keda-copilot-scaler` is a KEDA External Scaler (gRPC) that bridges this gap:
|
|
10
|
-
1. Polls GitHub API for issues matching specific labels (e.g., `squad:copilot`)
|
|
11
|
-
2. Reports queue depth as a KEDA metric
|
|
12
|
-
3. Handles rate limits gracefully (Retry-After, exponential backoff)
|
|
13
|
-
4. Supports composite scaling decisions
|
|
14
|
-
|
|
15
|
-
## Quick Start
|
|
16
|
-
|
|
17
|
-
### Prerequisites
|
|
18
|
-
- Kubernetes cluster with KEDA v2.x installed
|
|
19
|
-
- GitHub personal access token (PAT) with `repo` scope
|
|
20
|
-
- Helm 3.x
|
|
21
|
-
|
|
22
|
-
### 1. Install the Scaler
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
helm install keda-copilot-scaler oci://ghcr.io/tamirdresher/keda-copilot-scaler \
|
|
26
|
-
--namespace squad-scaler --create-namespace \
|
|
27
|
-
--set github.owner=YOUR_ORG \
|
|
28
|
-
--set github.repo=YOUR_REPO \
|
|
29
|
-
--set github.token=YOUR_TOKEN
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Or with Kustomize:
|
|
33
|
-
```bash
|
|
34
|
-
kubectl apply -k https://github.com/tamirdresher/keda-copilot-scaler/deploy/kustomize
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 2. Create a ScaledObject
|
|
38
|
-
|
|
39
|
-
```yaml
|
|
40
|
-
apiVersion: keda.sh/v1alpha1
|
|
41
|
-
kind: ScaledObject
|
|
42
|
-
metadata:
|
|
43
|
-
name: picard-scaler
|
|
44
|
-
namespace: squad
|
|
45
|
-
spec:
|
|
46
|
-
scaleTargetRef:
|
|
47
|
-
name: picard-deployment
|
|
48
|
-
minReplicaCount: 0 # Scale to zero when idle
|
|
49
|
-
maxReplicaCount: 3
|
|
50
|
-
pollingInterval: 30 # Check every 30 seconds
|
|
51
|
-
cooldownPeriod: 300 # Wait 5 minutes before scaling down
|
|
52
|
-
triggers:
|
|
53
|
-
- type: external
|
|
54
|
-
metadata:
|
|
55
|
-
scalerAddress: keda-copilot-scaler.squad-scaler.svc.cluster.local:6000
|
|
56
|
-
owner: your-org
|
|
57
|
-
repo: your-repo
|
|
58
|
-
labels: squad:copilot # Only count issues with this label
|
|
59
|
-
threshold: "1" # Scale up when >= 1 issue exists
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 3. Verify
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Check the scaler is running
|
|
66
|
-
kubectl get pods -n squad-scaler
|
|
67
|
-
|
|
68
|
-
# Check ScaledObject status
|
|
69
|
-
kubectl get scaledobject picard-scaler -n squad
|
|
70
|
-
|
|
71
|
-
# Watch scaling events
|
|
72
|
-
kubectl get events -n squad --watch
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Scaling Behavior
|
|
76
|
-
|
|
77
|
-
| Open Issues | Target Replicas | Behavior |
|
|
78
|
-
|------------|----------------|----------|
|
|
79
|
-
| 0 | 0 | Scale to zero — save resources |
|
|
80
|
-
| 1–3 | 1 | Single agent handles work |
|
|
81
|
-
| 4–10 | 2 | Scale up for parallel processing |
|
|
82
|
-
| 10+ | 3 (max) | Maximum parallelism |
|
|
83
|
-
|
|
84
|
-
The threshold and max replicas are configurable per ScaledObject.
|
|
85
|
-
|
|
86
|
-
## Rate Limit Awareness
|
|
87
|
-
|
|
88
|
-
The scaler tracks GitHub API rate limits:
|
|
89
|
-
- Reads `X-RateLimit-Remaining` from API responses
|
|
90
|
-
- Backs off when quota is low (< 100 remaining)
|
|
91
|
-
- Reports rate limit metrics as secondary KEDA triggers
|
|
92
|
-
- Never exhausts API quota from polling
|
|
93
|
-
|
|
94
|
-
## Integration with Squad
|
|
95
|
-
|
|
96
|
-
### Machine Capabilities (#514)
|
|
97
|
-
|
|
98
|
-
Combine with machine capability labels for intelligent scheduling:
|
|
99
|
-
|
|
100
|
-
```yaml
|
|
101
|
-
# Only scale pods on GPU-capable nodes
|
|
102
|
-
spec:
|
|
103
|
-
template:
|
|
104
|
-
spec:
|
|
105
|
-
nodeSelector:
|
|
106
|
-
node.squad.dev/gpu: "true"
|
|
107
|
-
triggers:
|
|
108
|
-
- type: external
|
|
109
|
-
metadata:
|
|
110
|
-
labels: squad:copilot,needs:gpu
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Cooperative Rate Limiting (#515)
|
|
114
|
-
|
|
115
|
-
The scaler exposes rate limit metrics that feed into the cooperative rate limiting system:
|
|
116
|
-
- Current `X-RateLimit-Remaining` value
|
|
117
|
-
- Predicted time to exhaustion (from predictive circuit breaker)
|
|
118
|
-
- Can return 0 target replicas when rate limited → pods scale to zero
|
|
119
|
-
|
|
120
|
-
## Architecture
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
GitHub API KEDA Kubernetes
|
|
124
|
-
┌──────────┐ ┌──────────┐ ┌──────────────┐
|
|
125
|
-
│ Issues │◄── poll ──►│ Scaler │──metrics─►│ HPA / KEDA │
|
|
126
|
-
│ (REST) │ │ (gRPC) │ │ Controller │
|
|
127
|
-
└──────────┘ └──────────┘ └──────┬───────┘
|
|
128
|
-
│
|
|
129
|
-
scale up/down
|
|
130
|
-
│
|
|
131
|
-
┌──────▼───────┐
|
|
132
|
-
│ Agent Pods │
|
|
133
|
-
│ (0–N replicas)│
|
|
134
|
-
└──────────────┘
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Configuration Reference
|
|
138
|
-
|
|
139
|
-
| Parameter | Default | Description |
|
|
140
|
-
|-----------|---------|-------------|
|
|
141
|
-
| `github.owner` | — | Repository owner |
|
|
142
|
-
| `github.repo` | — | Repository name |
|
|
143
|
-
| `github.token` | — | GitHub PAT with `repo` scope |
|
|
144
|
-
| `github.labels` | `squad:copilot` | Comma-separated label filter |
|
|
145
|
-
| `scaler.port` | `6000` | gRPC server port |
|
|
146
|
-
| `scaler.pollInterval` | `30s` | GitHub API polling interval |
|
|
147
|
-
| `scaler.rateLimitThreshold` | `100` | Stop polling below this remaining |
|
|
148
|
-
|
|
149
|
-
## Source & Contributing
|
|
150
|
-
|
|
151
|
-
- **Repository:** [tamirdresher/keda-copilot-scaler](https://github.com/tamirdresher/keda-copilot-scaler)
|
|
152
|
-
- **License:** MIT
|
|
153
|
-
- **Language:** Go
|
|
154
|
-
- **Tests:** 51 passing (unit + integration)
|
|
155
|
-
- **CI:** GitHub Actions
|
|
156
|
-
|
|
157
|
-
The scaler is maintained as a standalone project. PRs and issues welcome.
|
|
158
|
-
|
|
159
|
-
## References
|
|
160
|
-
|
|
161
|
-
- [KEDA External Scalers](https://keda.sh/docs/latest/concepts/external-scalers/) — KEDA documentation
|
|
162
|
-
- [Squad on AKS](https://github.com/tamirdresher/squad-on-aks) — Full Kubernetes deployment example
|
|
163
|
-
- [Machine Capabilities](machine-capabilities.md) — Capability-based routing (#514)
|
|
164
|
-
- [Cooperative Rate Limiting](cooperative-rate-limiting.md) — Multi-agent rate management (#515)
|
|
1
|
+
# KEDA External Scaler for GitHub Issue-Driven Agent Autoscaling
|
|
2
|
+
|
|
3
|
+
> Scale agent pods to zero when idle, up when work arrives — driven by GitHub Issues.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
When running Squad on Kubernetes, agent pods sit idle when no work exists. [KEDA](https://keda.sh) (Kubernetes Event-Driven Autoscaler) solves this for queue-based workloads, but GitHub Issues isn't a native KEDA trigger.
|
|
8
|
+
|
|
9
|
+
The `keda-copilot-scaler` is a KEDA External Scaler (gRPC) that bridges this gap:
|
|
10
|
+
1. Polls GitHub API for issues matching specific labels (e.g., `squad:copilot`)
|
|
11
|
+
2. Reports queue depth as a KEDA metric
|
|
12
|
+
3. Handles rate limits gracefully (Retry-After, exponential backoff)
|
|
13
|
+
4. Supports composite scaling decisions
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Prerequisites
|
|
18
|
+
- Kubernetes cluster with KEDA v2.x installed
|
|
19
|
+
- GitHub personal access token (PAT) with `repo` scope
|
|
20
|
+
- Helm 3.x
|
|
21
|
+
|
|
22
|
+
### 1. Install the Scaler
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
helm install keda-copilot-scaler oci://ghcr.io/tamirdresher/keda-copilot-scaler \
|
|
26
|
+
--namespace squad-scaler --create-namespace \
|
|
27
|
+
--set github.owner=YOUR_ORG \
|
|
28
|
+
--set github.repo=YOUR_REPO \
|
|
29
|
+
--set github.token=YOUR_TOKEN
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or with Kustomize:
|
|
33
|
+
```bash
|
|
34
|
+
kubectl apply -k https://github.com/tamirdresher/keda-copilot-scaler/deploy/kustomize
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Create a ScaledObject
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
apiVersion: keda.sh/v1alpha1
|
|
41
|
+
kind: ScaledObject
|
|
42
|
+
metadata:
|
|
43
|
+
name: picard-scaler
|
|
44
|
+
namespace: squad
|
|
45
|
+
spec:
|
|
46
|
+
scaleTargetRef:
|
|
47
|
+
name: picard-deployment
|
|
48
|
+
minReplicaCount: 0 # Scale to zero when idle
|
|
49
|
+
maxReplicaCount: 3
|
|
50
|
+
pollingInterval: 30 # Check every 30 seconds
|
|
51
|
+
cooldownPeriod: 300 # Wait 5 minutes before scaling down
|
|
52
|
+
triggers:
|
|
53
|
+
- type: external
|
|
54
|
+
metadata:
|
|
55
|
+
scalerAddress: keda-copilot-scaler.squad-scaler.svc.cluster.local:6000
|
|
56
|
+
owner: your-org
|
|
57
|
+
repo: your-repo
|
|
58
|
+
labels: squad:copilot # Only count issues with this label
|
|
59
|
+
threshold: "1" # Scale up when >= 1 issue exists
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. Verify
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Check the scaler is running
|
|
66
|
+
kubectl get pods -n squad-scaler
|
|
67
|
+
|
|
68
|
+
# Check ScaledObject status
|
|
69
|
+
kubectl get scaledobject picard-scaler -n squad
|
|
70
|
+
|
|
71
|
+
# Watch scaling events
|
|
72
|
+
kubectl get events -n squad --watch
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Scaling Behavior
|
|
76
|
+
|
|
77
|
+
| Open Issues | Target Replicas | Behavior |
|
|
78
|
+
|------------|----------------|----------|
|
|
79
|
+
| 0 | 0 | Scale to zero — save resources |
|
|
80
|
+
| 1–3 | 1 | Single agent handles work |
|
|
81
|
+
| 4–10 | 2 | Scale up for parallel processing |
|
|
82
|
+
| 10+ | 3 (max) | Maximum parallelism |
|
|
83
|
+
|
|
84
|
+
The threshold and max replicas are configurable per ScaledObject.
|
|
85
|
+
|
|
86
|
+
## Rate Limit Awareness
|
|
87
|
+
|
|
88
|
+
The scaler tracks GitHub API rate limits:
|
|
89
|
+
- Reads `X-RateLimit-Remaining` from API responses
|
|
90
|
+
- Backs off when quota is low (< 100 remaining)
|
|
91
|
+
- Reports rate limit metrics as secondary KEDA triggers
|
|
92
|
+
- Never exhausts API quota from polling
|
|
93
|
+
|
|
94
|
+
## Integration with Squad
|
|
95
|
+
|
|
96
|
+
### Machine Capabilities (#514)
|
|
97
|
+
|
|
98
|
+
Combine with machine capability labels for intelligent scheduling:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
# Only scale pods on GPU-capable nodes
|
|
102
|
+
spec:
|
|
103
|
+
template:
|
|
104
|
+
spec:
|
|
105
|
+
nodeSelector:
|
|
106
|
+
node.squad.dev/gpu: "true"
|
|
107
|
+
triggers:
|
|
108
|
+
- type: external
|
|
109
|
+
metadata:
|
|
110
|
+
labels: squad:copilot,needs:gpu
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Cooperative Rate Limiting (#515)
|
|
114
|
+
|
|
115
|
+
The scaler exposes rate limit metrics that feed into the cooperative rate limiting system:
|
|
116
|
+
- Current `X-RateLimit-Remaining` value
|
|
117
|
+
- Predicted time to exhaustion (from predictive circuit breaker)
|
|
118
|
+
- Can return 0 target replicas when rate limited → pods scale to zero
|
|
119
|
+
|
|
120
|
+
## Architecture
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
GitHub API KEDA Kubernetes
|
|
124
|
+
┌──────────┐ ┌──────────┐ ┌──────────────┐
|
|
125
|
+
│ Issues │◄── poll ──►│ Scaler │──metrics─►│ HPA / KEDA │
|
|
126
|
+
│ (REST) │ │ (gRPC) │ │ Controller │
|
|
127
|
+
└──────────┘ └──────────┘ └──────┬───────┘
|
|
128
|
+
│
|
|
129
|
+
scale up/down
|
|
130
|
+
│
|
|
131
|
+
┌──────▼───────┐
|
|
132
|
+
│ Agent Pods │
|
|
133
|
+
│ (0–N replicas)│
|
|
134
|
+
└──────────────┘
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Configuration Reference
|
|
138
|
+
|
|
139
|
+
| Parameter | Default | Description |
|
|
140
|
+
|-----------|---------|-------------|
|
|
141
|
+
| `github.owner` | — | Repository owner |
|
|
142
|
+
| `github.repo` | — | Repository name |
|
|
143
|
+
| `github.token` | — | GitHub PAT with `repo` scope |
|
|
144
|
+
| `github.labels` | `squad:copilot` | Comma-separated label filter |
|
|
145
|
+
| `scaler.port` | `6000` | gRPC server port |
|
|
146
|
+
| `scaler.pollInterval` | `30s` | GitHub API polling interval |
|
|
147
|
+
| `scaler.rateLimitThreshold` | `100` | Stop polling below this remaining |
|
|
148
|
+
|
|
149
|
+
## Source & Contributing
|
|
150
|
+
|
|
151
|
+
- **Repository:** [tamirdresher/keda-copilot-scaler](https://github.com/tamirdresher/keda-copilot-scaler)
|
|
152
|
+
- **License:** MIT
|
|
153
|
+
- **Language:** Go
|
|
154
|
+
- **Tests:** 51 passing (unit + integration)
|
|
155
|
+
- **CI:** GitHub Actions
|
|
156
|
+
|
|
157
|
+
The scaler is maintained as a standalone project. PRs and issues welcome.
|
|
158
|
+
|
|
159
|
+
## References
|
|
160
|
+
|
|
161
|
+
- [KEDA External Scalers](https://keda.sh/docs/latest/concepts/external-scalers/) — KEDA documentation
|
|
162
|
+
- [Squad on AKS](https://github.com/tamirdresher/squad-on-aks) — Full Kubernetes deployment example
|
|
163
|
+
- [Machine Capabilities](machine-capabilities.md) — Capability-based routing (#514)
|
|
164
|
+
- [Cooperative Rate Limiting](cooperative-rate-limiting.md) — Multi-agent rate management (#515)
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
# Machine Capability Discovery & Label-Based Routing
|
|
2
|
-
|
|
3
|
-
> Enable Ralph to skip issues requiring capabilities the current machine lacks.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
When running Squad across multiple machines (laptops, DevBoxes, GPU servers, Kubernetes nodes), each machine has different tooling. The capability system lets you declare what each machine can do, and Ralph automatically routes work accordingly.
|
|
8
|
-
|
|
9
|
-
## Setup
|
|
10
|
-
|
|
11
|
-
### 1. Create a Capabilities Manifest
|
|
12
|
-
|
|
13
|
-
Create `~/.squad/machine-capabilities.json` (user-wide) or `.squad/machine-capabilities.json` (project-local):
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"machine": "MY-LAPTOP",
|
|
18
|
-
"capabilities": ["browser", "personal-gh", "onedrive"],
|
|
19
|
-
"missing": ["gpu", "docker", "azure-speech"],
|
|
20
|
-
"lastUpdated": "2026-03-22T00:00:00Z"
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### 2. Label Issues with Requirements
|
|
25
|
-
|
|
26
|
-
Add `needs:*` labels to issues that require specific capabilities:
|
|
27
|
-
|
|
28
|
-
| Label | Meaning |
|
|
29
|
-
|-------|---------|
|
|
30
|
-
| `needs:browser` | Requires Playwright / browser automation |
|
|
31
|
-
| `needs:gpu` | Requires NVIDIA GPU |
|
|
32
|
-
| `needs:personal-gh` | Requires personal GitHub account |
|
|
33
|
-
| `needs:emu-gh` | Requires Enterprise Managed User account |
|
|
34
|
-
| `needs:azure-cli` | Requires authenticated Azure CLI |
|
|
35
|
-
| `needs:docker` | Requires Docker daemon |
|
|
36
|
-
| `needs:onedrive` | Requires OneDrive sync |
|
|
37
|
-
| `needs:teams-mcp` | Requires Teams MCP tools |
|
|
38
|
-
|
|
39
|
-
Custom capabilities are supported — any `needs:X` label works if `X` is in the machine's `capabilities` array.
|
|
40
|
-
|
|
41
|
-
### 3. Run Ralph
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
squad watch --interval 5
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Ralph will log skipped issues:
|
|
48
|
-
```
|
|
49
|
-
⏭️ Skipping #42 "Train ML model" — missing: gpu
|
|
50
|
-
✓ Triaged #43 "Fix CSS layout" → Picard (routing-rule)
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## How It Works
|
|
54
|
-
|
|
55
|
-
1. Ralph loads `machine-capabilities.json` at startup
|
|
56
|
-
2. For each open issue, Ralph extracts `needs:*` labels
|
|
57
|
-
3. If any required capability is missing, the issue is skipped
|
|
58
|
-
4. Issues without `needs:*` labels are always processed (opt-in system)
|
|
59
|
-
|
|
60
|
-
## Kubernetes Integration
|
|
61
|
-
|
|
62
|
-
On Kubernetes, machine capabilities map to node labels:
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
# Node labels (set by capability DaemonSet or manually)
|
|
66
|
-
node.squad.dev/gpu: "true"
|
|
67
|
-
node.squad.dev/browser: "true"
|
|
68
|
-
|
|
69
|
-
# Pod spec uses nodeSelector
|
|
70
|
-
spec:
|
|
71
|
-
nodeSelector:
|
|
72
|
-
node.squad.dev/gpu: "true"
|
|
73
|
-
```
|
|
74
|
-
|
|
1
|
+
# Machine Capability Discovery & Label-Based Routing
|
|
2
|
+
|
|
3
|
+
> Enable Ralph to skip issues requiring capabilities the current machine lacks.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
When running Squad across multiple machines (laptops, DevBoxes, GPU servers, Kubernetes nodes), each machine has different tooling. The capability system lets you declare what each machine can do, and Ralph automatically routes work accordingly.
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
### 1. Create a Capabilities Manifest
|
|
12
|
+
|
|
13
|
+
Create `~/.squad/machine-capabilities.json` (user-wide) or `.squad/machine-capabilities.json` (project-local):
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"machine": "MY-LAPTOP",
|
|
18
|
+
"capabilities": ["browser", "personal-gh", "onedrive"],
|
|
19
|
+
"missing": ["gpu", "docker", "azure-speech"],
|
|
20
|
+
"lastUpdated": "2026-03-22T00:00:00Z"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Label Issues with Requirements
|
|
25
|
+
|
|
26
|
+
Add `needs:*` labels to issues that require specific capabilities:
|
|
27
|
+
|
|
28
|
+
| Label | Meaning |
|
|
29
|
+
|-------|---------|
|
|
30
|
+
| `needs:browser` | Requires Playwright / browser automation |
|
|
31
|
+
| `needs:gpu` | Requires NVIDIA GPU |
|
|
32
|
+
| `needs:personal-gh` | Requires personal GitHub account |
|
|
33
|
+
| `needs:emu-gh` | Requires Enterprise Managed User account |
|
|
34
|
+
| `needs:azure-cli` | Requires authenticated Azure CLI |
|
|
35
|
+
| `needs:docker` | Requires Docker daemon |
|
|
36
|
+
| `needs:onedrive` | Requires OneDrive sync |
|
|
37
|
+
| `needs:teams-mcp` | Requires Teams MCP tools |
|
|
38
|
+
|
|
39
|
+
Custom capabilities are supported — any `needs:X` label works if `X` is in the machine's `capabilities` array.
|
|
40
|
+
|
|
41
|
+
### 3. Run Ralph
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
squad watch --interval 5
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Ralph will log skipped issues:
|
|
48
|
+
```
|
|
49
|
+
⏭️ Skipping #42 "Train ML model" — missing: gpu
|
|
50
|
+
✓ Triaged #43 "Fix CSS layout" → Picard (routing-rule)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## How It Works
|
|
54
|
+
|
|
55
|
+
1. Ralph loads `machine-capabilities.json` at startup
|
|
56
|
+
2. For each open issue, Ralph extracts `needs:*` labels
|
|
57
|
+
3. If any required capability is missing, the issue is skipped
|
|
58
|
+
4. Issues without `needs:*` labels are always processed (opt-in system)
|
|
59
|
+
|
|
60
|
+
## Kubernetes Integration
|
|
61
|
+
|
|
62
|
+
On Kubernetes, machine capabilities map to node labels:
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
# Node labels (set by capability DaemonSet or manually)
|
|
66
|
+
node.squad.dev/gpu: "true"
|
|
67
|
+
node.squad.dev/browser: "true"
|
|
68
|
+
|
|
69
|
+
# Pod spec uses nodeSelector
|
|
70
|
+
spec:
|
|
71
|
+
nodeSelector:
|
|
72
|
+
node.squad.dev/gpu: "true"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
75
|
A DaemonSet can run capability discovery on each node and maintain labels automatically. See the [squad-on-aks](https://github.com/tamirdresher/squad-on-aks) project for a complete Kubernetes deployment example.
|
package/templates/mcp-config.md
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
# MCP Integration — Configuration and Samples
|
|
2
|
-
|
|
3
|
-
MCP (Model Context Protocol) servers extend Squad with tools for external services — Trello, Aspire dashboards, Azure, Notion, and more. The user configures MCP servers in their environment; Squad discovers and uses them.
|
|
4
|
-
|
|
5
|
-
> **Full patterns:** Read `.squad/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, and graceful degradation.
|
|
6
|
-
|
|
7
|
-
## Config File Locations
|
|
8
|
-
|
|
9
|
-
Users configure MCP servers at these locations (checked in priority order):
|
|
10
|
-
1. **Repository-level:** `.copilot/mcp-config.json` (team-shared, committed to repo)
|
|
11
|
-
2. **Workspace-level:** `.vscode/mcp.json` (VS Code workspaces)
|
|
12
|
-
3. **User-level:** `~/.copilot/mcp-config.json` (personal)
|
|
13
|
-
4. **CLI override:** `--additional-mcp-config` flag (session-specific)
|
|
14
|
-
|
|
15
|
-
## Sample Config — Trello
|
|
16
|
-
|
|
17
|
-
```json
|
|
18
|
-
{
|
|
19
|
-
"mcpServers": {
|
|
20
|
-
"trello": {
|
|
21
|
-
"command": "npx",
|
|
22
|
-
"args": ["-y", "@trello/mcp-server"],
|
|
23
|
-
"env": {
|
|
24
|
-
"TRELLO_API_KEY": "${TRELLO_API_KEY}",
|
|
25
|
-
"TRELLO_TOKEN": "${TRELLO_TOKEN}"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Sample Config — GitHub
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"mcpServers": {
|
|
37
|
-
"github": {
|
|
38
|
-
"command": "npx",
|
|
39
|
-
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
40
|
-
"env": {
|
|
41
|
-
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Sample Config — Azure
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"mcpServers": {
|
|
53
|
-
"azure": {
|
|
54
|
-
"command": "npx",
|
|
55
|
-
"args": ["-y", "@azure/mcp-server"],
|
|
56
|
-
"env": {
|
|
57
|
-
"AZURE_SUBSCRIPTION_ID": "${AZURE_SUBSCRIPTION_ID}",
|
|
58
|
-
"AZURE_CLIENT_ID": "${AZURE_CLIENT_ID}",
|
|
59
|
-
"AZURE_CLIENT_SECRET": "${AZURE_CLIENT_SECRET}",
|
|
60
|
-
"AZURE_TENANT_ID": "${AZURE_TENANT_ID}"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Sample Config — Aspire
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"mcpServers": {
|
|
72
|
-
"aspire": {
|
|
73
|
-
"command": "npx",
|
|
74
|
-
"args": ["-y", "@aspire/mcp-server"],
|
|
75
|
-
"env": {
|
|
76
|
-
"ASPIRE_DASHBOARD_URL": "${ASPIRE_DASHBOARD_URL}"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Authentication Notes
|
|
84
|
-
|
|
85
|
-
- **GitHub MCP requires a separate token** from the `gh` CLI auth. Generate at https://github.com/settings/tokens
|
|
86
|
-
- **Trello requires API key + token** from https://trello.com/power-ups/admin
|
|
87
|
-
- **Azure requires service principal credentials** — see Azure docs for setup
|
|
88
|
-
- **Aspire uses the dashboard URL** — typically `http://localhost:18888` during local dev
|
|
89
|
-
|
|
90
|
-
Auth is a real blocker for some MCP servers. Users need separate tokens for GitHub MCP, Azure MCP, Trello MCP, etc. This is a documentation problem, not a code problem.
|
|
1
|
+
# MCP Integration — Configuration and Samples
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) servers extend Squad with tools for external services — Trello, Aspire dashboards, Azure, Notion, and more. The user configures MCP servers in their environment; Squad discovers and uses them.
|
|
4
|
+
|
|
5
|
+
> **Full patterns:** Read `.squad/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, and graceful degradation.
|
|
6
|
+
|
|
7
|
+
## Config File Locations
|
|
8
|
+
|
|
9
|
+
Users configure MCP servers at these locations (checked in priority order):
|
|
10
|
+
1. **Repository-level:** `.copilot/mcp-config.json` (team-shared, committed to repo)
|
|
11
|
+
2. **Workspace-level:** `.vscode/mcp.json` (VS Code workspaces)
|
|
12
|
+
3. **User-level:** `~/.copilot/mcp-config.json` (personal)
|
|
13
|
+
4. **CLI override:** `--additional-mcp-config` flag (session-specific)
|
|
14
|
+
|
|
15
|
+
## Sample Config — Trello
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"trello": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "@trello/mcp-server"],
|
|
23
|
+
"env": {
|
|
24
|
+
"TRELLO_API_KEY": "${TRELLO_API_KEY}",
|
|
25
|
+
"TRELLO_TOKEN": "${TRELLO_TOKEN}"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Sample Config — GitHub
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"github": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["-y", "@modelcontextprotocol/server-github"],
|
|
40
|
+
"env": {
|
|
41
|
+
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Sample Config — Azure
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"azure": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["-y", "@azure/mcp-server"],
|
|
56
|
+
"env": {
|
|
57
|
+
"AZURE_SUBSCRIPTION_ID": "${AZURE_SUBSCRIPTION_ID}",
|
|
58
|
+
"AZURE_CLIENT_ID": "${AZURE_CLIENT_ID}",
|
|
59
|
+
"AZURE_CLIENT_SECRET": "${AZURE_CLIENT_SECRET}",
|
|
60
|
+
"AZURE_TENANT_ID": "${AZURE_TENANT_ID}"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Sample Config — Aspire
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"aspire": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": ["-y", "@aspire/mcp-server"],
|
|
75
|
+
"env": {
|
|
76
|
+
"ASPIRE_DASHBOARD_URL": "${ASPIRE_DASHBOARD_URL}"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Authentication Notes
|
|
84
|
+
|
|
85
|
+
- **GitHub MCP requires a separate token** from the `gh` CLI auth. Generate at https://github.com/settings/tokens
|
|
86
|
+
- **Trello requires API key + token** from https://trello.com/power-ups/admin
|
|
87
|
+
- **Azure requires service principal credentials** — see Azure docs for setup
|
|
88
|
+
- **Aspire uses the dashboard URL** — typically `http://localhost:18888` during local dev
|
|
89
|
+
|
|
90
|
+
Auth is a real blocker for some MCP servers. Users need separate tokens for GitHub MCP, Azure MCP, Trello MCP, etc. This is a documentation problem, not a code problem.
|