@openrig/cli 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) 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 +43 -57
  37. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  38. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts +32 -0
  39. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts.map +1 -0
  40. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js +37 -0
  41. package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js.map +1 -0
  42. package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
  43. package/daemon/dist/domain/agent-manifest.js +116 -37
  44. package/daemon/dist/domain/agent-manifest.js.map +1 -1
  45. package/daemon/dist/domain/agent-resolver.js +1 -1
  46. package/daemon/dist/domain/agent-resolver.js.map +1 -1
  47. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +81 -0
  48. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -0
  49. package/daemon/dist/domain/claude-compaction-enforcer.js +242 -0
  50. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -0
  51. package/daemon/dist/domain/cmux-layout-service.d.ts +41 -0
  52. package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -0
  53. package/daemon/dist/domain/cmux-layout-service.js +184 -0
  54. package/daemon/dist/domain/cmux-layout-service.js.map +1 -0
  55. package/daemon/dist/domain/context-monitor.d.ts +15 -1
  56. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  57. package/daemon/dist/domain/context-monitor.js +38 -3
  58. package/daemon/dist/domain/context-monitor.js.map +1 -1
  59. package/daemon/dist/domain/kernel-boot-tracker.d.ts +74 -0
  60. package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -0
  61. package/daemon/dist/domain/kernel-boot-tracker.js +213 -0
  62. package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -0
  63. package/daemon/dist/domain/kernel-boot.d.ts +50 -0
  64. package/daemon/dist/domain/kernel-boot.d.ts.map +1 -0
  65. package/daemon/dist/domain/kernel-boot.js +147 -0
  66. package/daemon/dist/domain/kernel-boot.js.map +1 -0
  67. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +5 -0
  68. package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -1
  69. package/daemon/dist/domain/mission-control/mission-control-read-layer.js +16 -2
  70. package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
  71. package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
  72. package/daemon/dist/domain/mission-control/mission-control-write-contract.js +3 -1
  73. package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
  74. package/daemon/dist/domain/plugin-discovery-service.d.ts +150 -0
  75. package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -0
  76. package/daemon/dist/domain/plugin-discovery-service.js +468 -0
  77. package/daemon/dist/domain/plugin-discovery-service.js.map +1 -0
  78. package/daemon/dist/domain/plugin-vendor-service.d.ts +54 -0
  79. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -0
  80. package/daemon/dist/domain/plugin-vendor-service.js +111 -0
  81. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -0
  82. package/daemon/dist/domain/profile-resolver.d.ts +3 -3
  83. package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
  84. package/daemon/dist/domain/profile-resolver.js +7 -7
  85. package/daemon/dist/domain/profile-resolver.js.map +1 -1
  86. package/daemon/dist/domain/projection-planner.d.ts +7 -1
  87. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  88. package/daemon/dist/domain/projection-planner.js +44 -4
  89. package/daemon/dist/domain/projection-planner.js.map +1 -1
  90. package/daemon/dist/domain/queue-repository.d.ts +8 -1
  91. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  92. package/daemon/dist/domain/queue-repository.js +14 -5
  93. package/daemon/dist/domain/queue-repository.js.map +1 -1
  94. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  95. package/daemon/dist/domain/session-transport.js +33 -0
  96. package/daemon/dist/domain/session-transport.js.map +1 -1
  97. package/daemon/dist/domain/skill-library-discovery.d.ts +68 -0
  98. package/daemon/dist/domain/skill-library-discovery.d.ts.map +1 -0
  99. package/daemon/dist/domain/skill-library-discovery.js +144 -0
  100. package/daemon/dist/domain/skill-library-discovery.js.map +1 -0
  101. package/daemon/dist/domain/slices/slice-indexer.d.ts +19 -0
  102. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  103. package/daemon/dist/domain/slices/slice-indexer.js +88 -6
  104. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  105. package/daemon/dist/domain/spec-library-service.d.ts +6 -0
  106. package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
  107. package/daemon/dist/domain/spec-library-service.js.map +1 -1
  108. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +43 -0
  109. package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
  110. package/daemon/dist/domain/spec-library-workflow-scanner.js +157 -3
  111. package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
  112. package/daemon/dist/domain/spec-review-service.d.ts +1 -1
  113. package/daemon/dist/domain/spec-review-service.d.ts.map +1 -1
  114. package/daemon/dist/domain/spec-review-service.js +14 -1
  115. package/daemon/dist/domain/spec-review-service.js.map +1 -1
  116. package/daemon/dist/domain/types.d.ts +27 -7
  117. package/daemon/dist/domain/types.d.ts.map +1 -1
  118. package/daemon/dist/domain/types.js.map +1 -1
  119. package/daemon/dist/domain/user-settings/settings-store.d.ts +25 -1
  120. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  121. package/daemon/dist/domain/user-settings/settings-store.js +186 -4
  122. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  123. package/daemon/dist/domain/workflow-spec-cache.d.ts +27 -0
  124. package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
  125. package/daemon/dist/domain/workflow-spec-cache.js +59 -0
  126. package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
  127. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  128. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +45 -0
  129. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  130. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts +15 -0
  131. package/daemon/dist/domain/workspace/getting-started-narrative.d.ts.map +1 -0
  132. package/daemon/dist/domain/workspace/getting-started-narrative.js +237 -0
  133. package/daemon/dist/domain/workspace/getting-started-narrative.js.map +1 -0
  134. package/daemon/dist/index.d.ts +2 -1
  135. package/daemon/dist/index.d.ts.map +1 -1
  136. package/daemon/dist/index.js +52 -17
  137. package/daemon/dist/index.js.map +1 -1
  138. package/daemon/dist/lib/pane-envelope.d.ts +7 -0
  139. package/daemon/dist/lib/pane-envelope.d.ts.map +1 -0
  140. package/daemon/dist/lib/pane-envelope.js +38 -0
  141. package/daemon/dist/lib/pane-envelope.js.map +1 -0
  142. package/daemon/dist/middleware/auth-bearer-token.d.ts +47 -5
  143. package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -1
  144. package/daemon/dist/middleware/auth-bearer-token.js +109 -8
  145. package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
  146. package/daemon/dist/routes/kernel-status.d.ts +3 -0
  147. package/daemon/dist/routes/kernel-status.d.ts.map +1 -0
  148. package/daemon/dist/routes/kernel-status.js +40 -0
  149. package/daemon/dist/routes/kernel-status.js.map +1 -0
  150. package/daemon/dist/routes/mission-control.d.ts.map +1 -1
  151. package/daemon/dist/routes/mission-control.js +25 -2
  152. package/daemon/dist/routes/mission-control.js.map +1 -1
  153. package/daemon/dist/routes/missions.d.ts +3 -0
  154. package/daemon/dist/routes/missions.d.ts.map +1 -0
  155. package/daemon/dist/routes/missions.js +195 -0
  156. package/daemon/dist/routes/missions.js.map +1 -0
  157. package/daemon/dist/routes/plugins.d.ts +3 -0
  158. package/daemon/dist/routes/plugins.d.ts.map +1 -0
  159. package/daemon/dist/routes/plugins.js +223 -0
  160. package/daemon/dist/routes/plugins.js.map +1 -0
  161. package/daemon/dist/routes/rig-cmux.d.ts +3 -0
  162. package/daemon/dist/routes/rig-cmux.d.ts.map +1 -0
  163. package/daemon/dist/routes/rig-cmux.js +121 -0
  164. package/daemon/dist/routes/rig-cmux.js.map +1 -0
  165. package/daemon/dist/routes/skills.d.ts +3 -0
  166. package/daemon/dist/routes/skills.d.ts.map +1 -0
  167. package/daemon/dist/routes/skills.js +147 -0
  168. package/daemon/dist/routes/skills.js.map +1 -0
  169. package/daemon/dist/routes/slices.d.ts.map +1 -1
  170. package/daemon/dist/routes/slices.js +15 -0
  171. package/daemon/dist/routes/slices.js.map +1 -1
  172. package/daemon/dist/routes/spec-library.d.ts.map +1 -1
  173. package/daemon/dist/routes/spec-library.js +16 -1
  174. package/daemon/dist/routes/spec-library.js.map +1 -1
  175. package/daemon/dist/server.d.ts +31 -0
  176. package/daemon/dist/server.d.ts.map +1 -1
  177. package/daemon/dist/server.js +30 -0
  178. package/daemon/dist/server.js.map +1 -1
  179. package/daemon/dist/startup.d.ts.map +1 -1
  180. package/daemon/dist/startup.js +194 -5
  181. package/daemon/dist/startup.js.map +1 -1
  182. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +0 -1
  183. package/daemon/specs/agents/conveyor/builder/agent.yaml +0 -1
  184. package/daemon/specs/agents/conveyor/lead/agent.yaml +0 -1
  185. package/daemon/specs/agents/conveyor/planner/agent.yaml +0 -1
  186. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +0 -1
  187. package/daemon/specs/agents/design/product-designer/agent.yaml +0 -1
  188. package/daemon/specs/agents/development/implementer/agent.yaml +0 -1
  189. package/daemon/specs/agents/development/qa/agent.yaml +0 -1
  190. package/daemon/specs/agents/development/qa/guidance/role.md +0 -2
  191. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +0 -1
  192. package/daemon/specs/agents/research/analyst/agent.yaml +0 -1
  193. package/daemon/specs/agents/research/synthesizer/agent.yaml +0 -1
  194. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +0 -1
  195. package/daemon/specs/agents/shared/agent.yaml +6 -6
  196. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +361 -0
  197. package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +142 -0
  198. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +6 -1
  199. package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +4 -4
  200. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +116 -0
  201. package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -1
  202. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
  203. package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +6 -6
  204. package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +40 -0
  205. package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +10 -0
  206. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +48 -0
  207. package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +11 -0
  208. package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +5 -0
  209. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +56 -0
  210. package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +10 -0
  211. package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +5 -0
  212. package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +5 -0
  213. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -0
  214. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +48 -0
  215. package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +11 -0
  216. package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -0
  217. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +52 -0
  218. package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +12 -2
  219. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +35 -0
  220. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +50 -0
  221. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +37 -0
  222. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +35 -0
  223. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +49 -0
  224. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +63 -0
  225. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +35 -0
  226. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +33 -0
  227. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +30 -0
  228. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +69 -0
  229. package/daemon/specs/rigs/launch/kernel/rig-claude-only.yaml +59 -0
  230. package/daemon/specs/rigs/launch/kernel/rig-codex-only.yaml +59 -0
  231. package/daemon/specs/rigs/launch/kernel/rig.yaml +69 -0
  232. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  233. package/dist/commands/config-init-workspace.js +253 -0
  234. package/dist/commands/config-init-workspace.js.map +1 -1
  235. package/dist/commands/config.d.ts.map +1 -1
  236. package/dist/commands/config.js +11 -3
  237. package/dist/commands/config.js.map +1 -1
  238. package/dist/commands/daemon.d.ts.map +1 -1
  239. package/dist/commands/daemon.js +53 -1
  240. package/dist/commands/daemon.js.map +1 -1
  241. package/dist/commands/heartbeat.d.ts.map +1 -1
  242. package/dist/commands/heartbeat.js +0 -5
  243. package/dist/commands/heartbeat.js.map +1 -1
  244. package/dist/commands/plugin.d.ts +4 -0
  245. package/dist/commands/plugin.d.ts.map +1 -0
  246. package/dist/commands/plugin.js +395 -0
  247. package/dist/commands/plugin.js.map +1 -0
  248. package/dist/commands/send.d.ts +8 -0
  249. package/dist/commands/send.d.ts.map +1 -1
  250. package/dist/commands/send.js +8 -0
  251. package/dist/commands/send.js.map +1 -1
  252. package/dist/commands/up.d.ts.map +1 -1
  253. package/dist/commands/up.js +13 -1
  254. package/dist/commands/up.js.map +1 -1
  255. package/dist/config-store.d.ts +18 -1
  256. package/dist/config-store.d.ts.map +1 -1
  257. package/dist/config-store.js +167 -4
  258. package/dist/config-store.js.map +1 -1
  259. package/dist/daemon-lifecycle.d.ts +20 -1
  260. package/dist/daemon-lifecycle.d.ts.map +1 -1
  261. package/dist/daemon-lifecycle.js +57 -7
  262. package/dist/daemon-lifecycle.js.map +1 -1
  263. package/dist/host-registry.d.ts +1 -1
  264. package/dist/host-registry.js +1 -1
  265. package/dist/index.d.ts +1 -0
  266. package/dist/index.d.ts.map +1 -1
  267. package/dist/index.js +2 -0
  268. package/dist/index.js.map +1 -1
  269. package/package.json +1 -1
  270. package/ui/dist/assets/index-C_Q5FczU.css +1 -0
  271. package/ui/dist/assets/index-Rl3ZBrUg.js +547 -0
  272. package/ui/dist/index.html +2 -2
  273. package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +0 -100
  274. package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +0 -256
  275. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +0 -39
  276. package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +0 -37
  277. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +0 -40
  278. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +0 -94
  279. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +0 -13
  280. package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +0 -14
  281. package/ui/dist/assets/index-BDHU1JUK.js +0 -412
  282. package/ui/dist/assets/index-DXTyJSqu.css +0 -1
