@bradygaster/squad-cli 0.9.1 → 0.9.2-insider.6

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.
Files changed (320) hide show
  1. package/README.md +329 -329
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.js +10 -10
  4. package/dist/cli/commands/build.js.map +1 -1
  5. package/dist/cli/commands/config.d.ts +12 -0
  6. package/dist/cli/commands/config.d.ts.map +1 -0
  7. package/dist/cli/commands/config.js +157 -0
  8. package/dist/cli/commands/config.js.map +1 -0
  9. package/dist/cli/commands/consult.d.ts.map +1 -1
  10. package/dist/cli/commands/consult.js +9 -4
  11. package/dist/cli/commands/consult.js.map +1 -1
  12. package/dist/cli/commands/copilot.d.ts.map +1 -1
  13. package/dist/cli/commands/copilot.js +8 -7
  14. package/dist/cli/commands/copilot.js.map +1 -1
  15. package/dist/cli/commands/doctor.d.ts.map +1 -1
  16. package/dist/cli/commands/doctor.js +50 -17
  17. package/dist/cli/commands/doctor.js.map +1 -1
  18. package/dist/cli/commands/economy.d.ts.map +1 -1
  19. package/dist/cli/commands/economy.js +3 -2
  20. package/dist/cli/commands/economy.js.map +1 -1
  21. package/dist/cli/commands/export.d.ts.map +1 -1
  22. package/dist/cli/commands/export.js +22 -16
  23. package/dist/cli/commands/export.js.map +1 -1
  24. package/dist/cli/commands/extract.d.ts.map +1 -1
  25. package/dist/cli/commands/extract.js +14 -10
  26. package/dist/cli/commands/extract.js.map +1 -1
  27. package/dist/cli/commands/import.d.ts.map +1 -1
  28. package/dist/cli/commands/import.js +21 -18
  29. package/dist/cli/commands/import.js.map +1 -1
  30. package/dist/cli/commands/init-remote.d.ts.map +1 -1
  31. package/dist/cli/commands/init-remote.js +7 -6
  32. package/dist/cli/commands/init-remote.js.map +1 -1
  33. package/dist/cli/commands/link.d.ts.map +1 -1
  34. package/dist/cli/commands/link.js +11 -10
  35. package/dist/cli/commands/link.js.map +1 -1
  36. package/dist/cli/commands/migrate.d.ts.map +1 -1
  37. package/dist/cli/commands/migrate.js +19 -18
  38. package/dist/cli/commands/migrate.js.map +1 -1
  39. package/dist/cli/commands/personal.d.ts.map +1 -1
  40. package/dist/cli/commands/personal.js +57 -65
  41. package/dist/cli/commands/personal.js.map +1 -1
  42. package/dist/cli/commands/plugin.d.ts.map +1 -1
  43. package/dist/cli/commands/plugin.js +8 -7
  44. package/dist/cli/commands/plugin.js.map +1 -1
  45. package/dist/cli/commands/rc.d.ts.map +1 -1
  46. package/dist/cli/commands/rc.js +19 -12
  47. package/dist/cli/commands/rc.js.map +1 -1
  48. package/dist/cli/commands/schedule.d.ts.map +1 -1
  49. package/dist/cli/commands/schedule.js +6 -5
  50. package/dist/cli/commands/schedule.js.map +1 -1
  51. package/dist/cli/commands/start.d.ts.map +1 -1
  52. package/dist/cli/commands/start.js +18 -11
  53. package/dist/cli/commands/start.js.map +1 -1
  54. package/dist/cli/commands/streams.d.ts.map +1 -1
  55. package/dist/cli/commands/streams.js +3 -2
  56. package/dist/cli/commands/streams.js.map +1 -1
  57. package/dist/cli/commands/upstream.d.ts.map +1 -1
  58. package/dist/cli/commands/upstream.js +23 -19
  59. package/dist/cli/commands/upstream.js.map +1 -1
  60. package/dist/cli/commands/watch/capabilities/board.d.ts +22 -0
  61. package/dist/cli/commands/watch/capabilities/board.d.ts.map +1 -0
  62. package/dist/cli/commands/watch/capabilities/board.js +121 -0
  63. package/dist/cli/commands/watch/capabilities/board.js.map +1 -0
  64. package/dist/cli/commands/watch/capabilities/budget-check.d.ts +29 -0
  65. package/dist/cli/commands/watch/capabilities/budget-check.d.ts.map +1 -0
  66. package/dist/cli/commands/watch/capabilities/budget-check.js +38 -0
  67. package/dist/cli/commands/watch/capabilities/budget-check.js.map +1 -0
  68. package/dist/cli/commands/watch/capabilities/circuit-breaker.d.ts +52 -0
  69. package/dist/cli/commands/watch/capabilities/circuit-breaker.d.ts.map +1 -0
  70. package/dist/cli/commands/watch/capabilities/circuit-breaker.js +152 -0
  71. package/dist/cli/commands/watch/capabilities/circuit-breaker.js.map +1 -0
  72. package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts +14 -0
  73. package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -0
  74. package/dist/cli/commands/watch/capabilities/decision-hygiene.js +72 -0
  75. package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -0
  76. package/dist/cli/commands/watch/capabilities/execute.d.ts +33 -0
  77. package/dist/cli/commands/watch/capabilities/execute.d.ts.map +1 -0
  78. package/dist/cli/commands/watch/capabilities/execute.js +156 -0
  79. package/dist/cli/commands/watch/capabilities/execute.js.map +1 -0
  80. package/dist/cli/commands/watch/capabilities/health-check.d.ts +29 -0
  81. package/dist/cli/commands/watch/capabilities/health-check.d.ts.map +1 -0
  82. package/dist/cli/commands/watch/capabilities/health-check.js +139 -0
  83. package/dist/cli/commands/watch/capabilities/health-check.js.map +1 -0
  84. package/dist/cli/commands/watch/capabilities/heartbeat.d.ts +48 -0
  85. package/dist/cli/commands/watch/capabilities/heartbeat.d.ts.map +1 -0
  86. package/dist/cli/commands/watch/capabilities/heartbeat.js +115 -0
  87. package/dist/cli/commands/watch/capabilities/heartbeat.js.map +1 -0
  88. package/dist/cli/commands/watch/capabilities/index.d.ts +9 -0
  89. package/dist/cli/commands/watch/capabilities/index.d.ts.map +1 -0
  90. package/dist/cli/commands/watch/capabilities/index.js +40 -0
  91. package/dist/cli/commands/watch/capabilities/index.js.map +1 -0
  92. package/dist/cli/commands/watch/capabilities/lockfile.d.ts +30 -0
  93. package/dist/cli/commands/watch/capabilities/lockfile.d.ts.map +1 -0
  94. package/dist/cli/commands/watch/capabilities/lockfile.js +100 -0
  95. package/dist/cli/commands/watch/capabilities/lockfile.js.map +1 -0
  96. package/dist/cli/commands/watch/capabilities/machine-capabilities.d.ts +30 -0
  97. package/dist/cli/commands/watch/capabilities/machine-capabilities.d.ts.map +1 -0
  98. package/dist/cli/commands/watch/capabilities/machine-capabilities.js +103 -0
  99. package/dist/cli/commands/watch/capabilities/machine-capabilities.js.map +1 -0
  100. package/dist/cli/commands/watch/capabilities/monitor-email.d.ts +14 -0
  101. package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -0
  102. package/dist/cli/commands/watch/capabilities/monitor-email.js +54 -0
  103. package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -0
  104. package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts +14 -0
  105. package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -0
  106. package/dist/cli/commands/watch/capabilities/monitor-teams.js +55 -0
  107. package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -0
  108. package/dist/cli/commands/watch/capabilities/post-failure.d.ts +19 -0
  109. package/dist/cli/commands/watch/capabilities/post-failure.d.ts.map +1 -0
  110. package/dist/cli/commands/watch/capabilities/post-failure.js +58 -0
  111. package/dist/cli/commands/watch/capabilities/post-failure.js.map +1 -0
  112. package/dist/cli/commands/watch/capabilities/priority.d.ts +59 -0
  113. package/dist/cli/commands/watch/capabilities/priority.d.ts.map +1 -0
  114. package/dist/cli/commands/watch/capabilities/priority.js +101 -0
  115. package/dist/cli/commands/watch/capabilities/priority.js.map +1 -0
  116. package/dist/cli/commands/watch/capabilities/rate-pool.d.ts +67 -0
  117. package/dist/cli/commands/watch/capabilities/rate-pool.d.ts.map +1 -0
  118. package/dist/cli/commands/watch/capabilities/rate-pool.js +187 -0
  119. package/dist/cli/commands/watch/capabilities/rate-pool.js.map +1 -0
  120. package/dist/cli/commands/watch/capabilities/retro.d.ts +14 -0
  121. package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -0
  122. package/dist/cli/commands/watch/capabilities/retro.js +81 -0
  123. package/dist/cli/commands/watch/capabilities/retro.js.map +1 -0
  124. package/dist/cli/commands/watch/capabilities/self-pull.d.ts +14 -0
  125. package/dist/cli/commands/watch/capabilities/self-pull.d.ts.map +1 -0
  126. package/dist/cli/commands/watch/capabilities/self-pull.js +33 -0
  127. package/dist/cli/commands/watch/capabilities/self-pull.js.map +1 -0
  128. package/dist/cli/commands/watch/capabilities/stale-reclaim.d.ts +23 -0
  129. package/dist/cli/commands/watch/capabilities/stale-reclaim.d.ts.map +1 -0
  130. package/dist/cli/commands/watch/capabilities/stale-reclaim.js +87 -0
  131. package/dist/cli/commands/watch/capabilities/stale-reclaim.js.map +1 -0
  132. package/dist/cli/commands/watch/capabilities/two-pass.d.ts +14 -0
  133. package/dist/cli/commands/watch/capabilities/two-pass.d.ts.map +1 -0
  134. package/dist/cli/commands/watch/capabilities/two-pass.js +66 -0
  135. package/dist/cli/commands/watch/capabilities/two-pass.js.map +1 -0
  136. package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts +14 -0
  137. package/dist/cli/commands/watch/capabilities/wave-dispatch.d.ts.map +1 -0
  138. package/dist/cli/commands/watch/capabilities/wave-dispatch.js +117 -0
  139. package/dist/cli/commands/watch/capabilities/wave-dispatch.js.map +1 -0
  140. package/dist/cli/commands/watch/capabilities/webhook-alerts.d.ts +29 -0
  141. package/dist/cli/commands/watch/capabilities/webhook-alerts.d.ts.map +1 -0
  142. package/dist/cli/commands/watch/capabilities/webhook-alerts.js +114 -0
  143. package/dist/cli/commands/watch/capabilities/webhook-alerts.js.map +1 -0
  144. package/dist/cli/commands/watch/config.d.ts +40 -0
  145. package/dist/cli/commands/watch/config.d.ts.map +1 -0
  146. package/dist/cli/commands/watch/config.js +129 -0
  147. package/dist/cli/commands/watch/config.js.map +1 -0
  148. package/dist/cli/commands/watch/index.d.ts +109 -0
  149. package/dist/cli/commands/watch/index.d.ts.map +1 -0
  150. package/dist/cli/commands/watch/index.js +757 -0
  151. package/dist/cli/commands/watch/index.js.map +1 -0
  152. package/dist/cli/commands/watch/registry.d.ts +19 -0
  153. package/dist/cli/commands/watch/registry.d.ts.map +1 -0
  154. package/dist/cli/commands/watch/registry.js +28 -0
  155. package/dist/cli/commands/watch/registry.js.map +1 -0
  156. package/dist/cli/commands/watch/types.d.ts +57 -0
  157. package/dist/cli/commands/watch/types.d.ts.map +1 -0
  158. package/dist/cli/commands/watch/types.js +8 -0
  159. package/dist/cli/commands/watch/types.js.map +1 -0
  160. package/dist/cli/core/cast.d.ts.map +1 -1
  161. package/dist/cli/core/cast.js +15 -19
  162. package/dist/cli/core/cast.js.map +1 -1
  163. package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
  164. package/dist/cli/core/detect-squad-dir.js +12 -10
  165. package/dist/cli/core/detect-squad-dir.js.map +1 -1
  166. package/dist/cli/core/email-scrub.d.ts.map +1 -1
  167. package/dist/cli/core/email-scrub.js +12 -11
  168. package/dist/cli/core/email-scrub.js.map +1 -1
  169. package/dist/cli/core/gh-cli.d.ts +13 -0
  170. package/dist/cli/core/gh-cli.d.ts.map +1 -1
  171. package/dist/cli/core/gh-cli.js +24 -0
  172. package/dist/cli/core/gh-cli.js.map +1 -1
  173. package/dist/cli/core/init.d.ts +2 -0
  174. package/dist/cli/core/init.d.ts.map +1 -1
  175. package/dist/cli/core/init.js +22 -5
  176. package/dist/cli/core/init.js.map +1 -1
  177. package/dist/cli/core/migrate-directory.d.ts.map +1 -1
  178. package/dist/cli/core/migrate-directory.js +14 -13
  179. package/dist/cli/core/migrate-directory.js.map +1 -1
  180. package/dist/cli/core/migrations.d.ts.map +1 -1
  181. package/dist/cli/core/migrations.js +22 -8
  182. package/dist/cli/core/migrations.js.map +1 -1
  183. package/dist/cli/core/nap.d.ts.map +1 -1
  184. package/dist/cli/core/nap.js +116 -49
  185. package/dist/cli/core/nap.js.map +1 -1
  186. package/dist/cli/core/project-type.d.ts.map +1 -1
  187. package/dist/cli/core/project-type.js +11 -10
  188. package/dist/cli/core/project-type.js.map +1 -1
  189. package/dist/cli/core/team-md.d.ts.map +1 -1
  190. package/dist/cli/core/team-md.js +43 -38
  191. package/dist/cli/core/team-md.js.map +1 -1
  192. package/dist/cli/core/templates.d.ts.map +1 -1
  193. package/dist/cli/core/templates.js +4 -3
  194. package/dist/cli/core/templates.js.map +1 -1
  195. package/dist/cli/core/upgrade.d.ts.map +1 -1
  196. package/dist/cli/core/upgrade.js +68 -55
  197. package/dist/cli/core/upgrade.js.map +1 -1
  198. package/dist/cli/core/version.d.ts.map +1 -1
  199. package/dist/cli/core/version.js +8 -7
  200. package/dist/cli/core/version.js.map +1 -1
  201. package/dist/cli/index.d.ts +1 -1
  202. package/dist/cli/index.d.ts.map +1 -1
  203. package/dist/cli/index.js +1 -1
  204. package/dist/cli/index.js.map +1 -1
  205. package/dist/cli/self-update.d.ts.map +1 -1
  206. package/dist/cli/self-update.js +7 -4
  207. package/dist/cli/self-update.js.map +1 -1
  208. package/dist/cli/shell/agent-name-parser.d.ts +16 -0
  209. package/dist/cli/shell/agent-name-parser.d.ts.map +1 -0
  210. package/dist/cli/shell/agent-name-parser.js +54 -0
  211. package/dist/cli/shell/agent-name-parser.js.map +1 -0
  212. package/dist/cli/shell/commands.d.ts.map +1 -1
  213. package/dist/cli/shell/commands.js +4 -3
  214. package/dist/cli/shell/commands.js.map +1 -1
  215. package/dist/cli/shell/coordinator.d.ts +4 -1
  216. package/dist/cli/shell/coordinator.d.ts.map +1 -1
  217. package/dist/cli/shell/coordinator.js +29 -26
  218. package/dist/cli/shell/coordinator.js.map +1 -1
  219. package/dist/cli/shell/index.d.ts.map +1 -1
  220. package/dist/cli/shell/index.js +33 -35
  221. package/dist/cli/shell/index.js.map +1 -1
  222. package/dist/cli/shell/lifecycle.d.ts +13 -2
  223. package/dist/cli/shell/lifecycle.d.ts.map +1 -1
  224. package/dist/cli/shell/lifecycle.js +26 -13
  225. package/dist/cli/shell/lifecycle.js.map +1 -1
  226. package/dist/cli/shell/session-store.d.ts.map +1 -1
  227. package/dist/cli/shell/session-store.js +16 -12
  228. package/dist/cli/shell/session-store.js.map +1 -1
  229. package/dist/cli/shell/spawn.d.ts +4 -1
  230. package/dist/cli/shell/spawn.d.ts.map +1 -1
  231. package/dist/cli/shell/spawn.js +28 -10
  232. package/dist/cli/shell/spawn.js.map +1 -1
  233. package/dist/cli-entry.js +136 -12
  234. package/dist/cli-entry.js.map +1 -1
  235. package/package.json +8 -4
  236. package/scripts/patch-esm-imports.mjs +105 -105
  237. package/scripts/patch-ink-rendering.mjs +115 -115
  238. package/templates/casting/Futurama.json +9 -9
  239. package/templates/casting-history.json +4 -4
  240. package/templates/casting-policy.json +37 -37
  241. package/templates/casting-reference.md +104 -104
  242. package/templates/casting-registry.json +3 -3
  243. package/templates/ceremonies.md +41 -41
  244. package/templates/charter.md +53 -53
  245. package/templates/constraint-tracking.md +38 -38
  246. package/templates/cooperative-rate-limiting.md +229 -229
  247. package/templates/copilot-instructions.md +46 -46
  248. package/templates/history.md +10 -10
  249. package/templates/identity/now.md +9 -9
  250. package/templates/identity/wisdom.md +15 -15
  251. package/templates/issue-lifecycle.md +412 -412
  252. package/templates/keda-scaler.md +164 -164
  253. package/templates/machine-capabilities.md +74 -74
  254. package/templates/mcp-config.md +90 -90
  255. package/templates/multi-agent-format.md +28 -28
  256. package/templates/orchestration-log.md +27 -27
  257. package/templates/plugin-marketplace.md +49 -49
  258. package/templates/ralph-circuit-breaker.md +313 -313
  259. package/templates/raw-agent-output.md +37 -37
  260. package/templates/roster.md +60 -60
  261. package/templates/routing.md +39 -39
  262. package/templates/run-output.md +50 -50
  263. package/templates/scribe-charter.md +123 -119
  264. package/templates/skill.md +24 -24
  265. package/templates/skills/agent-collaboration/SKILL.md +42 -42
  266. package/templates/skills/agent-conduct/SKILL.md +24 -24
  267. package/templates/skills/architectural-proposals/SKILL.md +151 -151
  268. package/templates/skills/ci-validation-gates/SKILL.md +84 -84
  269. package/templates/skills/cli-wiring/SKILL.md +47 -47
  270. package/templates/skills/client-compatibility/SKILL.md +89 -89
  271. package/templates/skills/cross-machine-coordination/SKILL.md +434 -0
  272. package/templates/skills/cross-squad/SKILL.md +114 -114
  273. package/templates/skills/distributed-mesh/SKILL.md +287 -287
  274. package/templates/skills/distributed-mesh/mesh.json.example +30 -30
  275. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
  276. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
  277. package/templates/skills/docs-standards/SKILL.md +71 -71
  278. package/templates/skills/economy-mode/SKILL.md +114 -114
  279. package/templates/skills/error-recovery/SKILL.md +99 -0
  280. package/templates/skills/external-comms/SKILL.md +329 -329
  281. package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
  282. package/templates/skills/git-workflow/SKILL.md +204 -204
  283. package/templates/skills/github-multi-account/SKILL.md +95 -95
  284. package/templates/skills/history-hygiene/SKILL.md +36 -36
  285. package/templates/skills/humanizer/SKILL.md +105 -105
  286. package/templates/skills/init-mode/SKILL.md +102 -102
  287. package/templates/skills/iterative-retrieval/SKILL.md +165 -0
  288. package/templates/skills/model-selection/SKILL.md +117 -117
  289. package/templates/skills/nap/SKILL.md +24 -24
  290. package/templates/skills/notification-routing/SKILL.md +105 -0
  291. package/templates/skills/personal-squad/SKILL.md +57 -57
  292. package/templates/skills/pr-screenshots/SKILL.md +149 -0
  293. package/templates/skills/ralph-two-pass-scan/SKILL.md +35 -0
  294. package/templates/skills/reflect/SKILL.md +229 -0
  295. package/templates/skills/release-process/SKILL.md +131 -423
  296. package/templates/skills/reskill/SKILL.md +92 -92
  297. package/templates/skills/retro-enforcement/SKILL.md +148 -0
  298. package/templates/skills/reviewer-protocol/SKILL.md +79 -79
  299. package/templates/skills/secret-handling/SKILL.md +200 -200
  300. package/templates/skills/session-recovery/SKILL.md +155 -155
  301. package/templates/skills/squad-conventions/SKILL.md +69 -69
  302. package/templates/skills/test-discipline/SKILL.md +37 -37
  303. package/templates/skills/tiered-memory/SKILL.md +234 -0
  304. package/templates/skills/windows-compatibility/SKILL.md +98 -74
  305. package/templates/{squad.agent.md → squad.agent.md.template} +1316 -1287
  306. package/templates/workflows/squad-ci.yml +24 -24
  307. package/templates/workflows/squad-docs.yml +54 -54
  308. package/templates/workflows/squad-heartbeat.yml +0 -4
  309. package/templates/workflows/squad-insider-release.yml +61 -61
  310. package/templates/workflows/squad-issue-assign.yml +161 -161
  311. package/templates/workflows/squad-label-enforce.yml +181 -181
  312. package/templates/workflows/squad-preview.yml +55 -55
  313. package/templates/workflows/squad-promote.yml +120 -120
  314. package/templates/workflows/squad-release.yml +77 -77
  315. package/templates/workflows/squad-triage.yml +260 -260
  316. package/templates/workflows/sync-squad-labels.yml +169 -169
  317. package/dist/cli/commands/watch.d.ts +0 -18
  318. package/dist/cli/commands/watch.d.ts.map +0 -1
  319. package/dist/cli/commands/watch.js +0 -306
  320. package/dist/cli/commands/watch.js.map +0 -1
