@openrig/cli 0.4.6 → 0.4.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 (352) hide show
  1. package/daemon/assets/guidance/CULTURE-default.md +19 -0
  2. package/daemon/assets/guidance/openrig-start.md +20 -5
  3. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  4. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +9 -6
  5. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -72
  6. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +34 -22
  7. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +108 -0
  8. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +11 -14
  9. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +95 -0
  10. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +175 -105
  11. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +26 -9
  12. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +11 -9
  13. package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +162 -0
  14. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +165 -0
  15. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  16. package/daemon/dist/adapters/cmux-transport.js +8 -1
  17. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  18. package/daemon/dist/adapters/cmux.d.ts +9 -0
  19. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  20. package/daemon/dist/adapters/cmux.js +21 -0
  21. package/daemon/dist/adapters/cmux.js.map +1 -1
  22. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
  23. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  24. package/daemon/dist/adapters/codex-runtime-adapter.js +20 -4
  25. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  26. package/daemon/dist/build-info.js +3 -3
  27. package/daemon/dist/domain/claude-compaction-enforcer.d.ts +3 -0
  28. package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
  29. package/daemon/dist/domain/claude-compaction-enforcer.js +19 -3
  30. package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
  31. package/daemon/dist/domain/cmux-layout-service.d.ts +36 -0
  32. package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -1
  33. package/daemon/dist/domain/cmux-layout-service.js +100 -28
  34. package/daemon/dist/domain/cmux-layout-service.js.map +1 -1
  35. package/daemon/dist/domain/context-monitor.d.ts +2 -0
  36. package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
  37. package/daemon/dist/domain/context-monitor.js +14 -0
  38. package/daemon/dist/domain/context-monitor.js.map +1 -1
  39. package/daemon/dist/domain/feed/attention-aggregator.js +1 -1
  40. package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -1
  41. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
  42. package/daemon/dist/domain/hosts/hosts-registry-reader.js +12 -10
  43. package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
  44. package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -1
  45. package/daemon/dist/domain/hosts/hosts-registry-writer.js +3 -2
  46. package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -1
  47. package/daemon/dist/domain/hosts/read-through.js +1 -1
  48. package/daemon/dist/domain/hosts/read-through.js.map +1 -1
  49. package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
  50. package/daemon/dist/domain/hosts/remote-daemon-http.js +8 -5
  51. package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
  52. package/daemon/dist/domain/node-inventory.d.ts +3 -12
  53. package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
  54. package/daemon/dist/domain/node-inventory.js +55 -13
  55. package/daemon/dist/domain/node-inventory.js.map +1 -1
  56. package/daemon/dist/domain/plugin-vendor-service.d.ts +2 -0
  57. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  58. package/daemon/dist/domain/plugin-vendor-service.js +23 -0
  59. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  60. package/daemon/dist/domain/projection-lane.d.ts +7 -0
  61. package/daemon/dist/domain/projection-lane.d.ts.map +1 -0
  62. package/daemon/dist/domain/projection-lane.js +28 -0
  63. package/daemon/dist/domain/projection-lane.js.map +1 -0
  64. package/daemon/dist/domain/ps-projection.d.ts +19 -0
  65. package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
  66. package/daemon/dist/domain/ps-projection.js +46 -6
  67. package/daemon/dist/domain/ps-projection.js.map +1 -1
  68. package/daemon/dist/domain/queue-repository.d.ts +14 -10
  69. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  70. package/daemon/dist/domain/queue-repository.js +33 -12
  71. package/daemon/dist/domain/queue-repository.js.map +1 -1
  72. package/daemon/dist/domain/review/compose.d.ts +77 -4
  73. package/daemon/dist/domain/review/compose.d.ts.map +1 -1
  74. package/daemon/dist/domain/review/compose.js +152 -16
  75. package/daemon/dist/domain/review/compose.js.map +1 -1
  76. package/daemon/dist/domain/review/fleet-compose.js +1 -1
  77. package/daemon/dist/domain/review/fleet-compose.js.map +1 -1
  78. package/daemon/dist/domain/review/gather.d.ts +1 -1
  79. package/daemon/dist/domain/review/gather.d.ts.map +1 -1
  80. package/daemon/dist/domain/review/gather.js +92 -67
  81. package/daemon/dist/domain/review/gather.js.map +1 -1
  82. package/daemon/dist/domain/review/proof-io.d.ts +2 -0
  83. package/daemon/dist/domain/review/proof-io.d.ts.map +1 -0
  84. package/daemon/dist/domain/review/proof-io.js +38 -0
  85. package/daemon/dist/domain/review/proof-io.js.map +1 -0
  86. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  87. package/daemon/dist/domain/rigspec-instantiator.js +15 -2
  88. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  89. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +8 -0
  90. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -0
  91. package/daemon/dist/domain/scope/plan-lock-artifacts.js +57 -0
  92. package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -0
  93. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +38 -0
  94. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -0
  95. package/daemon/dist/domain/scope/scaffold-placeholder.js +98 -0
  96. package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -0
  97. package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
  98. package/daemon/dist/domain/scope/scope-approve.js +22 -1
  99. package/daemon/dist/domain/scope/scope-approve.js.map +1 -1
  100. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  101. package/daemon/dist/domain/scope/scope-audit.js +57 -20
  102. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  103. package/daemon/dist/domain/session-transport.d.ts +17 -0
  104. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  105. package/daemon/dist/domain/session-transport.js +44 -0
  106. package/daemon/dist/domain/session-transport.js.map +1 -1
  107. package/daemon/dist/domain/slices/qitem-membership.d.ts +17 -0
  108. package/daemon/dist/domain/slices/qitem-membership.d.ts.map +1 -0
  109. package/daemon/dist/domain/slices/qitem-membership.js +60 -0
  110. package/daemon/dist/domain/slices/qitem-membership.js.map +1 -0
  111. package/daemon/dist/domain/slices/slice-detail-projector.d.ts +5 -0
  112. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  113. package/daemon/dist/domain/slices/slice-detail-projector.js +157 -11
  114. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  115. package/daemon/dist/domain/slices/slice-indexer.d.ts +86 -0
  116. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  117. package/daemon/dist/domain/slices/slice-indexer.js +422 -45
  118. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  119. package/daemon/dist/domain/startup-orchestrator.d.ts +9 -0
  120. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  121. package/daemon/dist/domain/startup-orchestrator.js +71 -3
  122. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  123. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts +12 -11
  124. package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -1
  125. package/daemon/dist/domain/terminal/cmux-provider-adapter.js +61 -28
  126. package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -1
  127. package/daemon/dist/domain/terminal/herdr-adapter.d.ts +27 -10
  128. package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
  129. package/daemon/dist/domain/terminal/herdr-adapter.js +74 -33
  130. package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
  131. package/daemon/dist/domain/transcript-capture.d.ts +3 -0
  132. package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
  133. package/daemon/dist/domain/transcript-capture.js +28 -0
  134. package/daemon/dist/domain/transcript-capture.js.map +1 -1
  135. package/daemon/dist/domain/transcript-store.d.ts +10 -0
  136. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  137. package/daemon/dist/domain/transcript-store.js +26 -0
  138. package/daemon/dist/domain/transcript-store.js.map +1 -1
  139. package/daemon/dist/domain/types.d.ts +4 -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 +9 -4
  144. package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
  145. package/daemon/dist/domain/workspace/workspace-doctor.js +1 -1
  146. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  147. package/daemon/dist/routes/mission-control.js +1 -1
  148. package/daemon/dist/routes/mission-control.js.map +1 -1
  149. package/daemon/dist/routes/missions.d.ts +7 -0
  150. package/daemon/dist/routes/missions.d.ts.map +1 -1
  151. package/daemon/dist/routes/missions.js +6 -1
  152. package/daemon/dist/routes/missions.js.map +1 -1
  153. package/daemon/dist/routes/ps.d.ts.map +1 -1
  154. package/daemon/dist/routes/ps.js +5 -1
  155. package/daemon/dist/routes/ps.js.map +1 -1
  156. package/daemon/dist/routes/queue.d.ts.map +1 -1
  157. package/daemon/dist/routes/queue.js +9 -2
  158. package/daemon/dist/routes/queue.js.map +1 -1
  159. package/daemon/dist/routes/rigs.d.ts.map +1 -1
  160. package/daemon/dist/routes/rigs.js +21 -10
  161. package/daemon/dist/routes/rigs.js.map +1 -1
  162. package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  163. package/daemon/dist/routes/scope-audit.js +141 -135
  164. package/daemon/dist/routes/scope-audit.js.map +1 -1
  165. package/daemon/dist/routes/sessions.js +2 -1
  166. package/daemon/dist/routes/sessions.js.map +1 -1
  167. package/daemon/dist/routes/slices.d.ts.map +1 -1
  168. package/daemon/dist/routes/slices.js +48 -38
  169. package/daemon/dist/routes/slices.js.map +1 -1
  170. package/daemon/dist/routes/transcripts.d.ts.map +1 -1
  171. package/daemon/dist/routes/transcripts.js +62 -33
  172. package/daemon/dist/routes/transcripts.js.map +1 -1
  173. package/daemon/dist/startup.d.ts.map +1 -1
  174. package/daemon/dist/startup.js +25 -11
  175. package/daemon/dist/startup.js.map +1 -1
  176. package/daemon/docs/reference/agent-startup-guide.md +1 -0
  177. package/daemon/specs/agents/apps/vault-specialist/agent.yaml +2 -1
  178. package/daemon/specs/agents/conveyor/builder/agent.yaml +2 -1
  179. package/daemon/specs/agents/conveyor/lead/agent.yaml +2 -1
  180. package/daemon/specs/agents/conveyor/planner/agent.yaml +2 -1
  181. package/daemon/specs/agents/conveyor/reviewer/agent.yaml +2 -1
  182. package/daemon/specs/agents/design/product-designer/agent.yaml +12 -2
  183. package/daemon/specs/agents/development/implementer/agent.yaml +12 -2
  184. package/daemon/specs/agents/development/qa/agent.yaml +12 -2
  185. package/daemon/specs/agents/development/qa/guidance/role.md +1 -0
  186. package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +2 -1
  187. package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +2 -1
  188. package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +12 -2
  189. package/daemon/specs/agents/product-management/pm/agent.yaml +1 -2
  190. package/daemon/specs/agents/research/analyst/agent.yaml +2 -1
  191. package/daemon/specs/agents/research/synthesizer/agent.yaml +2 -1
  192. package/daemon/specs/agents/review/independent-reviewer/agent.yaml +12 -2
  193. package/daemon/specs/agents/shared/agent.yaml +5 -8
  194. package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +13 -1
  195. package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +132 -0
  196. package/daemon/{assets/plugins/openrig-core/skills → specs/agents/shared/skills/core}/agent-startup-and-context-ingestion/SKILL.md +27 -19
  197. package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +264 -0
  198. package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +190 -0
  199. package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +104 -0
  200. package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +25 -8
  201. package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +0 -5
  202. package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +1 -6
  203. package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +460 -0
  204. package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
  205. package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +22 -11
  206. package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +160 -0
  207. package/daemon/specs/agents/shared/skills/core/specification-system/SKILL.md +103 -0
  208. package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
  209. package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +125 -0
  210. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +4 -4
  211. package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +3 -0
  212. package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +3 -3
  213. package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +1 -1
  214. package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +6 -3
  215. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +1 -1
  216. package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +1 -1
  217. package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +12 -2
  218. package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +1 -1
  219. package/daemon/specs/rigs/focused/pm-team/CULTURE.md +1 -1
  220. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +2 -2
  221. package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +5 -4
  222. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +2 -2
  223. package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +3 -5
  224. package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +2 -2
  225. package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +3 -4
  226. package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
  227. package/dist/bin-wrapper.d.ts.map +1 -1
  228. package/dist/bin-wrapper.js +3 -1
  229. package/dist/bin-wrapper.js.map +1 -1
  230. package/dist/build-info.js +3 -3
  231. package/dist/cli-error.d.ts +33 -0
  232. package/dist/cli-error.d.ts.map +1 -0
  233. package/dist/cli-error.js +94 -0
  234. package/dist/cli-error.js.map +1 -0
  235. package/dist/commands/config-init-workspace.js +1 -1
  236. package/dist/commands/doctor.d.ts +1 -1
  237. package/dist/commands/doctor.d.ts.map +1 -1
  238. package/dist/commands/doctor.js +17 -11
  239. package/dist/commands/doctor.js.map +1 -1
  240. package/dist/commands/host.d.ts.map +1 -1
  241. package/dist/commands/host.js +24 -10
  242. package/dist/commands/host.js.map +1 -1
  243. package/dist/commands/proof.js +1 -1
  244. package/dist/commands/proof.js.map +1 -1
  245. package/dist/commands/ps.d.ts.map +1 -1
  246. package/dist/commands/ps.js +16 -2
  247. package/dist/commands/ps.js.map +1 -1
  248. package/dist/commands/queue.d.ts.map +1 -1
  249. package/dist/commands/queue.js +103 -24
  250. package/dist/commands/queue.js.map +1 -1
  251. package/dist/commands/rig.d.ts.map +1 -1
  252. package/dist/commands/rig.js +122 -0
  253. package/dist/commands/rig.js.map +1 -1
  254. package/dist/commands/scope.js +2 -2
  255. package/dist/commands/scope.js.map +1 -1
  256. package/dist/commands/send.d.ts.map +1 -1
  257. package/dist/commands/send.js +118 -24
  258. package/dist/commands/send.js.map +1 -1
  259. package/dist/commands/slack.d.ts +37 -0
  260. package/dist/commands/slack.d.ts.map +1 -0
  261. package/dist/commands/slack.js +274 -0
  262. package/dist/commands/slack.js.map +1 -0
  263. package/dist/commands/ui.d.ts +1 -0
  264. package/dist/commands/ui.d.ts.map +1 -1
  265. package/dist/commands/ui.js +2 -0
  266. package/dist/commands/ui.js.map +1 -1
  267. package/dist/commands/up.js +1 -1
  268. package/dist/commands/up.js.map +1 -1
  269. package/dist/commands/whoami.d.ts.map +1 -1
  270. package/dist/commands/whoami.js +3 -3
  271. package/dist/commands/whoami.js.map +1 -1
  272. package/dist/daemon-lifecycle.d.ts.map +1 -1
  273. package/dist/daemon-lifecycle.js +45 -14
  274. package/dist/daemon-lifecycle.js.map +1 -1
  275. package/dist/host-registry.d.ts +6 -1
  276. package/dist/host-registry.d.ts.map +1 -1
  277. package/dist/host-registry.js +15 -6
  278. package/dist/host-registry.js.map +1 -1
  279. package/dist/index.d.ts +3 -0
  280. package/dist/index.d.ts.map +1 -1
  281. package/dist/index.js +6 -1
  282. package/dist/index.js.map +1 -1
  283. package/dist/lib/scope/scaffold-placeholder.d.ts +38 -0
  284. package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -0
  285. package/dist/lib/scope/scaffold-placeholder.js +98 -0
  286. package/dist/lib/scope/scaffold-placeholder.js.map +1 -0
  287. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  288. package/dist/lib/scope/scope-audit.js +57 -20
  289. package/dist/lib/scope/scope-audit.js.map +1 -1
  290. package/dist/lib/scope-templates/backlog-deprecation.md +1 -1
  291. package/dist/lib/scope-templates/backlog-tech-debt.md +1 -1
  292. package/dist/lib/scope-templates/bug-fix.md +1 -1
  293. package/dist/lib/scope-templates/implementation-prd.md +1 -1
  294. package/dist/lib/scope-templates/mission-notes.md +7 -2
  295. package/dist/lib/scope-templates/mission-placeholder.md +1 -1
  296. package/dist/lib/scope-templates/mission-progress.md +1 -1
  297. package/dist/lib/scope-templates/mission-release.md +1 -1
  298. package/dist/lib/scope-templates/placeholder.md +1 -1
  299. package/dist/lib/scope-templates/proof.md +1 -1
  300. package/dist/lib/scope-templates/release-feature.md +1 -1
  301. package/dist/lib/scope-templates/research.md +1 -1
  302. package/dist/lib/scope-templates/slice-progress.md +1 -1
  303. package/dist/remote-host-ops.d.ts.map +1 -1
  304. package/dist/remote-host-ops.js +2 -2
  305. package/dist/remote-host-ops.js.map +1 -1
  306. package/dist/slack/config.d.ts +41 -0
  307. package/dist/slack/config.d.ts.map +1 -0
  308. package/dist/slack/config.js +60 -0
  309. package/dist/slack/config.js.map +1 -0
  310. package/dist/slack/inbound.d.ts +75 -0
  311. package/dist/slack/inbound.d.ts.map +1 -0
  312. package/dist/slack/inbound.js +133 -0
  313. package/dist/slack/inbound.js.map +1 -0
  314. package/dist/slack/message.d.ts +26 -0
  315. package/dist/slack/message.d.ts.map +1 -0
  316. package/dist/slack/message.js +60 -0
  317. package/dist/slack/message.js.map +1 -0
  318. package/dist/slack/outbound.d.ts +39 -0
  319. package/dist/slack/outbound.d.ts.map +1 -0
  320. package/dist/slack/outbound.js +52 -0
  321. package/dist/slack/outbound.js.map +1 -0
  322. package/dist/slack/queue-bridge.d.ts +56 -0
  323. package/dist/slack/queue-bridge.d.ts.map +1 -0
  324. package/dist/slack/queue-bridge.js +114 -0
  325. package/dist/slack/queue-bridge.js.map +1 -0
  326. package/dist/slack/secrets.d.ts +21 -0
  327. package/dist/slack/secrets.d.ts.map +1 -0
  328. package/dist/slack/secrets.js +73 -0
  329. package/dist/slack/secrets.js.map +1 -0
  330. package/dist/slack/slack-api.d.ts +49 -0
  331. package/dist/slack/slack-api.d.ts.map +1 -0
  332. package/dist/slack/slack-api.js +110 -0
  333. package/dist/slack/slack-api.js.map +1 -0
  334. package/dist/slack/state-store.d.ts +62 -0
  335. package/dist/slack/state-store.d.ts.map +1 -0
  336. package/dist/slack/state-store.js +132 -0
  337. package/dist/slack/state-store.js.map +1 -0
  338. package/package.json +1 -1
  339. package/ui/dist/assets/{index-zrFqS7gL.js → index-DkNi0RT8.js} +184 -184
  340. package/ui/dist/assets/index-N-SdPj-I.css +32 -0
  341. package/ui/dist/index.html +2 -2
  342. package/daemon/assets/plugins/openrig-core/skills/openrig-architect/SKILL.md +0 -361
  343. package/daemon/assets/plugins/openrig-core/skills/openrig-cmux/SKILL.md +0 -86
  344. package/daemon/assets/plugins/openrig-core/skills/openrig-herdr/SKILL.md +0 -158
  345. package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +0 -222
  346. package/daemon/docs/reference/product-factory-vps-runbook.md +0 -132
  347. package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +0 -113
  348. package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +0 -142
  349. package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +0 -110
  350. package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +0 -1245
  351. package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +0 -153
  352. package/ui/dist/assets/index-CFqxa0zW.css +0 -32
