@openrig/cli 0.5.6 → 0.5.7

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 (303) hide show
  1. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  2. package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/SKILL.md +34 -0
  3. package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
  4. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -4
  5. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -3
  6. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +4 -9
  7. package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +3 -3
  8. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  9. package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +120 -0
  10. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +10 -0
  11. package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +166 -0
  12. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +18 -0
  13. package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
  14. package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +487 -0
  15. package/daemon/context-packs/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
  16. package/daemon/context-packs/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
  17. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  18. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -1
  19. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  21. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  22. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  23. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -4
  27. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/delegating-work/SKILL.md +43 -0
  36. package/daemon/context-packs/skills/delegating-work/manifest.yaml +10 -0
  37. package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +318 -0
  38. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +10 -0
  39. package/daemon/context-packs/skills/loading-addressable-markdown/SKILL.md +34 -0
  40. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +12 -0
  41. package/daemon/context-packs/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
  42. package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +94 -0
  43. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +10 -0
  44. package/daemon/context-packs/skills/openrig-operating-model/SKILL.md +397 -0
  45. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +30 -0
  46. package/daemon/context-packs/skills/openrig-operating-model/scripts/compose.py +572 -0
  47. package/daemon/context-packs/skills/openrig-operating-model/scripts/scaffold.sh +34 -0
  48. package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-due.sh +32 -0
  49. package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-stamp.sh +5 -0
  50. package/daemon/context-packs/skills/openrig-operating-model/scripts/trunk-diff.sh +18 -0
  51. package/daemon/context-packs/skills/openrig-operating-model/templates/LEARNED.md +40 -0
  52. package/daemon/context-packs/skills/openrig-operating-model/templates/NOTES.md +9 -0
  53. package/daemon/context-packs/skills/openrig-operating-model/templates/PLAYBOOK.md +5 -0
  54. package/daemon/context-packs/skills/openrig-operating-model/templates/SOP.md +24 -0
  55. package/daemon/context-packs/skills/openrig-operating-model/templates/SPEC.md +54 -0
  56. package/daemon/context-packs/skills/openrig-user/SKILL.md +1374 -0
  57. package/daemon/context-packs/skills/openrig-user/manifest.yaml +10 -0
  58. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
  59. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +250 -0
  60. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +12 -0
  61. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  62. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  63. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  64. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  65. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  66. package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +21 -15
  67. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +3 -3
  68. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  69. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  70. package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +1 -1
  71. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  72. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  73. package/daemon/context-packs/skills/pods/review-team/SKILL.md +1 -1
  74. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  75. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  76. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  77. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  78. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  79. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  80. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  81. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  82. package/daemon/context-packs/skills/queue-handoff/SKILL.md +192 -0
  83. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +10 -0
  84. package/daemon/context-packs/skills/refocusing/SKILL.md +31 -0
  85. package/daemon/context-packs/skills/refocusing/manifest.yaml +14 -0
  86. package/daemon/context-packs/skills/refocusing/references/refocus.md +22 -0
  87. package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +264 -0
  88. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
  89. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +231 -0
  90. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +12 -0
  91. package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +151 -0
  92. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +16 -0
  93. package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-evidence-toolkit.md +32 -0
  94. package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-successor-seat-cutover.md +256 -0
  95. package/daemon/context-packs/skills/seat-continuity-and-handover/references/orchestrator-role.md +40 -0
  96. package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +163 -0
  97. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +10 -0
  98. package/daemon/context-packs/skills/software-for-agents/SKILL.md +187 -0
  99. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +10 -0
  100. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  101. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  102. package/daemon/dist/build-info.js +3 -3
  103. package/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
  104. package/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
  105. package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
  106. package/daemon/dist/db/all-migrations.d.ts +1 -1
  107. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  108. package/daemon/dist/db/all-migrations.js +4 -2
  109. package/daemon/dist/db/all-migrations.js.map +1 -1
  110. package/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
  111. package/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
  112. package/daemon/dist/db/migrations/077_node_session_source.js +6 -0
  113. package/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
  114. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  115. package/daemon/dist/domain/context-packs/manifest-parser.js +5 -6
  116. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  117. package/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
  118. package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  119. package/daemon/dist/domain/context-packs/profile-composer.js +2 -2
  120. package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  121. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
  122. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
  123. package/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
  124. package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
  125. package/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
  126. package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  127. package/daemon/dist/domain/rig-lifecycle-service.js +116 -6
  128. package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  129. package/daemon/dist/domain/rig-repository.d.ts +2 -1
  130. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  131. package/daemon/dist/domain/rig-repository.js +7 -0
  132. package/daemon/dist/domain/rig-repository.js.map +1 -1
  133. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  134. package/daemon/dist/domain/rigspec-exporter.js +2 -0
  135. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  136. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  137. package/daemon/dist/domain/rigspec-instantiator.js +2 -0
  138. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  139. package/daemon/dist/domain/types.d.ts +2 -0
  140. package/daemon/dist/domain/types.d.ts.map +1 -1
  141. package/daemon/dist/domain/types.js.map +1 -1
  142. package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  143. package/daemon/dist/domain/workspace/default-workspace-scaffold.js +37 -2
  144. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  145. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  146. package/daemon/dist/routes/context-packs.js +146 -6
  147. package/daemon/dist/routes/context-packs.js.map +1 -1
  148. package/daemon/dist/routes/rigs.js +7 -3
  149. package/daemon/dist/routes/rigs.js.map +1 -1
  150. package/daemon/dist/routes/sessions.js +7 -3
  151. package/daemon/dist/routes/sessions.js.map +1 -1
  152. package/daemon/dist/startup.d.ts.map +1 -1
  153. package/daemon/dist/startup.js +3 -1
  154. package/daemon/dist/startup.js.map +1 -1
  155. package/daemon/docs/reference/agent-spec.md +1 -1
  156. package/daemon/docs/reference/mission-install.md +23 -2
  157. package/daemon/docs/reference/product-journey-sdlc.md +305 -0
  158. package/daemon/docs/reference/sdlc-conventions.md +9 -2
  159. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -1
  160. package/daemon/specs/agents/apps/vault-specialist/guidance/role.md +0 -1
  161. package/daemon/specs/agents/conveyor/builder/agent.yaml +1 -1
  162. package/daemon/specs/agents/conveyor/builder/guidance/role.md +0 -1
  163. package/daemon/specs/agents/conveyor/lead/agent.yaml +1 -1
  164. package/daemon/specs/agents/conveyor/lead/guidance/role.md +0 -3
  165. package/daemon/specs/agents/conveyor/planner/agent.yaml +1 -1
  166. package/daemon/specs/agents/conveyor/planner/guidance/role.md +0 -1
  167. package/daemon/specs/agents/design/product-designer/agent.yaml +3 -4
  168. package/daemon/specs/agents/design/product-designer/guidance/role.md +0 -3
  169. package/daemon/specs/agents/development/implementer/agent.yaml +3 -4
  170. package/daemon/specs/agents/development/implementer/guidance/role.md +0 -3
  171. package/daemon/specs/agents/development/qa/agent.yaml +4 -4
  172. package/daemon/specs/agents/development/qa/guidance/role.md +1 -4
  173. package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +1 -1
  174. package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +1 -1
  175. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +3 -4
  176. package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +0 -4
  177. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +3 -4
  178. package/daemon/specs/agents/review/independent-reviewer/guidance/role.md +0 -3
  179. package/daemon/specs/agents/shared/agent.yaml +2 -10
  180. package/daemon/specs/agents/shared/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -1
  181. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -4
  182. package/daemon/specs/agents/shared/skills/pm/requirements-writer/SKILL.md +21 -15
  183. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
  184. package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +1 -1
  185. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +1 -1
  186. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +2 -3
  187. package/dist/build-info.js +3 -3
  188. package/dist/commands/config-init-workspace.d.ts.map +1 -1
  189. package/dist/commands/config-init-workspace.js +38 -3
  190. package/dist/commands/config-init-workspace.js.map +1 -1
  191. package/dist/commands/context.d.ts.map +1 -1
  192. package/dist/commands/context.js +37 -0
  193. package/dist/commands/context.js.map +1 -1
  194. package/dist/commands/create.d.ts +4 -0
  195. package/dist/commands/create.d.ts.map +1 -0
  196. package/dist/commands/create.js +84 -0
  197. package/dist/commands/create.js.map +1 -0
  198. package/dist/commands/grow.d.ts +4 -0
  199. package/dist/commands/grow.d.ts.map +1 -0
  200. package/dist/commands/grow.js +182 -0
  201. package/dist/commands/grow.js.map +1 -0
  202. package/dist/commands/remove.d.ts.map +1 -1
  203. package/dist/commands/remove.js +9 -1
  204. package/dist/commands/remove.js.map +1 -1
  205. package/dist/commands/rig.d.ts.map +1 -1
  206. package/dist/commands/rig.js +48 -1
  207. package/dist/commands/rig.js.map +1 -1
  208. package/dist/commands/scope.d.ts.map +1 -1
  209. package/dist/commands/scope.js +21 -2
  210. package/dist/commands/scope.js.map +1 -1
  211. package/dist/commands/shrink.d.ts.map +1 -1
  212. package/dist/commands/shrink.js +6 -1
  213. package/dist/commands/shrink.js.map +1 -1
  214. package/dist/commands/topology-default-agent.d.ts +4 -0
  215. package/dist/commands/topology-default-agent.d.ts.map +1 -0
  216. package/dist/commands/topology-default-agent.js +13 -0
  217. package/dist/commands/topology-default-agent.js.map +1 -0
  218. package/dist/commands/walk.d.ts.map +1 -1
  219. package/dist/commands/walk.js +3 -0
  220. package/dist/commands/walk.js.map +1 -1
  221. package/dist/index.d.ts +2 -0
  222. package/dist/index.d.ts.map +1 -1
  223. package/dist/index.js +4 -0
  224. package/dist/index.js.map +1 -1
  225. package/dist/lib/work-install.d.ts +39 -0
  226. package/dist/lib/work-install.d.ts.map +1 -0
  227. package/dist/lib/work-install.js +278 -0
  228. package/dist/lib/work-install.js.map +1 -0
  229. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  230. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
  231. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
  232. package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
  233. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
  234. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
  235. package/node_modules/@openrig/daemon/dist/db/all-migrations.js +4 -2
  236. package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
  237. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
  238. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
  239. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js +6 -0
  240. package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
  241. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  242. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +5 -6
  243. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  244. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
  245. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
  246. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +2 -2
  247. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
  248. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
  249. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
  250. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
  251. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
  252. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
  253. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
  254. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js +116 -6
  255. package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
  256. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +2 -1
  257. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  258. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +7 -0
  259. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
  260. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  261. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +2 -0
  262. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  263. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  264. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +2 -0
  265. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  266. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +2 -0
  267. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  268. package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
  269. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
  270. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js +37 -2
  271. package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  272. package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
  273. package/node_modules/@openrig/daemon/dist/routes/context-packs.js +146 -6
  274. package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
  275. package/node_modules/@openrig/daemon/dist/routes/rigs.js +7 -3
  276. package/node_modules/@openrig/daemon/dist/routes/rigs.js.map +1 -1
  277. package/node_modules/@openrig/daemon/dist/routes/sessions.js +7 -3
  278. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  279. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  280. package/node_modules/@openrig/daemon/dist/startup.js +3 -1
  281. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  282. package/node_modules/@openrig/daemon/package.json +1 -1
  283. package/package.json +1 -1
  284. package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +0 -48
  285. package/daemon/context-packs/skills/process/brainstorming/SKILL.md +0 -107
  286. package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +0 -12
  287. package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +0 -56
  288. package/daemon/context-packs/skills/process/executing-plans/SKILL.md +0 -94
  289. package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +0 -12
  290. package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +0 -48
  291. package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +0 -106
  292. package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +0 -12
  293. package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +0 -52
  294. package/daemon/context-packs/skills/process/writing-plans/SKILL.md +0 -126
  295. package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +0 -12
  296. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +0 -48
  297. package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +0 -107
  298. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +0 -56
  299. package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +0 -94
  300. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +0 -48
  301. package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +0 -106
  302. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +0 -52
  303. package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +0 -126
