@openrig/cli 0.3.0 → 0.3.2

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 (482) hide show
  1. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +15 -0
  2. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +24 -0
  3. package/daemon/assets/plugins/openrig-core/LICENSE +200 -0
  4. package/daemon/assets/plugins/openrig-core/README.md +42 -0
  5. package/daemon/assets/plugins/openrig-core/hooks/claude.json +78 -0
  6. package/daemon/assets/plugins/openrig-core/hooks/codex.json +37 -0
  7. package/daemon/assets/{openrig-activity-hook-relay.cjs → plugins/openrig-core/hooks/scripts/activity-relay.cjs} +12 -0
  8. package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +172 -0
  9. package/daemon/assets/plugins/openrig-core/skills/agent-startup-and-context-ingestion/SKILL.md +104 -0
  10. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +131 -0
  11. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
  12. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +433 -0
  13. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
  14. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
  15. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +305 -0
  16. package/daemon/{specs/agents/shared/skills/rig-architect → assets/plugins/openrig-core/skills/openrig-architect}/SKILL.md +38 -19
  17. package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +222 -0
  18. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +597 -0
  19. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +122 -0
  20. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +137 -0
  21. package/daemon/assets/vm-preview-fixtures/README.md +48 -0
  22. package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +79 -0
  23. package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -3
  24. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  25. package/daemon/dist/adapters/claude-code-adapter.js +17 -57
  26. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  27. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  28. package/daemon/dist/adapters/cmux-transport.js +81 -2
  29. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  30. package/daemon/dist/adapters/cmux.d.ts +4 -0
  31. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  32. package/daemon/dist/adapters/cmux.js +87 -0
  33. package/daemon/dist/adapters/cmux.js.map +1 -1
  34. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +14 -3
  35. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  36. package/daemon/dist/adapters/codex-runtime-adapter.js +45 -58
  37. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  38. package/daemon/dist/adapters/tmux.d.ts +36 -0
  39. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  40. package/daemon/dist/adapters/tmux.js +66 -0
  41. package/daemon/dist/adapters/tmux.js.map +1 -1
  42. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +5 -1
  43. package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -1
  44. package/daemon/dist/db/migrations/037_mission_control_actions.js +5 -1
  45. package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -1
  46. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts +32 -0
  47. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts.map +1 -0
  48. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js +37 -0
  49. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js.map +1 -0
  50. package/daemon/dist/db/migrations/041_rig_policy.d.ts +32 -0
  51. package/daemon/dist/db/migrations/041_rig_policy.d.ts.map +1 -0
  52. package/daemon/dist/db/migrations/041_rig_policy.js +47 -0
  53. package/daemon/dist/db/migrations/041_rig_policy.js.map +1 -0
  54. package/daemon/dist/domain/agent-images/resume-token-discovery.js +1 -1
  55. package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
  56. package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -1
  57. package/daemon/dist/domain/agent-images/snapshot-capturer.js +2 -1
  58. package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -1
  59. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  60. package/daemon/dist/domain/agent-manifest.js +143 -37
  61. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  62. package/daemon/dist/domain/agent-resolver.js +1 -1
  63. package/daemon/dist/domain/agent-resolver.js.map +1 -1
  64. package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
  65. package/daemon/dist/domain/bootstrap-orchestrator.js +86 -6
  66. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  67. package/daemon/dist/domain/bundle-agent-images-router.d.ts +95 -0
  68. package/daemon/dist/domain/bundle-agent-images-router.d.ts.map +1 -0
  69. package/daemon/dist/domain/bundle-agent-images-router.js +140 -0
  70. package/daemon/dist/domain/bundle-agent-images-router.js.map +1 -0
  71. package/daemon/dist/domain/bundle-assembler.d.ts +18 -1
  72. package/daemon/dist/domain/bundle-assembler.d.ts.map +1 -1
  73. package/daemon/dist/domain/bundle-assembler.js +11 -1
  74. package/daemon/dist/domain/bundle-assembler.js.map +1 -1
  75. package/daemon/dist/domain/bundle-audit.d.ts +89 -0
  76. package/daemon/dist/domain/bundle-audit.d.ts.map +1 -0
  77. package/daemon/dist/domain/bundle-audit.js +87 -0
  78. package/daemon/dist/domain/bundle-audit.js.map +1 -0
  79. package/daemon/dist/domain/bundle-conflict-detector.d.ts +57 -0
  80. package/daemon/dist/domain/bundle-conflict-detector.d.ts.map +1 -0
  81. package/daemon/dist/domain/bundle-conflict-detector.js +49 -0
  82. package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -0
  83. package/daemon/dist/domain/bundle-context-packs-router.d.ts +100 -0
  84. package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -0
  85. package/daemon/dist/domain/bundle-context-packs-router.js +158 -0
  86. package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -0
  87. package/daemon/dist/domain/bundle-plugins-router.d.ts +69 -0
  88. package/daemon/dist/domain/bundle-plugins-router.d.ts.map +1 -0
  89. package/daemon/dist/domain/bundle-plugins-router.js +87 -0
  90. package/daemon/dist/domain/bundle-plugins-router.js.map +1 -0
  91. package/daemon/dist/domain/bundle-skills-router.d.ts +62 -0
  92. package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -0
  93. package/daemon/dist/domain/bundle-skills-router.js +90 -0
  94. package/daemon/dist/domain/bundle-skills-router.js.map +1 -0
  95. package/daemon/dist/domain/bundle-types.d.ts +106 -0
  96. package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
  97. package/daemon/dist/domain/bundle-types.js +375 -0
  98. package/daemon/dist/domain/bundle-types.js.map +1 -1
  99. package/daemon/dist/domain/bundle-workflow-specs-router.d.ts +94 -0
  100. package/daemon/dist/domain/bundle-workflow-specs-router.d.ts.map +1 -0
  101. package/daemon/dist/domain/bundle-workflow-specs-router.js +144 -0
  102. package/daemon/dist/domain/bundle-workflow-specs-router.js.map +1 -0
  103. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +81 -0
  104. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -0
  105. package/daemon/dist/domain/claude-compaction-enforcer.js +242 -0
  106. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -0
  107. package/daemon/dist/domain/cmux-layout-service.d.ts +41 -0
  108. package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -0
  109. package/daemon/dist/domain/cmux-layout-service.js +184 -0
  110. package/daemon/dist/domain/cmux-layout-service.js.map +1 -0
  111. package/daemon/dist/domain/context-monitor.d.ts +19 -1
  112. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  113. package/daemon/dist/domain/context-monitor.js +62 -14
  114. package/daemon/dist/domain/context-monitor.js.map +1 -1
  115. package/daemon/dist/domain/graph-projection.d.ts +6 -0
  116. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  117. package/daemon/dist/domain/graph-projection.js +6 -0
  118. package/daemon/dist/domain/graph-projection.js.map +1 -1
  119. package/daemon/dist/domain/kernel-boot-tracker.d.ts +74 -0
  120. package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -0
  121. package/daemon/dist/domain/kernel-boot-tracker.js +213 -0
  122. package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -0
  123. package/daemon/dist/domain/kernel-boot.d.ts +50 -0
  124. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -0
  125. package/daemon/dist/domain/kernel-boot.js +147 -0
  126. package/daemon/dist/domain/kernel-boot.js.map +1 -0
  127. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +5 -0
  128. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -1
  129. package/daemon/dist/domain/mission-control/mission-control-read-layer.js +16 -2
  130. package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
  131. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  132. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +3 -1
  133. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  134. package/daemon/dist/domain/native-resume-probe.js +7 -7
  135. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  136. package/daemon/dist/domain/node-inventory.d.ts +18 -0
  137. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  138. package/daemon/dist/domain/node-inventory.js +98 -0
  139. package/daemon/dist/domain/node-inventory.js.map +1 -1
  140. package/daemon/dist/domain/node-launcher.d.ts +12 -0
  141. package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
  142. package/daemon/dist/domain/node-launcher.js +25 -1
  143. package/daemon/dist/domain/node-launcher.js.map +1 -1
  144. package/daemon/dist/domain/plugin-discovery-service.d.ts +150 -0
  145. package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -0
  146. package/daemon/dist/domain/plugin-discovery-service.js +468 -0
  147. package/daemon/dist/domain/plugin-discovery-service.js.map +1 -0
  148. package/daemon/dist/domain/plugin-vendor-service.d.ts +54 -0
  149. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -0
  150. package/daemon/dist/domain/plugin-vendor-service.js +111 -0
  151. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -0
  152. package/daemon/dist/domain/pod-bundle-assembler.d.ts +16 -1
  153. package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  154. package/daemon/dist/domain/pod-bundle-assembler.js +11 -1
  155. package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  156. package/daemon/dist/domain/profile-resolver.d.ts +13 -3
  157. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  158. package/daemon/dist/domain/profile-resolver.js +11 -7
  159. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  160. package/daemon/dist/domain/projection-planner.d.ts +7 -1
  161. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  162. package/daemon/dist/domain/projection-planner.js +44 -4
  163. package/daemon/dist/domain/projection-planner.js.map +1 -1
  164. package/daemon/dist/domain/ps-projection.d.ts +22 -0
  165. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  166. package/daemon/dist/domain/ps-projection.js +57 -0
  167. package/daemon/dist/domain/ps-projection.js.map +1 -1
  168. package/daemon/dist/domain/queue-repository.d.ts +44 -1
  169. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  170. package/daemon/dist/domain/queue-repository.js +112 -6
  171. package/daemon/dist/domain/queue-repository.js.map +1 -1
  172. package/daemon/dist/domain/restore-check-service.d.ts +4 -0
  173. package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
  174. package/daemon/dist/domain/restore-check-service.js +16 -7
  175. package/daemon/dist/domain/restore-check-service.js.map +1 -1
  176. package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts +48 -0
  177. package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +1 -0
  178. package/daemon/dist/domain/rig-policy/rig-policy-defaults.js +96 -0
  179. package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +1 -0
  180. package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts +46 -0
  181. package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +1 -0
  182. package/daemon/dist/domain/rig-policy/rig-policy-store.js +171 -0
  183. package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +1 -0
  184. package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts +145 -0
  185. package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +1 -0
  186. package/daemon/dist/domain/rig-policy/rig-policy-types.js +52 -0
  187. package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +1 -0
  188. package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts +58 -0
  189. package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +1 -0
  190. package/daemon/dist/domain/rig-policy/rig-policy-validator.js +211 -0
  191. package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +1 -0
  192. package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -1
  193. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  194. package/daemon/dist/domain/rigspec-instantiator.js +109 -18
  195. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  196. package/daemon/dist/domain/seat-activity-service.d.ts +79 -0
  197. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -0
  198. package/daemon/dist/domain/seat-activity-service.js +123 -0
  199. package/daemon/dist/domain/seat-activity-service.js.map +1 -0
  200. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  201. package/daemon/dist/domain/session-transport.js +33 -0
  202. package/daemon/dist/domain/session-transport.js.map +1 -1
  203. package/daemon/dist/domain/skill-library-discovery.d.ts +68 -0
  204. package/daemon/dist/domain/skill-library-discovery.d.ts.map +1 -0
  205. package/daemon/dist/domain/skill-library-discovery.js +144 -0
  206. package/daemon/dist/domain/skill-library-discovery.js.map +1 -0
  207. package/daemon/dist/domain/slices/slice-indexer.d.ts +31 -0
  208. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  209. package/daemon/dist/domain/slices/slice-indexer.js +111 -6
  210. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  211. package/daemon/dist/domain/spec-library-service.d.ts +6 -0
  212. package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
  213. package/daemon/dist/domain/spec-library-service.js +19 -0
  214. package/daemon/dist/domain/spec-library-service.js.map +1 -1
  215. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +43 -0
  216. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
  217. package/daemon/dist/domain/spec-library-workflow-scanner.js +157 -3
  218. package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
  219. package/daemon/dist/domain/spec-review-service.d.ts +1 -1
  220. package/daemon/dist/domain/spec-review-service.d.ts.map +1 -1
  221. package/daemon/dist/domain/spec-review-service.js +14 -1
  222. package/daemon/dist/domain/spec-review-service.js.map +1 -1
  223. package/daemon/dist/domain/types.d.ts +106 -10
  224. package/daemon/dist/domain/types.d.ts.map +1 -1
  225. package/daemon/dist/domain/types.js.map +1 -1
  226. package/daemon/dist/domain/user-settings/settings-store.d.ts +25 -1
  227. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  228. package/daemon/dist/domain/user-settings/settings-store.js +186 -4
  229. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  230. package/daemon/dist/domain/workflow-spec-cache.d.ts +49 -0
  231. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  232. package/daemon/dist/domain/workflow-spec-cache.js +96 -0
  233. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  234. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -0
  235. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  236. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +201 -3
  237. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  238. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts +15 -0
  239. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts.map +1 -0
  240. package/daemon/dist/domain/workspace/getting-started-narrative.js +237 -0
  241. package/daemon/dist/domain/workspace/getting-started-narrative.js.map +1 -0
  242. package/daemon/dist/domain/workspace/workspace-doctor.d.ts +197 -0
  243. package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -0
  244. package/daemon/dist/domain/workspace/workspace-doctor.js +448 -0
  245. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -0
  246. package/daemon/dist/index.d.ts +2 -1
  247. package/daemon/dist/index.d.ts.map +1 -1
  248. package/daemon/dist/index.js +63 -17
  249. package/daemon/dist/index.js.map +1 -1
  250. package/daemon/dist/lib/pane-envelope.d.ts +7 -0
  251. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -0
  252. package/daemon/dist/lib/pane-envelope.js +38 -0
  253. package/daemon/dist/lib/pane-envelope.js.map +1 -0
  254. package/daemon/dist/middleware/auth-bearer-token.d.ts +47 -5
  255. package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -1
  256. package/daemon/dist/middleware/auth-bearer-token.js +109 -8
  257. package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
  258. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  259. package/daemon/dist/routes/bundles.js +966 -7
  260. package/daemon/dist/routes/bundles.js.map +1 -1
  261. package/daemon/dist/routes/config.d.ts.map +1 -1
  262. package/daemon/dist/routes/config.js +19 -2
  263. package/daemon/dist/routes/config.js.map +1 -1
  264. package/daemon/dist/routes/info.d.ts +3 -0
  265. package/daemon/dist/routes/info.d.ts.map +1 -0
  266. package/daemon/dist/routes/info.js +20 -0
  267. package/daemon/dist/routes/info.js.map +1 -0
  268. package/daemon/dist/routes/kernel-status.d.ts +3 -0
  269. package/daemon/dist/routes/kernel-status.d.ts.map +1 -0
  270. package/daemon/dist/routes/kernel-status.js +40 -0
  271. package/daemon/dist/routes/kernel-status.js.map +1 -0
  272. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  273. package/daemon/dist/routes/mission-control.js +25 -2
  274. package/daemon/dist/routes/mission-control.js.map +1 -1
  275. package/daemon/dist/routes/missions.d.ts +3 -0
  276. package/daemon/dist/routes/missions.d.ts.map +1 -0
  277. package/daemon/dist/routes/missions.js +195 -0
  278. package/daemon/dist/routes/missions.js.map +1 -0
  279. package/daemon/dist/routes/plugins.d.ts +3 -0
  280. package/daemon/dist/routes/plugins.d.ts.map +1 -0
  281. package/daemon/dist/routes/plugins.js +223 -0
  282. package/daemon/dist/routes/plugins.js.map +1 -0
  283. package/daemon/dist/routes/queue.d.ts +18 -0
  284. package/daemon/dist/routes/queue.d.ts.map +1 -1
  285. package/daemon/dist/routes/queue.js +97 -5
  286. package/daemon/dist/routes/queue.js.map +1 -1
  287. package/daemon/dist/routes/rig-cmux.d.ts +3 -0
  288. package/daemon/dist/routes/rig-cmux.d.ts.map +1 -0
  289. package/daemon/dist/routes/rig-cmux.js +121 -0
  290. package/daemon/dist/routes/rig-cmux.js.map +1 -0
  291. package/daemon/dist/routes/rig-policy.d.ts +9 -0
  292. package/daemon/dist/routes/rig-policy.d.ts.map +1 -0
  293. package/daemon/dist/routes/rig-policy.js +174 -0
  294. package/daemon/dist/routes/rig-policy.js.map +1 -0
  295. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  296. package/daemon/dist/routes/rigs.js +10 -2
  297. package/daemon/dist/routes/rigs.js.map +1 -1
  298. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  299. package/daemon/dist/routes/sessions.js +26 -3
  300. package/daemon/dist/routes/sessions.js.map +1 -1
  301. package/daemon/dist/routes/skills.d.ts +3 -0
  302. package/daemon/dist/routes/skills.d.ts.map +1 -0
  303. package/daemon/dist/routes/skills.js +147 -0
  304. package/daemon/dist/routes/skills.js.map +1 -0
  305. package/daemon/dist/routes/slices.d.ts.map +1 -1
  306. package/daemon/dist/routes/slices.js +15 -0
  307. package/daemon/dist/routes/slices.js.map +1 -1
  308. package/daemon/dist/routes/spec-library.d.ts.map +1 -1
  309. package/daemon/dist/routes/spec-library.js +16 -1
  310. package/daemon/dist/routes/spec-library.js.map +1 -1
  311. package/daemon/dist/routes/up.d.ts +25 -0
  312. package/daemon/dist/routes/up.d.ts.map +1 -1
  313. package/daemon/dist/routes/up.js +70 -3
  314. package/daemon/dist/routes/up.js.map +1 -1
  315. package/daemon/dist/routes/workspace.d.ts.map +1 -1
  316. package/daemon/dist/routes/workspace.js +80 -1
  317. package/daemon/dist/routes/workspace.js.map +1 -1
  318. package/daemon/dist/server.d.ts +41 -0
  319. package/daemon/dist/server.d.ts.map +1 -1
  320. package/daemon/dist/server.js +41 -0
  321. package/daemon/dist/server.js.map +1 -1
  322. package/daemon/dist/startup.d.ts.map +1 -1
  323. package/daemon/dist/startup.js +236 -6
  324. package/daemon/dist/startup.js.map +1 -1
  325. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +0 -1
  326. package/daemon/specs/agents/conveyor/builder/agent.yaml +0 -1
  327. package/daemon/specs/agents/conveyor/lead/agent.yaml +0 -1
  328. package/daemon/specs/agents/conveyor/planner/agent.yaml +0 -1
  329. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +0 -1
  330. package/daemon/specs/agents/design/product-designer/agent.yaml +0 -1
  331. package/daemon/specs/agents/development/implementer/agent.yaml +0 -1
  332. package/daemon/specs/agents/development/qa/agent.yaml +0 -1
  333. package/daemon/specs/agents/development/qa/guidance/role.md +0 -2
  334. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +0 -1
  335. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +28 -4
  336. package/daemon/specs/agents/research/analyst/agent.yaml +0 -1
  337. package/daemon/specs/agents/research/synthesizer/agent.yaml +0 -1
  338. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +0 -1
  339. package/daemon/specs/agents/shared/agent.yaml +6 -6
  340. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +361 -0
  341. package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +142 -0
  342. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +288 -6
  343. package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +4 -4
  344. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +116 -0
  345. package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -1
  346. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
  347. package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +6 -6
  348. package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +40 -0
  349. package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +10 -0
  350. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +48 -0
  351. package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +11 -0
  352. package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +5 -0
  353. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +56 -0
  354. package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +10 -0
  355. package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +5 -0
  356. package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +5 -0
  357. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -0
  358. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +48 -0
  359. package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +11 -0
  360. package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -0
  361. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +52 -0
  362. package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +12 -2
  363. package/daemon/specs/rigs/launch/conveyor/rig.yaml +1 -1
  364. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +35 -0
  365. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +50 -0
  366. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +37 -0
  367. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +35 -0
  368. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +49 -0
  369. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +63 -0
  370. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +35 -0
  371. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +33 -0
  372. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +30 -0
  373. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +69 -0
  374. package/daemon/specs/rigs/launch/kernel/rig-claude-only.yaml +59 -0
  375. package/daemon/specs/rigs/launch/kernel/rig-codex-only.yaml +59 -0
  376. package/daemon/specs/rigs/launch/kernel/rig.yaml +69 -0
  377. package/dist/client.d.ts +3 -0
  378. package/dist/client.d.ts.map +1 -1
  379. package/dist/client.js +13 -1
  380. package/dist/client.js.map +1 -1
  381. package/dist/commands/bundle.d.ts.map +1 -1
  382. package/dist/commands/bundle.js +123 -2
  383. package/dist/commands/bundle.js.map +1 -1
  384. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  385. package/dist/commands/config-init-workspace.js +293 -5
  386. package/dist/commands/config-init-workspace.js.map +1 -1
  387. package/dist/commands/config.d.ts.map +1 -1
  388. package/dist/commands/config.js +11 -3
  389. package/dist/commands/config.js.map +1 -1
  390. package/dist/commands/daemon.d.ts.map +1 -1
  391. package/dist/commands/daemon.js +53 -1
  392. package/dist/commands/daemon.js.map +1 -1
  393. package/dist/commands/heartbeat.d.ts.map +1 -1
  394. package/dist/commands/heartbeat.js +0 -5
  395. package/dist/commands/heartbeat.js.map +1 -1
  396. package/dist/commands/plugin.d.ts +4 -0
  397. package/dist/commands/plugin.d.ts.map +1 -0
  398. package/dist/commands/plugin.js +395 -0
  399. package/dist/commands/plugin.js.map +1 -0
  400. package/dist/commands/ps.d.ts.map +1 -1
  401. package/dist/commands/ps.js +51 -8
  402. package/dist/commands/ps.js.map +1 -1
  403. package/dist/commands/queue.d.ts +6 -0
  404. package/dist/commands/queue.d.ts.map +1 -1
  405. package/dist/commands/queue.js +103 -5
  406. package/dist/commands/queue.js.map +1 -1
  407. package/dist/commands/rig-policy.d.ts +48 -0
  408. package/dist/commands/rig-policy.d.ts.map +1 -0
  409. package/dist/commands/rig-policy.js +429 -0
  410. package/dist/commands/rig-policy.js.map +1 -0
  411. package/dist/commands/scope.d.ts +6 -0
  412. package/dist/commands/scope.d.ts.map +1 -0
  413. package/dist/commands/scope.js +659 -0
  414. package/dist/commands/scope.js.map +1 -0
  415. package/dist/commands/send.d.ts +8 -0
  416. package/dist/commands/send.d.ts.map +1 -1
  417. package/dist/commands/send.js +8 -0
  418. package/dist/commands/send.js.map +1 -1
  419. package/dist/commands/up.d.ts.map +1 -1
  420. package/dist/commands/up.js +60 -1
  421. package/dist/commands/up.js.map +1 -1
  422. package/dist/commands/workflow.d.ts +9 -0
  423. package/dist/commands/workflow.d.ts.map +1 -1
  424. package/dist/commands/workflow.js +139 -1
  425. package/dist/commands/workflow.js.map +1 -1
  426. package/dist/commands/workspace.d.ts +20 -0
  427. package/dist/commands/workspace.d.ts.map +1 -1
  428. package/dist/commands/workspace.js +138 -7
  429. package/dist/commands/workspace.js.map +1 -1
  430. package/dist/config-store.d.ts +18 -1
  431. package/dist/config-store.d.ts.map +1 -1
  432. package/dist/config-store.js +167 -4
  433. package/dist/config-store.js.map +1 -1
  434. package/dist/daemon-lifecycle.d.ts +45 -2
  435. package/dist/daemon-lifecycle.d.ts.map +1 -1
  436. package/dist/daemon-lifecycle.js +90 -9
  437. package/dist/daemon-lifecycle.js.map +1 -1
  438. package/dist/host-registry.d.ts +1 -1
  439. package/dist/host-registry.js +1 -1
  440. package/dist/index.d.ts +3 -0
  441. package/dist/index.d.ts.map +1 -1
  442. package/dist/index.js +7 -0
  443. package/dist/index.js.map +1 -1
  444. package/dist/lib/scope/dot-id.d.ts +43 -0
  445. package/dist/lib/scope/dot-id.d.ts.map +1 -0
  446. package/dist/lib/scope/dot-id.js +165 -0
  447. package/dist/lib/scope/dot-id.js.map +1 -0
  448. package/dist/lib/scope/scope-fs.d.ts +79 -0
  449. package/dist/lib/scope/scope-fs.d.ts.map +1 -0
  450. package/dist/lib/scope/scope-fs.js +468 -0
  451. package/dist/lib/scope/scope-fs.js.map +1 -0
  452. package/dist/lib/scope/templates.d.ts +38 -0
  453. package/dist/lib/scope/templates.d.ts.map +1 -0
  454. package/dist/lib/scope/templates.js +109 -0
  455. package/dist/lib/scope/templates.js.map +1 -0
  456. package/dist/lib/scope/types.d.ts +61 -0
  457. package/dist/lib/scope/types.d.ts.map +1 -0
  458. package/dist/lib/scope/types.js +38 -0
  459. package/dist/lib/scope/types.js.map +1 -0
  460. package/dist/lib/scope-templates/backlog-deprecation.md +26 -0
  461. package/dist/lib/scope-templates/backlog-tech-debt.md +22 -0
  462. package/dist/lib/scope-templates/bug-fix.md +30 -0
  463. package/dist/lib/scope-templates/mission-notes.md +97 -0
  464. package/dist/lib/scope-templates/mission-placeholder.md +20 -0
  465. package/dist/lib/scope-templates/mission-release.md +25 -0
  466. package/dist/lib/scope-templates/placeholder.md +30 -0
  467. package/dist/lib/scope-templates/release-feature.md +26 -0
  468. package/dist/lib/scope-templates/research.md +22 -0
  469. package/package.json +2 -2
  470. package/ui/dist/assets/index-C_Q5FczU.css +1 -0
  471. package/ui/dist/assets/index-GjTxfi9S.js +547 -0
  472. package/ui/dist/index.html +2 -2
  473. package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +0 -100
  474. package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +0 -256
  475. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +0 -39
  476. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +0 -37
  477. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +0 -40
  478. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +0 -94
  479. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +0 -13
  480. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +0 -14
  481. package/ui/dist/assets/index-BDHU1JUK.js +0 -412
  482. package/ui/dist/assets/index-DXTyJSqu.css +0 -1