@@ -0,0 +1,434 @@
1
+ # Skill: Cross-Machine Coordination Pattern
2
+
3
+ **Skill ID:** `cross-machine-coordination`
4
+ **Owner:** Ralph (Work Monitor)
5
+ **Squad Integration:** All agents
6
+ **Status:** Specification (ready for implementation)
7
+
8
+ ---
9
+
10
+ ## Overview
11
+
12
+ Enables squad agents running on different machines (laptop, DevBox, Azure VM) to securely share work, coordinate execution, and pass results without manual intervention.
13
+
14
+ **Pattern:** Git-based task queuing + GitHub Issues supplement
15
+
16
+ ---
17
+
18
+ ## Usage
19
+
20
+ ### For Task Sources (Orchestrating Machine)
21
+
22
+ **To assign work to DevBox:**
23
+
24
+ ```bash
25
+ # Create task file
26
+ cat > .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-voice-clone.yaml << 'EOF'
27
+ id: gpu-voice-clone-001
28
+ source_machine: laptop-machine
29
+ target_machine: devbox
30
+ priority: high
31
+ created_at: 2026-03-14T15:30:00Z
32
+ task_type: gpu_workload
33
+ payload:
34
+ command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
35
+ expected_duration_min: 15
36
+ resources:
37
+ gpu: true
38
+ memory_gb: 8
39
+ status: pending
40
+ EOF
41
+
42
+ # Commit & push
43
+ git add .squad/cross-machine/tasks/
44
+ git commit -m "Cross-machine task: GPU voice cloning [squad:machine-devbox]"
45
+ git push origin main
46
+ ```
47
+
48
+ Ralph on DevBox will:
49
+ 1. Pull the task on next cycle (5-10 min)
50
+ 2. Validate schema & command whitelist
51
+ 3. Execute the GPU workload
52
+ 4. Write result to `.squad/cross-machine/results/gpu-voice-clone-001.yaml`
53
+ 5. Commit & push the result
54
+
55
+ ---
56
+
57
+ ### For Task Executors (DevBox, Azure VMs)
58
+
59
+ Ralph automatically watches `.squad/cross-machine/tasks/` for work targeted at this machine.
60
+
61
+ **On each cycle (5-10 min):**
62
+
63
+ ```python
64
+ # Pseudo-code (Ralph implementation)
65
+ 1. git pull origin main
66
+ 2. Load all .yaml files in .squad/cross-machine/tasks/
67
+ 3. Filter for status=pending AND target_machine=HOSTNAME
68
+ 4. For each task:
69
+ a. Validate schema (must have: id, source_machine, target_machine, payload)
70
+ b. Validate command against whitelist
71
+ c. Execute task (with timeout)
72
+ d. Write result to .squad/cross-machine/results/{id}.yaml
73
+ e. Commit & push result
74
+ ```
75
+
76
+ ---
77
+
78
+ ### For Urgent/Ad-Hoc Tasks
79
+
80
+ **Use GitHub Issues with `squad:machine-{name}` label:**
81
+
82
+ ```bash
83
+ # Create issue
84
+ gh issue create \
85
+ --title "GPU: Clone voice profile from sample.wav" \
86
+ --body "Execute voice cloning on DevBox. Input: /path/to/voice-input.wav" \
87
+ --label "squad:machine-devbox" \
88
+ --label "urgent"
89
+ ```
90
+
91
+ Ralph on DevBox will:
92
+ 1. Detect issue with `squad:machine-devbox` label
93
+ 2. Parse task from issue body
94
+ 3. Execute task
95
+ 4. Comment with result
96
+ 5. Close issue
97
+
98
+ ---
99
+
100
+ ## File Formats
101
+
102
+ ### Task File (YAML)
103
+
104
+ **Location:** `.squad/cross-machine/tasks/{timestamp}-{machine}-{task-id}.yaml`
105
+
106
+ **Required Fields:**
107
+ ```yaml
108
+ id: {task-id} # Unique identifier (alphanumeric + dash)
109
+ source_machine: {hostname} # Where task was created
110
+ target_machine: {hostname} # Where task will execute
111
+ priority: high|normal|low # Execution priority
112
+ created_at: 2026-03-14T15:30:00Z # ISO 8601 timestamp
113
+ task_type: gpu_workload|script|... # Category
114
+ payload:
115
+ command: "..." # Shell command to execute
116
+ expected_duration_min: 15 # Timeout (minutes)
117
+ resources:
118
+ gpu: true|false
119
+ memory_gb: 8
120
+ cpu_cores: 4
121
+ status: pending|executing|completed|failed
122
+ ```
123
+
124
+ **Optional Fields:**
125
+ ```yaml
126
+ description: "Human-readable task description"
127
+ timeout_override_min: 120 # Override default timeout
128
+ retry_count: 3 # Retry failed tasks
129
+ ```
130
+
131
+ ### Result File (YAML)
132
+
133
+ **Location:** `.squad/cross-machine/results/{task-id}.yaml`
134
+
135
+ ```yaml
136
+ id: {task-id} # Links back to task
137
+ target_machine: devbox # Executed on
138
+ completed_at: 2026-03-14T15:45:00Z # When it finished
139
+ status: completed|failed|timeout # Outcome
140
+ exit_code: 0 # Shell exit code
141
+ stdout: "..." # Captured output
142
+ stderr: "..." # Captured errors
143
+ duration_seconds: 900 # How long it took
144
+ artifacts:
145
+ - path: "/path/to/artifacts/..." # Location of results
146
+ type: audio|text|model|...
147
+ size_mb: 2.5
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Security Model
153
+
154
+ ### Validation Pipeline
155
+
156
+ All tasks go through:
157
+
158
+ 1. **Schema Validation**
159
+ - YAML structure matches spec
160
+ - Required fields present
161
+ - No unexpected fields (reject)
162
+
163
+ 2. **Command Whitelist**
164
+ - Only approved commands allowed
165
+ - Path validation (no `../../` escapes)
166
+ - Environment variable sanitization
167
+ - No inline shell operators (`&&`, `|`, `>`)
168
+
169
+ 3. **Resource Limits**
170
+ - Timeout enforced (default: 60 min)
171
+ - Memory cap: 16GB (adjustable)
172
+ - CPU threads: 4 (adjustable)
173
+ - Disk write: 100GB (adjustable)
174
+
175
+ 4. **Execution Isolation**
176
+ - Runs as unprivileged user
177
+ - Temp directory cleaned after execution
178
+ - Network access: read-only (no outbound writes)
179
+
180
+ 5. **Audit Trail**
181
+ - All executions logged to git
182
+ - Commit signed with Ralph's key
183
+ - Result stored immutably
184
+
185
+ ### Threat Mitigations
186
+
187
+ | Threat | Mitigation |
188
+ |--------|-----------|
189
+ | **Malicious task injection** | Branch protection + PR review before merge |
190
+ | **Credential leakage** | Pre-commit secret scan + environment scrubbing |
191
+ | **Resource exhaustion** | Timeout + memory limits |
192
+ | **Code injection** | Command whitelist + no shell evaluation |
193
+ | **Result tampering** | Git commit history is immutable |
194
+
195
+ ---
196
+
197
+ ## Configuration
198
+
199
+ Ralph reads config from `.squad/config.json`:
200
+
201
+ ```json
202
+ {
203
+ "cross_machine": {
204
+ "enabled": true,
205
+ "poll_interval_seconds": 300,
206
+ "this_machine": "devbox",
207
+ "max_concurrent_tasks": 2,
208
+ "task_timeout_minutes": 60,
209
+ "command_whitelist": [
210
+ "python scripts/voice-clone.py",
211
+ "python scripts/data-process.py",
212
+ "bash scripts/cleanup.sh"
213
+ ],
214
+ "result_ttl_days": 30
215
+ }
216
+ }
217
+ ```
218
+
219
+ ---
220
+
221
+ ## Examples
222
+
223
+ ### Example 1: GPU Voice Cloning (Laptop → DevBox)
224
+
225
+ **1. Laptop creates task:**
226
+
227
+ ```yaml
228
+ # .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-001.yaml
229
+ id: gpu-voice-clone-001
230
+ source_machine: laptop-machine
231
+ target_machine: devbox
232
+ priority: high
233
+ created_at: 2026-03-14T15:30:00Z
234
+ task_type: gpu_workload
235
+ payload:
236
+ command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
237
+ expected_duration_min: 15
238
+ resources:
239
+ gpu: true
240
+ memory_gb: 8
241
+ status: pending
242
+ ```
243
+
244
+ **2. Laptop commits & pushes:**
245
+
246
+ ```bash
247
+ git add .squad/cross-machine/tasks/
248
+ git commit -m "Task: GPU voice cloning [squad:machine-devbox]"
249
+ git push origin main
250
+ ```
251
+
252
+ **3. DevBox Ralph (5 min later):**
253
+
254
+ ```
255
+ [Ralph Watch Cycle]
256
+ - Pulled origin/main
257
+ - Detected: gpu-voice-clone-001 (status: pending, target: devbox)
258
+ - Validation: ✅ Schema OK, command whitelisted
259
+ - Executing: python scripts/voice-clone.py ...
260
+ - [15 minutes of processing]
261
+ - Completed: exit code 0
262
+ - Writing result...
263
+ - Committing & pushing...
264
+ ```
265
+
266
+ **4. Laptop Ralph (next cycle) sees result:**
267
+
268
+ ```yaml
269
+ # .squad/cross-machine/results/gpu-voice-clone-001.yaml
270
+ id: gpu-voice-clone-001
271
+ target_machine: devbox
272
+ completed_at: 2026-03-14T15:45:00Z
273
+ status: completed
274
+ exit_code: 0
275
+ stdout: "Voice cloning completed. Output written to /tmp/cloned.wav"
276
+ stderr: ""
277
+ duration_seconds: 900
278
+ artifacts:
279
+ - path: "/path/to/artifacts/voice-clone-001/output.wav"
280
+ type: audio
281
+ size_mb: 2.5
282
+ ```
283
+
284
+ ---
285
+
286
+ ### Example 2: Urgent Debug Request (Human → DevBox via Issue)
287
+
288
+ **Create issue:**
289
+
290
+ ```bash
291
+ gh issue create \
292
+ --title "DevBox: Debug voice model failure" \
293
+ --body "Error: Model failed to load on last run. Please check /tmp/model.log and report findings." \
294
+ --label "squad:machine-devbox" \
295
+ --label "urgent"
296
+ ```
297
+
298
+ **DevBox Ralph detects → executes → comments:**
299
+
300
+ ```
301
+ ✅ Executed on devbox at 2026-03-14 15:47:00
302
+ Command: python scripts/debug-model.py
303
+
304
+ Result:
305
+ ------
306
+ Model file: /tmp/model-v2.bin (OK)
307
+ Checksum: a1b2c3d4e5f6 (matches expected)
308
+ Memory available: 12 GB (sufficient)
309
+
310
+ ERROR FOUND: Config file permission issue
311
+ - File: ~/.config/voice/model.yaml
312
+ - Permissions: -rw------- (owner-only)
313
+ - Expected: -rw-r--r-- (world-readable for service)
314
+
315
+ FIX: Run: chmod 644 ~/.config/voice/model.yaml
316
+ ```
317
+
318
+ ---
319
+
320
+ ## Error Handling
321
+
322
+ ### Task Execution Failures
323
+
324
+ If a task fails (exit code != 0):
325
+
326
+ 1. Result written with `status: failed` + exit code
327
+ 2. stderr captured in result
328
+ 3. Committed to git for audit
329
+ 4. Source machine can retry by re-pushing task with `status: pending`
330
+
331
+ ### Stalled Tasks
332
+
333
+ If a task doesn't complete within timeout:
334
+
335
+ 1. Process killed
336
+ 2. Result written with `status: timeout`
337
+ 3. stderr: "Execution exceeded X minutes"
338
+ 4. Source can investigate or retry
339
+
340
+ ### Network Failures
341
+
342
+ If git push/pull fails:
343
+
344
+ - Ralph retries on next cycle
345
+ - Tasks queue locally until connectivity restored
346
+ - No tasks lost (stored in local repo)
347
+
348
+ ---
349
+
350
+ ## Monitoring & Debugging
351
+
352
+ ### Check Task Queue
353
+
354
+ ```bash
355
+ ls -la .squad/cross-machine/tasks/
356
+ cat .squad/cross-machine/tasks/*.yaml | grep -E "^(id|status|target_machine):"
357
+ ```
358
+
359
+ ### Check Results
360
+
361
+ ```bash
362
+ ls -la .squad/cross-machine/results/
363
+ cat .squad/cross-machine/results/{task-id}.yaml
364
+ ```
365
+
366
+ ### View Execution History
367
+
368
+ ```bash
369
+ git log --oneline .squad/cross-machine/ | head -20
370
+ ```
371
+
372
+ ### Monitor Ralph Cycles
373
+
374
+ ```bash
375
+ tail -f .squad/log/ralph-watch.log | grep "cross-machine"
376
+ ```
377
+
378
+ ---
379
+
380
+ ## Integration with Ralph Watch
381
+
382
+ Ralph automatically includes this pattern in its watch loop:
383
+
384
+ ```
385
+ Ralph Watch Cycle (every 5-10 min):
386
+ 1. Fetch GitHub issues with squad:machine-* labels
387
+ 2. Poll .squad/cross-machine/tasks/
388
+ 3. For each matching task:
389
+ - Validate
390
+ - Execute
391
+ - Write result
392
+ - Commit & push
393
+ 4. Update status in issue (if applicable)
394
+ 5. Sleep until next cycle
395
+ ```
396
+
397
+ No manual Ralph configuration needed — just create task files or issues with the right labels.
398
+
399
+ ---
400
+
401
+ ## Migration from Manual Handoff
402
+
403
+ **Before (today):**
404
+ - Laptop → user manually copies file to Teams chat
405
+ - user pastes into target terminal
406
+ - user copies output back
407
+ - user pastes result manually
408
+
409
+ **After (with this pattern):**
410
+ - Laptop Ralph writes task file → git push
411
+ - DevBox Ralph auto-executes → git push result
412
+ - Laptop Ralph auto-reads result
413
+ - 0 human intervention needed
414
+
415
+ ---
416
+
417
+ ## Future Enhancements
418
+
419
+ Potential expansions (Phase 2+):
420
+
421
+ 1. **Task Priorities:** Execution order based on priority field
422
+ 2. **Serial Pipelines:** Machine A → B → C task chains
423
+ 3. **GPU Availability Polling:** Query DevBox before submitting work
424
+ 4. **Cost Tracking:** Log resource usage per task
425
+ 5. **Notification Webhooks:** Alert on task completion
426
+ 6. **Web Dashboard:** Real-time task status visualization
427
+
428
+ ---
429
+
430
+ ## Questions?
431
+
432
+ Refer to research report: `research/active/cross-machine-agents/README.md`
433
+
434
+ Contact: Seven (Research & Docs) or Ralph (Work Monitor)
@@ -1,114 +1,114 @@
1
- ---
2
- name: "cross-squad"
3
- description: "Coordinating work across multiple Squad instances"
4
- domain: "orchestration"
5
- confidence: "medium"
6
- source: "manual"
7
- tools:
8
- - name: "squad-discover"
9
- description: "List known squads and their capabilities"
10
- when: "When you need to find which squad can handle a task"
11
- - name: "squad-delegate"
12
- description: "Create work in another squad's repository"
13
- when: "When a task belongs to another squad's domain"
14
- ---
15
-
16
- ## Context
17
- When an organization runs multiple Squad instances (e.g., platform-squad, frontend-squad, data-squad), those squads need to discover each other, share context, and hand off work across repository boundaries. This skill teaches agents how to coordinate across squads without creating tight coupling.
18
-
19
- Cross-squad orchestration applies when:
20
- - A task requires capabilities owned by another squad
21
- - An architectural decision affects multiple squads
22
- - A feature spans multiple repositories with different squads
23
- - A squad needs to request infrastructure, tooling, or support from another squad
24
-
25
- ## Patterns
26
-
27
- ### Discovery via Manifest
28
- Each squad publishes a `.squad/manifest.json` declaring its name, capabilities, and contact information. Squads discover each other through:
29
- 1. **Well-known paths**: Check `.squad/manifest.json` in known org repos
30
- 2. **Upstream config**: Squads already listed in `.squad/upstream.json` are checked for manifests
31
- 3. **Explicit registry**: A central `squad-registry.json` can list all squads in an org
32
-
33
- ```json
34
- {
35
- "name": "platform-squad",
36
- "version": "1.0.0",
37
- "description": "Platform infrastructure team",
38
- "capabilities": ["kubernetes", "helm", "monitoring", "ci-cd"],
39
- "contact": {
40
- "repo": "org/platform",
41
- "labels": ["squad:platform"]
42
- },
43
- "accepts": ["issues", "prs"],
44
- "skills": ["helm-developer", "operator-developer", "pipeline-engineer"]
45
- }
46
- ```
47
-
48
- ### Context Sharing
49
- When delegating work, share only what the target squad needs:
50
- - **Capability list**: What this squad can do (from manifest)
51
- - **Relevant decisions**: Only decisions that affect the target squad
52
- - **Handoff context**: A concise description of why this work is being delegated
53
-
54
- Do NOT share:
55
- - Internal team state (casting history, session logs)
56
- - Full decision archives (send only relevant excerpts)
57
- - Authentication credentials or secrets
58
-
59
- ### Work Handoff Protocol
60
- 1. **Check manifest**: Verify the target squad accepts the work type (issues, PRs)
61
- 2. **Create issue**: Use `gh issue create` in the target repo with:
62
- - Title: `[cross-squad] <description>`
63
- - Label: `squad:cross-squad` (or the squad's configured label)
64
- - Body: Context, acceptance criteria, and link back to originating issue
65
- 3. **Track**: Record the cross-squad issue URL in the originating squad's orchestration log
66
- 4. **Poll**: Periodically check if the delegated issue is closed/completed
67
-
68
- ### Feedback Loop
69
- Track delegated work completion:
70
- - Poll target issue status via `gh issue view`
71
- - Update originating issue with status changes
72
- - Close the feedback loop when delegated work merges
73
-
74
- ## Examples
75
-
76
- ### Discovering squads
77
- ```bash
78
- # List all squads discoverable from upstreams and known repos
79
- squad discover
80
-
81
- # Output:
82
- # platform-squad → org/platform (kubernetes, helm, monitoring)
83
- # frontend-squad → org/frontend (react, nextjs, storybook)
84
- # data-squad → org/data (spark, airflow, dbt)
85
- ```
86
-
87
- ### Delegating work
88
- ```bash
89
- # Delegate a task to the platform squad
90
- squad delegate platform-squad "Add Prometheus metrics endpoint for the auth service"
91
-
92
- # Creates issue in org/platform with cross-squad label and context
93
- ```
94
-
95
- ### Manifest in squad.config.ts
96
- ```typescript
97
- export default defineSquad({
98
- manifest: {
99
- name: 'platform-squad',
100
- capabilities: ['kubernetes', 'helm'],
101
- contact: { repo: 'org/platform', labels: ['squad:platform'] },
102
- accepts: ['issues', 'prs'],
103
- skills: ['helm-developer', 'operator-developer'],
104
- },
105
- });
106
- ```
107
-
108
- ## Anti-Patterns
109
- - **Direct file writes across repos** — Never modify another squad's `.squad/` directory. Use issues and PRs as the communication protocol.
110
- - **Tight coupling** — Don't depend on another squad's internal structure. Use the manifest as the public API contract.
111
- - **Unbounded delegation** — Always include acceptance criteria and a timeout. Don't create open-ended requests.
112
- - **Skipping discovery** — Don't hardcode squad locations. Use manifests and the discovery protocol.
113
- - **Sharing secrets** — Never include credentials, tokens, or internal URLs in cross-squad issues.
114
- - **Circular delegation** — Track delegation chains. If squad A delegates to B which delegates back to A, something is wrong.
1
+ ---
2
+ name: "cross-squad"
3
+ description: "Coordinating work across multiple Squad instances"
4
+ domain: "orchestration"
5
+ confidence: "medium"
6
+ source: "manual"
7
+ tools:
8
+ - name: "squad-discover"
9
+ description: "List known squads and their capabilities"
10
+ when: "When you need to find which squad can handle a task"
11
+ - name: "squad-delegate"
12
+ description: "Create work in another squad's repository"
13
+ when: "When a task belongs to another squad's domain"
14
+ ---
15
+
16
+ ## Context
17
+ When an organization runs multiple Squad instances (e.g., platform-squad, frontend-squad, data-squad), those squads need to discover each other, share context, and hand off work across repository boundaries. This skill teaches agents how to coordinate across squads without creating tight coupling.
18
+
19
+ Cross-squad orchestration applies when:
20
+ - A task requires capabilities owned by another squad
21
+ - An architectural decision affects multiple squads
22
+ - A feature spans multiple repositories with different squads
23
+ - A squad needs to request infrastructure, tooling, or support from another squad
24
+
25
+ ## Patterns
26
+
27
+ ### Discovery via Manifest
28
+ Each squad publishes a `.squad/manifest.json` declaring its name, capabilities, and contact information. Squads discover each other through:
29
+ 1. **Well-known paths**: Check `.squad/manifest.json` in known org repos
30
+ 2. **Upstream config**: Squads already listed in `.squad/upstream.json` are checked for manifests
31
+ 3. **Explicit registry**: A central `squad-registry.json` can list all squads in an org
32
+
33
+ ```json
34
+ {
35
+ "name": "platform-squad",
36
+ "version": "1.0.0",
37
+ "description": "Platform infrastructure team",
38
+ "capabilities": ["kubernetes", "helm", "monitoring", "ci-cd"],
39
+ "contact": {
40
+ "repo": "org/platform",
41
+ "labels": ["squad:platform"]
42
+ },
43
+ "accepts": ["issues", "prs"],
44
+ "skills": ["helm-developer", "operator-developer", "pipeline-engineer"]
45
+ }
46
+ ```
47
+
48
+ ### Context Sharing
49
+ When delegating work, share only what the target squad needs:
50
+ - **Capability list**: What this squad can do (from manifest)
51
+ - **Relevant decisions**: Only decisions that affect the target squad
52
+ - **Handoff context**: A concise description of why this work is being delegated
53
+
54
+ Do NOT share:
55
+ - Internal team state (casting history, session logs)
56
+ - Full decision archives (send only relevant excerpts)
57
+ - Authentication credentials or secrets
58
+
59
+ ### Work Handoff Protocol
60
+ 1. **Check manifest**: Verify the target squad accepts the work type (issues, PRs)
61
+ 2. **Create issue**: Use `gh issue create` in the target repo with:
62
+ - Title: `[cross-squad] <description>`
63
+ - Label: `squad:cross-squad` (or the squad's configured label)
64
+ - Body: Context, acceptance criteria, and link back to originating issue
65
+ 3. **Track**: Record the cross-squad issue URL in the originating squad's orchestration log
66
+ 4. **Poll**: Periodically check if the delegated issue is closed/completed
67
+
68
+ ### Feedback Loop
69
+ Track delegated work completion:
70
+ - Poll target issue status via `gh issue view`
71
+ - Update originating issue with status changes
72
+ - Close the feedback loop when delegated work merges
73
+
74
+ ## Examples
75
+
76
+ ### Discovering squads
77
+ ```bash
78
+ # List all squads discoverable from upstreams and known repos
79
+ squad discover
80
+
81
+ # Output:
82
+ # platform-squad → org/platform (kubernetes, helm, monitoring)
83
+ # frontend-squad → org/frontend (react, nextjs, storybook)
84
+ # data-squad → org/data (spark, airflow, dbt)
85
+ ```
86
+
87
+ ### Delegating work
88
+ ```bash
89
+ # Delegate a task to the platform squad
90
+ squad delegate platform-squad "Add Prometheus metrics endpoint for the auth service"
91
+
92
+ # Creates issue in org/platform with cross-squad label and context
93
+ ```
94
+
95
+ ### Manifest in squad.config.ts
96
+ ```typescript
97
+ export default defineSquad({
98
+ manifest: {
99
+ name: 'platform-squad',
100
+ capabilities: ['kubernetes', 'helm'],
101
+ contact: { repo: 'org/platform', labels: ['squad:platform'] },
102
+ accepts: ['issues', 'prs'],
103
+ skills: ['helm-developer', 'operator-developer'],
104
+ },
105
+ });
106
+ ```
107
+
108
+ ## Anti-Patterns
109
+ - **Direct file writes across repos** — Never modify another squad's `.squad/` directory. Use issues and PRs as the communication protocol.
110
+ - **Tight coupling** — Don't depend on another squad's internal structure. Use the manifest as the public API contract.
111
+ - **Unbounded delegation** — Always include acceptance criteria and a timeout. Don't create open-ended requests.
112
+ - **Skipping discovery** — Don't hardcode squad locations. Use manifests and the discovery protocol.
113
+ - **Sharing secrets** — Never include credentials, tokens, or internal URLs in cross-squad issues.
114
+ - **Circular delegation** — Track delegation chains. If squad A delegates to B which delegates back to A, something is wrong.