@@ -10,9 +10,9 @@ You are part of the orchestration pod. Your job is to keep the team productive,
10
10
  ## Startup sequence
11
11
 
12
12
  Before you summarize the rig or assign real work:
13
- 1. Load `using-superpowers`, `openrig-user`, `orchestration-team`, `systematic-debugging`, and `verification-before-completion`. Also load `mission-slice-sop` — the operating procedure for the canonical mission/slice files (you own PROGRESS.md `§1`; run `rig scope audit` at slice-close/mission-wrap).
13
+ 1. Load `using-superpowers`, `openrig-user`, `orchestration-team`, `systematic-debugging`, and `verification-before-completion`.
14
14
  2. Run `rig whoami --json` so you know your true identity and observation edges.
15
- 3. Run `rig ps --nodes -A --json` (v0.4.4: `--nodes` scopes to the current rig by default; `-A` for the fleet) and wait for the expected starter topology to settle.
15
+ 3. Run `rig ps --nodes --json` and wait for the expected starter topology to settle.
16
16
  4. Check recent chatroom history or direct startup messages so you know who is actually online and what they already reported.
17
17
  5. Only then announce readiness or assign work.
18
18
 
@@ -34,7 +34,7 @@ The orchestration pod is responsible for:
34
34
  **Principle:** monitoring intensity tracks **stakes × how likely you are to need to intervene, bounded to the window where that's true.** Spend tight attention only where it changes what you do, only as long as the risk lasts, then return to default. (Same evidence-not-cadence rule the `watchdog` skill applies to intervention *level*, applied to *intensity*.) **Self-test: "Can I name the stakes AND the condition that ends this close-watch?"** If not, you're hyper-monitoring.