@@ -0,0 +1,361 @@
1
+ ---
2
+ name: openrig-architect
3
+ description: Use when designing multi-agent topologies that run ON OpenRig — authoring RigSpec and AgentSpec files for new rigs, creating agent startup content (guidance / skills / culture), or diagnosing why a launched rig's agents aren't behaving as intended. NOT for changing OpenRig itself (work in the openrig product repo); NOT for ordinary CLI operation of an existing rig (use openrig-user). Covers the full authoring lifecycle from user intent to validated, launchable rig.
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/) for users authoring their own rigs.
11
+ sibling_skills:
12
+ - openrig-user
13
+ - openrig-operator
14
+ - forming-an-openrig-mental-model
15
+ transfer_test: pending
16
+ ---
17
+
18
+ # OpenRig Architect
19
+
20
+ You are now an OpenRig architect. You design, author, validate, and diagnose multi-agent topologies for OpenRig.
21
+
22
+ Your job is to take a user's intent — "I need a team that does X" — and produce a complete, functioning rig: the topology spec, the agent specs, the guidance files, the culture, the startup content, and everything else needed for the rig to boot and the agents to know what to do.
23
+
24
+ You also diagnose problems when a rig launches but agents aren't behaving as intended.
25
+
26
+ ## Before You Design: Required Reading
27
+
28
+ Load these before starting any design work. The quality of your output depends on the depth of knowledge you bring.
29
+
30
+ **Required (read all of these):**
31
+
32
+ 1. **`openrig-user` skill** — full OpenRig CLI surface. You must know the operator primitives. If your runtime supports skills, load it by name. Otherwise, look for it at `~/.openrig/skills/openrig-user/SKILL.md` (the runtime install dogfood mirror — packaged skills land here) or inside the OpenRig installation under `packages/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md`. The `~/.openrig/reference/` directory holds reference docs (rig-spec.md, agent-spec.md, etc.), NOT skills.
33
+
34
+ 2. **OpenRig reference docs** — these are installed at `~/.openrig/reference/` when the daemon starts. Read all of them:
35
+ - `~/.openrig/reference/rig-spec.md` — canonical RigSpec YAML reference. Every field, validation rule, default.
36
+ - `~/.openrig/reference/agent-spec.md` — canonical AgentSpec YAML reference. Same depth.
37
+ - `~/.openrig/reference/agent-startup-guide.md` — how to think about what goes into agent startup. Context loading vs deterministic config, when to use skills vs guidance, the layering model, current support matrix.
38
+ - `~/.openrig/reference/edge-types.md` — what edges do today vs what they're intended to do.
39
+
40
+ If `~/.openrig/reference/` doesn't exist yet, start the daemon first (`rig daemon start`) — it copies the reference docs on startup.
41
+
42
+ **Read as worked examples:**
43
+
44
+ 3. **Shipped starter specs** — the OpenRig installation includes proven starter topologies. Find them by running `rig specs ls`. Read the ones that are relevant to your design task, especially:
45
+ - `implementation-pair` — the smallest effective development unit (2 agents)
46
+ - `secrets-manager` — a managed-app rig with services integration and a specialist agent
47
+
48
+ **Read if present on this host:**
49
+
50
+ 4. **Host-level doctrine file** (if your team maintains one — e.g., a HOST-TOPOLOGY doc that defines canonical rig classes, context-sharing patterns, and authoring SOPs for high-stakes rigs). If present, it supersedes the baseline process below for complex or high-stakes rigs (≥4 members, HA, managed-app, or shared/copied). Solo operators and small/focused rigs use the baseline below directly.
51
+ 5. **Agent-facing software design principles** if your rig ships a new CLI, service, or managed app that agents will operate. Treat the operating surface as a context-engineering problem: every error message and help text gives the agent information to act on.
52
+
53
+ **Load as needed:**
54
+ - Domain-specific skills when designing specialist agents — find shipped skills inside the OpenRig installation under the `specs/agents/` tree
55
+ - If the design session is long and you're running inside a managed rig, use `rig whoami --json` to recover your identity after compaction
56
+
57
+ Do not skip the required reading. A rig architect who doesn't know the spec format will produce specs that don't validate. An architect who doesn't know the startup layering model will produce agents that boot without knowing their role. An architect who doesn't check for host-level doctrine will reinvent conventions the host has already established.
58
+
59
+ ## The Design Process
60
+
61
+ ### Step 1: Understand the User's Intent
62
+
63
+ Before touching YAML, understand what the user actually needs:
64
+
65
+ - **What is the goal?** Not "I need 5 agents" but "I need to build and ship a web application" or "I need to research a technical question deeply" or "I need a team that can operate and monitor a running service."
66
+ - **What are the workflows?** How does work flow from intent to completion? Who does what? Where are the handoffs?
67
+ - **What is the project?** What codebase, what tech stack, what domain? This shapes agent specialization and startup content.
68
+ - **What runtimes are available?** Does the user have Claude Code? Codex? Both? Runtime availability constrains topology design.
69
+ - **How autonomous should it be?** Does the user want to direct every step, or should the rig be mostly self-driving with occasional human checkpoints?
70
+
71
+ Ask clarifying questions if the intent is ambiguous. A well-understood intent produces a dramatically better topology than a guess.
72
+
73
+ ### Step 2: Identify Bounded Contexts → Pods
74
+
75
+ Every rig is organized into pods — bounded context groups where members share a workflow concern. The question is: what are the natural groupings?
76
+
77
+ **Common pod patterns:**
78
+
79
+ | Pod | Purpose | When to use |
80
+ |-----|---------|-------------|
81
+ | Orchestration | Coordination, dispatch, monitoring | Almost always — any rig with 3+ agents needs an orchestrator |
82
+ | Development | Implementation, testing, quality | Any rig that writes code |
83
+ | Review | Independent code review, architecture review | When quality gates matter (production code, security-sensitive work) |
84
+ | Research | Deep investigation, analysis, synthesis | When the work requires research before implementation |
85
+ | Design | UX, interaction design, product decisions | When the work has a user-facing interface |
86
+ | Specialist | Domain-specific operations (Vault, DB, infra) | When a specific technology needs dedicated expertise |
87
+
88
+ **Sizing principles:**
89
+
90
+ - **Solo agent:** Only when the task is genuinely single-person (quick script, simple question). No rig needed.
91
+ - **Pair (2 agents):** The minimum effective unit for quality work. One does, one verifies. The `implementation-pair` pattern.
92
+ - **Small team (3-5 agents):** Orchestrator + one or two working pods. Good starting point for focused projects.
93
+ - **Full team (6-10 agents):** Multiple bounded contexts with orchestration, development, review, and potentially research or design.
94
+ - **Large team (10-40+ agents):** Complex projects with many concerns. Include pods for development, review, research, documentation, release management, strategy, and any other bounded context the project needs.
95
+
96
+ **Important:** Agents do NOT all need to be busy at the same time. A rig is a network, not an assembly line. Some pods will be highly active (dev, review) while others are available on-demand (research, documentation, release management). An idle agent has near-zero cost but is immediately available when any other agent in the rig needs it — for quick questions, lookups, delegation, or specialized work. Design for availability, not constant utilization.
97
+
98
+ **Start small to increase the likelihood of success,** not because large rigs are wasteful. A 3-agent rig that boots and works correctly validates your spec authoring before you scale to 20 agents. Once the core topology works, expand with additional pods as needed.
99
+
100
+ ### Step 3: Design Agent Roles → Members
101
+
102
+ Each pod member needs a clear role. The role determines:
103
+ - What agent spec to reference (builtin or custom)
104
+ - What profile to use
105
+ - What guidance and startup content to provide
106
+
107
+ **Builtin agents shipped with OpenRig:**
108
+
109
+ | Agent | agent_ref (in shipped starters) | Purpose |
110
+ |-------|-------------------------------|---------|
111
+ | orchestrator | `local:agents/orchestration/orchestrator` | Rig orchestration lead |
112
+ | implementer | `local:agents/development/implementer` | TDD implementation agent |
113
+ | qa | `local:agents/development/qa` | Quality assurance agent |
114
+ | independent-reviewer | `local:agents/review/independent-reviewer` | Independent code reviewer |
115
+ | product-designer | `local:agents/design/product-designer` | Product designer |
116
+ | pm | `local:agents/product-management/pm` | Product manager |
117
+ | analyst | `local:agents/research/analyst` | Research analyst |
118
+ | synthesizer | `local:agents/research/synthesizer` | Research synthesizer |
119
+ | vault-specialist | `local:agents/apps/vault-specialist` | Vault domain specialist |
120
+
121
+ To verify the current builtin set on this host, run `rig specs ls` and look for entries with type `agent` and source `builtin`.
122
+
123
+ **Path resolution:** The `local:` prefix means relative to the rig spec file's directory. In shipped starters, these paths resolve against the builtin specs directory inside the OpenRig installation. When authoring a custom rig spec outside the installation, you have two options:
124
+ - **Reference your own agent specs** with `local:` paths relative to your rig spec file
125
+ - **Use `path:` with an absolute path** to reference builtins inside the OpenRig installation (look under the `specs/agents/` directory near where `rig` is installed)
126
+
127
+ **When to create a custom agent spec:**
128
+ - The builtin doesn't match the role (e.g., you need a documentation specialist, a security auditor, a data scientist)
129
+ - The role needs domain-specific skills that no builtin carries
130
+ - The role needs custom guidance that goes beyond what startup files can provide
131
+
132
+ **When to reuse a builtin:**
133
+ - The role maps cleanly to an existing builtin (most implementation, QA, review, and orchestration roles)
134
+ - You can customize behavior through startup files and culture without changing the agent spec
135
+
136
+ ### Step 4: Choose Runtimes and Models
137
+
138
+ Each member needs a `runtime` and optionally a `model`.
139
+
140
+ **Runtime selection:**
141
+ - `claude-code` — Claude Code. Best for: complex reasoning, architecture, code review, orchestration. Supports `/loop` for recurring tasks, rich hooks system, MCP servers.
142
+ - `codex` — Codex. Best for: parallel work, implementation, testing. Different approval model. Less reliable for recurring tasks.
143
+ - `terminal` — Infrastructure nodes. Servers, log tails, build watchers. Not an agent — a process.
144
+
145
+ **Runtime diversity is valuable.** Using both Claude Code and Codex in the same rig gives you different reasoning perspectives. The `product-team` starter uses Claude Code for the lead/impl/design/r1 roles and Codex for peer/qa/r2 roles. This is deliberate — model diversity catches different classes of issues.
146
+
147
+ **Model selection** is optional. The runtime's default model is usually fine. Override only when you have a specific reason (e.g., a complex architecture agent might benefit from a specific model).
148
+
149
+ ### Step 5: Design Edge Topology
150
+
151
+ Edges define relationships between members. See `~/.openrig/reference/edge-types.md` for the full reference.
152
+
153
+ **Practical rules:**
154
+ - Every working pod should have at least one `delegates_to` edge from the orchestrator
155
+ - Review pods should have `can_observe` edges to the pods they review
156
+ - Within a pod, the primary workflow direction should be expressed as `delegates_to` (e.g., impl → qa)
157
+ - `delegates_to` and `spawned_by` affect launch order. Use them for dependency chains.
158
+ - `can_observe`, `collaborates_with`, `escalates_to` are informational — they help agents understand the topology but don't constrain launch.
159
+
160
+ **Start simple.** You can always add edges later. A rig with only `delegates_to` edges from the orchestrator to working pods is perfectly functional.
161
+
162
+ ### Step 6: Design Startup Content Strategy
163
+
164
+ This is where most rigs succeed or fail. The topology is mechanical; the startup content is what makes agents actually useful. See `~/.openrig/reference/agent-startup-guide.md` for the full guide.
165
+
166
+ **Minimum for every rig:**
167
+ 1. Each agent has a `guidance/role.md` — who they are, what they do
168
+ 2. The rig has a `CULTURE.md` — how the team works together
169
+ 3. Each agent gets `openrig-user` skill — so they know how to use the rig primitives
170
+
171
+ **For serious rigs, also include:**
172
+ 4. `startup/context.md` per agent — boot-time grounding (project info, environment details)
173
+ 5. Pod SOP skills — how each pod operates (implementation-pair SOP, review-pair SOP, etc.)
174
+ 6. Project-specific documentation in rig-level startup files
175
+
176
+ **The key principle:** An agent that boots without knowing its role, its team's culture, and its project context will produce generic, unhelpful work. The startup content IS the product value. Invest in it.
177
+
178
+ ### Step 7: Services Integration (If Needed)
179
+
180
+ If the rig needs managed software (databases, API servers, etc.), add a `services` block. See `~/.openrig/reference/rig-spec.md` for the full services reference.
181
+
182
+ **When to add services:**
183
+ - The agents operate ON software (not just write code)
184
+ - The project needs a local dev environment (Postgres, Redis, etc.)
185
+ - You're building a managed-app rig (software + specialist agent)
186
+
187
+ **Services boot before agents.** If health checks fail, no agents start. This is the hard gate — the environment must be healthy before agents can work.
188
+
189
+ ## Authoring: The File Creation Workflow
190
+
191
+ ### Directory Layout
192
+
193
+ ```
194
+ my-rig/
195
+ rig.yaml # The RigSpec — required
196
+ culture/
197
+ CULTURE.md # Rig-wide culture — strongly recommended
198
+ agents/
199
+ my-custom-agent/
200
+ agent.yaml # AgentSpec — if custom agent needed
201
+ guidance/
202
+ role.md # Role guidance
203
+ startup/
204
+ context.md # Boot-time context
205
+ skills/
206
+ my-skill/
207
+ SKILL.md # Custom skill if needed
208
+ docker-compose.yaml # Only if services block is used
209
+ ```
210
+
211
+ For rigs that reuse builtin agents, the agents directory is often unnecessary — the rig spec references the builtins directly.
212
+
213
+ ### Workflow
214
+
215
+ 1. **Write the rig spec** (`rig.yaml`) — define pods, members, edges, optionally services
216
+ 2. **Write or reference agent specs** — builtins for standard roles, custom for specialized roles
217
+ 3. **Write CULTURE.md** — the team operating manual
218
+ 4. **Write role guidance** for each custom agent — who they are, what they do
219
+ 5. **Write startup context** for agents that need environment grounding
220
+ 6. **Validate:** `rig spec validate rig.yaml` and `rig agent validate agents/*/agent.yaml`
221
+ 7. **Confirm the runtime cwd** — do not assume agents should work from the directory where the rig spec is stored. The spec root controls file resolution; the runtime cwd controls trust, project guidance, permissions, and repo context.
222
+ 8. **Launch:** `rig up rig.yaml --cwd /path/to/project`
223
+ 9. **Verify:** `rig ps --nodes` — all agents ready? Check `rig capture` on each agent.
224
+
225
+ ### Validation Is Non-Negotiable
226
+
227
+ Always validate before launching:
228
+
229
+ ```bash
230
+ rig spec validate rig.yaml
231
+ rig agent validate agents/my-agent/agent.yaml
232
+ ```
233
+
234
+ If validation fails, fix the errors. Do not try to launch an invalid spec — it will fail with a less helpful error.
235
+
236
+ ## Diagnosis: When Things Go Wrong
237
+
238
+ ### Agent doesn't know its role
239
+
240
+ **Symptom:** Agent produces generic output, doesn't follow team conventions.
241
+ **Root cause:** Missing or insufficient `guidance/role.md`.
242
+ **Fix:** Write a clear role guidance file. Include responsibilities, working rhythm, and principles. Reference it in both `resources.guidance` and `startup.files`.
243
+
244
+ ### Agent can't coordinate with peers
245
+
246
+ **Symptom:** Agent tries raw tmux commands instead of `rig send`, doesn't know peer session names.
247
+ **Root cause:** Agent didn't receive `openrig-user` skill or `openrig-start` overlay.
248
+ **Fix:** Ensure the agent's profile `uses.skills` includes `openrig-user`. Verify via `rig ps --nodes` that the agent shows expected startup status; check installed skills via direct startup/capture/transcript evidence or the UI node detail (the `rig ps --nodes` projection does not expose installed-resource counts).
249
+
250
+ ### Agent hits approval prompts on rig commands
251
+
252
+ **Symptom:** Agent stalls on `rig whoami`, `rig send`, etc.
253
+ **Root cause:** Claude Code permissions not configured for rig commands.
254
+ **Fix:** Describe the required permissions in startup context. The agent should configure `~/.claude/settings.json` with allowlisted rig commands. See `~/.openrig/reference/agent-startup-guide.md` for the current support matrix.
255
+
256
+ ### Agents idle — topology doesn't engage the team
257
+
258
+ **Symptom:** Orchestrator works with one or two agents, others sit idle.
259
+ **Root cause:** Missing `CULTURE.md` or pod SOP content that describes how the full team coordinates.
260
+ **Fix:** Write a culture file that explicitly describes the coordination protocol. Include delegation patterns, review gates, and when each pod should be engaged.
261
+
262
+ ### Services don't boot
263
+
264
+ **Symptom:** `rig up` fails before agents launch with a service health error.
265
+ **Root cause:** Docker Compose issue, health check failure, or port conflict.
266
+ **Fix:** Check `docker compose up` manually with the compose file. Verify health check URLs are correct. Check for port conflicts.
267
+
268
+ ### Agent boots from the wrong project context
269
+
270
+ **Symptom:** Agent misses expected guidance, trust settings, permissions, or repo context even though the spec validates.
271
+ **Root cause:** The rig spec directory was treated as the agent's runtime cwd by assumption.
272
+ **Fix:** Confirm the intended cwd before launch. The spec can live in a rig/spec shelf while the agent works from the project or hub directory that carries the relevant `AGENTS.md`, `CLAUDE.md`, trust, and permissions. Use member `cwd` or `rig up --cwd` deliberately.
273
+
274
+ ### Startup content not delivered
275
+
276
+ **Symptom:** Agent is missing expected guidance/skills.
277
+ **Root cause:** File paths in the spec don't resolve, or `delivery_hint` is wrong.
278
+ **Fix:** Verify file paths resolve relative to their owning artifact — AgentSpec resource paths are relative to the agent spec directory; RigSpec startup, culture, compose, cwd, and `local:` agent-ref paths are relative to the rig root. Check `delivery_hint` — use `guidance_merge` for pre-boot content, `send_text` for post-boot instructions.
279
+
280
+ ### Agent startup delivered but agent doesn't use skills
281
+
282
+ **Symptom:** Skills are projected but agent doesn't invoke them.
283
+ **Root cause:** Agent wasn't told to load them.
284
+ **Fix:** In the startup context or role guidance, explicitly tell the agent which skills to load. The belt-and-suspenders pattern: project the skills via the spec AND tell the agent to read them in the guidance.
285
+
286
+ ## Pattern Catalog
287
+
288
+ ### The Implementation Pair
289
+ **2 agents, 1 pod.** The smallest effective development unit. One implements (TDD), one does QA. The implementer proposes, QA approves or rejects, then the implementer commits.
290
+
291
+ ```yaml
292
+ pods:
293
+ - id: dev
294
+ label: Development
295
+ members:
296
+ - id: impl
297
+ agent_ref: "local:agents/development/implementer"
298
+ runtime: claude-code
299
+ profile: default
300
+ cwd: "."
301
+ - id: qa
302
+ agent_ref: "local:agents/development/qa"
303
+ runtime: codex
304
+ profile: default
305
+ cwd: "."
306
+ edges:
307
+ - kind: delegates_to
308
+ from: impl
309
+ to: qa
310
+ ```
311
+
312
+ **Use when:** Focused feature work, bug fixes, small-to-medium implementation tasks.
313
+
314
+ ### The Orchestrated Team
315
+ **5-7 agents, 3 pods.** Orchestration + development + review. The orchestrator dispatches work, the dev pair implements, the review pair validates independently.
316
+
317
+ **Use when:** Production-quality work that needs coordination and independent review.
318
+
319
+ ### The Research Team
320
+ **3 agents, 2 pods.** Orchestrator + research pair (analyst + synthesizer). The analyst investigates deeply, the synthesizer consolidates findings.
321
+
322
+ **Use when:** Technical research, competitive analysis, architecture exploration.
323
+
324
+ ### The Managed App
325
+ **1+ agents, 1 pod, services block.** Software infrastructure (Docker Compose) plus a specialist agent who knows how to operate it.
326
+
327
+ ```yaml
328
+ services:
329
+ kind: compose
330
+ compose_file: docker-compose.yaml
331
+ wait_for:
332
+ - url: http://127.0.0.1:8200/v1/sys/health
333
+
334
+ pods:
335
+ - id: vault
336
+ label: Vault
337
+ members:
338
+ - id: specialist
339
+ agent_ref: "local:agents/apps/vault-specialist"
340
+ runtime: claude-code
341
+ profile: default
342
+ cwd: "."
343
+ edges: []
344
+ ```
345
+
346
+ **Use when:** The work involves operating software, not just writing code.
347
+
348
+ ### The Full Product Team
349
+ **7 agents, 3 pods.** The kitchen-sink topology: orchestration pair, development pod (impl + qa + design), review pair. See the `product-team` starter spec for the complete worked example.
350
+
351
+ **Use when:** Full product development with design, implementation, QA, and independent review. Requires strong culture and SOP content to keep all agents engaged.
352
+
353
+ ## Final Notes
354
+
355
+ **Start simple, add complexity when needed.** A working implementation pair is better than a broken full team. Launch with the minimum viable topology, verify it works, then expand.
356
+
357
+ **Culture is not optional for team rigs.** Any rig with 3+ agents needs a CULTURE.md. Without it, agents will default to generic behavior and the topology will underperform.
358
+
359
+ **Validate early and often.** Run `rig spec validate` after every change. Run `rig agent validate` after every agent spec edit. Fix errors immediately — don't accumulate them.
360
+
361
+ **The startup content IS the product.** The YAML topology is scaffolding. What makes a rig actually useful is the guidance, culture, skills, and startup context that agents receive. Invest your authoring time there.
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: openrig-installer
3
+ description: Use when installing or upgrading OpenRig on a host, especially the V0.3.1 upgrade flow which includes the substrate-kernel → daemon-managed-kernel migration ceremony. Covers npm install, rig setup, rig daemon start (auto-boots kernel), and the canonical verification commands. NOT for ordinary kernel operation post-install — use openrig-operator skill for that.
4
+ metadata:
5
+ openrig:
6
+ maturity: L2
7
+ distribution_scope: shipped
8
+ source_evidence: V0.3.1 slice 05-kernel-rig-as-default IMPLEMENTATION-PRD §8 + OQ-A=B migration-ceremony decision
9
+ ---
10
+
11
+ # OpenRig Installer
12
+
13
+ This skill teaches the operator agent how to install + upgrade
14
+ OpenRig cleanly. The V0.3.1 upgrade is the one with the migration
15
+ ceremony (substrate kernel → daemon-managed kernel); other upgrades
16
+ follow the same install / setup / start shape with no migration.
17
+
18
+ ## Fresh install
19
+
20
+ ```bash
21
+ npm install -g @openrig/cli
22
+ rig setup
23
+ ```
24
+
25
+ `rig setup` is idempotent — safe to re-run if a step fails. It probes
26
+ host prereqs (tmux present, Node version, writable state path,
27
+ optional cmux), then invokes `rig daemon start` per the L2 factoring
28
+ (OQ-B). The daemon's start path auto-boots the kernel rig per the
29
+ V0.3.1 slice 05 kernel-rig-as-default logic.
30
+
31
+ ## Verification after install
32
+
33
+ ```bash
34
+ rig ps --nodes --rig kernel --json
35
+ ```
36
+
37
+ Should report 4 members (advisor.lead + operator.agent +
38
+ operator.human + queue.worker) all ready. If a runtime is unavailable
39
+ the daemon picks the matching variant (`rig-claude-only.yaml` or
40
+ `rig-codex-only.yaml`); the topology stays the same shape with the
41
+ unavailable runtime omitted from the agent membership.
42
+
43
+ Entry point for chatting with the rig:
44
+
45
+ ```bash
46
+ rig capture advisor-lead@kernel
47
+ ```
48
+
49
+ Or click the CMUX button on the topology graph in the UI at
50
+ `/topology`.
51
+
52
+ ## V0.3.1 upgrade ceremony (one-time migration)
53
+
54
+ Operators with a kernel spec stored outside the daemon-managed
55
+ location (any pre-V0.3.1 layout, typically wherever you kept your
56
+ own `rigs/kernel/` directory) must migrate to
57
+ `~/.openrig/specs/rigs/kernel/` as a one-time step during the V0.3.1
58
+ upgrade. The V0.3.1 upgrade IS the migration moment; it's not a
59
+ separate ceremony.
60
+
61
+ ### Migration steps
62
+
63
+ 1. **Snapshot first.** Take a snapshot of the running substrate
64
+ kernel so the migration is reversible:
65
+
66
+ ```bash
67
+ rig snapshot kernel
68
+ ```
69
+
70
+ 2. **Stop the substrate kernel** (so the migration doesn't race a
71
+ running rig):
72
+
73
+ ```bash
74
+ rig down kernel --snapshot
75
+ ```
76
+
77
+ 3. **Copy your existing kernel spec** into the daemon-managed
78
+ location:
79
+
80
+ ```bash
81
+ mkdir -p ~/.openrig/specs/rigs/kernel
82
+ cp -r /path/to/old/kernel-spec/* ~/.openrig/specs/rigs/kernel/
83
+ ```
84
+
85
+ 4. **Upgrade the CLI + daemon**:
86
+
87
+ ```bash
88
+ npm install -g @openrig/cli@0.3.1
89
+ rig daemon stop
90
+ rig daemon start
91
+ ```
92
+
93
+ At this point the new daemon detects `~/.openrig/specs/rigs/kernel.yaml`
94
+ exists and skips the V0.3.1 builtin-kernel boot (the
95
+ already-managed-rig branch). The substrate-rooted topology
96
+ continues to run under daemon management.
97
+
98
+ 5. **Verify** the migrated kernel matches expectations:
99
+
100
+ ```bash
101
+ rig ps --nodes --rig kernel --json
102
+ ```
103
+
104
+ 6. **Decommission the old copy** (only after verifying the
105
+ daemon-managed copy works):
106
+
107
+ ```bash
108
+ rm -rf /path/to/old/kernel-spec
109
+ ```
110
+
111
+ ### If migration fails
112
+
113
+ The pre-step snapshot is the rollback. `rig restore <snapshot-id>
114
+ --rig kernel` revives the prior topology. Then `npm install -g
115
+ @openrig/cli@0.3.0` rolls the CLI back and you can retry later.
116
+
117
+ ## Operator agent's role in install + upgrade
118
+
119
+ The operator agent shepherds operators through these steps when the
120
+ user asks "how do I upgrade?" or "what's the V0.3.1 ceremony?". The
121
+ agent reads this skill on demand via `find-skills` — it does not
122
+ need to memorize the steps; it consults the canonical reference
123
+ (this file) and walks the operator through.
124
+
125
+ ## 3-part error remediation
126
+
127
+ | What failed | Why it matters | Fix |
128
+ |---|---|---|
129
+ | `npm install -g @openrig/cli` permission denied | Global install needs writable npm prefix; macOS Homebrew default is usually writable; some custom Node installs aren't | Either fix the npm prefix permissions or use `sudo npm install -g`; check `npm config get prefix` |
130
+ | `rig setup` host prereq fail | tmux, Node version, or writable state path missing | `rig doctor` lists each missing piece + the install command; run those, retry `rig setup` |
131
+ | `rig daemon start` auth-block error | Neither Claude Code nor Codex authenticated; kernel rig requires at least one | Run `claude auth login` OR `codex login`; then retry `rig daemon start` |
132
+ | `rig daemon start` "kernel already managed" | An existing managed rig named `kernel` exists; the daemon skips builtin-boot per design | This is the expected path after migration — no action needed |
133
+ | `rig ps --rig kernel --json` returns empty | Daemon healthy but no kernel rig managed; likely the migration step copied content but did not boot | `rig up kernel` from inside `~/.openrig/specs/rigs/kernel/`; or invoke the daemon's cold-boot path explicitly |
134
+
135
+ ## What this skill is NOT
136
+
137
+ - Not the canonical OpenRig command surface; that lives in the
138
+ `openrig-user` skill.
139
+ - Not the kernel-operating-procedure for post-install daily use;
140
+ that's `openrig-operator`.
141
+ - Not for project rigs; project rigs install themselves via `rig
142
+ up <spec>` after the kernel is in place.
@@ -25,9 +25,14 @@ Default posture:
25
25
 