@@ -0,0 +1,597 @@
1
+ ---
2
+ name: openrig-user
3
+ description: Use when operating OpenRig with the `rig` CLI and you need the shipped command surface for identity, inventory, communication, lifecycle, specs, recovery, or agent-facing JSON output. NOT for debugging host-side runtime issues (use openrig-operator) or for changing OpenRig itself (work in the openrig product repo).
4
+ metadata:
5
+ openrig:
6
+ stage: factory-approved
7
+ last_verified: "2026-05-04"
8
+ distribution_scope: product-bound
9
+ source_evidence: |
10
+ Bootstrap skill — NPM install lands this in personal homes (~/.claude/skills/, ~/.agents/skills/) so agents have it at every boot.
11
+ sibling_skills:
12
+ - openrig-operator
13
+ - openrig-architect
14
+ - forming-an-openrig-mental-model
15
+ transfer_test: pending
16
+ notes: |
17
+ Description was already correct (starts with "Use when..."; lists triggering domains without summarizing workflow). No frontmatter rewrite needed.
18
+ 2026-05-04 sync: body content updated for OpenRig v0.2.0 release — adds Runtime-Gated Coordination Primitives section (PL-004 Phase A-D commands: rig stream / rig queue / rig project / rig view / rig watchdog / rig workflow), default posture for daemon vs substrate coordination commands, capture discipline section. Frontmatter metadata.openrig.* preserved across the sync.
19
+ ---
20
+
21
+
22
+ # OpenRig User
23
+
24
+ This is an as-built guide to the shipped `rig` CLI.
25
+ Use current code and `rig ... --help` as ground truth if anything here ever conflicts with older planning docs.
26
+
27
+ This is the daily-driving CLI guide for an OpenRig operator. It is not
28
+ a guide to OpenRig internals or to changing OpenRig behavior — for that,
29
+ work in the openrig product repo.
30
+
31
+ ## Runtime-Gated Coordination Primitives
32
+
33
+ OpenRig v0.2.0 is published publicly as `@openrig/cli@0.2.0` and GitHub Release
34
+ `v0.2.0`. It includes the bundled PL-004 Coordination Primitive System: Phase A
35
+ `rig stream` / `rig queue`, Phase B `rig project` / `rig view`, Phase C
36
+ `rig watchdog`, and Phase D `rig workflow` / `workflow-keepalive`.
37
+
38
+ Do not confuse public package truth with this host's active daemon truth. As of 2026-05-04, the
39
+ human reports the production daemon has been upgraded to v0.2.0; a local check showed `rig
40
+ --version` and the product package version at `0.2.0`, with the daemon running on port 7433.
41
+
42
+ Default posture on this host now:
43
+
44
+ - Treat daemon `rig queue`, `rig stream`, `rig project`, `rig view`, `rig watchdog`, and
45
+ `rig workflow` as active-host coordination surfaces for PL-004-backed work.
46
+ - **CANONICAL SURFACE NOTE (2026-05-11)**: `rig queue` (daemon-backed SQLite) is the
47
+ canonical surface for queue routing since the 2026-05-11 host-CLI fix landed. Use
48
+ `rig queue create / handoff / update / show / list` for all substantive work.
49
+ - Use substrate `rigx queue`, `rigx stream`, `rigx project`, and `rigx view-proto` only where the
50
+ current workflow is still explicitly operating on the temporary substrate coordination layer or
51
+ a legacy artifact has not migrated. For queue specifically, `rigx queue` is recovery-only
52
+ fallback; qitems written via `rigx queue` are invisible to daemon-backed reads and break
53
+ fleet-wide routing discipline.
54
+ - If a daemon-backed coordination command fails, debug the command/runtime/schema edge directly;
55
+ do not fall back to stale pre-upgrade assumptions about this host.
56
+ - Do not run daemon stop/start, wrapper mutation, production DB copy/mutation, git push, tags, npm
57
+ publish, or GitHub release unless a human grants the specific bounded gate. The public release
58
+ already exists; further release operations need explicit scope.
59
+
60
+ ## Core Loop
61
+
62
+ Most work in OpenRig reduces to this loop:
63
+ - recover identity: `rig whoami --json`
64
+ - inspect inventory: `rig ps --nodes --json`
65
+ - read context: `rig transcript ...`, `rig ask ...`, `rig chatroom history ...`
66
+ - act: `rig send`, `rig capture`, `rig broadcast`, lifecycle commands
67
+
68
+ ## Identity and Recovery
69
+
70
+ Start here after launch, compaction, or confusion:
71
+
72
+ ```bash
73
+ rig whoami --json
74
+ ```
75
+
76
+ What it gives you today:
77
+ - identity: rig, logical ID, pod/member, session name, runtime
78
+ - peers and directional edges
79
+ - transcript info
80
+ - `contextUsage` when available
81
+
82
+ Flags:
83
+ ```bash
84
+ rig whoami --session <name>
85
+ rig whoami --node-id <id>
86
+ ```
87
+
88
+ If the daemon is unreachable but identity can still be inferred, `--json` may return a partial result instead of crashing.
89
+
90
+ ## Inventory and Monitoring
91
+
92
+ ```bash
93
+ rig ps
94
+ rig ps --json
95
+ rig ps --nodes
96
+ rig ps --nodes --json
97
+ ```
98
+
99
+ Use `rig ps --nodes --json` for the current node inventory across rigs. It is the best machine-readable operator surface for:
100
+ - session name
101
+ - runtime
102
+ - session/startup status
103
+ - restore outcome
104
+ - attach/resume commands
105
+ - latest error
106
+
107
+ Other health surfaces:
108
+
109
+ ```bash
110
+ rig status
111
+ rig daemon status
112
+ rig config
113
+ rig preflight
114
+ rig doctor
115
+ ```
116
+
117
+ ## Transcript and Communication
118
+
119
+ ### Transcript access
120
+
121
+ ```bash
122
+ rig transcript <session> --tail 100
123
+ rig transcript <session> --grep "pattern"
124
+ rig transcript <session> --json
125
+ ```
126
+
127
+ ### Send to one session
128
+
129
+ ```bash
130
+ rig send <session> "message"
131
+ rig send <session> "message" --verify
132
+ rig send <session> "message" --force
133
+ rig send <session> "message" --json
134
+ ```
135
+
136
+ Use `--verify` when you want delivery evidence. Use `--force` only when you intentionally want to bypass activity-risk checks.
137
+
138
+ Observed operator nuance for `--verify`:
139
+ - `Sent to ...` + `Verified: yes` = strong positive delivery evidence.
140
+ - `Sent to ...` + `Verified: no` = ambiguous delivery, not automatic failure. We have repeatedly seen the message still land; treat this as verification drift until disproven.
141
+ - no `Sent to ...` line or a hard error = send failure.
142
+
143
+ When you get `Verified: no`, do not immediately retry blindly. First check one of:
144
+ - a direct reply from the target
145
+ - `rig capture <session>`
146
+ - transcript evidence
147
+ - queue/outbox state if the message asked for a durable handoff
148
+
149
+ ### Capture terminal output
150
+
151
+ ```bash
152
+ rig capture <session>
153
+ rig capture <session> --lines 50
154
+ rig capture --rig <name>
155
+ rig capture --pod <name> --rig <name>
156
+ rig capture --rig <name> --json
157
+ ```
158
+
159
+ Capture discipline:
160
+ - Default to bounded captures: `rig capture <session> --lines 80`.
161
+ - Use `--lines 120` when the latest activity is ambiguous.
162
+ - Use `--lines 200` or more only for explicit recovery/debug reconstruction, such as post-compaction restore, context-wall diagnosis, or a failed handoff.
163
+ - Prefer targeted `rig transcript <session> --tail ...`, `rig transcript <session> --grep ...`, queue files, or status commands over large pane captures.
164
+ - Do not use large captures as routine monitoring; they waste operator context and can hide the actual latest state in old scrollback.
165
+
166
+ ### Broadcast
167
+
168
+ ```bash
169
+ rig broadcast --rig <name> "message"
170
+ rig broadcast --pod <name> "message"
171
+ rig broadcast "message"
172
+ rig broadcast --rig <name> "message" --json
173
+ ```
174
+
175
+ Without `--rig` or `--pod`, broadcast targets all running sessions.
176
+
177
+ ### Chatroom
178
+
179
+ ```bash
180
+ rig chatroom send <rig> <message> [--sender <name>]
181
+ rig chatroom history <rig> [--topic <name>] [--after <id>] [--since <ts>] [--sender <name>] [--limit <n>] [--json]
182
+ rig chatroom wait <rig> [--after <id>] [--topic <name>] [--sender <name>] [--timeout <seconds>] [--json]
183
+ rig chatroom clear <rig>
184
+ rig chatroom topic <rig> <topic-name> [--body <text>] [--sender <name>]
185
+ rig chatroom watch <rig> [--tmux]
186
+ ```
187
+
188
+ **Key commands:**
189
+ - `send` — post a message
190
+ - `history` — retrieve with composable filters (sender, since, after, topic)
191
+ - `wait` — block until new matching messages arrive (polls history, times out honestly)
192
+ - `clear` — delete all messages for the rig (destructive, rig-scoped)
193
+ - `topic` — set a topic marker
194
+ - `watch` — SSE or tmux-based live stream
195
+
196
+ **Roundtable protocol:**
197
+ 1. Inspect old room: `rig chatroom history my-rig --limit 5`
198
+ 2. Save if needed: `rig chatroom history my-rig --json > /tmp/old-room.json`
199
+ 3. Clear if needed: `rig chatroom clear my-rig`
200
+ 4. Set topic: `rig chatroom topic my-rig "ROUND START"`
201
+ 5. Post: `rig chatroom send my-rig "position..." --sender <session>`
202
+ 6. Monitor: `rig chatroom wait my-rig --timeout 120`
203
+ 7. Close: `rig chatroom topic my-rig "ROUND CLOSED"`
204
+
205
+ See `docs/planning/roadmaps/chatroom-roundtable-protocol.md` for the full protocol.
206
+
207
+ ### `rig ask`
208
+
209
+ ```bash
210
+ rig ask <rig> "question"
211
+ rig ask <rig> "question" --json
212
+ ```
213
+
214
+ Current shipped behavior:
215
+ - queries the daemon for evidence
216
+ - returns rig summary
217
+ - returns transcript excerpts
218
+ - may return chat excerpts
219
+ - returns insufficiency state and optional guidance
220
+
221
+ This is an evidence/context command. It is not a hidden second-LLM call.
222
+
223
+ ## Lifecycle
224
+
225
+ ### Bring a rig up
226
+
227
+ ```bash
228
+ rig up <source>
229
+ rig up <source> --plan
230
+ rig up <source> --yes
231
+ rig up <source> --json
232
+ ```
233
+
234
+ `<source>` can be:
235
+ - a rig spec path
236
+ - a `.rigbundle` path
237
+ - a bare name
238
+
239
+ Bare names are special:
240
+ - if they match a library spec, `rig up` launches from the spec library
241
+ - if they do not match a library spec, `rig up` treats the name as an existing-rig restore/power-on target
242
+ - if both exist, `rig up` fails loudly on ambiguity
243
+
244
+ Current behavior notes:
245
+ - `--target <root>` is only for `.rigbundle` / package installation. It does not change agent cwd.
246
+ - `local:` `agent_ref` values resolve relative to the rig spec directory, not your shell cwd.
247
+ - if you copy a built-in spec elsewhere, keep its `agents/` tree beside the YAML or rewrite those refs to `path:/absolute/path`
248
+ - `rig up --cwd <path>` exists as a launch working-directory override applied to all members for that run (verify with `rig up --help`)
249
+ - Source at OpenRig `6af2754` adds member-level `starter_ref` for named Agent
250
+ Starter registry entries. Active host availability still depends on the
251
+ running daemon; `rig-real-17812d5` does not resolve `starter_ref`.
252
+
253
+ Legacy/spec-specific surfaces still ship too:
254
+
255
+ ```bash
256
+ rig bootstrap <spec> [--plan] [--yes] [--json]
257
+ rig requirements <spec> [--json]
258
+ ```
259
+
260
+ ### Agent Starter `starter_ref`
261
+
262
+ Source `>= 6af2754` lets a RigSpec member set:
263
+
264
+ ```yaml
265
+ starter_ref:
266
+ name: my-team-starter--claude-code
267
+ ```
268
+
269
+ The daemon resolves the named entry from the Agent Starter registry, applies the
270
+ credential scan, and prepends the starter content as `guidance_merge` on fresh
271
+ launch. It supports Claude and Codex members, rejects terminal members, rejects
272
+ `starter_ref + session_source.mode: fork`, and allows
273
+ `starter_ref + session_source.mode: rebuild`.
274
+
275
+ Runtime-truth rule: verify active daemon/runtime provenance before depending on
276
+ this. If the live daemon is still `rig-real-17812d5`, `starter_ref` is source
277
+ truth only and should not be used against the active control plane. After a
278
+ runtime at or after `6af2754` is active, `rig up --plan --json` should expose a
279
+ `resolve_starter` stage with `detail.starterContent`.
280
+
281
+ ### Tear a rig down
282
+
283
+ ```bash
284
+ rig down <rigId>
285
+ rig down <rigId> --snapshot
286
+ rig down <rigId> --delete
287
+ rig down <rigId> --force
288
+ rig down <rigId> --json
289
+ ```
290
+
291
+ Known v0.2.0 public-release caveat: `rig down <name> --delete` can return HTTP 404 even when
292
+ `rig ps --json` exposes the rig name. Use `rig ps` to find the rig ID, then run
293
+ `rig down <rigId> --delete` until `rig-down-name-lookup-404` is fixed.
294
+
295
+ If `--snapshot` succeeds, human output includes the restore hint.
296
+
297
+ ### Release management without killing live claimed sessions
298
+
299
+ ```bash
300
+ rig release <rigId>
301
+ rig release <rigId> --delete
302
+ rig release <rigId> --json
303
+ ```
304
+
305
+ Use `rig release` for adopted/claimed-session rigs when you want OpenRig to stop managing the rig but leave the tmux sessions alive.
306
+ This is the safe recovery/reset surface for the "sessions still exist, management is broken or stale" case.
307
+ If the rig contains OpenRig-launched nodes, `rig release` refuses loudly instead of pretending the mixed rig is safe to detach.
308
+
309
+ ### Snapshots and restore
310
+
311
+ ```bash
312
+ rig snapshot <rigId>
313
+ rig snapshot list <rigId>
314
+ rig restore <snapshotId> --rig <rigId>
315
+ ```
316
+
317
+ `rig restore` requires `--rig <rigId>`.
318
+
319
+ Claude Code autonomy note:
320
+ - unattended `rig whoami` on boot may require the local permission allow list to include `Bash(rig:*)`
321
+
322
+ ### Import/export and bundles
323
+
324
+ ```bash
325
+ rig export <rigId> -o rig.yaml
326
+ rig import <path> [--instantiate] [--materialize-only] [--preflight] [--target-rig <rigId>] [--rig-root <root>]
327
+ rig bundle create <spec> -o out.rigbundle
328
+ rig bundle inspect <bundle>
329
+ rig bundle install <bundle> [--plan] [--yes] [--target <root>] [--json]
330
+ ```
331
+
332
+ ### Legacy package surface
333
+
334
+ This still ships, but is explicitly marked legacy:
335
+
336
+ ```bash
337
+ rig package validate <path>
338
+ rig package plan <path> [--target <dir>] [--runtime <runtime>] [--role <name>]
339
+ rig package install <path> [--target <dir>] [--runtime <runtime>] [--role <name>] [--allow-merge]
340
+ rig package list
341
+ rig package rollback <installId>
342
+ ```
343
+
344
+ ## Discovery and Topology Mutation
345
+
346
+ ### Discover unmanaged tmux sessions
347
+
348
+ ```bash
349
+ rig discover
350
+ rig discover --json
351
+ rig discover --draft
352
+ ```
353
+
354
+ ### Bind a discovered session
355
+
356
+ ```bash
357
+ rig bind <discoveredId> --rig <rigId> --node <logicalId>
358
+ rig bind <discoveredId> --rig <rigId> --pod <namespace> --member <name>
359
+ ```
360
+
361
+ There is no shipped top-level `rig claim` command.
362
+ The current adoption surface is `discover`, `bind`, `adopt`, and `unclaim`.
363
+
364
+ ### Self-attach the current shell or agent
365
+
366
+ ```bash
367
+ rig attach --self --rig <rigId> --node <logicalId>
368
+ rig attach --self --rig <rigId> --node <logicalId> --print-env
369
+ rig attach --self --rig <rigId> --pod <namespace> --member <name> --runtime <runtime>
370
+ ```
371
+
372
+ Use `rig attach --self` when the current agent should attach itself directly instead of going through `discover` + `bind`.
373
+
374
+ Current proven behavior:
375
+ - inside `tmux`: attaches as a normal tmux-backed node, preserving inbound `rig send` / `rig capture`
376
+ - outside `tmux`: attaches as `external_cli`
377
+ - `--print-env` prints the `OPENRIG_NODE_ID` and `OPENRIG_SESSION_NAME` exports for the current shell
378
+
379
+ Recommended flow:
380
+
381
+ ```bash
382
+ rig attach --self --rig <rigId> --node <logicalId> --print-env > /tmp/openrig-self-attach.env
383
+ . /tmp/openrig-self-attach.env
384
+ rig whoami --json
385
+ ```
386
+
387
+ Notes:
388
+ - for tmux-backed self-attach, `rig whoami --json` is the right verification
389
+ - for raw/external self-attach, `rig ps --nodes --json` is currently the more reliable verification surface
390
+ - if the current shell is outside tmux, pass `--display-name <name>` when you want a stable human session label recorded
391
+
392
+ ### Adopt a topology and bind live sessions
393
+
394
+ ```bash
395
+ rig adopt <path> --bind <logicalId=tmuxSessionOrDiscoveryId>
396
+ rig adopt <path> --bind <logicalId=...> --bind <logicalId=...> --json
397
+ rig adopt <path> --bindings-file <bindings.yaml>
398
+ rig adopt <path> --bind <logicalId=...> --target-rig <rigId> --rig-root <root>
399
+ ```
400
+
401
+ Use `rig adopt` when the sessions already exist and you want OpenRig to start managing them.
402
+
403
+ A bindings file is the durable map from authored logical IDs to live sessions. Shape:
404
+
405
+ ```yaml
406
+ bindings:
407
+ dev1.impl2: dev1-impl2@rigged-buildout
408
+ dev1.qa: dev1-qa@rigged-buildout
409
+ ```
410
+
411
+ Spec + bindings is the proven recovery pair for adopted rigs.
412
+ Spec gives OpenRig the intended topology. Bindings tells OpenRig which discovered live session belongs in each logical node.
413
+
414
+ ### Proven adopted-rig recovery workflow
415
+
416
+ This workflow is proven for the case where the external tmux sessions are still alive:
417
+
418
+ ```bash
419
+ rig release <rigId> --delete
420
+ rig discover --json
421
+ rig adopt <spec.yaml> --bindings-file <bindings.yaml>
422
+ ```
423
+
424
+ What this does:
425
+ - removes OpenRig management without killing the sessions
426
+ - re-discovers those same sessions as unmanaged
427
+ - re-attaches them to the topology defined by the spec + bindings
428
+
429
+ Important limits:
430
+ - this is for `sessions still alive`
431
+ - spec alone is not enough for adopted rigs; you also need bindings
432
+ - this does not yet mean OpenRig can recreate dead external sessions from nothing
433
+
434
+ ### Add unmanaged pods into an existing rig
435
+
436
+ This is the proven workflow when a rig is already managed, but a new pod was created outside OpenRig and you want to add it later:
437
+
438
+ ```bash
439
+ rig adopt <pod-fragment.yaml> --bindings-file <pod.bindings.yaml> --target-rig <rigId>
440
+ ```
441
+
442
+ Use this when:
443
+ - the target rig already exists
444
+ - the new sessions are live and visible in `rig discover --json`
445
+ - you want additive topology growth, not a full rebuild
446
+
447
+ What to prepare:
448
+ - a pod fragment spec with only the new pod
449
+ - a bindings file mapping the new logical IDs to the live session names
450
+
451
+ Verification loop:
452
+
453
+ ```bash
454
+ rig discover --json
455
+ rig adopt <fragment.yaml> --bindings-file <bindings.yaml> --target-rig <rigId>
456
+ rig ps --nodes --json
457
+ rig export <rigId> -o rig.yaml
458
+ ```
459
+
460
+ Success looks like:
461
+ - the new sessions stop appearing in `rig discover`
462
+ - the new logical IDs appear in `rig ps --nodes --json`
463
+ - `rig export` includes the new pod
464
+
465
+ ### Mixed-origin rigs are allowed
466
+
467
+ One rig can contain both:
468
+ - adopted nodes bound from already-running sessions
469
+ - OpenRig-launched nodes created later with `rig expand` / `rig launch`
470
+
471
+ Current safety rule:
472
+ - `rig release` is for claimed/adopted-only rigs
473
+ - if a rig contains launched nodes, `rig release` fails with `contains_launched_nodes`
474
+
475
+ ### Manager-assisted recovery
476
+
477
+ The proven operator pattern is:
478
+ - keep one OpenRig manager session outside the rig it manages
479
+ - address the target by rig name, not cached rig ID
480
+ - resolve the current owner from fresh `rig ps --nodes --json`
481
+ - send the manager the spec path, bindings path, and verification steps with `rig send`
482
+
483
+ This lets ordinary agents ask the manager for OpenRig help instead of every agent needing to be an OpenRig expert.
484
+
485
+ ### Add/remove running topology parts
486
+
487
+ ```bash
488
+ rig expand <rig-id> <pod-fragment-path> [--rig-root <path>] [--json]
489
+ rig launch <rigId> <nodeRef> [--json]
490
+ rig remove <rigId> <nodeRef> [--json]
491
+ rig shrink <rigId> <podRef> [--json]
492
+ rig unclaim <sessionRef> [--json]
493
+ ```
494
+
495
+ ## Specs and Validation
496
+
497
+ ### Validate specs
498
+
499
+ ```bash
500
+ rig spec validate <path> [--json]
501
+ rig spec preflight <path> [--rig-root <root>] [--json]
502
+ rig agent validate <path> [--json]
503
+ ```
504
+
505
+ ### Spec library
506
+
507
+ ```bash
508
+ rig specs ls [--kind <kind>] [--json]
509
+ rig specs show <name-or-id> [--json]
510
+ rig specs preview <name-or-id> [--json]
511
+ rig specs add <yaml-or-directory> [--json]
512
+ rig specs sync [--json]
513
+ rig specs remove <name-or-id> [--json]
514
+ rig specs rename <name-or-id> <new-name> [--json]
515
+ ```
516
+
517
+ `rig specs add <directory>` installs a full spec tree when the directory contains `rig.yaml` or `agent.yaml`.
518
+
519
+ ## MCP
520
+
521
+ ```bash
522
+ rig mcp serve [--port <port>]
523
+ ```
524
+
525
+ Current shipped MCP tools:
526
+ - `rig_up`
527
+ - `rig_down`
528
+ - `rig_ps`
529
+ - `rig_status`
530
+ - `rig_snapshot_create`
531
+ - `rig_snapshot_list`
532
+ - `rig_restore`
533
+ - `rig_discover`
534
+ - `rig_bind`
535
+ - `rig_bundle_inspect`
536
+ - `rig_agent_validate`
537
+ - `rig_rig_validate`
538
+ - `rig_rig_nodes`
539
+ - `rig_send`
540
+ - `rig_capture`
541
+ - `rig_chatroom_send`
542
+ - `rig_chatroom_watch`
543
+
544
+ ## Troubleshooting and Weird States
545
+
546
+ When the CLI behaves strangely, use the smallest truthful check first:
547
+
548
+ ```bash
549
+ rig whoami --json
550
+ rig daemon status
551
+ rig ps --nodes --json
552
+ ```
553
+
554
+ Specific operator rules:
555
+ - `Sent to ...` + `Verified: no` is ambiguous delivery, not automatic failure. Check reply, `rig capture`, transcript evidence, or queue/outbox state before retrying.
556
+ - partial `rig whoami --json` can happen when identity is still inferable but the daemon-backed path is degraded.
557
+ - the unified-exec-process warning is a host/tooling-layer signal, not automatic proof that the OpenRig topology is unhealthy.
558
+
559
+ If you hit the unified-exec warning, inspect for stale one-shot helpers before touching live seats:
560
+
561
+ ```bash
562
+ ps -axo pid,ppid,command | rg 'tmux send-keys|rig queue create|tmux attach|codex|claude'
563
+ ```
564
+
565
+ Safe cleanup target:
566
+ - orphaned one-shot wrappers like `tmux send-keys ...`
567
+
568
+ Do not mass-kill:
569
+ - `tmux attach ...`
570
+ - `codex ...`
571
+ - `claude ...`
572
+
573
+ For deeper host/runtime triage, use the companion `openrig-operator` skill.
574
+
575
+ ## JSON and Error Posture
576
+
577
+ Design assumptions that hold in the shipped CLI:
578
+ - many operator commands support `--json`
579
+ - error messages are intended to say what happened, why it matters, and what to do next
580
+ - daemon-backed commands fail loudly when the daemon is stopped or unhealthy
581
+ - restore failure is not something you should silently reinterpret as success
582
+
583
+ ## After-Compaction Recovery Checklist
584
+
585
+ 1. `rig whoami --json`
586
+ 2. `rig transcript <your-session> --tail 100`
587
+ 3. `rig ps --nodes --json`
588
+ 4. `rig chatroom history <rig> --limit 50`
589
+
590
+ ## Commands That Do Not Exist
591
+
592
+ Do not assume these exist unless the shipped help starts listing them:
593
+ - `rig claim`
594
+ - `rig blame`
595
+ - `rig replay`
596
+
597
+ `rig env` IS shipped (was previously listed as not-present). It exposes `status`, `logs`, and `down` for service-backed rigs and managed apps; verify with `rig env --help`.