35
35
 
36
36
  **Default (almost always) — token-efficient.** Steady-state your job is the **idle-without-handoff exception**: the queue handles normal handoff; you catch the agent who finished + went idle without closing/handing off.
37
- - **Status lives in the queue, not panes** (`status-not-chat-orchestrator`): `rig ps` (the consolidated map) / `rig ps --nodes -A --json` + `rig queue` are your status source; do NOT reconstruct fleet-state by capturing panes (pane `rig capture` is high-bandwidth *within your own pod* — that's fine; it is not how you track cross-pod/fleet state).
37
+ - **Status lives in the queue, not panes** (`status-not-chat-orchestrator`): `rig ps --nodes --json` + `rig queue` are your status source; do NOT reconstruct fleet-state by capturing panes (pane `rig capture` is high-bandwidth *within your own pod* — that's fine; it is not how you track cross-pod/fleet state).
38
38
  - **The watchdog is your clock** (`watchdog`): configure `rig watchdog` to wake you (~3 min); between wakes, idle (zero tokens) — no self-run sleep-loop re-reading panes at steady-state. Prefer one workflow-watchdog + targeted exception handling over many per-seat nag loops.
39
39
  - **On each wake — cheap sweep:** `rig queue` + a *filtered* `rig ps` (see "Read cheap" below) first; ONLY for a seat that looks idle/suspicious, `rig capture <session>` last few lines (never a full pane, never huge chunks); **active owner → no-op.**
40
40
  - **Read cheap — every status command has a token cost; project to the question.** The queue-first rule is about *where* status lives; this is about *how much you pay to read it*. The token bomb is the broad unfiltered dump, not the pane capture: an unfiltered fleet-wide `rig ps --nodes --json` emits ~77k tokens — for a one-rig or one-qitem question that is almost all waste, and at watchdog cadence it burns the shared account fast.
@@ -45,7 +45,7 @@ The orchestration pod is responsible for:
45
45
  - **Self-test:** "Does this read return more than the decision in front of me needs?" If yes, narrow it before running.
46
46
  - **A watchdog turn is small:** tiny queue/frontier check → make exactly the needed durable transition or wake → park. Not a fleet-wide scan per wake.
47
47
 
48
- **Close-monitoring — legitimate exception, deliberate + BOUNDED.** Some moments warrant tight/continuous attention — a seat doing something high-stakes, novel, or fragile where you may need to feed context, hand-hold, or intervene fast; a delicate gate; a recovery in flight. Switch in **on purpose** on a nameable trigger; **exit the instant the condition clears** (time- *and* event-bounded); don't let it bleed into steady-state. Worked example (slice-17): close through compaction-recovery / QA-runtime-proof / merge-gate; back off to queue+watchdog once the owner is active + the qitem in-progress. The anti-pattern is not tight monitoring — it's **unbounded** tight monitoring (an ambient sleep-loop with no nameable end-condition). That is what burns the shared account.
48
+ **Close-monitoring — legitimate exception, deliberate + BOUNDED.** Some moments warrant tight/continuous attention — a seat doing something high-stakes, novel, or fragile where you may need to feed context, hand-hold, or intervene fast; a delicate gate; a recovery in flight. Switch in **on purpose** on a nameable trigger; **exit the instant the condition clears** (time- *and* event-bounded); don't let it bleed into steady-state. Worked example: close through compaction-recovery / QA-runtime-proof / merge-gate; back off to queue+watchdog once the owner is active + the qitem in-progress. The anti-pattern is not tight monitoring — it's **unbounded** tight monitoring (an ambient sleep-loop with no nameable end-condition). That is what burns the shared account.
49
49
 
50
50
  ### B. Intervention — correct + re-teach, don't silently substitute
51
51
  When you DO catch a dropped potato, your default is to **teach the agent the protocol, not do it for them.** Agents load the hot-potato / queue-handoff protocol and are supposed to hand off on their own; you are the **belt-and-suspenders** for when one doesn't (skill not loaded, fell out of context, or just got it wrong).
@@ -7,6 +7,9 @@ description: Complete operating manual for the review pod. Covers everyday revie
7
7
 
8
8
  You are part of the review pod. Your value is fresh scrutiny that implementation and QA do not have.
9
9
 
10
+ ## Proportionality — right-size the review to the change (read first)
11
+ Review rigor scales to stakes and change size. A small, low-stakes diff gets a fast, focused pass; the full deep protocol (context proof, confidence scores, independent → cross-exam → convergence → roundtable) is for architecture / security / high-blast-radius changes. Don't run the heavy machinery on a one-line fix — that's ceremony, and it delays the ship it exists to protect. Catch what matters, then let good work through. The point of review is **better product shipped, not review performed.**
12
+
10
13
  ## Startup sequence
11
14
 
12
15
  Before you announce a review position:
@@ -21,13 +21,13 @@ openrig-relationship: vendored-modified
21
21
  |---|---|---|
22
22
  | Visual Companion offer step | Standalone step #2 in the flow — "offer Visual Companion in its own message before clarifying questions" | **Removed.** OpenRig agents typically operate without a separate visual-companion mode; visual design work routes through dedicated design-pod seats. |
23
23
  | Spec self-review step | Step #7 — inline self-review for placeholders/contradictions/scope | **Removed.** Self-review is handled at the rig/orchestration layer (driver/guard pattern + review-lead). |
24
- | User reviews written spec | Step #8 — pause for user to review the spec file | **Removed.** OpenRig's founder-walk and orchestration gates already cover this checkpoint at a higher level. |
24
+ | User reviews written spec | Step #8 — pause for user to review the spec file | **Removed.** OpenRig's the operator-walk and orchestration gates already cover this checkpoint at a higher level. |
25
25
  | Spec save path | `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` | `docs/plans/YYYY-MM-DD-<topic>-design.md` (matches OpenRig's `docs/plans/` convention) |
26
26
  | Process flow diagram | Includes Visual Companion + Spec self-review nodes | Simplified to remove those nodes; edges rewired |
27
27
 
28
28
  ## Why these modifications (inferred)
29
29
 
30
- - **Multi-platform / multi-step gates removed**: OpenRig's rig-level orchestration (driver → guard → qa, founder-walks) already provides the checkpoint structure that the upstream skill builds inline. Keeping those steps inside the skill double-gates the work.
30
+ - **Multi-platform / multi-step gates removed**: OpenRig's rig-level orchestration (driver → guard → qa, the operator-walks) already provides the checkpoint structure that the upstream skill builds inline. Keeping those steps inside the skill double-gates the work.
31
31
  - **`docs/plans/` path**: OpenRig's project structure uses `docs/plans/` as the canonical home for design + implementation plan documents (matches `writing-plans` modification — both are co-ordinated).
32
32
 
33
33
  ## Companion files
@@ -44,5 +44,5 @@ Watch upstream for:
44
44
  When upstream changes:
45
45
 
46
46
  1. Pull non-conflicting changes into the OpenRig copy.
47
- 2. Preserve the simplified 6-step flow and the `docs/plans/` save path unless founder direction reverses.
47
+ 2. Preserve the simplified 6-step flow and the `docs/plans/` save path unless operator direction reverses.
48
48
  3. Bump `last_upstream_check` in `SKILL.md` frontmatter.
@@ -50,7 +50,7 @@ Watch for upstream changes to:
50
50
  When upstream changes:
51
51
 
52
52
  1. Pull non-conflicting changes into the OpenRig copy.
53
- 2. Preserve the batch-with-checkpoint structure unless founder direction reverses.
53
+ 2. Preserve the batch-with-checkpoint structure unless operator direction reverses.
54
54
  3. Re-check that the subagent-alternative pointer hasn't crept back in.
55
55
  4. Bump `last_upstream_check` in `SKILL.md` frontmatter.
56
56
  5. Note any structural shape changes in `divergence_notes`.
@@ -4,9 +4,12 @@ description: Create distinctive, production-grade frontend interfaces with high
4
4
  license: Complete terms in LICENSE.txt
5
5
  metadata:
6
6
  openrig:
7
- vendored_from: "Anthropic skills (Apache 2.0; see LICENSE.txt sibling)"
8
- vendoring_pattern: vendored-as-is
9
- last_upstream_check: "2026-05-13 (diff against ~/.claude/skills/frontend-design = identical)"
7
+ stage: factory-approved
8
+ license_status: "see LICENSE.txt — vendor-derived; license terms apply"
9
+ vendored_from: "unknown vendor LICENSE.txt present at copy time; quarterly license review"
10
+ sibling_skills:
11
+ - shadcn
12
+ - remotion-best-practices
10
13
  ---
11
14
 
12
15
  This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
@@ -16,7 +16,7 @@ Write the test first. Watch it fail. Write minimal code to pass.
16
16
 
17
17
  **Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
18
18
 
19
- **Violating the letter of the rules is violating the spirit of the rules.**
19
+ **A strong default in service of shipping — not a law that outranks it.** TDD earns its keep where a failing test pins down behavior you'd otherwise get wrong: core logic, contracts, tricky edge cases. Match it to stakes — reach for it where test-first genuinely de-risks the change; throwaway prototypes, one-line copy tweaks, and obvious glue don't need the ceremony. Don't dodge it with synonyms; equally, don't let it block you from shipping the working thing.
20
20
 
21
21
  ## When to Use
22
22
 
@@ -44,5 +44,5 @@ Watch upstream for:
44
44
  When upstream changes:
45
45
 
46
46
  1. Pull non-conflicting changes into the OpenRig copy.
47
- 2. Do NOT re-introduce the multi-platform sections, SUBAGENT-STOP block, or Instruction Priority section unless founder direction reverses.
47
+ 2. Do NOT re-introduce the multi-platform sections, SUBAGENT-STOP block, or Instruction Priority section unless operator direction reverses.
48
48
  3. Bump `last_upstream_check` in `SKILL.md` frontmatter.
@@ -16,7 +16,7 @@ Claiming work is complete without verification is dishonesty, not efficiency.
16
16
 
17
17
  **Core principle:** Evidence before claims, always.
18
18
 
19
- **Violating the letter of this rule is violating the spirit of this rule.**
19
+ **This rule serves shipping — it is not a ritual that outranks it.** It governs one thing: *claims that a verifiable result holds* ("tests pass", "build succeeds", "bug fixed") — run the check before you assert it, and scale the check to the stakes (a one-line copy tweak is not a test-suite ceremony). Don't dodge it with synonyms; equally, don't inflate it into a tax on the word "done" or a reason to keep re-proving instead of shipping the working thing.
20
20
 
21
21
  ## The Iron Law
22
22
 
@@ -57,7 +57,7 @@ Skip any step = lying, not verifying
57
57
  ## Red Flags - STOP
58
58
 
59
59
  - Using "should", "probably", "seems to"
60
- - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
60
+ - Claiming a specific result is *proven* ("tests pass", "it's fixed", "build's green") before running the check in this message — enthusiasm itself is fine; an unverified **result claim** is the flag
61
61
  - About to commit/push/PR without verification
62
62
  - Trusting agent success reports
63
63
  - Relying on partial verification
@@ -110,6 +110,16 @@ Skip any step = lying, not verifying
110
110
  ❌ Trust agent report
111
111
  ```
112
112
 
113
+ ## When the check itself lies — content over shape
114
+
115
+ Running a verification is necessary but not sufficient: a check can exit clean and still prove nothing. These are the named ways a green check lies — the failure siblings behind "evidence before claims." (Deeper treatment of *what* you verify against: `reference-first-verification`.)
116
+
117
+ - **Assert on CONTENT, never shape or count.** Output that *looks* like success — a non-zero count, a clean exit, no error text — can carry failure as its content. Before trusting a check, ask what its output looks like *when it fails*: if failure and success are indistinguishable at a glance, the check proves nothing. (`[1 lines]` and `No matches found` both read as "a match" to a line-count.)
118
+ - **Compare the returned value to the value you PASSED — never to a description of it.** A confident label (`evidenceRef NOW SET:` printed above the untouched original) is indistinguishable from a verification in a transcript. Diff the actual result against your actual input, not against a claim about it.
119
+ - **Find the untested axis.** Thorough coverage of ONE axis reads as thorough coverage overall. Ask what every one of your tests shares — a healthy manifest, a default option value, the happy path — and treat that shared assumption as the dimension you never tested. (A 15-case "exhaustive" harness whose only defect lived on the one axis every case held constant.)
120
+ - **A syntax check proves parseability and nothing else.** A clean `node --check` / lint / parse pass is the *covered* axis; boot and runtime are the untested one. Parseable ≠ sound.
121
+ - **A failure whose shape is a HANG reports nothing.** A bare `await` against a stated deadline that never re-checks cannot fail loudly. Race it against a timer so failure has a shape you can see.
122
+
113
123
  ## Why This Matters
114
124
 
115
125
  From 24 failure memories:
@@ -47,6 +47,6 @@ Watch upstream for:
47
47
  When upstream changes:
48
48
 
49
49
  1. Pull non-conflicting changes into the OpenRig copy.
50
- 2. Preserve the `docs/plans/` save path and the absence of the Scope Check + File Structure sections unless founder direction reverses.
50
+ 2. Preserve the `docs/plans/` save path and the absence of the Scope Check + File Structure sections unless operator direction reverses.
51
51
  3. Re-check that the subagent-driven-development pointer hasn't crept back in.
52
52
  4. Bump `last_upstream_check` in `SKILL.md` frontmatter.
@@ -18,4 +18,4 @@ Ship features that solve real customer problems with evidence-backed requirement
18
18
 
19
19
  ## Mission/slice tracking (the SDLC)
20
20
 
21
- Requirements and delivery are tracked as missions and slices — on-disk markdown the Living Notes UI projects. Load the packaged `mission-slice-sop` skill; the conventions live in `docs/reference/sdlc-conventions.md` (shipped with the CLI package). PM's leg of the flow: record intent verbatim, author the mini-requirements (the one-glance tier where approval starts) + the proof contract (promised deliverables as observable outcomes; UI deliverables name their planned mockup), then plan-lock with `rig scope slice approve --scope spec`. Proof-lock (`--scope delivery`) is the terminal sign-off after QA's visual compare and `rig proof add … --media` drops (the C1 drop verb).
21
+ Requirements and delivery are tracked as missions and slices — on-disk markdown the Living Notes UI projects. Load the packaged `mission-slice-sop` skill; the conventions live in `docs/reference/sdlc-conventions.md` (installed: `$OPENRIG_HOME/reference/sdlc-conventions.md`; shipped with the CLI package). PM's leg of the flow: record intent verbatim, author the mini-requirements (the one-glance tier where approval starts) + the proof contract (promised deliverables as observable outcomes; UI deliverables name their planned mockup), then plan-lock with `rig scope slice approve --scope spec`. Proof-lock (`--scope delivery`) is the terminal sign-off after QA's visual compare and `rig proof add … --media` drops (the C1 drop verb).
@@ -11,10 +11,10 @@ imports:
11
11
  profiles:
12
12
  default:
13
13
  uses:
14
- skills: [openrig-user, openrig-architect, brainstorming, requirements-writer]
14
+ skills: [openrig-architect, brainstorming, requirements-writer]
15
15
  guidance: [role]
16
16
  subagents: []
17
- plugins: []
17
+ plugins: [shared:openrig-core]
18
18
  runtime_resources: [shared:claude-default-settings, shared:claude-default-mcp, shared:codex-default-config]
19
19
 
20
20
  resources:
@@ -35,10 +35,11 @@ hand off.
35
35
 
36
36
  Long advising sessions hit context limits. The discipline is
37
37
  externalize-state-to-durable-substrate, not in-context recall:
38
- recover identity via `rig whoami --json`; recover recent peer
39
- context via `rig transcript <session> --tail` / `--grep`; recover
40
- in-flight work via `rig queue list --as <me>`. Hand off load-bearing
41
- decisions to the queue so a fresh-context advisor can pick them up.
38
+ recover identity via `rig whoami --json`; recover in-flight work from
39
+ restore maps, current `MISSION_NOTES.md`, and owned queue items. Use
40
+ `rig transcript <session> --tail` / `--grep` only as a secondary check;
41
+ little or no output does not prove the session was quiet. Hand off
42
+ load-bearing decisions to the queue so a fresh-context advisor can pick them up.
42
43
  If the operator has installed a richer compaction-survival skill on
43
44
  this host (substrate skill path or `~/.openrig/skills/`), load it
44
45
  for more detail.
@@ -11,10 +11,10 @@ imports:
11
11
  profiles:
12
12
  default:
13
13
  uses:
14
- skills: [openrig-user, openrig-operator, rig-lifecycle, systematic-debugging, verification-before-completion, openrig-installer]
14
+ skills: [rig-lifecycle, openrig-upgrade, systematic-debugging, verification-before-completion]
15
15
  guidance: [role]
16
16
  subagents: []
17
- plugins: []
17
+ plugins: [shared:openrig-core]
18
18
  runtime_resources: [shared:claude-default-settings, shared:claude-default-mcp, shared:codex-default-config]
19
19
 
20
20
  resources:
@@ -18,11 +18,9 @@ with them and escalate to them when ops decisions need human approval.
18
18
  4. Confirm healthy via `rig ps --nodes --rig <name>`.
19
19
  - Inspect topology, transcript, attention queue state, mission
20
20
  control views.
21
- - Shepherd install / upgrade / migration ceremonies. The
22
- `openrig-installer` skill is your reference for the V0.3.1
23
- upgrade flow (which includes the substrate-kernel → daemon-managed
24
- kernel migration as a one-time ceremony — see openrig-installer
25
- for the canonical steps).
21
+ - Shepherd current install and upgrade work. Use the `openrig-upgrade`
22
+ skill for the supported upgrade path and verify the resulting daemon
23
+ and rig health before declaring the operation complete.
26
24
 
27
25
  ## What you do NOT do
28
26
 
@@ -11,10 +11,10 @@ imports:
11
11
  profiles:
12
12
  default:
13
13
  uses:
14
- skills: [openrig-user]
14
+ skills: []
15
15
  guidance: [role]
16
16
  subagents: []
17
- plugins: []
17
+ plugins: [shared:openrig-core]
18
18
  runtime_resources: [shared:claude-default-settings, shared:claude-default-mcp, shared:codex-default-config]
19
19
 
20
20
  resources:
@@ -46,10 +46,9 @@ machine and have things happen.
46
46
  and surfaces a 3-part error (fact / reason / fix) per the
47
47
  building-agent-software skill discipline. No best-effort
48
48
  half-booted state.
49
- - **Migration ceremony is part of the upgrade.** V0.3.1 ships the
50
- kernel as a daemon-managed built-in; operators with a pre-existing
51
- substrate-rooted kernel migrate as a one-time step during the
52
- V0.3.1 install (openrig-installer skill walks this).
49
+ - **Use the current upgrade path.** The operator loads `openrig-upgrade`,
50
+ follows the supported migration guidance for the installed version,
51
+ and verifies daemon plus rig health before closing the operation.
53
52
  - **Skills earn their slot.** Each agent loads a lean roster at
54
53
  startup (per HOST-TOPOLOGY §4.10); the rest are reachable on demand
55
54
  via find-skills.
@@ -138,4 +138,4 @@ This is the advanced product-team lane. Use it when the work needs richer coordi
138
138
 
139
139
  ## Mission/slice tracking (the SDLC)
140
140
 
141
- Work is tracked as missions and slices — on-disk markdown the Living Notes UI projects. Load the packaged `mission-slice-sop` skill before authoring or building a slice; the conventions (section names, proof contract, the two locks, C1 proof headers) live in `docs/reference/sdlc-conventions.md` (shipped with the CLI package). The short form: record intent → author mini-requirements + a proof contract (→ mockups for UI slices) → plan-lock (`rig scope slice approve --scope spec`) → build the locked set → QA visually compares planned vs delivered → `rig proof add … --evidences --media` drops (the C1 drop verb — never hand-place evidence) → proof-lock (`--scope delivery`). `rig scope audit` is the advisory backstop — fix the flag, don't suppress it.
141
+ Work is tracked as missions and slices — on-disk markdown the Living Notes UI projects. Load the packaged `mission-slice-sop` skill before authoring or building a slice; the conventions (section names, proof contract, the two locks, C1 proof headers) live in `docs/reference/sdlc-conventions.md` (installed: `$OPENRIG_HOME/reference/sdlc-conventions.md`; shipped with the CLI package). The short form: record intent → author mini-requirements + a proof contract (→ mockups for UI slices) → plan-lock (`rig scope slice approve --scope spec`) → build the locked set → QA visually compares planned vs delivered → `rig proof add … --evidences --media` drops (the C1 drop verb — never hand-place evidence) → proof-lock (`--scope delivery`). `rig scope audit` is the advisory backstop — fix the flag, don't suppress it.
@@ -1 +1 @@
1
- {"version":3,"file":"bin-wrapper.d.ts","sourceRoot":"","sources":["../src/bin-wrapper.ts"],"names":[],"mappings":";AASA,wBAAgB,eAAe,CAAC,WAAW,qBAAkB,EAAE,SAAS,SAAkB,GAAG,MAAM,CAIlG;AAED,wBAAgB,WAAW,CAAC,KAAK,qBAAkB,EAAE,SAAS,SAAkB,GAAG,OAAO,CAOzF;AAED,wBAAgB,uBAAuB,CACrC,eAAe,SAAmB,EAClC,WAAW,qBAAkB,EAC7B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,MAAM,GAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAoB,EACnD,QAAQ,GAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAqB,GACrD,MAAM,GAAG,IAAI,CAiBf;AAsBD,wBAAsB,GAAG,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAS5D"}
1
+ {"version":3,"file":"bin-wrapper.d.ts","sourceRoot":"","sources":["../src/bin-wrapper.ts"],"names":[],"mappings":";AASA,wBAAgB,eAAe,CAAC,WAAW,qBAAkB,EAAE,SAAS,SAAkB,GAAG,MAAM,CAIlG;AAED,wBAAgB,WAAW,CAAC,KAAK,qBAAkB,EAAE,SAAS,SAAkB,GAAG,OAAO,CAOzF;AAED,wBAAgB,uBAAuB,CACrC,eAAe,SAAmB,EAClC,WAAW,qBAAkB,EAC7B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,MAAM,GAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAoB,EACnD,QAAQ,GAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAqB,GACrD,MAAM,GAAG,IAAI,CAiBf;AAsBD,wBAAsB,GAAG,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAc5D"}
@@ -63,7 +63,9 @@ export async function run(argv = process.argv) {
63
63
  }
64
64
  const entryUrl = pathToFileURL(resolveBinEntry(normalizedArgv[1], import.meta.url)).href;
65
65
  const mod = await import(entryUrl);
66
- await mod.createProgram().parseAsync(normalizedArgv);
66
+ // Slice 15: run through the shared error path so `--json` failures emit a JSON
67
+ // error object with a nonzero exit instead of plain Commander text.
68
+ await mod.runProgram(mod.createProgram(), normalizedArgv);
67
69
  }
68
70
  if (isDirectRun()) {
69
71
  maybeReexecWithSiblingNode(process.argv);
@@ -1 +1 @@
1
- {"version":3,"file":"bin-wrapper.js","sourceRoot":"","sources":["../src/bin-wrapper.ts"],"names":[],"mappings":";AAEA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,UAAU,eAAe,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;IACxF,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;IACrG,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;IAClE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,WAAW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AoE;IACpE,MAAM,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,cAAc,CAAC,CAAC;AAC5D,CAAC;AAED,IAAI,WAAW,EAAE,EAAE,CAAC;IAClB,0BAA0B,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  // GENERATED by scripts/build-package.sh — the packaged build-identity stamp.
2
2
  export const BUILD_INFO = {
3
- semver: "0.4.6",
4
- commit: "8250d702a27aa24bb9acf0b4bef12f58fd83df12",
3
+ semver: "0.4.7",
4
+ commit: "f81018fbb9b889f53a1660d832b330d7d14f6c8f",
5
5
  dirty: false,
6
- builtAt: "2026-07-09T22:59:04Z",
6
+ builtAt: "2026-08-03T07:16:39Z",
7
7
  };
8
8
  export function stampFields(info = BUILD_INFO) {
9
9
  if (!info.commit) return {};
@@ -0,0 +1,33 @@
1
+ import type { Command } from "commander";
2
+ /**
3
+ * Commander option parser — a positive integer (>= 1). Rejects negative, zero,
4
+ * and non-numeric values (finding 4). Throws InvalidArgumentError, which the
5
+ * shared error path (below) renders as a JSON error under `--json`.
6
+ */
7
+ export declare function positiveIntArg(value: string): number;
8
+ /** Commander option parser factory — the value must be one of `allowed` (finding 3). */
9
+ export declare function enumArg(allowed: readonly string[]): (value: string) => string;
10
+ /** True when the invocation requested machine output (`--json` or `-o/--output/--format json`). */
11
+ export declare function wantsJsonOutput(argv: readonly string[]): boolean;
12
+ /** Commander's non-error terminations (help/version) — exit cleanly, no error object. */
13
+ export declare function isCleanCommanderExit(err: unknown): boolean;
14
+ export declare function formatCliError(err: unknown): {
15
+ ok: false;
16
+ error: {
17
+ code: string;
18
+ message: string;
19
+ };
20
+ };
21
+ /** Recursively give every command exitOverride so parse errors throw instead of exiting. */
22
+ export declare function applyExitOverride(program: Command): void;
23
+ export interface RunProgramIo {
24
+ out?: (line: string) => void;
25
+ err?: (line: string) => void;
26
+ exit?: (code: number) => void;
27
+ }
28
+ /**
29
+ * Parse+run the program through the shared error path. Injectable IO for tests.
30
+ * Returns the process exit code (0 on success / clean help/version).
31
+ */
32
+ export declare function runProgram(program: Command, argv: string[], io?: RunProgramIo): Promise<number>;
33
+ //# sourceMappingURL=cli-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-error.d.ts","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED,wFAAwF;AACxF,wBAAgB,OAAO,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAO7E;AAED,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAQhE;AAQD,yFAAyF;AACzF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAQ1D;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAIpG;AAED,4FAA4F;AAC5F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAMxD;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,YAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BzG"}
@@ -0,0 +1,94 @@
1
+ import { InvalidArgumentError } from "commander";
2
+ /**
3
+ * Commander option parser — a positive integer (>= 1). Rejects negative, zero,
4
+ * and non-numeric values (finding 4). Throws InvalidArgumentError, which the
5
+ * shared error path (below) renders as a JSON error under `--json`.
6
+ */
7
+ export function positiveIntArg(value) {
8
+ const n = Number(value);
9
+ if (!Number.isInteger(n) || n < 1) {
10
+ throw new InvalidArgumentError(`must be a positive integer (>= 1); got '${value}'`);
11
+ }
12
+ return n;
13
+ }
14
+ /** Commander option parser factory — the value must be one of `allowed` (finding 3). */
15
+ export function enumArg(allowed) {
16
+ return (value) => {
17
+ if (!allowed.includes(value)) {
18
+ throw new InvalidArgumentError(`must be one of: ${allowed.join(", ")}; got '${value}'`);
19
+ }
20
+ return value;
21
+ };
22
+ }
23
+ /** True when the invocation requested machine output (`--json` or `-o/--output/--format json`). */
24
+ export function wantsJsonOutput(argv) {
25
+ for (let i = 0; i < argv.length; i++) {
26
+ const a = argv[i];
27
+ if (a === "--json")
28
+ return true;
29
+ if ((a === "-o" || a === "--output" || a === "--format") && argv[i + 1] === "json")
30
+ return true;
31
+ if (/^(?:-o|--output|--format)=json$/.test(a))
32
+ return true;
33
+ }
34
+ return false;
35
+ }
36
+ /** Commander's non-error terminations (help/version) — exit cleanly, no error object. */
37
+ export function isCleanCommanderExit(err) {
38
+ const e = err;
39
+ return (e?.code === "commander.helpDisplayed" ||
40
+ e?.code === "commander.version" ||
41
+ e?.code === "commander.help" ||
42
+ (typeof e?.exitCode === "number" && e.exitCode === 0));
43
+ }
44
+ export function formatCliError(err) {
45
+ const e = err;
46
+ const message = (e?.message ?? String(err)).replace(/^error:\s*/i, "").trim();
47
+ return { ok: false, error: { code: e?.code ?? "cli_error", message } };
48
+ }
49
+ /** Recursively give every command exitOverride so parse errors throw instead of exiting. */
50
+ export function applyExitOverride(program) {
51
+ const walk = (cmd) => {
52
+ cmd.exitOverride();
53
+ for (const sub of cmd.commands)
54
+ walk(sub);
55
+ };
56
+ walk(program);
57
+ }
58
+ /**
59
+ * Parse+run the program through the shared error path. Injectable IO for tests.
60
+ * Returns the process exit code (0 on success / clean help/version).
61
+ */
62
+ export async function runProgram(program, argv, io = {}) {
63
+ const out = io.out ?? ((l) => process.stdout.write(l + "\n"));
64
+ const err = io.err ?? ((l) => process.stderr.write(l + "\n"));
65
+ const exit = io.exit ?? ((c) => process.exit(c));
66
+ const json = wantsJsonOutput(argv.slice(2));
67
+ applyExitOverride(program);
68
+ // Suppress Commander's own plain-text stderr write when JSON was requested, so a
69
+ // `--json` failure emits ONLY the JSON error object (below). Non-JSON keeps the
70
+ // familiar stderr text. Applied to the whole command tree.
71
+ const suppressErr = (cmd) => {
72
+ cmd.configureOutput({ writeErr: (str) => { if (!json)
73
+ err(str.replace(/\n$/, "")); } });
74
+ for (const sub of cmd.commands)
75
+ suppressErr(sub);
76
+ };
77
+ suppressErr(program);
78
+ try {
79
+ await program.parseAsync(argv);
80
+ return 0;
81
+ }
82
+ catch (e) {
83
+ if (isCleanCommanderExit(e))
84
+ return 0;
85
+ const code = e?.exitCode ?? 1;
86
+ if (json) {
87
+ out(JSON.stringify(formatCliError(e)));
88
+ }
89
+ // (non-JSON plain text was already emitted via configureOutput.writeErr above)
90
+ exit(code || 1);
91
+ return code || 1;
92
+ }
93
+ }
94
+ //# sourceMappingURL=cli-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-error.js","sourceRoot":"","sources":["../src/cli-error.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,I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,7 @@ ${slice.objective}
474
474
  - [ ] Queue items include enough body or tag context to link back to \`${slice.id}\`.
475
475
  - [ ] Proof artifacts are referenced from the slice before closure (drop via \`rig proof add\`).
476
476
 
477
- > Conventions SSOT: \`docs/reference/sdlc-conventions.md\` — section names, proof-contract format, the two locks, C1 headers. For a small slice the mini-requirements may BE the whole PRD.
477
+ > Conventions SSOT: \`docs/reference/sdlc-conventions.md (installed: $OPENRIG_HOME/reference/sdlc-conventions.md)\` — section names, proof-contract format, the two locks, C1 headers. For a small slice the mini-requirements may BE the whole PRD.
478
478
  `;
479
479
  }
480
480
  export function workspaceScaffoldDirs() {
@@ -12,7 +12,7 @@ export interface DoctorDeps {
12
12
  baseDir: string;
13
13
  readFile: (path: string) => string | null;
14
14
  exec: (cmd: string) => string;
15
- checkPort: (port: number) => Promise<boolean>;
15
+ checkPort: (port: number, host: string) => Promise<boolean>;
16
16
  configStore: Pick<ConfigStore, "resolve">;
17
17
  platform?: NodeJS.Platform;
18
18
  mkdirp?: (path: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAUjD,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;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const DEFAULT_PORT = 7433;
13
- function defaultCheckPort(port) {
13
+ function defaultCheckPort(port, host) {
14
14
  return new Promise((resolve) => {
15
15
  const socket = new net.Socket();
16
16
  socket.setTimeout(1000);
17
17
  socket.on("connect", () => { socket.destroy(); resolve(false); });
18
18
  socket.on("error", () => { socket.destroy(); resolve(true); });
19
19
  socket.on("timeout", () => { socket.destroy(); resolve(true); });
20
- socket.connect(port, "127.0.0.1");
20
+ socket.connect(port, host);
21
21
  });
22
22
  }
23
23
  export function runDoctorChecks(deps) {
@@ -163,26 +163,32 @@ export function runDoctorChecks(deps) {
163
163
  reason: writableCheck.reason,
164
164
  fix: writableCheck.fix,
165
165
  });
166
- // 7. Port availability (async) — daemon already running on that port counts as OK
166
+ // 7. Port availability (async) — daemon already running on that port counts as OK.
167
+ // OPR.0.4.7 slice-05 item-4b: resolve the daemon host+port ONCE from config and use
168
+ // BOTH for checkPort, healthz, the cmux URL, and messages (a daemon on a non-default
169
+ // configured host/port must not be reported missing). Defaults stay 127.0.0.1:7433.
170
+ const daemonHost = config.daemon.host ?? "127.0.0.1";
171
+ const daemonPort = config.daemon.port ?? DEFAULT_PORT;
172
+ const daemonBase = `http://${daemonHost}:${daemonPort}`;
167
173
  const fetchFn = deps.fetch ?? globalThis.fetch;
168
- const portCheck = deps.checkPort(DEFAULT_PORT).then(async (available) => {
174
+ const portCheck = deps.checkPort(daemonPort, daemonHost).then(async (available) => {
169
175
  if (available) {
170
- return { name: "port", status: "pass", message: `Port ${DEFAULT_PORT} available.` };
176
+ return { name: "port", status: "pass", message: `Port ${daemonHost}:${daemonPort} available.` };
171
177
  }
172
178
  // Port in use — check if it's our daemon via healthz
173
179
  try {
174
- const res = await fetchFn(`http://127.0.0.1:${DEFAULT_PORT}/healthz`);
180
+ const res = await fetchFn(`${daemonBase}/healthz`);
175
181
  if (res.ok) {
176
- return { name: "port", status: "pass", message: `Port ${DEFAULT_PORT} in use by OpenRig daemon.` };
182
+ return { name: "port", status: "pass", message: `Port ${daemonHost}:${daemonPort} in use by OpenRig daemon.` };
177
183
  }
178
184
  }
179
185
  catch { /* not our daemon */ }
180
186
  return {
181
187
  name: "port",
182
188
  status: "fail",
183
- message: `Port ${DEFAULT_PORT} is in use by another process.`,
189
+ message: `Port ${daemonHost}:${daemonPort} is in use by another process.`,
184
190
  reason: "The daemon needs this port to serve the API and UI.",
185
- fix: `Stop the process using port ${DEFAULT_PORT}, or start the daemon on a different port with: rig daemon start --port <port>`,
191
+ fix: `Stop the process using port ${daemonPort}, or start the daemon on a different port with: rig daemon start --port <port>`,
186
192
  };
187
193
  });
188
194
  // 8. Daemon cmux control (async, only when shell cmux passed)
@@ -190,7 +196,7 @@ export function runDoctorChecks(deps) {
190
196
  if (shellCmuxPassed) {
191
197
  const daemonCmuxCheck = (async () => {
192
198
  try {
193
- const healthRes = await fetchFn(`http://127.0.0.1:${DEFAULT_PORT}/healthz`);
199
+ const healthRes = await fetchFn(`${daemonBase}/healthz`);
194
200
  if (!healthRes.ok) {
195
201
  return { name: "cmux_daemon", status: "skipped", message: "Daemon not running. Skipping daemon cmux check." };
196
202
  }
@@ -199,7 +205,7 @@ export function runDoctorChecks(deps) {
199
205
  return { name: "cmux_daemon", status: "skipped", message: "Daemon not reachable. Skipping daemon cmux check." };
200
206
  }
201
207
  try {
202
- const cmuxRes = await fetchFn(`http://127.0.0.1:${DEFAULT_PORT}/api/adapters/cmux/status`);
208
+ const cmuxRes = await fetchFn(`${daemonBase}/api/adapters/cmux/status`);
203
209
  if (cmuxRes.ok && cmuxRes.json) {
204
210
  const data = (await cmuxRes.json());
205
211
  if (data.available) {