@@ -0,0 +1,1374 @@
1
+ ---
2
+ name: openrig-user
3
+ description: >-
4
+ Use when a specific `rig` command, subcommand, or flag is already known and you need its exact
5
+ syntax, JSON shape, defaults, or error meaning. NOT for natural capability discovery, open-ended
6
+ how-do-I questions, or choosing which OpenRig move applies.
7
+ ---
8
+
9
+ # OpenRig User
10
+
11
+ This is an as-built guide to the shipped `rig` CLI.
12
+ Use current code and `rig ... --help` as ground truth if anything here ever conflicts with older planning docs.
13
+
14
+ Use the OpenRig builder guidance when changing OpenRig behavior, doctrine, or release posture.
15
+
16
+
17
+ ## Coordination trust boundary
18
+
19
+ Coordinate as openly as the trust boundary you actually control allows. Within a set of machines you
20
+ own that already trust each other — they can reach each other's daemon URLs and the daemon itself
21
+ requires no authentication — direct `rig send`, `rig capture`, and `rig queue` should just work.
22
+ Don't invent bearer placeholders, allowlists, trust handshakes, or guest-reach restrictions the
23
+ environment doesn't require.
24
+
25
+ Do not add or defend a restriction without naming the protected asset, the actual adversary, the
26
+ blocked attack path, and the concrete consequence. Missing capability is not protection — repair the
27
+ route, registration, runtime posture, or product defect directly. Arbitrary boundaries create
28
+ constraint-induced circumvention: under goal pressure, agents build shadow transports, alternate
29
+ credentials, and weaker proof instead of the direct authorized path. Keep only explicitly stated
30
+ external or irreversible boundaries — public push / PR / publish, and destruction of canonical data.
31
+
32
+ ## Coordination primitives — when to use which
33
+
34
+ Three coordination surfaces, used together for forward-momentum work. Internalize this
35
+ on first read — it shapes every turn you take in a rig.
36
+
37
+ ### `rig send <seat> "<text>"` — intra-pod direct messaging / nudges
38
+
39
+ Use when you need to ask a quick question or give a teammate context that does not
40
+ carry handoff semantics. **NOT for durable work.** NOT for state that must survive
41
+ across turns. The message lands in the target's pane; there is no durable queue
42
+ record. The CLI prints `Sent to ...` (and `Verified: yes/no` with `--verify`); read
43
+ the receipt and move on.
44
+
45
+ Example:
46
+
47
+ ```bash
48
+ rig send guard@your-rig "Heads up — filing per-commit handoff on the rig-up paper-cut fix at tip 6b8673b6." --verify
49
+ ```
50
+
51
+ ### `rig queue create --source <X> --destination <Y> --tags <...> --body "<...>"` — durable work item
52
+
53
+ Use for any substantive work that must not fall through chat — slice handoffs,
54
+ guard verdicts, QA results, full-tip reviews, multi-item batches. Survives agent
55
+ restarts. Tracked in the daemon SQLite schema. Surfaces in Project / queue views
56
+ + in the destination seat's inbox. Tag with mission / slice / gate / checkpoint
57
+ so future-you (and any peer) can find it.
58
+
59
+ Body discipline: substantive bodies go through **`--body-file <path>`** (or `-` for stdin) — the
60
+ purpose-built, corruption-safe surface (it kills the backtick-shell-corruption class for multi-line
61
+ bodies). Do NOT inline a backtick-heavy or multi-line body via `--body`: `rig queue create` body
62
+ parsing breaks on unescaped backticks and rejects flag-like tokens.
63
+
64
+ Example:
65
+
66
+ ```bash
67
+ rig queue create \
68
+ --source driver-2@your-rig \
69
+ --destination redo-guard-2@your-rig \
70
+ --tags "mission:release,slice:rig-up-paper-cut-fix,gate:guard,handoff:per-commit,checkpoint:bug-1-bonus" \
71
+ --body-file /tmp/per-commit-body.txt
72
+ ```
73
+
74
+ ### `rig queue handoff <qitem-id> --to <next> ...` — hot-potato handoff
75
+
76
+ Use when you have completed your turn on a qitem and the work moves to the next
77
+ owner. **This is forward momentum.** The ball passes to the destination seat;
78
+ chain-of-record (the prior qitem id) is preserved so the verdict trail is intact;
79
+ tags carry the phase boundary forward (e.g. `gate:guard` → `gate:qa`).
80
+
81
+ Example:
82
+
83
+ ```bash
84
+ rig queue handoff qitem-20260601012431-d78aa805 \
85
+ --to velocity-qa@your-rig \
86
+ --tags "mission:release,slice:rig-up-paper-cut-fix,gate:qa,handoff:adversarial-dogfood"
87
+ ```
88
+
89
+ ### §1b doctrine — turn ends by passing the ball
90
+
91
+ **A turn ends by passing the ball, never by going idle holding the slice waiting
92
+ on a confirmation the process does not include.** If the work was authorized, the
93
+ per-commit guard + adversarial QA + orch heavy-verify are the guardrails — not an
94
+ operator pre-commit gate. Do the authorized work and pass the ball.
95
+
96
+ Valid pauses are only:
97
+
98
+ - A genuine blocker — file a blocked-state qitem against the blocking peer or
99
+ surface explicitly to orch.
100
+ - A scope-or-architecture question that requires owner input and changes the
101
+ plan — surface to orch with the specific decision needed.
102
+
103
+ Implementing already-authorized work is neither of these. Proceed without
104
+ phantom-gating on an imagined "next prompt" or "operator confirmation" that the
105
+ process does not require.
106
+
107
+ ### Anti-patterns
108
+
109
+ - Using `rig send` for durable work → use `rig queue create` instead. Sends do
110
+ not survive restarts and do not show up in queue/project views.
111
+ - Idle-holding a slice for an imagined "next prompt" or "operator confirmation"
112
+ that the process does not require → pass the ball via `rig queue handoff` and
113
+ proceed to the next slice or stand by for the inbound verdict. See the §1b
114
+ doctrine above.
115
+ - Inlining a multi-line / backtick-heavy body into `rig queue create --body`
116
+ → use `--body-file /tmp/<descriptive-name>.txt` (or `-` for stdin), the
117
+ corruption-safe surface. The body parser does not tolerate raw backticks or
118
+ flag-like tokens inline.
119
+
120
+ ## Runtime-Gated Coordination Primitives
121
+
122
+ OpenRig v0.3.1 is published publicly as `@openrig/cli@0.3.1` and GitHub Release
123
+ `v0.3.1`. It includes the bundled PL-004 Coordination Primitive System: Phase A
124
+ `rig stream` / `rig queue`, Phase B `rig project` / `rig view`, Phase C
125
+ `rig watchdog`, and Phase D `rig workflow` / `workflow-keepalive`.
126
+
127
+ These are shipped product surfaces in v0.3.x, but they require a compatible
128
+ v0.3.x daemon and matching SQLite schema at runtime — the installed package
129
+ version is not automatically the version of the daemon serving you. If a
130
+ coordination command behaves unexpectedly, confirm the running daemon with
131
+ `rig whoami --json` and daemon status before assuming a product bug.
132
+
133
+ Default posture:
134
+
135
+ - Treat daemon `rig queue`, `rig stream`, `rig project`, `rig view`, `rig watchdog`, and
136
+ `rig workflow` as the product coordination surfaces when the active daemon is v0.2.0 or newer.
137
+ - **CANONICAL SURFACE NOTE (2026-05-11)**: `rig queue` (daemon-backed SQLite) became
138
+ the canonical queue-routing surface when the 2026-05-11 host-CLI fix landed. The
139
+ coordination model is now load-bearing at the top of this skill — see
140
+ "Coordination primitives — when to use which" above for the send / queue /
141
+ queue-handoff usage model and the §1b doctrine. Auxiliary queue verbs:
142
+ `rig queue update / show / list` complement `rig queue create / handoff`
143
+ for in-flight inspection and state mutation.
144
+ - If a daemon-backed coordination command fails, debug the command/runtime/schema edge directly;
145
+ do not assume the right workaround is to drop back to a config-layer primitive.
146
+ - Do not perform daemon stop/start, production DB copy/mutation, release, publish, or other
147
+ consequence-boundary actions unless the operator/workstream has granted that specific gate.
148
+
149
+ ## First-user workspace setup
150
+
151
+ When booting into a rig on a host where the workspace is unset, gap-ridden, or
152
+ points at a stale layout, address that before substantive project work. The
153
+ shipped surface is small + bounded — reach for the canonical commands rather
154
+ than improvising.
155
+
156
+ ### Detect workspace state at boot
157
+
158
+ Agent-actionable when the daemon is reachable.
159
+
160
+ ```bash
161
+ rig workspace validate --json
162
+ rig workspace validate <path> --kind <user|project|knowledge|lab|delivery> --json
163
+ ```
164
+
165
+ `rig workspace validate` walks the workspace root and emits a structured
166
+ frontmatter-gap report against the v0 contract. Exit code is non-zero when
167
+ gaps exist (operators chain into hygiene fix loops). Default root is the
168
+ current directory; pass a positional path to validate elsewhere. `--kind`
169
+ scopes the contract to a specific workspace kind; omit for a kind-agnostic
170
+ structural check.
171
+
172
+ If `rig workspace validate` reports a non-zero `gapCount` OR the workspace
173
+ root is unset / unwritable, the workspace needs instantiation — see the next
174
+ section.
175
+
176
+ ### Instantiate the canonical workspace scaffold
177
+
178
+ Agent-actionable. Idempotent on existing dirs without `--force`.
179
+
180
+ ```bash
181
+ rig config init-workspace
182
+ rig config init-workspace --root <path>
183
+ rig config init-workspace --dry-run --json
184
+ ```
185
+
186
+ `rig config init-workspace` scaffolds the canonical workspace layout at the
187
+ configured `workspace.root` (default `~/.openrig/workspace`):
188
+
189
+ - `missions/` — release missions + slices
190
+ - `artifacts/` — work artifacts produced inside the workspace
191
+ - `evidence/` — non-dogfood evidence (release evidence, proof packets, etc.)
192
+ - `progress/` — progress index + per-mission rails
193
+ - `field-notes/` — operator + agent observations
194
+ - `specs/` — spec library (rig + agent + workflow YAML lives here)
195
+ - `dogfood-evidence/` — dogfood proof packets + run artifacts
196
+
197
+ The scaffold seeds one example mission (`getting-started`) with multiple
198
+ slices, and drops a workspace README.md + STEERING.md so a fresh install has
199
+ browsable Project content. `--root <path>` targets a non-default root for
200
+ this call; `--dry-run` reports what would be created without writing.
201
+ `--force` overwrites existing FILES but never deletes
202
+ directories — operator content is safe.
203
+
204
+ ### Redirect the workspace root
205
+
206
+ Operator-gated when persistent. Agent-actionable when one-shot via env-var.
207
+
208
+ For a single command:
209
+
210
+ ```bash
211
+ OPENRIG_WORKSPACE_ROOT=<path> rig <command> ...
212
+ ```
213
+
214
+ For a persistent host-level redirect, the operator changes the config file or
215
+ runs the setter:
216
+
217
+ ```bash
218
+ rig config set workspace.root <path>
219
+ ```
220
+
221
+ ConfigStore precedence: `OPENRIG_WORKSPACE_ROOT` env > config-file
222
+ `workspace.root` > built-in default `~/.openrig/workspace`. The same
223
+ precedence governs `OPENRIG_WORKSPACE_SPECS_ROOT` → `workspace.specs_root`
224
+ (default `<workspace_root>/specs`).
225
+
226
+ Prefer the env-var form for one-shot redirects (transparent to operators);
227
+ reserve `rig config set` for changes the operator owns.
228
+
229
+ ### Build a workspace from scratch
230
+
231
+ Agent-actionable. Same surface as the canonical scaffold above; the
232
+ `workspace.root` cascade handles non-existent host paths.
233
+
234
+ ```bash
235
+ rig config init-workspace --root /path/to/new/workspace
236
+ ```
237
+
238
+ The command creates the root dir if missing (idempotent: existing root +
239
+ populated subdirs is a no-op). Run
240
+ `rig workspace validate /path/to/new/workspace --json` after to confirm the
241
+ contract holds.
242
+
243
+ ### Create a workflow inside an existing workspace
244
+
245
+ Authoring is operator-or-agent; validation + instantiation are
246
+ agent-actionable.
247
+
248
+ Workflow spec files live at:
249
+
250
+ ```
251
+ <workspace_root>/specs/workflows/<name>.yaml
252
+ ```
253
+
254
+ `<workspace_root>` resolves via the ConfigStore precedence named above.
255
+ There is no `rig workflow create` verb in v0.3.x — the spec YAML is authored
256
+ directly. Template by hand from the documented schema, or copy a built-in
257
+ starter from `<openrig install>/dist/builtins/workflow-specs/` and adapt.
258
+ Once written:
259
+
260
+ ```bash
261
+ rig workflow validate <workspace_root>/specs/workflows/<name>.yaml --json
262
+
263
+ rig workflow instantiate <workspace_root>/specs/workflows/<name>.yaml \
264
+ --root-objective "<one-line objective for the run>" \
265
+ --created-by <your-session>@<your-rig> \
266
+ --json
267
+ ```
268
+
269
+ Both `--root-objective <text>` and `--created-by <session>` are REQUIRED
270
+ on `instantiate` — omitting either yields a Commander required-option
271
+ error before the daemon is contacted. `--entry-owner <session>` is an
272
+ optional override for the entry-step owner; default routing is per the
273
+ workflow spec.
274
+
275
+ `validate` returns a structured ok/error report; `instantiate` creates a
276
+ workflow instance + entry-step qitem. Inspect existing surface state with:
277
+
278
+ ```bash
279
+ rig workflow specs --json # list registered specs (built-in + operator-authored)
280
+ rig workflow list --json # list active workflow instances
281
+ rig workflow show <instanceId> --json # inspect one instance
282
+ rig workflow project <instanceId> # ADVANCE an instance — projects the next-step packet
283
+ rig workflow continue <instanceId> # read-only inspector of an instance (does NOT advance it)
284
+ ```
285
+
286
+ *(Surface note — the current `rig workflow` command group registers **13** subcommands: `validate`, `instantiate`, `project`, `list`, `specs`, `show`, `trace`, `continue`, `run`, `watch`, `route`, `resume`, `status`. There is still no `create` verb — the spec YAML is authored on disk. `project` is the advancing verb (it projects the next-step packet); `continue` is a read-only inspector, NOT an advance — do not conflate them. The 13-verb set and the project-vs-continue semantics are verified against current product main `d37a08ad` (`packages/cli/src/commands/workflow.ts`, 13 registered `.command(...)` entries; the earlier "6-verb surface / continue-advances" claim here was stale). Verify individual subcommand flags with `rig workflow --help`.)*
287
+
288
+ ## Permission policy — pick one at setup (onboarding)
289
+
290
+ OpenRig sets only a **minimal usability floor** on your harness permissions and otherwise stays out of the way — then it ships **recommended policies you opt into**. It never bakes a permission policy for you. On install / onboarding this is a required choice, presented as a top-level pick:
291
+
292
+ - **POLICY MODE** — pick a built-in policy and have it applied:
293
+ - **Locked** — deny-by-default whitelist; untrusted rigs/work.
294
+ - **Standard** ⭐ (recommended) — the normal software-factory posture; dev incl. push + PR, destructive actions ask.
295
+ - **Open** — allow-by-default; everything except explicitly-destructive, which ask.
296
+
297
+ The built-in definitions ship as read-only policy spec files (Locked / Standard / Open); applying your pick is the job of the **`applying-a-permission-policy`** skill — it translates the chosen spec into your live harness config (Claude `settings.json` / Codex `config.toml`), interactively, showing the diff before it writes.
298
+ - **YOLO MODE** — done with permissions, just want it to work: OpenRig boots every seat with the harness full-bypass launch flag. No config policy is applied (the bypass overrides it). This is a deterministic OpenRig setting, not a skill.
299
+ - **No choice = the floor** — the minimal usability baseline (Claude `acceptEdits` / Codex workspace-only / Pi `--no-approve`), one consistent minimum, nothing more.
300
+
301
+ The floor and YOLO are **launch flags** OpenRig sets deterministically; the Locked / Standard / Open policies are **config-file** policies the skill applies (agent-driven, because harness config formats drift). A rig **carries** its chosen policy on its spec and boots with it — see Lifecycle → Bring a rig up. To (re)apply or change a policy, open **`applying-a-permission-policy`**.
302
+
303
+ ## v0.3.x Starter, Workspace, And Plugin Surfaces
304
+
305
+ OpenRig v0.3.0 adds `rig agent-image`, `rig context-pack`, `rig workspace`, and
306
+ `rig config init-workspace`. *(0.5.0: the `rig context-pack` alias is retired — the store + compose library is the single `rig context` noun; see "Context packs and paced delivery (0.5.0)".)* It also shifts fresh-user starter guidance toward
307
+ `product-team` for human-directed work and `conveyor` for workflow-oriented
308
+ work. Treat `demo` as legacy/test content unless a task specifically asks for
309
+ the old demo spec.
310
+
311
+ OpenRig v0.3.1 adds public package/source surfaces for Plugin Primitive v0,
312
+ Claude Auto-Compaction Policy, migration `040_workflow_specs_diagnostic`,
313
+ Library Explorer finishing, Settings Destination Explorer, Dashboard/For You
314
+ vellum refresh, storytelling adapter, and action outcome + inline error UX.
315
+
316
+ `rig plugin` is read-only at v0:
317
+
318
+ ```bash
319
+ rig plugin list
320
+ rig plugin show <id>
321
+ rig plugin used-by <id>
322
+ rig plugin validate <path>
323
+ ```
324
+
325
+ There is no `rig plugin install` verb in v0.3.1. Plugin installation remains
326
+ explicit operator copy/symlink to `$OPENRIG_HOME/plugins/<plugin-id>/`.
327
+
328
+ Claude auto-compaction policy is opt-in default-off. The v0.3.1 package and
329
+ this host's active daemon ship `policies.claude_compaction.*` ConfigStore keys,
330
+ but no behavior changes unless the operator enables the policy.
331
+
332
+ Known v0.3.0/v0.3.1 caveats:
333
+ - `rig down` now accepts a rig name or id (symmetric with `rig up`): the earlier
334
+ name-to-404 caveat (the D1 path) is resolved in v0.3.3. An ambiguous name
335
+ matching more than one active rig is refused with the matching ids; re-run
336
+ with `rig down <id>`.
337
+ - `rig queue` / `rig view` JSON and limit compatibility drift is an open
338
+ follow-up from host-adoption proof; treat it as a compatibility caveat, not a
339
+ daemon-health failure.
340
+ - Queue/view JSON/limit drift is now refined as a wrapper-layer routing issue,
341
+ not a daemon-layer issue; use human-readable output for affected wrapper
342
+ commands until v0.3.2.
343
+ - First v0.3.1 daemon start hit a plugin-vendor fallback health-probe timeout;
344
+ controlled retry succeeded. Manual retry is the current workaround.
345
+ - Topology mobile drawer restoration and plugin source-label taxonomy are
346
+ v0.3.2 carry-forwards.
347
+
348
+ ## Recovery and Resilience (v0.3.4+)
349
+
350
+ v0.3.4's theme is Recovery + Resilience. The surfaces below compose into a
351
+ single boot-to-running-rig path that survives crashes, hand-resumed sessions,
352
+ profile-load drift, and partial workspace state without silently fudging
353
+ status.
354
+
355
+ ### `rig start` — recovery entrypoint
356
+
357
+ `rig start` is the top-level recovery sequencer. It does not invent recovery;
358
+ it composes existing primitives (daemon start + kernel verify + per-rig
359
+ restore) into one call.
360
+
361
+ ```bash
362
+ rig start # interactive: daemon + kernel + pick-and-restore
363
+ rig start --last # headless: restore all rigs that were last running
364
+ rig start --all # headless: restore all rigs with restore-usable snapshots
365
+ rig start --rigs <name> [<name>...] # headless: restore only the named rigs
366
+ rig start --json # JSON output for agents
367
+ ```
368
+
369
+ Framing: `rig start` is the RECOVERY entry point, not the getting-started
370
+ hero. The fresh-user boot hero remains `rig up <starter>` (typically
371
+ `rig up product-team`). Reach for `rig start` after a host reboot, daemon
372
+ restart, or any "bring my rigs back" moment.
373
+
374
+ ### `rig reconcile-session` — no-launch adopt of a hand-resumed session
375
+
376
+ When an operator has externally resumed an agent session (e.g. attached a
377
+ shell, restarted a runtime by hand) and you want OpenRig to reconcile its
378
+ lifecycle state without re-launching or sending input, use:
379
+
380
+ ```bash
381
+ rig reconcile-session <session>
382
+ rig reconcile-session <session> --rig <rigId> --node <logicalId>
383
+ rig reconcile-session <session> --no-launch
384
+ rig reconcile-session <session> --json
385
+ ```
386
+
387
+ This is a no-launch, no-input adopt. `--rig`/`--node` disambiguate when the
388
+ canonical session name does not uniquely resolve. `--no-launch` is accepted
389
+ for explicitness (it is the only mode this command has).
390
+
391
+ ### Five-term restore status vocabulary
392
+
393
+ The shipped restore vocabulary is intentionally honest. It surfaces in
394
+ `rig up` / `rig restore` / `rig ps`. Use the term that fits — do not collapse
395
+ to a generic "ok/failed":
396
+
397
+ - `resumed` — seat resumed from its original session/snapshot and is live.
398
+ - `fresh-primed` — seat opted into `--fresh` and was freshly started.
399
+ - `awaiting-decision` — zero-session honest state. There is no resumable
400
+ session AND no `--fresh` opt-in was given; the seat is waiting for an
401
+ operator decision. Previously fudged as `failed`; that was wrong — nothing
402
+ is broken, the system is asking for input.
403
+ - `attention_required` — seat is in a state needing operator attention; not
404
+ a transport failure. Clear via `rig seat clear-attention` once the
405
+ attention has been resolved.
406
+ - `failed` — the send transport or launch genuinely failed.
407
+
408
+ This replaces the prior collapsed model (the v0.3.3 four-term vocabulary, in
409
+ which `rebuilt` was a term, is retired).
410
+
411
+ ### `rig seat clear-attention` — audited reconcile of stuck attention
412
+
413
+ When a seat is stuck in `attention_required`, do NOT hand-edit SQLite to
414
+ fake-clear the state. Use the evidence-gated, operator-attested, audited
415
+ reconcile:
416
+
417
+ ```bash
418
+ rig seat clear-attention <session>
419
+ rig seat clear-attention <session> --reason "operator attested: the operator re-authed, confirmed live"
420
+ rig seat clear-attention <session> --json
421
+ ```
422
+
423
+ `--reason <text>` is the operator-attestation override path; without it the
424
+ command runs the evidence gate. Either way the action is audited.
425
+
426
+ ### Periodic snapshots — crash-insurance floor
427
+
428
+ The daemon ships a periodic-snapshot scheduler. It runs independently of
429
+ teardown events and provides the crash-insurance floor that prior
430
+ event-only/teardown-only snapshots could not provide on hard crashes.
431
+
432
+ Config keys (SettingsStore):
433
+ - `snapshots.periodic.enabled` — default `true`
434
+ - `snapshots.periodic.interval_seconds` — default `300`
435
+ - `snapshots.periodic.retention_keep` — default `10`
436
+
437
+ Newest-wins semantics: when both `auto-periodic` and `auto-pre-down`
438
+ snapshots exist for a rig, the freshest of the two is selected for restore.
439
+ A newer `auto-periodic` beats a stale `auto-pre-down` (the crash fix); a
440
+ genuinely-fresher `auto-pre-down` still wins on graceful cycles. Manual
441
+ snapshots are handled separately. See
442
+ `packages/daemon/src/domain/snapshot-repository.ts` for the ordering rule.
443
+
444
+ The last-snapshot floor surfaces in `rig ps` / status output so an operator
445
+ can see at a glance how recent the crash-insurance floor is.
446
+
447
+ ### Codex profile-v2 preflight
448
+
449
+ Profile-bearing launch/restore surfaces run a profile-load preflight. When
450
+ profile-load issues are detected, the failure is honest and actionable
451
+ (named error + remediation pointer) instead of a silent partial launch that
452
+ would later look like an attention_required seat with no explanation.
453
+
454
+ ### cmux launch readiness
455
+
456
+ cmux-backed launches no longer produce silent partial workspace state. When
457
+ parts of the workspace are missing, the launch surfaces partial state
458
+ honestly and the UI exposes a one-click open-missing affordance.
459
+
460
+ (See also `## Token-Efficient Defaults (v0.4.0+)` below for the compact-by-default read-command surface that lands in 0.4.0.)
461
+
462
+ ## Token-Efficient Defaults (v0.4.0+)
463
+
464
+ v0.4.0 flips the five most frequently invoked read-commands from firehose-by-default to compact-by-default, and `rig queue list` adopts the docker / kubectl read-command grammar. **All defaults preserve breadth and capability — the firehose is one explicit flag away.**
465
+
466
+ ### `rig ps` — scope-aware: bare `rig ps` = ALL rigs; `--nodes` = your rig only
467
+
468
+ ```bash
469
+ rig ps # ALL active rigs on the host, one compact row each — RUN FIRST to know the world
470
+ rig ps --rig <name> # one named rig's summary
471
+ rig ps --nodes --rig <name> # per-node (seat) detail for a NAMED rig — the normal drill-in
472
+ rig ps --nodes # per-node detail — CURRENT rig ONLY (deliberately narrow; NOT the whole host)
473
+ rig ps --json # compact JSON (default = a bare array of ALL non-archived rigs)
474
+ rig ps --nodes -A # cross-rig node inventory (was v0.3.4 default)
475
+ rig ps --nodes --full # complete record (the v0.3.4 per-node default shape; resumeToken VALUE retained here for downstream consumers)
476
+ rig ps --nodes --session <sess> # narrow to one canonical session
477
+ rig ps --active # opt-in active-state filter (does NOT change the all-states default — ps surfaces topology/readiness, where stopped/recoverable/attention IS the actionable signal)
478
+ ```
479
+
480
+ **v0.4.0 breadth + projection changes**:
481
+ - **Rig-level `rig ps` lists ALL active rigs** (one row each — the cheap "know the world" view). The **`--nodes` (per-seat) view defaults to your CURRENT rig only** (from `OPENRIG_SESSION_NAME`'s `@<rig>` suffix); `--rig <name>` picks another rig, `-A` widens `--nodes` to the whole host (expensive — prefer `--fields`/`--limit`).
482
+ - **Per-node TL;DR projection (compact) is the default**; `--full` returns the raw byte-equivalent passthrough. Daemon-side `recoveryGuidance` relocated to a guidance-by-reference map (no longer duplicated per-node) — even `--full` benefits.
483
+ - **All-states stays default** (different from `rig queue list` which defaults to active-only) — for `ps`, non-running states ARE often the actionable signal.
484
+ - **Resume-token security**: `--full` JSON emits `resumeTokenPresent` (boolean) — the actual `resumeToken` value also remains in `--full` for downstream consumers that legitimately need it, but the compact default never carries it (an orch glance never accidentally leaks token material).
485
+
486
+ **⚠ SCOPE-AWARENESS — the one that bites:** `rig ps --nodes` (and `--nodes --json`) show ONLY your current rig's seats, by design — the narrow default protects your context window. **Narrow output is not the whole world.** Never conclude "my rig is the only rig on the host" from a `--nodes` read — run bare `rig ps` FIRST (cheap; it lists every rig), then `rig ps --nodes --rig <name>` for the one you need. (`-A` = the expensive whole-host node read; use sparingly. The ~77k-token status-glance incident is closed by compact + scope.)
487
+
488
+ ### `rig whoami` — compact-by-default + `--full` (`--verbose` alias)
489
+
490
+ ```bash
491
+ rig whoami # compact: identity + peers names + edges + transcript path
492
+ rig whoami --json # compact JSON (~192 tokens)
493
+ rig whoami --full # complete payload (~909 tokens; v0.3.4 default shape)
494
+ rig whoami --verbose # alias of --full
495
+ ```
496
+
497
+ The first command every agent runs on boot AND every compaction-restore. The compact default keeps identity-recovery essentials (`identity`, `peers` names + sessionNames, `edges` directional `kind` + `to.sessionName`, `transcriptPath`). `--full` adds `contextUsage`, `commands`, `peersNote`, `runtimeContext`. The compact-default is an ALLOWLIST projection — future payload fields default to `--full` and cannot silently re-bloat the every-boot path.
498
+
499
+ ### `rig queue list` — active-frontier + docker/kubectl grammar
500
+
501
+ ```bash
502
+ rig queue list # active, compact, CURRENT-rig (docker-ps default)
503
+ rig queue list -a # + closed/done history within current breadth (docker -a)
504
+ rig queue list -A # cross-rig breadth (kubectl -A)
505
+ rig queue list --full # add body + chain-of-record + transition history
506
+ rig queue list -o json # compact JSON (token-safe, machine-parseable)
507
+ rig queue list --full -o json # full JSON
508
+ rig queue list --mine # just the caller's items
509
+ rig queue list --destination <s> # destined to <s>
510
+ rig queue list --source <s> # sourced by <s>
511
+ rig queue show <qitemId> # full single item (kubectl describe)
512
+ ```
513
+
514
+ Four orthogonal axes (scope × history × field-breadth × encoding), all composable. **STOP using bare `rig queue list` as the cross-rig firehose.** Default is now active + compact + current-rig. The cross-rig + history + full-body firehose (the ~64,000-token payload spike) is opt-in via `-A -a --full`.
515
+
516
+ ### `rig restore-check` — summary + not-ready-only default + `--full`
517
+
518
+ ```bash
519
+ rig restore-check # summary counts + not-ready seats (with reasons) only
520
+ rig restore-check --full # complete per-seat readiness across the fleet (v0.3.4 default)
521
+ rig restore-check --rig <name> # narrow
522
+ rig restore-check --as <session> # narrow to one seat
523
+ ```
524
+
525
+ Closes the largest measured bomb (~79,000 → low thousands). Summary correctly identifies EVERY not-ready seat (no false-ready omission); detail is dropped only for ready seats.
526
+
527
+ ### `rig context` — context-window usage viewer (0.4.x; REMOVED in 0.5.0)
528
+
529
+ ```bash
530
+ rig context # compact summary (0.4.x only)
531
+ rig context --full # complete current payload
532
+ rig context --rig <name> # narrow to one rig
533
+ rig context --threshold 80 # filter to seats at/above 80%
534
+ ```
535
+
536
+ Lower leverage than the others; keeps the read-command surface compact-by-default after the 0.4.0 upgrade. **⚠ 0.5.0: this usage viewer is removed entirely and the `rig context` name is reassigned to the context library (store + compose) — see "Context packs and paced delivery (0.5.0)" below. On a 0.5.0 host, bare `rig context` is the library, not this viewer.**
537
+
538
+ ### Why this matters
539
+
540
+ This release closes the host-version-aged token-burn class: on this host the read-commands accumulated to ~225,000 tokens of context-window cost over a typical orchestrator session, almost all of it firehose-when-a-glance-was-wanted. Compact defaults restore the lean-monitoring doctrine: a narrow status check must be cheap. The full payloads remain one flag away when actually needed.
541
+
542
+ ### Token-efficiency-boot-guardrail pack (interim) — CLI-prohibitions RETIRE at host-upgrade
543
+
544
+ The interim `token-efficiency-boot-guardrail` pack (the CLI-command prohibitions on `rig queue list` unfiltered, `rig ps --nodes --json` unfiltered, `rig restore-check`, `rig context`, `rig whoami --json`) is a host-version workaround for the bloated defaults this release closes. **The CLI-command-prohibitions half retires when 0.4.0 lands on the host.** The pack's bounded-local-search rule + scope / over-flag discipline GRADUATE to a standing convention (`conventions/bounded-local-search-and-flag-scope`) and continue to apply host-independently.
545
+
546
+ ### `rig scope mission|slice progress` — deterministic progress updates
547
+
548
+ ```bash
549
+ rig scope mission progress <mission> --add "<line>" # append a progress line; --set replaces; --section <heading> (default Rail); --status active|done|blocked
550
+ rig scope slice progress <slice-path> --add "<line>" # same flags: --add / --set, --section <heading>, --status active|done|blocked
551
+ ```
552
+
553
+ Replaces hand-editing `PROGRESS.md` with markdown. Writes the canonical structure the OpenRig PROGRESS UI page reads. `rig scope mission create` + `rig scope slice create` now scaffold `PROGRESS.md` automatically per `conventions/scope-and-versioning/README.md`.
554
+
555
+ ### `rig scope mission|slice stage / verified / repair` — deterministic maturity vocabulary
556
+
557
+ ```bash
558
+ rig scope slice stage <slice> <new-stage> # wip / provisional / established / canonical / superseded / retired
559
+ rig scope slice stage <slice> superseded --successor <id> # superseded REQUIRES --successor (rejected otherwise)
560
+ rig scope mission stage <mission> <new-stage> # same enum + rules at mission tier
561
+
562
+ rig scope slice verified <slice> --against "<source>" # stamp `verified: <today> against <source>`; --against MANDATORY
563
+ rig scope mission verified <mission> --against "<source>"
564
+
565
+ rig scope slice repair <slice> # idempotent repair: backfill PROGRESS.md, conform id/stage/verified, repair ghosts
566
+ rig scope mission repair <mission> # mission-tier idempotent repair
567
+
568
+ rig scope slice show <slice> # derives read-time effective-reliability from (stage × verified)
569
+ # — stale-`verified` `canonical` reported as effectively `provisional`
570
+ ```
571
+
572
+ Composes with the `progress` command + scaffolding to make `rig scope` the **deterministic enforcer** of `conventions/scope-and-versioning` §1 (dot-IDs) + §2 (maturity vocabulary). Agents update `stage` / `verified` / `id` through commands rather than hand-editing markdown and drifting. The `--against` MANDATORY rule on `verified` is the anti-stale keystone: bare timestamps are rejected because a bare timestamp is exactly what lets stale trackers lie while looking fresh. **STOP hand-editing the `stage` / `verified` / `id` fields in scope frontmatter; use the new verbs.** Existing missions / slices with `id:null` ghosts or missing `PROGRESS.md` are repaired idempotently via `repair`.
573
+
574
+ ### `rig skill audit` — skill cascade provenance
575
+
576
+ ```bash
577
+ rig skill audit # human report of findings
578
+ rig skill audit --json # structured findings
579
+ rig skill audit --severity warn # stale + mirror-drift only
580
+ rig skill audit --rig <name> # narrow to embedded skill copies for one rig
581
+ ```
582
+
583
+ Read-only audit of the skill cascade. Detects `missing` / `stale` / `self-referential` / `invalid-date` / `mirror-drift` across the canonical skills workspace → product mirror → hub cwd → installed plugin chain. Findings route back to the lifecycle for shaped propagation runs. **False-green prevention**: when audit evidence is unavailable, the CLI emits `unable-to-audit` with exit code `2` rather than reporting `clean`.
584
+
585
+ ### `rig seat clear-attention` — extended to derived projection staleness
586
+
587
+ v0.3.4 shipped `clear-attention` gating on `session.startupStatus` only. v0.4.0 extends the verb to also reach **restoreOutcome-derived** attention (seat is `startupStatus=ready` + `sessionStatus=running` but carries `restoreOutcome=failed` / `continuityOutcome=failed`). Same evidence-gated audit row applies; the `--reason <text>` operator-attestation override carries the runtime / cwd-uncertainty disclosure honestly.
588
+
589
+ ### Native Codex session id capture
590
+
591
+ Codex seats can now record the real native session id from the Codex
592
+ `SessionStart` hook instead of relying on scrape-shaped identity. The proof
593
+ lane for v0.4.0 matched the same id across the hook payload, rollout log, and
594
+ SQLite. Treat hook-sourced ids as stronger resume/identity evidence than
595
+ terminal scraping when present.
596
+
597
+ Managed-seat hook trust is a 0.4.1 carry: the v0.4.0 surface proves native
598
+ capture and hook-trust constraints, but do not assume every managed Codex seat
599
+ has already migrated from scrape-backed to hook-sourced ids.
600
+
601
+ ### Codex resume preserves approval posture
602
+
603
+ Resuming a Codex seat preserves the launching seat's approval/sandbox posture
604
+ and profile flags. Product-emitted resume commands carry the posture flags
605
+ instead of silently falling back to implicit-deny or an unrelated profile.
606
+
607
+ Do not "fix" a resumed Codex seat by relaunching it with broader approvals
608
+ unless the operator explicitly grants a bounded window. Verify the seat's
609
+ active posture first, and preserve it when composing recovery commands.
610
+
611
+ ### `rig seat set-resume-token --token-stdin`
612
+
613
+ ```bash
614
+ printf '%s' "$RESUME_TOKEN" | rig seat set-resume-token <session> --token-stdin
615
+ ```
616
+
617
+ Use this command to set or restore a seat resume token. It replaces direct
618
+ SQLite edits, rejects unauthorized writes and bad/null token false-ready paths,
619
+ records redacted audit/provenance, and keeps token material out of command
620
+ arguments, stdout, logs, and normal status rows. Use stdin, not an inline flag,
621
+ when passing token material.
622
+
623
+ ## Core Loop
624
+
625
+ Most work in OpenRig reduces to this loop:
626
+ - recover identity: `rig whoami` (compact default; add `--full` only when you need the heavy payload)
627
+ - inspect inventory: `rig ps --nodes` (compact default; add `--full` only when you need the firehose)
628
+ - read context: `rig transcript ...`, `rig ask ...`, `rig chatroom history ...`
629
+ - act: `rig send`, `rig capture`, `rig broadcast`, lifecycle commands
630
+
631
+ ## Agent-Managed Apps
632
+
633
+ An agent-managed app is a deployable OpenRig unit made of:
634
+ - the software or service
635
+ - one specialist agent dedicated to that software
636
+
637
+ Treat the specialist as the domain delegate for that app.
638
+ The current canonical example is:
639
+ - rig: `secrets-manager`
640
+ - pod: `vault`
641
+ - member: `specialist`
642
+ - logical ID: `vault.specialist`
643
+ - session: `vault-specialist@secrets-manager`
644
+
645
+ Typical operator loop:
646
+
647
+ ```bash
648
+ rig up secrets-manager --cwd /path/to/project
649
+ rig ps --nodes --json
650
+ rig send vault-specialist@secrets-manager "Check Vault health and report back." --verify
651
+ rig env status secrets-manager
652
+ rig env logs secrets-manager
653
+ ```
654
+
655
+ Cross-rig communication is valid when the target session resolves uniquely.
656
+ Example:
657
+
658
+ ```bash
659
+ rig send vault-specialist@secrets-manager "Read secret/data/dogfood and report the value." --verify
660
+ ```
661
+
662
+ Use the specialist instead of teaching every peer the same app-specific toolchain.
663
+ For Vault, ask `vault.specialist` to do secrets-domain work rather than improvising curl or Vault CLI usage in unrelated agents.
664
+
665
+ ## Identity and Recovery
666
+
667
+ Start here after launch, compaction, or confusion:
668
+
669
+ ```bash
670
+ rig whoami --json
671
+ ```
672
+
673
+ What it gives you today:
674
+ - identity: rig, logical ID, pod/member, session name, runtime
675
+ - peers and directional edges
676
+ - transcript info
677
+ - `contextUsage` when available
678
+
679
+ Flags:
680
+ ```bash
681
+ rig whoami --session <name>
682
+ rig whoami --node-id <id>
683
+ ```
684
+
685
+ If the daemon is unreachable but identity can still be inferred, `--json` may return a partial result instead of crashing.
686
+
687
+ `WhoamiResult` (v0.3.3+) carries a required `peersNote` field with three pointers
688
+ the agent can use to navigate the rest of the rig from a cold start. The
689
+ human-formatted CLI output preserves the literal `Peers:` line prefix verbatim
690
+ (parser/test compatibility) and surfaces the clarifier in-band beneath it; the
691
+ JSON form exposes `peersNote` directly for programmatic consumers.
692
+
693
+ ## Inventory and Monitoring
694
+
695
+ ```bash
696
+ rig ps # ALL active rigs on the host, one compact row each (run FIRST to know the world)
697
+ rig ps --nodes # compact node inventory (current rig)
698
+ rig ps -A # all-rigs breadth (was the pre-0.4.0 default)
699
+ rig ps --nodes --full # complete per-node record (the firehose — opt-in)
700
+ rig ps --nodes --json # compact JSON node inventory (add --full for the full record)
701
+ ```
702
+
703
+ **v0.4.0 flipped these to compact-by-default — see the `rig ps` compact-defaults section above; STOP using bare `rig ps --nodes --json` as a fleet-wide firehose (the ~77k-token status-glance incident).** The compact `rig ps --nodes` node inventory (add `--full` only when you need the complete record, `-A` for cross-rig breadth) carries, per node:
704
+ - session name
705
+ - runtime
706
+ - session/startup status
707
+ - restore outcome (compact: `resumeTokenPresent` boolean; the token VALUE is in `--full`)
708
+ - attach/resume commands
709
+ - latest error
710
+
711
+ Other health surfaces:
712
+
713
+ ```bash
714
+ rig status
715
+ rig daemon status
716
+ rig config
717
+ rig preflight
718
+ rig doctor
719
+ rig env status <rig>
720
+ rig env logs <rig>
721
+ rig env down <rig>
722
+ ```
723
+
724
+ ## Transcript and Communication
725
+
726
+ ### Transcript access
727
+
728
+ ```bash
729
+ rig transcript <session> --tail 100
730
+ rig transcript <session> --grep "pattern"
731
+ rig transcript <session> --json
732
+ ```
733
+
734
+ ### Send to one session
735
+
736
+ ```bash
737
+ rig send <session> "message"
738
+ rig send <session> "message" --verify
739
+ rig send <session> "message" --wait-for-idle <seconds>
740
+ rig send <session> "message" --raw
741
+ rig send <session> "message" --dangerously-interact --reason "<why>"
742
+ rig send <session> "message" --host <id>
743
+ rig send <session> "message" --json
744
+ ```
745
+
746
+ **The send-guard (v0.4.0) — the default is SAFE.** A default `rig send` is guarded: it will NOT submit into an interactive prompt / permission block on the target pane (the footgun that prematurely shipped 0.4.0). Flags:
747
+ - `--verify` — delivery evidence.
748
+ - `--force` — **a back-compat no-op on the send DECISION**: it never bypasses the interactive-prompt/permission guard and never changes whether a message is delivered (a mid-task/busy pane already sends-with-advisory by default). *(It does NOT "bypass activity-risk checks" — that earlier teaching is retired.)* It is **not fully inert**, though — it is still parsed solely to be **rejected in combination with `--wait-for-idle`**: `rig send … --force --wait-for-idle <n>` prints `--wait-for-idle cannot be combined with --force`, exits 1, and sends nothing. So do not read "no-op" as "`--force --wait-for-idle` is harmless"; that pairing errors. *(Verified against current product main `d37a08ad`: the guard-bypass no-op is declared at `send.ts` and confirmed by runtime capture — a plain `--force` send delivers through the ordinary path; the `--wait-for-idle` rejection is enforced at `send.ts`, `routes/transport.ts`, and `session-transport.ts`, and confirmed by runtime capture — exit 1, nothing sent.)*
749
+ - `--wait-for-idle <seconds>` — wait until the target is explicitly idle before sending. **Cannot be combined with `--force`** (that pairing is rejected: exit 1, nothing sent).
750
+ - `--raw` — send exact text/keystrokes without the From/To messaging envelope (still guarded against interactive prompts).
751
+ - `--dangerously-interact --reason "<why>"` — the ONLY override of the prompt/permission guard: deliberately drive an interactive prompt/permission block (implies `--raw`, requires `--reason`, audit-logged).
752
+ - `--host <id>` — send on a remote host declared in `~/.openrig/hosts.yaml` (ssh hosts shell out; http hosts go CLI-direct to the remote daemon).
753
+ - `--from <session>` — originating session for the envelope sender/actor (provenance; defaults to `$OPENRIG_SESSION_NAME`, and is plumbed through cross-host sends so the remote envelope names the origin, not the relay).
754
+ - `--context <ref>` **(0.5.0)** — attach a composed context pack/piece by ref (see "Context packs and paced delivery"). Small piece → `send --context`; a real pack → `rig walk`. The noun `rig context` composes the ref; the verb delivers it.
755
+
756
+ > **Durable work goes to the QUEUE, not `send`.** `rig send` is an *ephemeral* message to a pane — it can be missed, and its delivery status is pane-render, not receipt. If you are **assigning work, or the message is important enough that losing it would be a real bummer**, use `rig queue` (below): it's durable, owned, tracked, and survives compaction and restart. Reach for `send` for a quick conversational nudge; reach for the **queue** for anything that must not get lost. Do not default to `send` for work — that's the most common mistake.
757
+
758
+ As of v0.3.3, content beginning with `--` or `-` is safe:
759
+ `rig send <session> "content starting with -- or - is now safe"` delivers
760
+ literally. The daemon's `send_text` path carries an explicit `--`
761
+ end-of-options sentinel so tmux no longer parses dash-prefixed content
762
+ as its own flags. The CLI surface itself is unchanged. For multi-line
763
+ or large bodies handed off as durable work, use
764
+ `rig queue create --body-file <path>` (`-` for stdin) — that's the
765
+ queue-side surface, not `rig send`.
766
+
767
+ `--verify` delivery outcomes (v0.3.3+):
768
+ - `delivered` — text + Enter both succeeded and capture re-confirmed the body landed.
769
+ - `rendered-unconfirmed` — text + Enter both succeeded but capture could not re-confirm the body (TUI redraw race or scroll). The message landed; the post-send re-check could not prove it. Treat as landed-but-unconfirmable, NOT failure.
770
+ - `failed` — the send transport itself failed.
771
+
772
+ The legacy `Verified: yes/no` line is preserved verbatim (parser/test
773
+ compatibility). A new `Delivery: <outcome>` line carries the named outcome
774
+ above.
775
+
776
+ Observed operator nuance for `--verify`:
777
+ - `Sent to ...` + `Verified: yes` (`Delivery: delivered`) = strong positive delivery evidence.
778
+ - `Sent to ...` + `Verified: no` + `Delivery: rendered-unconfirmed` = the message landed; capture could not re-prove it. Don't blind-retry — check reply / `rig capture` / transcript before sending again.
779
+ - `Sent to ...` + `Verified: no` + `Delivery: failed` = send-transport failure.
780
+ - no `Sent to ...` line or a hard error = send failure.
781
+
782
+ When you get `Verified: no`, do not immediately retry blindly. First check one of:
783
+ - a direct reply from the target
784
+ - `rig capture <session>`
785
+ - transcript evidence
786
+ - queue/outbox state if the message asked for a durable handoff
787
+
788
+ ### Capture terminal output
789
+
790
+ ```bash
791
+ rig capture <session>
792
+ rig capture <session> --lines 50
793
+ rig capture --rig <name>
794
+ rig capture --pod <name> --rig <name>
795
+ rig capture --rig <name> --json
796
+ ```
797
+
798
+ ### Broadcast
799
+
800
+ ```bash
801
+ rig broadcast --rig <name> "message"
802
+ rig broadcast --pod <name> "message"
803
+ rig broadcast "message"
804
+ rig broadcast --rig <name> "message" --json
805
+ ```
806
+
807
+ **Use `rig broadcast` sparingly — prefer `rig send` fan-out.** Without `--rig` or `--pod`, broadcast targets
808
+ **every running session across ALL rigs** (plus attached external_cli nodes) — the fastest way to cause a
809
+ broadcast storm. Reserve `rig broadcast` for small rigs or a genuine all-hands emergency. For the normal
810
+ "message several seats at once" case, use `rig send`, which scopes the fan-out and keeps the messaging
811
+ envelope, the delivery/interactive-prompt guards, and per-recipient results:
812
+
813
+ ```bash
814
+ rig send --to dev-impl@my-rig,dev-qa@my-rig "message to specific seats" # named seats (comma-list or repeat --to)
815
+ rig send --pod dev "message to one pod" # scoped fan-out
816
+ rig send --rig my-rig "message to one rig" # scoped fan-out
817
+ ```
818
+
819
+ ### Chatroom
820
+
821
+ ```bash
822
+ rig chatroom send <rig> <message> [--sender <name>]
823
+ rig chatroom history <rig> [--topic <name>] [--after <id>] [--since <ts>] [--sender <name>] [--limit <n>] [--json]
824
+ rig chatroom wait <rig> [--after <id>] [--topic <name>] [--sender <name>] [--timeout <seconds>] [--json]
825
+ rig chatroom clear <rig>
826
+ rig chatroom topic <rig> <topic-name> [--body <text>] [--sender <name>]
827
+ rig chatroom watch <rig> [--tmux]
828
+ ```
829
+
830
+ **Key commands:**
831
+ - `send` — post a message
832
+ - `history` — retrieve with composable filters (sender, since, after, topic)
833
+ - `wait` — block until new matching messages arrive (polls history, times out honestly)
834
+ - `clear` — delete all messages for the rig (destructive, rig-scoped)
835
+
836
+ ## See something, say something
837
+
838
+ OpenRig has an **observation stream** — the fleet's zero-friction institutional memory, mined for
839
+ real product improvements. When you notice **anything worth externalizing**, say something and keep
840
+ working:
841
+
842
+ - a **bug**, a rough edge, or something that needs fixing
843
+ - a **feature idea** or an improvement
844
+ - something that **worked really well** — a technique, tool, or pattern worth spreading
845
+ - an **observation**, positive or negative feedback, or something genuinely cool, productive, or funny
846
+
847
+ ```bash
848
+ rig stream emit --source <your-session> --body "what you noticed"
849
+ ```
850
+
851
+ That's the whole reflex. **Don't** decide where it goes or who it's for — the intake router triages
852
+ (destination/type/urgency/tags are optional hints — `--hint-type review|handoff|idea`,
853
+ `--hint-urgency routine|urgent|critical`, `--hint-tags` — never required). One command, then carry
854
+ on; the value is the habit, not the polish. **Don't overdo it, either:** stream real signal, not
855
+ narration — a good observation beats ten noisy ones. It's a passing thought you externalize, not a chore.
856
+ - `topic` — set a topic marker
857
+ - `watch` — SSE or tmux-based live stream
858
+
859
+ **Roundtable protocol:**
860
+ 1. Inspect old room: `rig chatroom history my-rig --limit 5`
861
+ 2. Save if needed: `rig chatroom history my-rig --json > /tmp/old-room.json`
862
+ 3. Clear if needed: `rig chatroom clear my-rig`
863
+ 4. Set topic: `rig chatroom topic my-rig "ROUND START"`
864
+ 5. Post: `rig chatroom send my-rig "position..." --sender <session>`
865
+ 6. Monitor: `rig chatroom wait my-rig --timeout 120`
866
+ 7. Close: `rig chatroom topic my-rig "ROUND CLOSED"`
867
+
868
+ See `docs/planning/roadmaps/chatroom-roundtable-protocol.md` for the full protocol.
869
+
870
+ ### `rig ask`
871
+
872
+ ```bash
873
+ rig ask <rig> "question"
874
+ rig ask <rig> "question" --json
875
+ ```
876
+
877
+ Current shipped behavior:
878
+ - queries the daemon for evidence
879
+ - returns rig summary
880
+ - returns transcript excerpts
881
+ - may return chat excerpts
882
+ - returns insufficiency state and optional guidance
883
+
884
+ This is an evidence/context command. It is not a hidden second-LLM call.
885
+
886
+ ### `rig auth` — agent auth-profile management (v0.4.1, product-native)
887
+
888
+ Product-native switching of agent auth profiles from the CLI. The runtime is a **flag** (`--runtime <codex>`), not a command noun — never `rig codex-auth`.
889
+
890
+ ```bash
891
+ rig auth status --runtime codex # presence / mode / parseability / login-state (never prints token contents)
892
+ rig auth list --runtime codex # saved profiles
893
+ rig auth save <profile> --runtime codex # snapshot the auth FILE (mode-guarded), never echoes contents
894
+ rig auth switch <profile> --runtime codex
895
+ rig auth validate <profile> --runtime codex
896
+ rig auth seats … --runtime codex # seat -> profile registry (metadata only; NOT proof of a live account)
897
+ ```
898
+
899
+ **Hard secret boundary:** no token value is ever printed, logged, queued, streamed, or committed; status/validate report presence/mode/login-state only; seat labels are metadata, not live-account proof. MVP is `--runtime codex`; other runtimes use the same surface with a different `--runtime`, never a parallel command.
900
+
901
+ ## Context packs and paced delivery (0.5.0)
902
+
903
+ **Compose context once, hand it to a seat cleanly.** A library primitive plus a set of delivery flags. The rule that keeps the grammar coherent — internalize this one: **the noun stores and composes; the verbs deliver.** `rig context` never sends anything; delivery is only ever `rig send` / `rig broadcast` / `rig walk` / `rig queue`.
904
+
905
+ > Version note: this is the 0.5.0 surface, pinned to the team-locked spec — not yet on lagging hosts. In 0.4.x, bare `rig context` was a context-window usage viewer (above); in 0.5.0 that viewer is removed and the `rig context` name belongs to the library here.
906
+
907
+ ### `rig context` — the store + compose library (never delivers)
908
+
909
+ Manage and compose context (any text/markdown) into reusable **packs**. Every piece and pack has a stable, **path-like ref** — you address context the way you address files (`packs/compaction-restore`, `as-built/queue-internals`).
910
+
911
+ ```bash
912
+ rig context list # what's in the library
913
+ rig context show <ref> # read a piece or pack
914
+ rig context add <source-dir> # install an existing pack directory into the store
915
+ rig context preview <ref> # assemble + show a pack WITHOUT delivering it
916
+ rig context sync # re-walk discovery roots, refresh the library index
917
+ rig context rm <ref>
918
+ rig context compose --out packs/<ref> --from <fileA> <fileB> ... # ordered pieces -> a durable pack
919
+ ```
920
+
921
+ - Sensible default store location; works unconfigured, can be pointed elsewhere later (another folder now; a machine or URL later).
922
+ - `compose` (v1) is honest ordered concatenation of named files into a durable pack with a ref — "here's a file, read a file."
923
+ - **No delivery verb lives on the noun.** To get a pack to a seat, hand its ref to a delivery verb below.
924
+
925
+ ### `rig walk` — paced delivery of a sequence
926
+
927
+ ```bash
928
+ rig walk <seat> --through <ref | file ...> --pace 10s
929
+ ```
930
+
931
+ Walk a seat *through* a pack: each piece is sent into the pane, spaced by `--pace`, so the agent processes between sends (the human paste → wait → paste rhythm). Its own top-level verb, push-direction — the walker leads and does not wait for replies; the spacing does the work. Reach for `walk` on onboarding, repriming, or a fleet update — anything absorbed in order rather than all at once.
932
+
933
+ ### The delivery grammar — send a ref, walk a pack, or attach it to a qitem
934
+
935
+ | When | Verb |
936
+ |---|---|
937
+ | One thing, now | `rig send <seat> --context <ref>` |
938
+ | One thing, everyone | `rig broadcast --rig <rig> --context <ref>` |
939
+ | A sequence, absorbed | `rig walk <seat> --through <ref> --pace 10s` |
940
+ | Context riding a durable handoff | `rig queue create … --body-context <ref>` |
941
+
942
+ - **Rule of thumb:** small piece → `send --context`; real pack → `walk`. An oversized `send --context` warns "this is walk-sized" instead of blasting the pane.
943
+ - **`--body-context` snapshot rule:** a qitem built from a ref stores the **resolved content** in its body **plus the ref for provenance** — the handoff carries what was actually sent, and a later library edit never silently rewrites a past handoff's history.
944
+ - **The orchestrator habit — assign work *with* its context attached:**
945
+ ```bash
946
+ rig context compose --out packs/qitem-brief --from as-built/queue.md conventions/c1-proof.md
947
+ rig queue create --destination dev-driver@build --body-context packs/qitem-brief --summary "…"
948
+ ```
949
+ The assignee never greps for the as-built; the curated context rides the durable handoff, survives compaction, and is auditable.
950
+
951
+ **Skills tier vs context tier:** skills are the HOT tier (ambient, finite, always-visible front-matter); context packs are the COLD tier (unbounded, fetched on instruction — "walk yourself through `packs/tui-onboarding`"). Don't overrun the skill layer by using skills as context packs — that's what this primitive is for.
952
+
953
+ ## Lifecycle
954
+
955
+ ### Bring a rig up
956
+
957
+ ```bash
958
+ rig up <source>
959
+ rig up <source> --plan
960
+ rig up <source> --yes
961
+ rig up <source> --cwd /path/to/project
962
+ rig up <source> --existing
963
+ rig up <source> --fresh <seat...>
964
+ rig up <source> --json
965
+ ```
966
+
967
+ `<source>` can be:
968
+ - a rig spec path
969
+ - a `.rigbundle` path
970
+ - a bare name
971
+
972
+ Bare names are special:
973
+ - if they match a library spec, `rig up` launches from the spec library
974
+ - if they do not match a library spec, `rig up` treats the name as an existing-rig restore/power-on target
975
+ - if both exist, `rig up` fails loudly on ambiguity
976
+
977
+ Resume-original-by-default (v0.3.4+):
978
+ - For an existing rig, `rig up <name>` resumes each seat from its original session/snapshot by default (operation A). Seats that successfully resume report `resumed`.
979
+ - `--fresh <seat...>` is the per-seat opt-in for deliberate fresh-prime (operation B). Named seats are reported as `fresh-primed`.
980
+ - `--existing` forces existing-rig restore semantics on a bare name, bypassing library-spec resolution. Useful when a rig name collides with a library spec name.
981
+ - Example: `rig up --existing my-rig --fresh dev-impl` — resume everything in `my-rig` except `dev-impl`, which is freshly primed.
982
+ - Seats with no resumable session land in `awaiting-decision` (zero-session honest state, NOT `failed`); see the five-term restore vocabulary in "Recovery and Resilience" below.
983
+
984
+ `--plan` (v0.3.4+):
985
+ - `rig up <source> --plan` produces a read-only restore plan preview. It surfaces per-seat resume/fresh-prime intent and any awaiting-decision seats without mutating state. Honest async timeout: a stuck plan reports the timeout rather than hanging silently.
986
+
987
+ Current behavior notes:
988
+ - `--target <root>` is only for `.rigbundle` / package installation. It does not change agent cwd.
989
+ - `rig up --cwd` is shipped. `rig up --cwd <path>` sends a per-run cwd override for all members in that launch.
990
+ - `local:` `agent_ref` values resolve relative to the rig spec directory, not your shell cwd.
991
+ - if you copy a built-in spec elsewhere, keep its `agents/` tree beside the YAML or rewrite those refs to `path:/absolute/path`
992
+ - `rig specs add <directory>` installs a full spec tree when the directory contains `rig.yaml` or `agent.yaml`.
993
+ - **Permission policy:** a rig carries a permission policy and boots with it (never changed on the fly). Default if none set = the minimum floor (Claude `acceptEdits` / Codex workspace-only / Pi `--no-approve`); otherwise a chosen built-in (Locked / Standard / Open) or deliberately none. When you spec or bring up a rig, decide its policy — apply it via `applying-a-permission-policy` (see also the onboarding menu, "Permission policy — pick one at setup").
994
+
995
+ Legacy/spec-specific surfaces still ship too:
996
+
997
+ ```bash
998
+ rig bootstrap <spec> [--plan] [--yes] [--json]
999
+ rig requirements <spec> [--json]
1000
+ ```
1001
+
1002
+ ### Tear a rig down
1003
+
1004
+ ```bash
1005
+ rig down <rig> # <rig> = rig name or id (active rig)
1006
+ rig down <rig> --snapshot
1007
+ rig down <rig> --delete
1008
+ rig down <rig> --force
1009
+ rig down <rig> --json
1010
+ ```
1011
+
1012
+ If `--snapshot` succeeds, human output includes the restore hint.
1013
+
1014
+ ### Archive a stopped rig (recoverable) — v0.3.3+
1015
+
1016
+ ```bash
1017
+ rig archive <rig> [--json]
1018
+ rig unarchive <rig> [--json]
1019
+ ```
1020
+
1021
+ `rig archive` marks a stopped rig as archived (sets `archivedAt`) without
1022
+ discarding it. The rig is preserved for later restoration via `rig unarchive`,
1023
+ which clears `archivedAt` and returns the rig to the active set.
1024
+
1025
+ Archive vs delete:
1026
+ - `rig down --delete` — permanent removal; not recoverable.
1027
+ - `rig archive` — recoverable; the rig is hidden from the default active view but its record + snapshots are preserved.
1028
+
1029
+ Visibility in `rig ps`:
1030
+ - `rig ps` — active rigs only (default).
1031
+ - `rig ps --include-archived` — includes archived rigs, marked with `*`.
1032
+
1033
+ SSE events `rig.archived` / `rig.unarchived` drive Project / dashboard updates;
1034
+ consumers that depend on the rig list should subscribe rather than poll.
1035
+
1036
+ ### Environment services
1037
+
1038
+ ```bash
1039
+ rig env status <rig>
1040
+ rig env logs <rig> [service]
1041
+ rig env down <rig>
1042
+ ```
1043
+
1044
+ Use these for service-backed rigs and agent-managed apps.
1045
+ For `secrets-manager`, these are the fastest CLI surfaces for:
1046
+ - confirming whether Vault is healthy
1047
+ - reading Vault container logs
1048
+ - stopping the Vault env without tearing down the specialist session first
1049
+
1050
+ ### Release management without killing live claimed sessions
1051
+
1052
+ ```bash
1053
+ rig release <rigId>
1054
+ rig release <rigId> --delete
1055
+ rig release <rigId> --json
1056
+ ```
1057
+
1058
+ Use `rig release` for adopted/claimed-session rigs when you want OpenRig to stop managing the rig but leave the tmux sessions alive.
1059
+ This is the safe recovery/reset surface for the "sessions still exist, management is broken or stale" case.
1060
+ If the rig contains OpenRig-launched nodes, `rig release` refuses loudly instead of pretending the mixed rig is safe to detach.
1061
+
1062
+ ### Snapshots and restore
1063
+
1064
+ ```bash
1065
+ rig snapshot <rigId>
1066
+ rig snapshot list <rigId>
1067
+ rig restore <snapshotId> --rig <rigId>
1068
+ ```
1069
+
1070
+ `rig restore` requires `--rig <rigId>`.
1071
+
1072
+ Claude Code autonomy note:
1073
+ - unattended `rig whoami` on boot may require the local permission allow list to include `Bash(rig:*)`
1074
+
1075
+ ### Import/export and bundles
1076
+
1077
+ ```bash
1078
+ rig export <rigId> -o rig.yaml
1079
+ rig import <path> [--instantiate] [--materialize-only] [--preflight] [--target-rig <rigId>] [--rig-root <root>]
1080
+ rig bundle create <spec> -o out.rigbundle
1081
+ rig bundle inspect <bundle>
1082
+ rig bundle install <bundle> [--plan] [--yes] [--target <root>] [--json]
1083
+ ```
1084
+
1085
+ ### Legacy package surface
1086
+
1087
+ This still ships, but is explicitly marked legacy:
1088
+
1089
+ ```bash
1090
+ rig package validate <path>
1091
+ rig package plan <path> [--target <dir>] [--runtime <runtime>] [--role <name>]
1092
+ rig package install <path> [--target <dir>] [--runtime <runtime>] [--role <name>] [--allow-merge]
1093
+ rig package list
1094
+ rig package rollback <installId>
1095
+ ```
1096
+
1097
+ ## Discovery and Topology Mutation
1098
+
1099
+ ### Discover unmanaged tmux sessions
1100
+
1101
+ ```bash
1102
+ rig discover
1103
+ rig discover --json
1104
+ rig discover --draft
1105
+ ```
1106
+
1107
+ ### Bind a discovered session
1108
+
1109
+ ```bash
1110
+ rig bind <discoveredId> --rig <rigId> --node <logicalId>
1111
+ rig bind <discoveredId> --rig <rigId> --pod <namespace> --member <name>
1112
+ ```
1113
+
1114
+ There is no shipped top-level `rig claim` command.
1115
+ The current adoption surface is `discover`, `bind`, `adopt`, and `unclaim`.
1116
+
1117
+ ### Self-attach the current shell or agent
1118
+
1119
+ ```bash
1120
+ rig attach --self --rig <rigId> --node <logicalId>
1121
+ rig attach --self --rig <rigId> --node <logicalId> --print-env
1122
+ rig attach --self --rig <rigId> --pod <namespace> --member <name> --runtime <runtime>
1123
+ ```
1124
+
1125
+ Use `rig attach --self` when the current agent should attach itself directly instead of going through `discover` + `bind`.
1126
+
1127
+ Current proven behavior:
1128
+ - inside `tmux`: attaches as a normal tmux-backed node, preserving inbound `rig send` / `rig capture`
1129
+ - outside `tmux`: attaches as `external_cli`
1130
+ - `--print-env` prints the `OPENRIG_NODE_ID` and `OPENRIG_SESSION_NAME` exports for the current shell
1131
+
1132
+ Recommended flow:
1133
+
1134
+ ```bash
1135
+ rig attach --self --rig <rigId> --node <logicalId> --print-env > /tmp/openrig-self-attach.env
1136
+ . /tmp/openrig-self-attach.env
1137
+ rig whoami --json
1138
+ ```
1139
+
1140
+ Notes:
1141
+ - for tmux-backed self-attach, `rig whoami --json` is the right verification
1142
+ - for raw/external self-attach, `rig ps --nodes --json` is currently the more reliable verification surface
1143
+ - if the current shell is outside tmux, pass `--display-name <name>` when you want a stable human session label recorded
1144
+
1145
+ ### Adopt a topology and bind live sessions
1146
+
1147
+ ```bash
1148
+ rig adopt <path> --bind <logicalId=tmuxSessionOrDiscoveryId>
1149
+ rig adopt <path> --bind <logicalId=...> --bind <logicalId=...> --json
1150
+ rig adopt <path> --bindings-file <bindings.yaml>
1151
+ rig adopt <path> --bind <logicalId=...> --target-rig <rigId> --rig-root <root>
1152
+ ```
1153
+
1154
+ Use `rig adopt` when the sessions already exist and you want OpenRig to start managing them.
1155
+
1156
+ A bindings file is the durable map from authored logical IDs to live sessions. Shape:
1157
+
1158
+ ```yaml
1159
+ bindings:
1160
+ dev1.impl2: dev1.impl2@rigged-buildout
1161
+ dev1.qa: dev1.qa@rigged-buildout
1162
+ ```
1163
+
1164
+ Spec + bindings is the proven recovery pair for adopted rigs.
1165
+ Spec gives OpenRig the intended topology. Bindings tells OpenRig which discovered live session belongs in each logical node.
1166
+
1167
+ ### Proven adopted-rig recovery workflow
1168
+
1169
+ This workflow is proven for the case where the external tmux sessions are still alive:
1170
+
1171
+ ```bash
1172
+ rig release <rigId> --delete
1173
+ rig discover --json
1174
+ rig adopt <spec.yaml> --bindings-file <bindings.yaml>
1175
+ ```
1176
+
1177
+ What this does:
1178
+ - removes OpenRig management without killing the sessions
1179
+ - re-discovers those same sessions as unmanaged
1180
+ - re-attaches them to the topology defined by the spec + bindings
1181
+
1182
+ Important limits:
1183
+ - this is for `sessions still alive`
1184
+ - spec alone is not enough for adopted rigs; you also need bindings
1185
+ - this does not yet mean OpenRig can recreate dead external sessions from nothing
1186
+
1187
+ ### Add unmanaged pods into an existing rig
1188
+
1189
+ 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:
1190
+
1191
+ ```bash
1192
+ rig adopt <pod-fragment.yaml> --bindings-file <pod.bindings.yaml> --target-rig <rigId>
1193
+ ```
1194
+
1195
+ Use this when:
1196
+ - the target rig already exists
1197
+ - the new sessions are live and visible in `rig discover --json`
1198
+ - you want additive topology growth, not a full rebuild
1199
+
1200
+ What to prepare:
1201
+ - a pod fragment spec with only the new pod
1202
+ - a bindings file mapping the new logical IDs to the live session names
1203
+
1204
+ Verification loop:
1205
+
1206
+ ```bash
1207
+ rig discover --json
1208
+ rig adopt <fragment.yaml> --bindings-file <bindings.yaml> --target-rig <rigId>
1209
+ rig ps --nodes --rig <rigId> # the target rig's nodes (--nodes alone = your current rig)
1210
+ rig export <rigId> -o rig.yaml
1211
+ ```
1212
+
1213
+ Success looks like:
1214
+ - the new sessions stop appearing in `rig discover`
1215
+ - the new logical IDs appear in `rig ps --nodes --rig <rigId>`
1216
+ - `rig export` includes the new pod
1217
+
1218
+ ### Mixed-origin rigs are allowed
1219
+
1220
+ One rig can contain both:
1221
+ - adopted nodes bound from already-running sessions
1222
+ - OpenRig-launched nodes created later with `rig expand` / `rig launch`
1223
+
1224
+ Current safety rule:
1225
+ - `rig release` is for claimed/adopted-only rigs
1226
+ - if a rig contains launched nodes, `rig release` fails with `contains_launched_nodes`
1227
+
1228
+ ### Manager-assisted recovery
1229
+
1230
+ The proven operator pattern is:
1231
+ - keep one OpenRig manager session outside the rig it manages
1232
+ - address the target by rig name, not cached rig ID
1233
+ - find the target rig with bare `rig ps` (lists all rigs), then resolve its owner from `rig ps --nodes --rig <target>` (a bare `--nodes` read is your current rig only, not the target's)
1234
+ - send the manager the spec path, bindings path, and verification steps with `rig send`
1235
+
1236
+ This lets ordinary agents ask the manager for OpenRig help instead of every agent needing to be an OpenRig expert.
1237
+
1238
+ ### Add/remove running topology parts
1239
+
1240
+ ```bash
1241
+ rig expand <rig-id> <pod-fragment-path> [--rig-root <path>] [--json]
1242
+ rig launch <rigId> <nodeRef> [--json]
1243
+ rig launch <rigId> --seats <a,b,c> [--hold-reason <text>] [--json]
1244
+ rig remove <rigId> <nodeRef> [--json]
1245
+ rig shrink <rigId> <podRef> [--json]
1246
+ rig unclaim <sessionRef> [--json]
1247
+ ```
1248
+
1249
+ Node-granular managed partial restore (v0.3.4+):
1250
+ - `rig launch <rigId> <nodeRef>` relaunches a single seat by logical id or node id through orchestration.
1251
+ - `rig launch <rigId> --seats <a,b,c>` relaunches a comma-separated subset of seats.
1252
+ - `--hold-reason <text>` records a reason for holding non-target seats during the partial launch.
1253
+ - This is a SUPPORTED managed path. The prior `pod_aware_launch_unsupported` dead-end is retired; pod-aware narrow launch now goes through this surface rather than ad-hoc rebuilds.
1254
+
1255
+ ### Add a member to an existing pod — v0.3.3+
1256
+
1257
+ ```bash
1258
+ rig add <rig> <member-fragment-path> [--json]
1259
+ rig add-member <rig> <member-fragment-path> [--json]
1260
+ ```
1261
+
1262
+ `rig add` (alias `rig add-member`) is the top-level verb for the `add_member`
1263
+ converge op. It adds a single member to an existing pod from a YAML/JSON member
1264
+ fragment file. The fragment must declare the target pod; the daemon resolves
1265
+ the pod by that declared identity, validates the member, runs preflight, and
1266
+ launches the member in place.
1267
+
1268
+ HTTP outcomes:
1269
+ - `201` — member added; per-node launch state included in the response.
1270
+ - `400` — `validation_failed` or `preflight_failed` (the fragment or its launch posture is rejected before any state change).
1271
+ - `409` — `member_conflict` (a member with that identity already exists in the pod).
1272
+
1273
+ Use `rig add` when you want additive growth inside a pod without re-running
1274
+ the full `rig expand` pod-fragment path or rebuilding the rig.
1275
+
1276
+ ## Specs and Validation
1277
+
1278
+ ### Validate specs
1279
+
1280
+ ```bash
1281
+ rig spec validate <path> [--json]
1282
+ rig spec preflight <path> [--rig-root <root>] [--json]
1283
+ rig agent validate <path> [--json]
1284
+ ```
1285
+
1286
+ ### Spec library
1287
+
1288
+ ```bash
1289
+ rig specs ls [--kind <kind>] [--json]
1290
+ rig specs show <name-or-id> [--json]
1291
+ rig specs preview <name-or-id> [--json]
1292
+ rig specs add <yaml-or-directory> [--json]
1293
+ rig specs sync [--json]
1294
+ rig specs remove <name-or-id> [--json]
1295
+ rig specs rename <name-or-id> <new-name> [--json]
1296
+ ```
1297
+
1298
+ ## MCP
1299
+
1300
+ ```bash
1301
+ rig mcp serve [--port <port>]
1302
+ ```
1303
+
1304
+ Current shipped MCP tools:
1305
+ - `rig_up`
1306
+ - `rig_down`
1307
+ - `rig_ps`
1308
+ - `rig_status`
1309
+ - `rig_snapshot_create`
1310
+ - `rig_snapshot_list`
1311
+ - `rig_restore`
1312
+ - `rig_discover`
1313
+ - `rig_bind`
1314
+ - `rig_bundle_inspect`
1315
+ - `rig_agent_validate`
1316
+ - `rig_rig_validate`
1317
+ - `rig_rig_nodes`
1318
+ - `rig_send`
1319
+ - `rig_capture`
1320
+ - `rig_chatroom_send`
1321
+ - `rig_chatroom_watch`
1322
+
1323
+ ## Troubleshooting and Weird States
1324
+
1325
+ When the CLI behaves strangely, use the smallest truthful check first:
1326
+
1327
+ ```bash
1328
+ rig whoami --json
1329
+ rig daemon status
1330
+ rig ps --nodes --json
1331
+ ```
1332
+
1333
+ Specific operator rules:
1334
+ - `Sent to ...` + `Verified: no` is ambiguous delivery, not automatic failure. Check reply, `rig capture`, transcript evidence, or queue/outbox state before retrying.
1335
+ - partial `rig whoami --json` can happen when identity is still inferable but the daemon-backed path is degraded.
1336
+ - the unified-exec-process warning is a host/tooling-layer signal, not automatic proof that the OpenRig topology is unhealthy.
1337
+
1338
+ If you hit the unified-exec warning, inspect for stale one-shot helpers before touching live seats:
1339
+
1340
+ ```bash
1341
+ ps -axo pid,ppid,command | rg 'tmux send-keys|rig queue create|tmux attach|codex|claude'
1342
+ ```
1343
+
1344
+ Safe cleanup target:
1345
+ - orphaned one-shot wrappers like `tmux send-keys ...`
1346
+
1347
+ Do not mass-kill:
1348
+ - `tmux attach ...`
1349
+ - `codex ...`
1350
+ - `claude ...`
1351
+
1352
+ For deeper host/runtime triage, use the companion `openrig-operator` skill if it is available in your seat.
1353
+
1354
+ ## JSON and Error Posture
1355
+
1356
+ Design assumptions that hold in the shipped CLI:
1357
+ - many operator commands support `--json`
1358
+ - error messages are intended to say what happened, why it matters, and what to do next
1359
+ - daemon-backed commands fail loudly when the daemon is stopped or unhealthy
1360
+ - restore failure is not something you should silently reinterpret as success
1361
+
1362
+ ## After-Compaction Recovery Checklist
1363
+
1364
+ 1. `rig whoami --json`
1365
+ 2. `rig transcript <your-session> --tail 100`
1366
+ 3. `rig ps` — lists ALL rigs on the host (know the world FIRST); then `rig ps --nodes --rig <your-rig>` for your seats. ⚠ `rig ps --nodes --json` alone is your CURRENT rig only — do NOT mistake it for the whole host (a freshly-compacted agent has no other context to catch the lie).
1367
+ 4. `rig chatroom history <rig> --limit 50`
1368
+
1369
+ ## Commands That Do Not Exist
1370
+
1371
+ Do not assume these exist unless the shipped help starts listing them:
1372
+ - `rig claim`
1373
+ - `rig blame`
1374
+ - `rig replay`