26
26
  - Treat daemon `rig queue`, `rig stream`, `rig project`, `rig view`, `rig watchdog`, and
27
27
  `rig workflow` as the product coordination surfaces when the active daemon is v0.2.0 or newer.
28
+ - **CANONICAL SURFACE NOTE (2026-05-11)**: `rig queue` (daemon-backed SQLite) is the
29
+ canonical surface for queue routing since the 2026-05-11 host-CLI fix landed. Use
30
+ `rig queue create / handoff / update / show / list` for all substantive work.
28
31
  - Use temporary substrate overlays such as `rigx queue`, `rigx stream`, `rigx project`, and
29
32
  `rigx view-proto` only where the current OpenRig workstream explicitly says that legacy/control
30
- layer is still in use.
33
+ layer is still in use. For queue specifically, `rigx queue` is recovery-only fallback;
34
+ qitems written via `rigx queue` are invisible to daemon-backed reads and break fleet-wide
35
+ routing discipline.
31
36
  - If a daemon-backed coordination command fails, debug the command/runtime/schema edge directly;
32
37
  do not assume the right workaround is to drop back to a config-layer primitive.
33
38
  - Do not perform daemon stop/start, production DB copy/mutation, release, publish, or other
@@ -86,10 +86,10 @@ Resolution order for workspace per-subdir keys: per-subdir override >
86
86
  > set the per-subdir workspace overrides explicitly:
87
87
  >
88
88
  > ```bash
89
- > rig config set workspace.slices_root /Users/me/code/substrate/.../missions
90
- > rig config set workspace.steering_path /Users/me/code/substrate/openrig-work/STEERING.md
91
- > rig config set workspace.progress_scan_roots 'work:/Users/me/code/substrate/openrig-work,missions:/Users/me/code/substrate/openrig-work/missions'
92
- > rig config set workspace.field_notes_root /Users/me/code/substrate/openrig-work/field-notes
89
+ > rig config set workspace.slices_root /path/to/your/workspace/missions
90
+ > rig config set workspace.steering_path /path/to/your/workspace/STEERING.md
91
+ > rig config set workspace.progress_scan_roots 'work:/path/to/your/workspace,missions:/path/to/your/workspace/missions'
92
+ > rig config set workspace.field_notes_root /path/to/your/workspace/field-notes
93
93
  > ```
94
94
  >
95
95
  > No restart needed for the CLI; for the daemon's reads to pick up
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: rig-lifecycle
3
+ description: Use when reasoning about the rig lifecycle operations family (create / start / stop / resume / restore / snapshot / release / unclaim / destroy), reading or trusting `rig ps` / lifecycle projections after recovery, or designing proof for a lifecycle scenario. Covers the 4 failure modes (auto-restore creates partial rig; projections report healthier than reality; provider auth treated as impl work; resume succeeds for one runtime fails another) plus the restore-honesty rule (failed resume is FAILED loudly — no auto fresh fallback).
4
+ metadata:
5
+ openrig:
6
+ stage: factory-approved
7
+ last_verified: "2026-05-04"
8
+ distribution_scope: product-bound
9
+ source_evidence: |
10
+ Lifecycle Reboot/Recovery Scenario Matrix (Tier 1 complete; Tier 2
11
+ human-gated). Codex auth-refusal surfaces as attention_required.
12
+ sibling_skills:
13
+ - openrig-user
14
+ - openrig-operator
15
+ - seat-continuity-and-handover
16
+ transfer_test: pending
17
+ ---
18
+
19
+ # Rig Lifecycle
20
+
21
+ The family of operations that **create, start, stop, resume, restore,
22
+ snapshot, release, unclaim, and destroy** OpenRig-managed topologies.
23
+ Includes the user story after reboot: **"bring my work back without
24
+ turning a clean recovery into a cleanup project."**
25
+
26
+ If lifecycle is brittle, every higher-level primitive inherits that
27
+ brittleness. Queue, workflow, seat continuity, cross-host operation,
28
+ and RSI all assume that rigs and seats can be restored into known
29
+ states.
30
+
31
+ ## Use this when
32
+
33
+ - Operating `rig up / down / restore / resume / snapshot / release / unclaim / destroy`
34
+ - Reading `rig ps` after a reboot or recovery and deciding what to trust
35
+ - Designing proof for a lifecycle scenario (clean start / warm resume / host reboot / provider auth loss / partial boot / operator recovery)
36
+ - Reasoning about restore-outcome semantics (`resumed` / `rebuilt` / `fresh` / `failed` / `attention_required`)
37
+ - Auditing whether a lifecycle proof is in-process bedrock vs requires real reboot evidence
38
+
39
+ ## Don't use this when
40
+
41
+ - The operation is single-command and deterministic — use `openrig-user` skill for CLI surface
42
+ - The work is operator-level configuration of OpenRig itself — use `openrig-operator`
43
+ - The work is rig spec authoring — use `openrig-architect`
44
+
45
+ ## Failure modes (4)
46
+
47
+ 1. **Auto-restore creates a partially restored rig that must be cleaned up before real recovery.** Partial restore looks like recovery but isn't; cleanup-before-recovery becomes the actual workload.
48
+ 2. **`rig ps` or lifecycle projections report a healthier state than the runtime actually has.** Projections are summaries; the runtime is truth. Don't trust projections silently.
49
+ 3. **Provider auth is unavailable after reboot and the system treats that as implementation work** instead of a human/environment decision. Auth issues are environmental; route to human.
50
+ 4. **Resume succeeds for one runtime/provider but fails for another scenario that was never tested.** Per-runtime parity assumptions break silently; matrix proof catches them.
51
+
52
+ ## Restore-honesty rule (load-bearing)
53
+
54
+ **Failed resume is FAILED loudly.** No automatic fresh fallback. Fresh
55
+ launch is **explicit follow-up only.** This is enforced architecturally
56
+ at the daemon level (per `architecture.md` §7 rule 15).
57
+
58
+ The locked restore-outcome vocabulary:
59
+
60
+ | Outcome | Meaning |
61
+ |---|---|
62
+ | `resumed` | Native runtime resumed the same conversation |
63
+ | `rebuilt` | New process assembled from artifacts (`session_source: mode: rebuild`) |
64
+ | `fresh` | New process with no prior continuity |
65
+ | `failed` | Restore attempted and failed; no automatic fallback |
66
+ | `attention_required` | Recoverable blocker (provider auth refused, etc.); needs operator action |
67
+ | `n-a` | Not applicable (terminal nodes, etc.) |
68
+
69
+ Codex auth-refusal returns `attention_required` (recoverable); Claude
70
+ `looksLikeClaudeLoginPrompt` returns `failed/login_required` (terminal).
71
+ Cross-runtime alignment is an open follow-up question.
72
+
73
+ ## Proof standard
74
+
75
+ Lifecycle proof should include **real reboot or VM-reboot evidence**,
76
+ not only daemon-unit evidence. The minimum useful matrix covers:
77
+
78
+ | Scenario | What it proves |
79
+ |---|---|
80
+ | Clean start | Boot from spec into known state |
81
+ | Warm resume | `rig down` → `rig up <name>` resumes seats |
82
+ | Host reboot / tmux socket absence | Recovery from lost tmux connection |
83
+ | Provider auth loss | Codex/Claude auth refusal handled honestly |
84
+ | Partial boot / partial failure | Some seats up, some failed; honest reporting |
85
+ | Intentional operator recovery | Operator-initiated restore from snapshot |
86
+
87
+ Tier 1: in-process bedrock (daemon-unit evidence). Tier 2: real reboot
88
+ or disposable Tart VM. Tier 1 alone is not lifecycle proof; it's
89
+ bedrock.
90
+
91
+ ## Default policy is part of the primitive
92
+
93
+ **Treat default policy as part of the primitive, not an afterthought.**
94
+ Lifecycle defaults that are too optimistic for the reliability level
95
+ actually proven create silent harm:
96
+
97
+ - `auto-restore` defaults that mask failure modes
98
+ - Implicit fresh-fallback that hides resume failure
99
+ - Permissive verification that doesn't distinguish honest success from "appeared to work"
100
+
101
+ ## Total-Host Restore Product Rail v2
102
+
103
+ The rail sequences restore truth into **four rungs**:
104
+
105
+ - `fully_restored` is a **Rung 3 execution rollup**
106
+ - "fully back" is **reserved for Rung 4 only**
107
+
108
+ Naming discipline matters. "Fully restored" and "fully back" are
109
+ different claims; don't conflate.
110
+
111
+ ## See also
112
+
113
+ - `openrig-user` skill — CLI surface for `rig up / down / restore / etc.`
114
+ - `openrig-operator` skill — operator-level discipline for OpenRig itself
115
+ - `seat-continuity-and-handover` skill — occupant-creation modes for restore (`resume` / `rebuild` / `fresh` / `failed`)
116
+ - `openrig/docs/as-built/architecture.md` (product reference doc) — daemon enforcement of restore-honesty rule
@@ -115,7 +115,6 @@ The development pod has access to browser automation and structured dogfood test
115
115
 
116
116
  - **`agent-browser`** — browser automation CLI. Navigate to the daemon UI, snapshot interactive elements, take annotated screenshots, record repro videos. Use `agent-browser open <url>`, `agent-browser snapshot -i`, `agent-browser screenshot --annotate`.
117
117
  - **`dogfood`** — structured exploratory testing workflow. Produces a report with screenshots, repro videos, and step-by-step evidence for every finding.
118
- - **`containerized-e2e`** — Docker-based clean-install testing. Simulates a fresh user environment.
119
118
 
120
119
  QA typically drives browser and dogfood testing, but both impl and QA should know these tools exist and can use them. When dogfooding UI:
121
120
  1. Load `/agent-browser` and `/dogfood`