@openrig/cli 0.5.1 → 0.5.3

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 (859) hide show
  1. package/daemon/assets/guidance/openrig-start.md +21 -64
  2. package/daemon/assets/plugins/openrig-core/hooks/claude.json +36 -0
  3. package/daemon/assets/plugins/openrig-core/hooks/codex.json +27 -0
  4. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +132 -0
  5. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +35 -3
  6. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +8 -95
  7. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +63 -20
  8. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +6 -2
  9. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +28 -2
  10. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +42 -52
  11. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +23 -1
  12. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -2
  13. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
  14. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +235 -0
  15. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +31 -1
  16. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
  17. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +211 -0
  18. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +8 -0
  19. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +28 -1
  20. package/daemon/context-packs/skills/core/agent-starters/SKILL.md +132 -0
  21. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +9 -0
  22. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +112 -0
  23. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +9 -0
  24. package/daemon/context-packs/skills/core/attention-queue/SKILL.md +264 -0
  25. package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +9 -0
  26. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +195 -0
  27. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +9 -0
  28. package/daemon/context-packs/skills/core/human-in-the-loop/SKILL.md +104 -0
  29. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +9 -0
  30. package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +378 -0
  31. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +9 -0
  32. package/daemon/context-packs/skills/core/openrig-cmux/SKILL.md +81 -0
  33. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +9 -0
  34. package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +153 -0
  35. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +9 -0
  36. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +460 -0
  37. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -0
  38. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
  39. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +9 -0
  40. package/daemon/context-packs/skills/core/rig-lifecycle/SKILL.md +127 -0
  41. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +9 -0
  42. package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +160 -0
  43. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +9 -0
  44. package/daemon/context-packs/skills/core/specification-system/SKILL.md +103 -0
  45. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +9 -0
  46. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
  47. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +9 -0
  48. package/daemon/context-packs/skills/core/watchdog/SKILL.md +126 -0
  49. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +9 -0
  50. package/daemon/context-packs/skills/pm/backlog-capture/SKILL.md +43 -0
  51. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +9 -0
  52. package/daemon/context-packs/skills/pm/context-builder/SKILL.md +87 -0
  53. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +9 -0
  54. package/daemon/context-packs/skills/pm/exec-summary/SKILL.md +84 -0
  55. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +9 -0
  56. package/daemon/context-packs/skills/pm/office-hours/SKILL.md +129 -0
  57. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +9 -0
  58. package/daemon/context-packs/skills/pm/plan-review/SKILL.md +98 -0
  59. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +9 -0
  60. package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +113 -0
  61. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +9 -0
  62. package/daemon/context-packs/skills/pm/ui-mockup/SKILL.md +76 -0
  63. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +9 -0
  64. package/daemon/context-packs/skills/pods/development-team/SKILL.md +156 -0
  65. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +9 -0
  66. package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +307 -0
  67. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +9 -0
  68. package/daemon/context-packs/skills/pods/oversight-team/SKILL.md +106 -0
  69. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +9 -0
  70. package/daemon/context-packs/skills/pods/review-team/SKILL.md +213 -0
  71. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +9 -0
  72. package/daemon/context-packs/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
  73. package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +40 -0
  74. package/daemon/context-packs/skills/process/agent-browser/SKILL.md +427 -0
  75. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +13 -0
  76. package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +48 -0
  77. package/daemon/context-packs/skills/process/brainstorming/SKILL.md +107 -0
  78. package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +11 -0
  79. package/daemon/context-packs/skills/process/context-engineering/SKILL.md +479 -0
  80. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +9 -0
  81. package/daemon/context-packs/skills/process/dogfood/SKILL.md +225 -0
  82. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +13 -0
  83. package/daemon/context-packs/skills/process/dogfood/references/issue-taxonomy.md +109 -0
  84. package/daemon/context-packs/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
  85. package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +56 -0
  86. package/daemon/context-packs/skills/process/executing-plans/SKILL.md +94 -0
  87. package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +11 -0
  88. package/daemon/context-packs/skills/process/frontend-design/LICENSE.txt +177 -0
  89. package/daemon/context-packs/skills/process/frontend-design/SKILL.md +50 -0
  90. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +11 -0
  91. package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +301 -0
  92. package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
  93. package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
  94. package/daemon/context-packs/skills/process/systematic-debugging/defense-in-depth.md +122 -0
  95. package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +63 -0
  96. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +19 -0
  97. package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
  98. package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +385 -0
  99. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +11 -0
  100. package/daemon/context-packs/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
  101. package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +48 -0
  102. package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +106 -0
  103. package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +11 -0
  104. package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +155 -0
  105. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +9 -0
  106. package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +52 -0
  107. package/daemon/context-packs/skills/process/writing-plans/SKILL.md +126 -0
  108. package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +11 -0
  109. package/daemon/context-packs/world/install/01-world-from-primitives.md +97 -0
  110. package/daemon/context-packs/world/install/02-permission-self-sleep.md +141 -0
  111. package/daemon/context-packs/world/install/03-what-this-is-for.md +86 -0
  112. package/daemon/context-packs/world/install/04-ontology.md +790 -0
  113. package/daemon/context-packs/world/install/05-harness-power-use.md +355 -0
  114. package/daemon/context-packs/world/install/06-a-competent-turn.md +225 -0
  115. package/daemon/context-packs/world/install/manifest.yaml +125 -0
  116. package/daemon/context-packs/world/install/reference-material.md +125 -0
  117. package/daemon/context-packs/world/install/what-you-can-do.md +416 -0
  118. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  119. package/daemon/dist/adapters/claude-code-adapter.js +7 -4
  120. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  121. package/daemon/dist/adapters/claude-resume.js +2 -2
  122. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  123. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -2
  124. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  125. package/daemon/dist/adapters/codex-runtime-adapter.js +18 -10
  126. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  127. package/daemon/dist/adapters/tmux.d.ts +10 -2
  128. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  129. package/daemon/dist/adapters/tmux.js +27 -7
  130. package/daemon/dist/adapters/tmux.js.map +1 -1
  131. package/daemon/dist/adapters/yolo-mode.d.ts +18 -0
  132. package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
  133. package/daemon/dist/adapters/yolo-mode.js +21 -0
  134. package/daemon/dist/adapters/yolo-mode.js.map +1 -1
  135. package/daemon/dist/build-info.js +3 -3
  136. package/daemon/dist/domain/codex-thread-id.d.ts +100 -2
  137. package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  138. package/daemon/dist/domain/codex-thread-id.js +180 -6
  139. package/daemon/dist/domain/codex-thread-id.js.map +1 -1
  140. package/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
  141. package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  142. package/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
  143. package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  144. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  145. package/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
  146. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  147. package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
  148. package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
  149. package/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
  150. package/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
  151. package/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
  152. package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
  153. package/daemon/dist/domain/context-packs/profile-composer.js +125 -0
  154. package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
  155. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
  156. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
  157. package/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
  158. package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
  159. package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
  160. package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
  161. package/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
  162. package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
  163. package/daemon/dist/domain/crash-cart-conductor.d.ts +173 -0
  164. package/daemon/dist/domain/crash-cart-conductor.d.ts.map +1 -0
  165. package/daemon/dist/domain/crash-cart-conductor.js +233 -0
  166. package/daemon/dist/domain/crash-cart-conductor.js.map +1 -0
  167. package/daemon/dist/domain/crash-cart-probes.d.ts +7 -6
  168. package/daemon/dist/domain/crash-cart-probes.d.ts.map +1 -1
  169. package/daemon/dist/domain/crash-cart-probes.js +57 -7
  170. package/daemon/dist/domain/crash-cart-probes.js.map +1 -1
  171. package/daemon/dist/domain/hosts/fanout-contract.d.ts +4 -0
  172. package/daemon/dist/domain/hosts/fanout-contract.d.ts.map +1 -1
  173. package/daemon/dist/domain/hosts/fanout-contract.js +15 -0
  174. package/daemon/dist/domain/hosts/fanout-contract.js.map +1 -1
  175. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +11 -0
  176. package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
  177. package/daemon/dist/domain/hosts/hosts-registry-reader.js +34 -1
  178. package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
  179. package/daemon/dist/domain/markdown-address.d.ts +56 -0
  180. package/daemon/dist/domain/markdown-address.d.ts.map +1 -0
  181. package/daemon/dist/domain/markdown-address.js +188 -0
  182. package/daemon/dist/domain/markdown-address.js.map +1 -0
  183. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +73 -0
  184. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -0
  185. package/daemon/dist/domain/model-divergence/current-generation-record.js +204 -0
  186. package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -0
  187. package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +13 -0
  188. package/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -0
  189. package/daemon/dist/domain/model-divergence/effective-model-readers.js +163 -0
  190. package/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -0
  191. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +125 -0
  192. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -0
  193. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +199 -0
  194. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -0
  195. package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
  196. package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
  197. package/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
  198. package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
  199. package/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
  200. package/daemon/dist/domain/permission-drift-observer.js +6 -1
  201. package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
  202. package/daemon/dist/domain/predecessor-recap-resolver.d.ts +10 -3
  203. package/daemon/dist/domain/predecessor-recap-resolver.d.ts.map +1 -1
  204. package/daemon/dist/domain/predecessor-recap-resolver.js +61 -14
  205. package/daemon/dist/domain/predecessor-recap-resolver.js.map +1 -1
  206. package/daemon/dist/domain/process-census.d.ts +25 -0
  207. package/daemon/dist/domain/process-census.d.ts.map +1 -0
  208. package/daemon/dist/domain/process-census.js +47 -0
  209. package/daemon/dist/domain/process-census.js.map +1 -0
  210. package/daemon/dist/domain/resume-metadata-refresher.d.ts +41 -3
  211. package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  212. package/daemon/dist/domain/resume-metadata-refresher.js +74 -31
  213. package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  214. package/daemon/dist/domain/review/compose.d.ts +5 -26
  215. package/daemon/dist/domain/review/compose.d.ts.map +1 -1
  216. package/daemon/dist/domain/review/compose.js +31 -57
  217. package/daemon/dist/domain/review/compose.js.map +1 -1
  218. package/daemon/dist/domain/review/gather.d.ts.map +1 -1
  219. package/daemon/dist/domain/review/gather.js +3 -2
  220. package/daemon/dist/domain/review/gather.js.map +1 -1
  221. package/daemon/dist/domain/{rig-policy/rig-policy-defaults.d.ts → rig-mode/rig-mode-defaults.d.ts} +2 -2
  222. package/daemon/dist/domain/rig-mode/rig-mode-defaults.d.ts.map +1 -0
  223. package/daemon/dist/domain/{rig-policy/rig-policy-defaults.js → rig-mode/rig-mode-defaults.js} +1 -1
  224. package/daemon/dist/domain/rig-mode/rig-mode-defaults.js.map +1 -0
  225. package/{node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-store.d.ts → daemon/dist/domain/rig-mode/rig-mode-store.d.ts} +6 -6
  226. package/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -0
  227. package/daemon/dist/domain/{rig-policy/rig-policy-store.js → rig-mode/rig-mode-store.js} +5 -5
  228. package/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -0
  229. package/daemon/dist/domain/{rig-policy/rig-policy-types.d.ts → rig-mode/rig-mode-types.d.ts} +1 -1
  230. package/daemon/dist/domain/rig-mode/rig-mode-types.d.ts.map +1 -0
  231. package/{node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-types.js → daemon/dist/domain/rig-mode/rig-mode-types.js} +1 -1
  232. package/daemon/dist/domain/rig-mode/rig-mode-types.js.map +1 -0
  233. package/{node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts → daemon/dist/domain/rig-mode/rig-mode-validator.d.ts} +2 -2
  234. package/daemon/dist/domain/rig-mode/rig-mode-validator.d.ts.map +1 -0
  235. package/daemon/dist/domain/{rig-policy/rig-policy-validator.js → rig-mode/rig-mode-validator.js} +3 -3
  236. package/daemon/dist/domain/rig-mode/rig-mode-validator.js.map +1 -0
  237. package/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
  238. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  239. package/daemon/dist/domain/rigspec-instantiator.js +39 -0
  240. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  241. package/daemon/dist/domain/rigspec-schema.d.ts +7 -0
  242. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  243. package/daemon/dist/domain/rigspec-schema.js +25 -2
  244. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  245. package/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
  246. package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
  247. package/daemon/dist/domain/scope/logical-checkbox.js +65 -0
  248. package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
  249. package/daemon/dist/domain/scope/node-file.d.ts +37 -0
  250. package/daemon/dist/domain/scope/node-file.d.ts.map +1 -0
  251. package/daemon/dist/domain/scope/node-file.js +55 -0
  252. package/daemon/dist/domain/scope/node-file.js.map +1 -0
  253. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +12 -1
  254. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
  255. package/daemon/dist/domain/scope/plan-lock-artifacts.js +42 -2
  256. package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
  257. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
  258. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
  259. package/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
  260. package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
  261. package/daemon/dist/domain/scope/scope-approve.d.ts +4 -0
  262. package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
  263. package/daemon/dist/domain/scope/scope-approve.js +56 -7
  264. package/daemon/dist/domain/scope/scope-approve.js.map +1 -1
  265. package/daemon/dist/domain/scope/scope-audit.d.ts +1 -1
  266. package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  267. package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  268. package/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
  269. package/daemon/dist/domain/scope/scope-view-projection.js +5 -2
  270. package/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
  271. package/daemon/dist/domain/seat-activity-service.d.ts +1 -0
  272. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  273. package/daemon/dist/domain/seat-activity-service.js +39 -23
  274. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  275. package/daemon/dist/domain/seat-handover-service.d.ts +54 -15
  276. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  277. package/daemon/dist/domain/seat-handover-service.js +74 -19
  278. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  279. package/daemon/dist/domain/seat-identity-reconciler.d.ts +17 -0
  280. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  281. package/daemon/dist/domain/seat-identity-reconciler.js +22 -0
  282. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  283. package/daemon/dist/domain/session-jsonl.js +1 -1
  284. package/daemon/dist/domain/session-jsonl.js.map +1 -1
  285. package/daemon/dist/domain/session-transport.d.ts +8 -0
  286. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  287. package/daemon/dist/domain/session-transport.js +116 -0
  288. package/daemon/dist/domain/session-transport.js.map +1 -1
  289. package/daemon/dist/domain/shell-classifier.d.ts +23 -0
  290. package/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
  291. package/daemon/dist/domain/shell-classifier.js +36 -0
  292. package/daemon/dist/domain/shell-classifier.js.map +1 -0
  293. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  294. package/daemon/dist/domain/slices/slice-detail-projector.js +24 -3
  295. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  296. package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  297. package/daemon/dist/domain/slices/slice-indexer.js +16 -3
  298. package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  299. package/daemon/dist/domain/spec-live-conformance.d.ts +22 -0
  300. package/daemon/dist/domain/spec-live-conformance.d.ts.map +1 -1
  301. package/daemon/dist/domain/spec-live-conformance.js +35 -0
  302. package/daemon/dist/domain/spec-live-conformance.js.map +1 -1
  303. package/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
  304. package/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
  305. package/daemon/dist/domain/spec-validation-advisory.js +38 -0
  306. package/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
  307. package/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
  308. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  309. package/daemon/dist/domain/successor-session-launcher.js +38 -1
  310. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  311. package/daemon/dist/domain/sync-site-wrap.d.ts +9 -0
  312. package/daemon/dist/domain/sync-site-wrap.d.ts.map +1 -1
  313. package/daemon/dist/domain/sync-site-wrap.js +11 -0
  314. package/daemon/dist/domain/sync-site-wrap.js.map +1 -1
  315. package/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
  316. package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
  317. package/daemon/dist/domain/topology-defaults-installer.js +92 -0
  318. package/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
  319. package/daemon/dist/domain/transcript-rotation.d.ts +4 -0
  320. package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
  321. package/daemon/dist/domain/transcript-rotation.js +61 -3
  322. package/daemon/dist/domain/transcript-rotation.js.map +1 -1
  323. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  324. package/daemon/dist/domain/transcript-store.js +9 -2
  325. package/daemon/dist/domain/transcript-store.js.map +1 -1
  326. package/daemon/dist/domain/types.d.ts +18 -0
  327. package/daemon/dist/domain/types.d.ts.map +1 -1
  328. package/daemon/dist/domain/types.js.map +1 -1
  329. package/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
  330. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  331. package/daemon/dist/domain/user-settings/settings-store.js +59 -0
  332. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  333. package/daemon/dist/domain/watchdog-auto-registration.d.ts +7 -0
  334. package/daemon/dist/domain/watchdog-auto-registration.d.ts.map +1 -1
  335. package/daemon/dist/domain/watchdog-auto-registration.js +27 -0
  336. package/daemon/dist/domain/watchdog-auto-registration.js.map +1 -1
  337. package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -1
  338. package/daemon/dist/domain/workspace/workspace-doctor.js +4 -3
  339. package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  340. package/daemon/dist/routes/activity.js +11 -2
  341. package/daemon/dist/routes/activity.js.map +1 -1
  342. package/daemon/dist/routes/bundles.d.ts +27 -0
  343. package/daemon/dist/routes/bundles.d.ts.map +1 -1
  344. package/daemon/dist/routes/bundles.js +107 -26
  345. package/daemon/dist/routes/bundles.js.map +1 -1
  346. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  347. package/daemon/dist/routes/context-packs.js +205 -0
  348. package/daemon/dist/routes/context-packs.js.map +1 -1
  349. package/daemon/dist/routes/crash-cart.d.ts +4 -0
  350. package/daemon/dist/routes/crash-cart.d.ts.map +1 -0
  351. package/daemon/dist/routes/crash-cart.js +144 -0
  352. package/daemon/dist/routes/crash-cart.js.map +1 -0
  353. package/daemon/dist/routes/missions.d.ts.map +1 -1
  354. package/daemon/dist/routes/missions.js +10 -6
  355. package/daemon/dist/routes/missions.js.map +1 -1
  356. package/daemon/dist/routes/{rig-policy.d.ts → rig-mode.d.ts} +3 -3
  357. package/daemon/dist/routes/rig-mode.d.ts.map +1 -0
  358. package/{node_modules/@openrig/daemon/dist/routes/rig-policy.js → daemon/dist/routes/rig-mode.js} +13 -13
  359. package/daemon/dist/routes/rig-mode.js.map +1 -0
  360. package/daemon/dist/routes/scope-approve.d.ts.map +1 -1
  361. package/daemon/dist/routes/scope-approve.js +4 -0
  362. package/daemon/dist/routes/scope-approve.js.map +1 -1
  363. package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  364. package/daemon/dist/routes/scope-audit.js +29 -2
  365. package/daemon/dist/routes/scope-audit.js.map +1 -1
  366. package/daemon/dist/routes/seat.d.ts.map +1 -1
  367. package/daemon/dist/routes/seat.js +18 -2
  368. package/daemon/dist/routes/seat.js.map +1 -1
  369. package/daemon/dist/routes/sessions.d.ts.map +1 -1
  370. package/daemon/dist/routes/sessions.js +66 -1
  371. package/daemon/dist/routes/sessions.js.map +1 -1
  372. package/daemon/dist/routes/transport.d.ts.map +1 -1
  373. package/daemon/dist/routes/transport.js +12 -3
  374. package/daemon/dist/routes/transport.js.map +1 -1
  375. package/daemon/dist/seat-recap-store-surface.d.ts +2 -0
  376. package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
  377. package/daemon/dist/seat-recap-store-surface.js +6 -0
  378. package/daemon/dist/seat-recap-store-surface.js.map +1 -0
  379. package/daemon/dist/server.d.ts +3 -1
  380. package/daemon/dist/server.d.ts.map +1 -1
  381. package/daemon/dist/server.js +15 -5
  382. package/daemon/dist/server.js.map +1 -1
  383. package/daemon/dist/startup.d.ts.map +1 -1
  384. package/daemon/dist/startup.js +166 -6
  385. package/daemon/dist/startup.js.map +1 -1
  386. package/daemon/docs/reference/chain-file-convention.md +115 -0
  387. package/daemon/docs/reference/legacy-topology-migration.md +53 -0
  388. package/daemon/docs/reference/refocus-channel.md +80 -0
  389. package/daemon/docs/reference/sdlc-conventions.md +24 -0
  390. package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +1 -1
  391. package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +1 -1
  392. package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +1 -1
  393. package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -4
  394. package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +8 -0
  395. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +72 -31
  396. package/daemon/specs/agents/shared/skills/pods/oversight-team/SKILL.md +106 -0
  397. package/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md +479 -0
  398. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +9 -0
  399. package/daemon/specs/rigs/launch/demo/project-example/README.md +25 -0
  400. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +19 -0
  401. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +6 -0
  402. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +7 -0
  403. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +31 -0
  404. package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +24 -0
  405. package/daemon/specs/rigs/preview/product-team/topology/rig/CRAFT.md +21 -0
  406. package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +50 -0
  407. package/daemon/specs/rigs/preview/product-team/topology/seats/dev1-qa/CRAFT.md +13 -0
  408. package/daemon/specs/rigs/preview/product-team/topology/seats/orch1-lead/CRAFT.md +17 -0
  409. package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r1/CRAFT.md +17 -0
  410. package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r2/CRAFT.md +15 -0
  411. package/dist/build-info.js +3 -3
  412. package/dist/commands/bundle.d.ts.map +1 -1
  413. package/dist/commands/bundle.js +6 -0
  414. package/dist/commands/bundle.js.map +1 -1
  415. package/dist/commands/capture.d.ts.map +1 -1
  416. package/dist/commands/capture.js +2 -0
  417. package/dist/commands/capture.js.map +1 -1
  418. package/dist/commands/config.d.ts.map +1 -1
  419. package/dist/commands/config.js +8 -0
  420. package/dist/commands/config.js.map +1 -1
  421. package/dist/commands/context.d.ts.map +1 -1
  422. package/dist/commands/context.js +353 -48
  423. package/dist/commands/context.js.map +1 -1
  424. package/dist/commands/crash-cart.d.ts.map +1 -1
  425. package/dist/commands/crash-cart.js.map +1 -1
  426. package/dist/commands/host.d.ts +5 -0
  427. package/dist/commands/host.d.ts.map +1 -1
  428. package/dist/commands/host.js +59 -3
  429. package/dist/commands/host.js.map +1 -1
  430. package/dist/commands/policy.d.ts +5 -0
  431. package/dist/commands/policy.d.ts.map +1 -0
  432. package/dist/commands/policy.js +307 -0
  433. package/dist/commands/policy.js.map +1 -0
  434. package/dist/commands/proof.d.ts.map +1 -1
  435. package/dist/commands/proof.js +70 -12
  436. package/dist/commands/proof.js.map +1 -1
  437. package/dist/commands/ps.d.ts +4 -0
  438. package/dist/commands/ps.d.ts.map +1 -1
  439. package/dist/commands/ps.js +4 -0
  440. package/dist/commands/ps.js.map +1 -1
  441. package/dist/commands/{rig-policy.d.ts → rig-mode.d.ts} +3 -3
  442. package/dist/commands/rig-mode.d.ts.map +1 -0
  443. package/dist/commands/{rig-policy.js → rig-mode.js} +17 -17
  444. package/dist/commands/rig-mode.js.map +1 -0
  445. package/dist/commands/rig.d.ts.map +1 -1
  446. package/dist/commands/rig.js +5 -0
  447. package/dist/commands/rig.js.map +1 -1
  448. package/dist/commands/scope.d.ts.map +1 -1
  449. package/dist/commands/scope.js +58 -16
  450. package/dist/commands/scope.js.map +1 -1
  451. package/dist/commands/send.d.ts.map +1 -1
  452. package/dist/commands/send.js +2 -0
  453. package/dist/commands/send.js.map +1 -1
  454. package/dist/commands/setup.d.ts +13 -0
  455. package/dist/commands/setup.d.ts.map +1 -1
  456. package/dist/commands/setup.js +3 -3
  457. package/dist/commands/setup.js.map +1 -1
  458. package/dist/commands/transcript.d.ts.map +1 -1
  459. package/dist/commands/transcript.js +27 -1
  460. package/dist/commands/transcript.js.map +1 -1
  461. package/dist/commands/walk.d.ts.map +1 -1
  462. package/dist/commands/walk.js +279 -26
  463. package/dist/commands/walk.js.map +1 -1
  464. package/dist/commands/whoami.d.ts.map +1 -1
  465. package/dist/commands/whoami.js +11 -1
  466. package/dist/commands/whoami.js.map +1 -1
  467. package/dist/config-store.d.ts +17 -1
  468. package/dist/config-store.d.ts.map +1 -1
  469. package/dist/config-store.js +53 -1
  470. package/dist/config-store.js.map +1 -1
  471. package/dist/cross-host-target.d.ts +8 -1
  472. package/dist/cross-host-target.d.ts.map +1 -1
  473. package/dist/cross-host-target.js +23 -4
  474. package/dist/cross-host-target.js.map +1 -1
  475. package/dist/daemon-lifecycle.d.ts +10 -1
  476. package/dist/daemon-lifecycle.d.ts.map +1 -1
  477. package/dist/daemon-lifecycle.js +26 -1
  478. package/dist/daemon-lifecycle.js.map +1 -1
  479. package/dist/front-door.d.ts.map +1 -1
  480. package/dist/front-door.js +11 -1
  481. package/dist/front-door.js.map +1 -1
  482. package/dist/host-bindings.d.ts +62 -0
  483. package/dist/host-bindings.d.ts.map +1 -0
  484. package/dist/host-bindings.js +147 -0
  485. package/dist/host-bindings.js.map +1 -0
  486. package/dist/host-registry.d.ts +14 -1
  487. package/dist/host-registry.d.ts.map +1 -1
  488. package/dist/host-registry.js +30 -2
  489. package/dist/host-registry.js.map +1 -1
  490. package/dist/index.d.ts +2 -2
  491. package/dist/index.d.ts.map +1 -1
  492. package/dist/index.js +5 -2
  493. package/dist/index.js.map +1 -1
  494. package/dist/lib/hosts/fanout-contract.d.ts +4 -0
  495. package/dist/lib/hosts/fanout-contract.d.ts.map +1 -1
  496. package/dist/lib/hosts/fanout-contract.js +15 -0
  497. package/dist/lib/hosts/fanout-contract.js.map +1 -1
  498. package/dist/lib/path-safety.d.ts +8 -0
  499. package/dist/lib/path-safety.d.ts.map +1 -0
  500. package/dist/lib/path-safety.js +24 -0
  501. package/dist/lib/path-safety.js.map +1 -0
  502. package/dist/lib/permission-policy/policy-ref.d.ts +89 -0
  503. package/dist/lib/permission-policy/policy-ref.d.ts.map +1 -0
  504. package/dist/lib/permission-policy/policy-ref.js +171 -0
  505. package/dist/lib/permission-policy/policy-ref.js.map +1 -0
  506. package/dist/lib/permission-policy/policy-spec.d.ts +34 -0
  507. package/dist/lib/permission-policy/policy-spec.d.ts.map +1 -0
  508. package/dist/lib/permission-policy/policy-spec.js +106 -0
  509. package/dist/lib/permission-policy/policy-spec.js.map +1 -0
  510. package/dist/lib/scope/logical-checkbox.d.ts +26 -0
  511. package/dist/lib/scope/logical-checkbox.d.ts.map +1 -0
  512. package/dist/lib/scope/logical-checkbox.js +65 -0
  513. package/dist/lib/scope/logical-checkbox.js.map +1 -0
  514. package/dist/lib/scope/scaffold-placeholder.d.ts +22 -0
  515. package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
  516. package/dist/lib/scope/scaffold-placeholder.js +24 -0
  517. package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
  518. package/dist/lib/scope/scope-audit.d.ts +1 -1
  519. package/dist/lib/scope/scope-audit.d.ts.map +1 -1
  520. package/dist/lib/scope/scope-audit.js.map +1 -1
  521. package/dist/lib/scope/scope-fs.d.ts +19 -3
  522. package/dist/lib/scope/scope-fs.d.ts.map +1 -1
  523. package/dist/lib/scope/scope-fs.js +37 -17
  524. package/dist/lib/scope/scope-fs.js.map +1 -1
  525. package/dist/lib/topology-trace.d.ts +36 -0
  526. package/dist/lib/topology-trace.d.ts.map +1 -0
  527. package/dist/lib/topology-trace.js +91 -0
  528. package/dist/lib/topology-trace.js.map +1 -0
  529. package/dist/release-surface/extract-surface.js +1 -1
  530. package/dist/release-surface/extract-surface.js.map +1 -1
  531. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  532. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +7 -4
  533. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  534. package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js +2 -2
  535. package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js.map +1 -1
  536. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -2
  537. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  538. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js +18 -10
  539. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  540. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +10 -2
  541. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
  542. package/node_modules/@openrig/daemon/dist/adapters/tmux.js +27 -7
  543. package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
  544. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts +18 -0
  545. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
  546. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js +21 -0
  547. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js.map +1 -1
  548. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  549. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts +100 -2
  550. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  551. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js +180 -6
  552. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js.map +1 -1
  553. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
  554. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  555. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
  556. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  557. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  558. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
  559. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  560. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
  561. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
  562. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
  563. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
  564. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
  565. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
  566. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +125 -0
  567. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
  568. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
  569. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
  570. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
  571. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
  572. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
  573. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
  574. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
  575. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
  576. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.d.ts +173 -0
  577. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.d.ts.map +1 -0
  578. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.js +233 -0
  579. package/node_modules/@openrig/daemon/dist/domain/crash-cart-conductor.js.map +1 -0
  580. package/node_modules/@openrig/daemon/dist/domain/crash-cart-probes.d.ts +7 -6
  581. package/node_modules/@openrig/daemon/dist/domain/crash-cart-probes.d.ts.map +1 -1
  582. package/node_modules/@openrig/daemon/dist/domain/crash-cart-probes.js +57 -7
  583. package/node_modules/@openrig/daemon/dist/domain/crash-cart-probes.js.map +1 -1
  584. package/node_modules/@openrig/daemon/dist/domain/hosts/fanout-contract.d.ts +4 -0
  585. package/node_modules/@openrig/daemon/dist/domain/hosts/fanout-contract.d.ts.map +1 -1
  586. package/node_modules/@openrig/daemon/dist/domain/hosts/fanout-contract.js +15 -0
  587. package/node_modules/@openrig/daemon/dist/domain/hosts/fanout-contract.js.map +1 -1
  588. package/node_modules/@openrig/daemon/dist/domain/hosts/hosts-registry-reader.d.ts +11 -0
  589. package/node_modules/@openrig/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
  590. package/node_modules/@openrig/daemon/dist/domain/hosts/hosts-registry-reader.js +34 -1
  591. package/node_modules/@openrig/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
  592. package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts +56 -0
  593. package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts.map +1 -0
  594. package/node_modules/@openrig/daemon/dist/domain/markdown-address.js +188 -0
  595. package/node_modules/@openrig/daemon/dist/domain/markdown-address.js.map +1 -0
  596. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +73 -0
  597. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -0
  598. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +204 -0
  599. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -0
  600. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts +13 -0
  601. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.d.ts.map +1 -0
  602. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js +163 -0
  603. package/node_modules/@openrig/daemon/dist/domain/model-divergence/effective-model-readers.js.map +1 -0
  604. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +125 -0
  605. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -0
  606. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js +199 -0
  607. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -0
  608. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
  609. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
  610. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
  611. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
  612. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
  613. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js +6 -1
  614. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js.map +1 -1
  615. package/node_modules/@openrig/daemon/dist/domain/predecessor-recap-resolver.d.ts +10 -3
  616. package/node_modules/@openrig/daemon/dist/domain/predecessor-recap-resolver.d.ts.map +1 -1
  617. package/node_modules/@openrig/daemon/dist/domain/predecessor-recap-resolver.js +61 -14
  618. package/node_modules/@openrig/daemon/dist/domain/predecessor-recap-resolver.js.map +1 -1
  619. package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts +25 -0
  620. package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts.map +1 -0
  621. package/node_modules/@openrig/daemon/dist/domain/process-census.js +47 -0
  622. package/node_modules/@openrig/daemon/dist/domain/process-census.js.map +1 -0
  623. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts +41 -3
  624. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  625. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js +74 -31
  626. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  627. package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts +5 -26
  628. package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts.map +1 -1
  629. package/node_modules/@openrig/daemon/dist/domain/review/compose.js +31 -57
  630. package/node_modules/@openrig/daemon/dist/domain/review/compose.js.map +1 -1
  631. package/node_modules/@openrig/daemon/dist/domain/review/gather.d.ts.map +1 -1
  632. package/node_modules/@openrig/daemon/dist/domain/review/gather.js +3 -2
  633. package/node_modules/@openrig/daemon/dist/domain/review/gather.js.map +1 -1
  634. package/node_modules/@openrig/daemon/dist/domain/{rig-policy/rig-policy-defaults.d.ts → rig-mode/rig-mode-defaults.d.ts} +2 -2
  635. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-defaults.d.ts.map +1 -0
  636. package/node_modules/@openrig/daemon/dist/domain/{rig-policy/rig-policy-defaults.js → rig-mode/rig-mode-defaults.js} +1 -1
  637. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-defaults.js.map +1 -0
  638. package/{daemon/dist/domain/rig-policy/rig-policy-store.d.ts → node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.d.ts} +6 -6
  639. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.d.ts.map +1 -0
  640. package/node_modules/@openrig/daemon/dist/domain/{rig-policy/rig-policy-store.js → rig-mode/rig-mode-store.js} +5 -5
  641. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-store.js.map +1 -0
  642. package/node_modules/@openrig/daemon/dist/domain/{rig-policy/rig-policy-types.d.ts → rig-mode/rig-mode-types.d.ts} +1 -1
  643. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.d.ts.map +1 -0
  644. package/{daemon/dist/domain/rig-policy/rig-policy-types.js → node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.js} +1 -1
  645. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-types.js.map +1 -0
  646. package/{daemon/dist/domain/rig-policy/rig-policy-validator.d.ts → node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-validator.d.ts} +2 -2
  647. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-validator.d.ts.map +1 -0
  648. package/node_modules/@openrig/daemon/dist/domain/{rig-policy/rig-policy-validator.js → rig-mode/rig-mode-validator.js} +3 -3
  649. package/node_modules/@openrig/daemon/dist/domain/rig-mode/rig-mode-validator.js.map +1 -0
  650. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +4 -0
  651. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  652. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +39 -0
  653. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  654. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts +7 -0
  655. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  656. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +25 -2
  657. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
  658. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
  659. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
  660. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js +65 -0
  661. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
  662. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.d.ts +37 -0
  663. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.d.ts.map +1 -0
  664. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.js +55 -0
  665. package/node_modules/@openrig/daemon/dist/domain/scope/node-file.js.map +1 -0
  666. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +12 -1
  667. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
  668. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js +42 -2
  669. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
  670. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
  671. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
  672. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
  673. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
  674. package/node_modules/@openrig/daemon/dist/domain/scope/scope-approve.d.ts +4 -0
  675. package/node_modules/@openrig/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
  676. package/node_modules/@openrig/daemon/dist/domain/scope/scope-approve.js +56 -7
  677. package/node_modules/@openrig/daemon/dist/domain/scope/scope-approve.js.map +1 -1
  678. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.d.ts +1 -1
  679. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
  680. package/node_modules/@openrig/daemon/dist/domain/scope/scope-audit.js.map +1 -1
  681. package/node_modules/@openrig/daemon/dist/domain/scope/scope-view-projection.d.ts.map +1 -1
  682. package/node_modules/@openrig/daemon/dist/domain/scope/scope-view-projection.js +5 -2
  683. package/node_modules/@openrig/daemon/dist/domain/scope/scope-view-projection.js.map +1 -1
  684. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts +1 -0
  685. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  686. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js +39 -23
  687. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js.map +1 -1
  688. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts +54 -15
  689. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  690. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js +74 -19
  691. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js.map +1 -1
  692. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.d.ts +17 -0
  693. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  694. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js +22 -0
  695. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  696. package/node_modules/@openrig/daemon/dist/domain/session-jsonl.js +1 -1
  697. package/node_modules/@openrig/daemon/dist/domain/session-jsonl.js.map +1 -1
  698. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +8 -0
  699. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
  700. package/node_modules/@openrig/daemon/dist/domain/session-transport.js +116 -0
  701. package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
  702. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts +23 -0
  703. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
  704. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js +36 -0
  705. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js.map +1 -0
  706. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  707. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +24 -3
  708. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  709. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
  710. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.js +16 -3
  711. package/node_modules/@openrig/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
  712. package/node_modules/@openrig/daemon/dist/domain/spec-live-conformance.d.ts +22 -0
  713. package/node_modules/@openrig/daemon/dist/domain/spec-live-conformance.d.ts.map +1 -1
  714. package/node_modules/@openrig/daemon/dist/domain/spec-live-conformance.js +35 -0
  715. package/node_modules/@openrig/daemon/dist/domain/spec-live-conformance.js.map +1 -1
  716. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
  717. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
  718. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js +38 -0
  719. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
  720. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
  721. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  722. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js +38 -1
  723. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  724. package/node_modules/@openrig/daemon/dist/domain/sync-site-wrap.d.ts +9 -0
  725. package/node_modules/@openrig/daemon/dist/domain/sync-site-wrap.d.ts.map +1 -1
  726. package/node_modules/@openrig/daemon/dist/domain/sync-site-wrap.js +11 -0
  727. package/node_modules/@openrig/daemon/dist/domain/sync-site-wrap.js.map +1 -1
  728. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
  729. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
  730. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +92 -0
  731. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
  732. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts +4 -0
  733. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
  734. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js +61 -3
  735. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js.map +1 -1
  736. package/node_modules/@openrig/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  737. package/node_modules/@openrig/daemon/dist/domain/transcript-store.js +9 -2
  738. package/node_modules/@openrig/daemon/dist/domain/transcript-store.js.map +1 -1
  739. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +18 -0
  740. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  741. package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
  742. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
  743. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  744. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +59 -0
  745. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  746. package/node_modules/@openrig/daemon/dist/domain/watchdog-auto-registration.d.ts +7 -0
  747. package/node_modules/@openrig/daemon/dist/domain/watchdog-auto-registration.d.ts.map +1 -1
  748. package/node_modules/@openrig/daemon/dist/domain/watchdog-auto-registration.js +27 -0
  749. package/node_modules/@openrig/daemon/dist/domain/watchdog-auto-registration.js.map +1 -1
  750. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -1
  751. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.js +4 -3
  752. package/node_modules/@openrig/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
  753. package/node_modules/@openrig/daemon/dist/routes/activity.js +11 -2
  754. package/node_modules/@openrig/daemon/dist/routes/activity.js.map +1 -1
  755. package/node_modules/@openrig/daemon/dist/routes/bundles.d.ts +27 -0
  756. package/node_modules/@openrig/daemon/dist/routes/bundles.d.ts.map +1 -1
  757. package/node_modules/@openrig/daemon/dist/routes/bundles.js +107 -26
  758. package/node_modules/@openrig/daemon/dist/routes/bundles.js.map +1 -1
  759. package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
  760. package/node_modules/@openrig/daemon/dist/routes/context-packs.js +205 -0
  761. package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
  762. package/node_modules/@openrig/daemon/dist/routes/crash-cart.d.ts +4 -0
  763. package/node_modules/@openrig/daemon/dist/routes/crash-cart.d.ts.map +1 -0
  764. package/node_modules/@openrig/daemon/dist/routes/crash-cart.js +144 -0
  765. package/node_modules/@openrig/daemon/dist/routes/crash-cart.js.map +1 -0
  766. package/node_modules/@openrig/daemon/dist/routes/missions.d.ts.map +1 -1
  767. package/node_modules/@openrig/daemon/dist/routes/missions.js +10 -6
  768. package/node_modules/@openrig/daemon/dist/routes/missions.js.map +1 -1
  769. package/node_modules/@openrig/daemon/dist/routes/{rig-policy.d.ts → rig-mode.d.ts} +3 -3
  770. package/node_modules/@openrig/daemon/dist/routes/rig-mode.d.ts.map +1 -0
  771. package/{daemon/dist/routes/rig-policy.js → node_modules/@openrig/daemon/dist/routes/rig-mode.js} +13 -13
  772. package/node_modules/@openrig/daemon/dist/routes/rig-mode.js.map +1 -0
  773. package/node_modules/@openrig/daemon/dist/routes/scope-approve.d.ts.map +1 -1
  774. package/node_modules/@openrig/daemon/dist/routes/scope-approve.js +4 -0
  775. package/node_modules/@openrig/daemon/dist/routes/scope-approve.js.map +1 -1
  776. package/node_modules/@openrig/daemon/dist/routes/scope-audit.d.ts.map +1 -1
  777. package/node_modules/@openrig/daemon/dist/routes/scope-audit.js +29 -2
  778. package/node_modules/@openrig/daemon/dist/routes/scope-audit.js.map +1 -1
  779. package/node_modules/@openrig/daemon/dist/routes/seat.d.ts.map +1 -1
  780. package/node_modules/@openrig/daemon/dist/routes/seat.js +18 -2
  781. package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
  782. package/node_modules/@openrig/daemon/dist/routes/sessions.d.ts.map +1 -1
  783. package/node_modules/@openrig/daemon/dist/routes/sessions.js +66 -1
  784. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  785. package/node_modules/@openrig/daemon/dist/routes/transport.d.ts.map +1 -1
  786. package/node_modules/@openrig/daemon/dist/routes/transport.js +12 -3
  787. package/node_modules/@openrig/daemon/dist/routes/transport.js.map +1 -1
  788. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts +2 -0
  789. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
  790. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js +6 -0
  791. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js.map +1 -0
  792. package/node_modules/@openrig/daemon/dist/server.d.ts +3 -1
  793. package/node_modules/@openrig/daemon/dist/server.d.ts.map +1 -1
  794. package/node_modules/@openrig/daemon/dist/server.js +15 -5
  795. package/node_modules/@openrig/daemon/dist/server.js.map +1 -1
  796. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  797. package/node_modules/@openrig/daemon/dist/startup.js +166 -6
  798. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  799. package/node_modules/@openrig/daemon/package.json +6 -1
  800. package/package.json +1 -1
  801. package/tui/dist/crash-cart/from-emit.d.ts +9 -0
  802. package/tui/dist/crash-cart/from-emit.d.ts.map +1 -1
  803. package/tui/dist/crash-cart/from-emit.js.map +1 -1
  804. package/tui/dist/crash-cart/keys.d.ts +1 -1
  805. package/tui/dist/crash-cart/keys.d.ts.map +1 -1
  806. package/tui/dist/crash-cart/keys.js +13 -2
  807. package/tui/dist/crash-cart/keys.js.map +1 -1
  808. package/tui/dist/crash-cart/one-click-gate.d.ts +5 -0
  809. package/tui/dist/crash-cart/one-click-gate.d.ts.map +1 -1
  810. package/tui/dist/crash-cart/one-click-gate.js +8 -0
  811. package/tui/dist/crash-cart/one-click-gate.js.map +1 -1
  812. package/tui/dist/crash-cart/render-crash-cart.d.ts +11 -0
  813. package/tui/dist/crash-cart/render-crash-cart.d.ts.map +1 -1
  814. package/tui/dist/crash-cart/render-crash-cart.js +113 -0
  815. package/tui/dist/crash-cart/render-crash-cart.js.map +1 -1
  816. package/tui/dist/crash-cart/restore-input.d.ts +32 -0
  817. package/tui/dist/crash-cart/restore-input.d.ts.map +1 -0
  818. package/tui/dist/crash-cart/restore-input.js +37 -0
  819. package/tui/dist/crash-cart/restore-input.js.map +1 -0
  820. package/tui/dist/crash-cart/restore-lifecycle.d.ts +66 -0
  821. package/tui/dist/crash-cart/restore-lifecycle.d.ts.map +1 -0
  822. package/tui/dist/crash-cart/restore-lifecycle.js +96 -0
  823. package/tui/dist/crash-cart/restore-lifecycle.js.map +1 -0
  824. package/tui/dist/crash-cart/restore-scroll.d.ts +14 -0
  825. package/tui/dist/crash-cart/restore-scroll.d.ts.map +1 -0
  826. package/tui/dist/crash-cart/restore-scroll.js +27 -0
  827. package/tui/dist/crash-cart/restore-scroll.js.map +1 -0
  828. package/tui/dist/daemon-client.d.ts +38 -0
  829. package/tui/dist/daemon-client.d.ts.map +1 -1
  830. package/tui/dist/daemon-client.js +15 -0
  831. package/tui/dist/daemon-client.js.map +1 -1
  832. package/tui/dist/main.js +146 -2
  833. package/tui/dist/main.js.map +1 -1
  834. package/tui/dist/render.d.ts +10 -0
  835. package/tui/dist/render.d.ts.map +1 -1
  836. package/tui/dist/render.js +63 -10
  837. package/tui/dist/render.js.map +1 -1
  838. package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +0 -1
  839. package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +0 -1
  840. package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +0 -1
  841. package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +0 -1
  842. package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +0 -1
  843. package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +0 -1
  844. package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +0 -1
  845. package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +0 -1
  846. package/daemon/dist/routes/rig-policy.d.ts.map +0 -1
  847. package/daemon/dist/routes/rig-policy.js.map +0 -1
  848. package/dist/commands/rig-policy.d.ts.map +0 -1
  849. package/dist/commands/rig-policy.js.map +0 -1
  850. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +0 -1
  851. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +0 -1
  852. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +0 -1
  853. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-store.js.map +0 -1
  854. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +0 -1
  855. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-types.js.map +0 -1
  856. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +0 -1
  857. package/node_modules/@openrig/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +0 -1
  858. package/node_modules/@openrig/daemon/dist/routes/rig-policy.d.ts.map +0 -1
  859. package/node_modules/@openrig/daemon/dist/routes/rig-policy.js.map +0 -1
@@ -0,0 +1,385 @@
1
+ ---
2
+ name: test-driven-development
3
+ description: Use when implementing any feature or bugfix, before writing implementation code
4
+ metadata:
5
+ openrig:
6
+ vendored_from: "Obra Superpowers (https://github.com/obra/superpowers)"
7
+ vendoring_pattern: vendored-as-is
8
+ last_upstream_check: "2026-05-13 (diff against plugin source pulled 2026-05-11 = identical)"
9
+ ---
10
+
11
+ # Test-Driven Development (TDD)
12
+
13
+ ## Overview
14
+
15
+ Write the test first. Watch it fail. Write minimal code to pass.
16
+
17
+ **Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
18
+
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
+
21
+ ## When to Use
22
+
23
+ **Always:**
24
+ - New features
25
+ - Bug fixes
26
+ - Refactoring
27
+ - Behavior changes
28
+
29
+ **Exceptions (ask your human partner):**
30
+ - Throwaway prototypes
31
+ - Generated code
32
+ - Configuration files
33
+
34
+ Thinking "skip TDD just this once"? Stop. That's rationalization.
35
+
36
+ **Chunk size is a dial, and it points up (2026-08) — this is NOT "skip TDD".** *How much* you build per
37
+ red-green cycle is configurable, and with frontier agents handling hour-plus goal-oriented work it is
38
+ **much larger than the classic tiny ping-pong**, and rising. Keep everything below — the Iron Law, red
39
+ before green, two sets of eyes, the guard structure — **fully intact**; only the *cadence / granularity*
40
+ loosens. You still write the failing test(s) first for the chunk; the chunk is simply bigger. Tiny
41
+ back-and-forth is overhead, not virtue, once the SDLC's gates (QA, review, guards) bound a larger chunk's
42
+ risk. Match the chunk to the task; treat it as a configured lever — never as license to write code before
43
+ its test (that's the rationalization this skill exists to stop).
44
+
45
+ ## The Iron Law
46
+
47
+ ```
48
+ NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
49
+ ```
50
+
51
+ Write code before the test? Delete it. Start over.
52
+
53
+ **No exceptions:**
54
+ - Don't keep it as "reference"
55
+ - Don't "adapt" it while writing tests
56
+ - Don't look at it
57
+ - Delete means delete
58
+
59
+ Implement fresh from tests. Period.
60
+
61
+ ## Red-Green-Refactor
62
+
63
+ ```dot
64
+ digraph tdd_cycle {
65
+ rankdir=LR;
66
+ red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];
67
+ verify_red [label="Verify fails\ncorrectly", shape=diamond];
68
+ green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];
69
+ verify_green [label="Verify passes\nAll green", shape=diamond];
70
+ refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];
71
+ next [label="Next", shape=ellipse];
72
+
73
+ red -> verify_red;
74
+ verify_red -> green [label="yes"];
75
+ verify_red -> red [label="wrong\nfailure"];
76
+ green -> verify_green;
77
+ verify_green -> refactor [label="yes"];
78
+ verify_green -> green [label="no"];
79
+ refactor -> verify_green [label="stay\ngreen"];
80
+ verify_green -> next;
81
+ next -> red;
82
+ }
83
+ ```
84
+
85
+ ### RED - Write Failing Test
86
+
87
+ Write one minimal test showing what should happen.
88
+
89
+ <Good>
90
+ ```typescript
91
+ test('retries failed operations 3 times', async () => {
92
+ let attempts = 0;
93
+ const operation = () => {
94
+ attempts++;
95
+ if (attempts < 3) throw new Error('fail');
96
+ return 'success';
97
+ };
98
+
99
+ const result = await retryOperation(operation);
100
+
101
+ expect(result).toBe('success');
102
+ expect(attempts).toBe(3);
103
+ });
104
+ ```
105
+ Clear name, tests real behavior, one thing
106
+ </Good>
107
+
108
+ <Bad>
109
+ ```typescript
110
+ test('retry works', async () => {
111
+ const mock = jest.fn()
112
+ .mockRejectedValueOnce(new Error())
113
+ .mockRejectedValueOnce(new Error())
114
+ .mockResolvedValueOnce('success');
115
+ await retryOperation(mock);
116
+ expect(mock).toHaveBeenCalledTimes(3);
117
+ });
118
+ ```
119
+ Vague name, tests mock not code
120
+ </Bad>
121
+
122
+ **Requirements:**
123
+ - One behavior
124
+ - Clear name
125
+ - Real code (no mocks unless unavoidable)
126
+
127
+ ### Verify RED - Watch It Fail
128
+
129
+ **MANDATORY. Never skip.**
130
+
131
+ ```bash
132
+ npm test path/to/test.test.ts
133
+ ```
134
+
135
+ Confirm:
136
+ - Test fails (not errors)
137
+ - Failure message is expected
138
+ - Fails because feature missing (not typos)
139
+
140
+ **Test passes?** You're testing existing behavior. Fix test.
141
+
142
+ **Test errors?** Fix error, re-run until it fails correctly.
143
+
144
+ ### GREEN - Minimal Code
145
+
146
+ Write simplest code to pass the test.
147
+
148
+ <Good>
149
+ ```typescript
150
+ async function retryOperation<T>(fn: () => Promise<T>): Promise<T> {
151
+ for (let i = 0; i < 3; i++) {
152
+ try {
153
+ return await fn();
154
+ } catch (e) {
155
+ if (i === 2) throw e;
156
+ }
157
+ }
158
+ throw new Error('unreachable');
159
+ }
160
+ ```
161
+ Just enough to pass
162
+ </Good>
163
+
164
+ <Bad>
165
+ ```typescript
166
+ async function retryOperation<T>(
167
+ fn: () => Promise<T>,
168
+ options?: {
169
+ maxRetries?: number;
170
+ backoff?: 'linear' | 'exponential';
171
+ onRetry?: (attempt: number) => void;
172
+ }
173
+ ): Promise<T> {
174
+ // YAGNI
175
+ }
176
+ ```
177
+ Over-engineered
178
+ </Bad>
179
+
180
+ Don't add features, refactor other code, or "improve" beyond the test.
181
+
182
+ ### Verify GREEN - Watch It Pass
183
+
184
+ **MANDATORY.**
185
+
186
+ ```bash
187
+ npm test path/to/test.test.ts
188
+ ```
189
+
190
+ Confirm:
191
+ - Test passes
192
+ - Other tests still pass
193
+ - Output pristine (no errors, warnings)
194
+
195
+ **Test fails?** Fix code, not test.
196
+
197
+ **Other tests fail?** Fix now.
198
+
199
+ ### REFACTOR - Clean Up
200
+
201
+ After green only:
202
+ - Remove duplication
203
+ - Improve names
204
+ - Extract helpers
205
+
206
+ Keep tests green. Don't add behavior.
207
+
208
+ ### Repeat
209
+
210
+ Next failing test for next feature.
211
+
212
+ ## Good Tests
213
+
214
+ | Quality | Good | Bad |
215
+ |---------|------|-----|
216
+ | **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` |
217
+ | **Clear** | Name describes behavior | `test('test1')` |
218
+ | **Shows intent** | Demonstrates desired API | Obscures what code should do |
219
+
220
+ ## Why Order Matters
221
+
222
+ **"I'll write tests after to verify it works"**
223
+
224
+ Tests written after code pass immediately. Passing immediately proves nothing:
225
+ - Might test wrong thing
226
+ - Might test implementation, not behavior
227
+ - Might miss edge cases you forgot
228
+ - You never saw it catch the bug
229
+
230
+ Test-first forces you to see the test fail, proving it actually tests something.
231
+
232
+ **"I already manually tested all the edge cases"**
233
+
234
+ Manual testing is ad-hoc. You think you tested everything but:
235
+ - No record of what you tested
236
+ - Can't re-run when code changes
237
+ - Easy to forget cases under pressure
238
+ - "It worked when I tried it" ≠ comprehensive
239
+
240
+ Automated tests are systematic. They run the same way every time.
241
+
242
+ **"Deleting X hours of work is wasteful"**
243
+
244
+ Sunk cost fallacy. The time is already gone. Your choice now:
245
+ - Delete and rewrite with TDD (X more hours, high confidence)
246
+ - Keep it and add tests after (30 min, low confidence, likely bugs)
247
+
248
+ The "waste" is keeping code you can't trust. Working code without real tests is technical debt.
249
+
250
+ **"TDD is dogmatic, being pragmatic means adapting"**
251
+
252
+ TDD IS pragmatic:
253
+ - Finds bugs before commit (faster than debugging after)
254
+ - Prevents regressions (tests catch breaks immediately)
255
+ - Documents behavior (tests show how to use code)
256
+ - Enables refactoring (change freely, tests catch breaks)
257
+
258
+ "Pragmatic" shortcuts = debugging in production = slower.
259
+
260
+ **"Tests after achieve the same goals - it's spirit not ritual"**
261
+
262
+ No. Tests-after answer "What does this do?" Tests-first answer "What should this do?"
263
+
264
+ Tests-after are biased by your implementation. You test what you built, not what's required. You verify remembered edge cases, not discovered ones.
265
+
266
+ Tests-first force edge case discovery before implementing. Tests-after verify you remembered everything (you didn't).
267
+
268
+ 30 minutes of tests after ≠ TDD. You get coverage, lose proof tests work.
269
+
270
+ ## Common Rationalizations
271
+
272
+ | Excuse | Reality |
273
+ |--------|---------|
274
+ | "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
275
+ | "I'll test after" | Tests passing immediately prove nothing. |
276
+ | "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
277
+ | "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
278
+ | "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
279
+ | "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
280
+ | "Need to explore first" | Fine. Throw away exploration, start with TDD. |
281
+ | "Test hard = design unclear" | Listen to test. Hard to test = hard to use. |
282
+ | "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
283
+ | "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
284
+ | "Existing code has no tests" | You're improving it. Add tests for existing code. |
285
+
286
+ ## Red Flags - STOP and Start Over
287
+
288
+ - Code before test
289
+ - Test after implementation
290
+ - Test passes immediately
291
+ - Can't explain why test failed
292
+ - Tests added "later"
293
+ - Rationalizing "just this once"
294
+ - "I already manually tested it"
295
+ - "Tests after achieve the same purpose"
296
+ - "It's about spirit not ritual"
297
+ - "Keep as reference" or "adapt existing code"
298
+ - "Already spent X hours, deleting is wasteful"
299
+ - "TDD is dogmatic, I'm being pragmatic"
300
+ - "This is different because..."
301
+
302
+ **All of these mean: Delete code. Start over with TDD.**
303
+
304
+ ## Example: Bug Fix
305
+
306
+ **Bug:** Empty email accepted
307
+
308
+ **RED**
309
+ ```typescript
310
+ test('rejects empty email', async () => {
311
+ const result = await submitForm({ email: '' });
312
+ expect(result.error).toBe('Email required');
313
+ });
314
+ ```
315
+
316
+ **Verify RED**
317
+ ```bash
318
+ $ npm test
319
+ FAIL: expected 'Email required', got undefined
320
+ ```
321
+
322
+ **GREEN**
323
+ ```typescript
324
+ function submitForm(data: FormData) {
325
+ if (!data.email?.trim()) {
326
+ return { error: 'Email required' };
327
+ }
328
+ // ...
329
+ }
330
+ ```
331
+
332
+ **Verify GREEN**
333
+ ```bash
334
+ $ npm test
335
+ PASS
336
+ ```
337
+
338
+ **REFACTOR**
339
+ Extract validation for multiple fields if needed.
340
+
341
+ ## Verification Checklist
342
+
343
+ Before marking work complete:
344
+
345
+ - [ ] Every new function/method has a test
346
+ - [ ] Watched each test fail before implementing
347
+ - [ ] Each test failed for expected reason (feature missing, not typo)
348
+ - [ ] Wrote minimal code to pass each test
349
+ - [ ] All tests pass
350
+ - [ ] Output pristine (no errors, warnings)
351
+ - [ ] Tests use real code (mocks only if unavoidable)
352
+ - [ ] Edge cases and errors covered
353
+
354
+ Can't check all boxes? You skipped TDD. Start over.
355
+
356
+ ## When Stuck
357
+
358
+ | Problem | Solution |
359
+ |---------|----------|
360
+ | Don't know how to test | Write wished-for API. Write assertion first. Ask your human partner. |
361
+ | Test too complicated | Design too complicated. Simplify interface. |
362
+ | Must mock everything | Code too coupled. Use dependency injection. |
363
+ | Test setup huge | Extract helpers. Still complex? Simplify design. |
364
+
365
+ ## Debugging Integration
366
+
367
+ Bug found? Write failing test reproducing it. Follow TDD cycle. Test proves fix and prevents regression.
368
+
369
+ Never fix bugs without a test.
370
+
371
+ ## Testing Anti-Patterns
372
+
373
+ When adding mocks or test utilities, read @testing-anti-patterns.md to avoid common pitfalls:
374
+ - Testing mock behavior instead of real behavior
375
+ - Adding test-only methods to production classes
376
+ - Mocking without understanding dependencies
377
+
378
+ ## Final Rule
379
+
380
+ ```
381
+ Production code → test exists and failed first
382
+ Otherwise → not TDD
383
+ ```
384
+
385
+ No exceptions without your human partner's permission.
@@ -0,0 +1,11 @@
1
+ # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
+ # Package-time projection of a canonical skill; regenerated every build.
3
+ name: "test-driven-development"
4
+ version: "0.5.3"
5
+ purpose: "Use when implementing any feature or bugfix, before writing implementation code"
6
+ files:
7
+ - path: "SKILL.md"
8
+ role: "instruction"
9
+ summary: "Use when implementing any feature or bugfix, before writing implementation code"
10
+ - path: "testing-anti-patterns.md"
11
+ role: "reference"
@@ -0,0 +1,299 @@
1
+ # Testing Anti-Patterns
2
+
3
+ **Load this reference when:** writing or changing tests, adding mocks, or tempted to add test-only methods to production code.
4
+
5
+ ## Overview
6
+
7
+ Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested.
8
+
9
+ **Core principle:** Test what the code does, not what the mocks do.
10
+
11
+ **Following strict TDD prevents these anti-patterns.**
12
+
13
+ ## The Iron Laws
14
+
15
+ ```
16
+ 1. NEVER test mock behavior
17
+ 2. NEVER add test-only methods to production classes
18
+ 3. NEVER mock without understanding dependencies
19
+ ```
20
+
21
+ ## Anti-Pattern 1: Testing Mock Behavior
22
+
23
+ **The violation:**
24
+ ```typescript
25
+ // ❌ BAD: Testing that the mock exists
26
+ test('renders sidebar', () => {
27
+ render(<Page />);
28
+ expect(screen.getByTestId('sidebar-mock')).toBeInTheDocument();
29
+ });
30
+ ```
31
+
32
+ **Why this is wrong:**
33
+ - You're verifying the mock works, not that the component works
34
+ - Test passes when mock is present, fails when it's not
35
+ - Tells you nothing about real behavior
36
+
37
+ **your human partner's correction:** "Are we testing the behavior of a mock?"
38
+
39
+ **The fix:**
40
+ ```typescript
41
+ // ✅ GOOD: Test real component or don't mock it
42
+ test('renders sidebar', () => {
43
+ render(<Page />); // Don't mock sidebar
44
+ expect(screen.getByRole('navigation')).toBeInTheDocument();
45
+ });
46
+
47
+ // OR if sidebar must be mocked for isolation:
48
+ // Don't assert on the mock - test Page's behavior with sidebar present
49
+ ```
50
+
51
+ ### Gate Function
52
+
53
+ ```
54
+ BEFORE asserting on any mock element:
55
+ Ask: "Am I testing real component behavior or just mock existence?"
56
+
57
+ IF testing mock existence:
58
+ STOP - Delete the assertion or unmock the component
59
+
60
+ Test real behavior instead
61
+ ```
62
+
63
+ ## Anti-Pattern 2: Test-Only Methods in Production
64
+
65
+ **The violation:**
66
+ ```typescript
67
+ // ❌ BAD: destroy() only used in tests
68
+ class Session {
69
+ async destroy() { // Looks like production API!
70
+ await this._workspaceManager?.destroyWorkspace(this.id);
71
+ // ... cleanup
72
+ }
73
+ }
74
+
75
+ // In tests
76
+ afterEach(() => session.destroy());
77
+ ```
78
+
79
+ **Why this is wrong:**
80
+ - Production class polluted with test-only code
81
+ - Dangerous if accidentally called in production
82
+ - Violates YAGNI and separation of concerns
83
+ - Confuses object lifecycle with entity lifecycle
84
+
85
+ **The fix:**
86
+ ```typescript
87
+ // ✅ GOOD: Test utilities handle test cleanup
88
+ // Session has no destroy() - it's stateless in production
89
+
90
+ // In test-utils/
91
+ export async function cleanupSession(session: Session) {
92
+ const workspace = session.getWorkspaceInfo();
93
+ if (workspace) {
94
+ await workspaceManager.destroyWorkspace(workspace.id);
95
+ }
96
+ }
97
+
98
+ // In tests
99
+ afterEach(() => cleanupSession(session));
100
+ ```
101
+
102
+ ### Gate Function
103
+
104
+ ```
105
+ BEFORE adding any method to production class:
106
+ Ask: "Is this only used by tests?"
107
+
108
+ IF yes:
109
+ STOP - Don't add it
110
+ Put it in test utilities instead
111
+
112
+ Ask: "Does this class own this resource's lifecycle?"
113
+
114
+ IF no:
115
+ STOP - Wrong class for this method
116
+ ```
117
+
118
+ ## Anti-Pattern 3: Mocking Without Understanding
119
+
120
+ **The violation:**
121
+ ```typescript
122
+ // ❌ BAD: Mock breaks test logic
123
+ test('detects duplicate server', () => {
124
+ // Mock prevents config write that test depends on!
125
+ vi.mock('ToolCatalog', () => ({
126
+ discoverAndCacheTools: vi.fn().mockResolvedValue(undefined)
127
+ }));
128
+
129
+ await addServer(config);
130
+ await addServer(config); // Should throw - but won't!
131
+ });
132
+ ```
133
+
134
+ **Why this is wrong:**
135
+ - Mocked method had side effect test depended on (writing config)
136
+ - Over-mocking to "be safe" breaks actual behavior
137
+ - Test passes for wrong reason or fails mysteriously
138
+
139
+ **The fix:**
140
+ ```typescript
141
+ // ✅ GOOD: Mock at correct level
142
+ test('detects duplicate server', () => {
143
+ // Mock the slow part, preserve behavior test needs
144
+ vi.mock('MCPServerManager'); // Just mock slow server startup
145
+
146
+ await addServer(config); // Config written
147
+ await addServer(config); // Duplicate detected ✓
148
+ });
149
+ ```
150
+
151
+ ### Gate Function
152
+
153
+ ```
154
+ BEFORE mocking any method:
155
+ STOP - Don't mock yet
156
+
157
+ 1. Ask: "What side effects does the real method have?"
158
+ 2. Ask: "Does this test depend on any of those side effects?"
159
+ 3. Ask: "Do I fully understand what this test needs?"
160
+
161
+ IF depends on side effects:
162
+ Mock at lower level (the actual slow/external operation)
163
+ OR use test doubles that preserve necessary behavior
164
+ NOT the high-level method the test depends on
165
+
166
+ IF unsure what test depends on:
167
+ Run test with real implementation FIRST
168
+ Observe what actually needs to happen
169
+ THEN add minimal mocking at the right level
170
+
171
+ Red flags:
172
+ - "I'll mock this to be safe"
173
+ - "This might be slow, better mock it"
174
+ - Mocking without understanding the dependency chain
175
+ ```
176
+
177
+ ## Anti-Pattern 4: Incomplete Mocks
178
+
179
+ **The violation:**
180
+ ```typescript
181
+ // ❌ BAD: Partial mock - only fields you think you need
182
+ const mockResponse = {
183
+ status: 'success',
184
+ data: { userId: '123', name: 'Alice' }
185
+ // Missing: metadata that downstream code uses
186
+ };
187
+
188
+ // Later: breaks when code accesses response.metadata.requestId
189
+ ```
190
+
191
+ **Why this is wrong:**
192
+ - **Partial mocks hide structural assumptions** - You only mocked fields you know about
193
+ - **Downstream code may depend on fields you didn't include** - Silent failures
194
+ - **Tests pass but integration fails** - Mock incomplete, real API complete
195
+ - **False confidence** - Test proves nothing about real behavior
196
+
197
+ **The Iron Rule:** Mock the COMPLETE data structure as it exists in reality, not just fields your immediate test uses.
198
+
199
+ **The fix:**
200
+ ```typescript
201
+ // ✅ GOOD: Mirror real API completeness
202
+ const mockResponse = {
203
+ status: 'success',
204
+ data: { userId: '123', name: 'Alice' },
205
+ metadata: { requestId: 'req-789', timestamp: 1234567890 }
206
+ // All fields real API returns
207
+ };
208
+ ```
209
+
210
+ ### Gate Function
211
+
212
+ ```
213
+ BEFORE creating mock responses:
214
+ Check: "What fields does the real API response contain?"
215
+
216
+ Actions:
217
+ 1. Examine actual API response from docs/examples
218
+ 2. Include ALL fields system might consume downstream
219
+ 3. Verify mock matches real response schema completely
220
+
221
+ Critical:
222
+ If you're creating a mock, you must understand the ENTIRE structure
223
+ Partial mocks fail silently when code depends on omitted fields
224
+
225
+ If uncertain: Include all documented fields
226
+ ```
227
+
228
+ ## Anti-Pattern 5: Integration Tests as Afterthought
229
+
230
+ **The violation:**
231
+ ```
232
+ ✅ Implementation complete
233
+ ❌ No tests written
234
+ "Ready for testing"
235
+ ```
236
+
237
+ **Why this is wrong:**
238
+ - Testing is part of implementation, not optional follow-up
239
+ - TDD would have caught this
240
+ - Can't claim complete without tests
241
+
242
+ **The fix:**
243
+ ```
244
+ TDD cycle:
245
+ 1. Write failing test
246
+ 2. Implement to pass
247
+ 3. Refactor
248
+ 4. THEN claim complete
249
+ ```
250
+
251
+ ## When Mocks Become Too Complex
252
+
253
+ **Warning signs:**
254
+ - Mock setup longer than test logic
255
+ - Mocking everything to make test pass
256
+ - Mocks missing methods real components have
257
+ - Test breaks when mock changes
258
+
259
+ **your human partner's question:** "Do we need to be using a mock here?"
260
+
261
+ **Consider:** Integration tests with real components often simpler than complex mocks
262
+
263
+ ## TDD Prevents These Anti-Patterns
264
+
265
+ **Why TDD helps:**
266
+ 1. **Write test first** → Forces you to think about what you're actually testing
267
+ 2. **Watch it fail** → Confirms test tests real behavior, not mocks
268
+ 3. **Minimal implementation** → No test-only methods creep in
269
+ 4. **Real dependencies** → You see what the test actually needs before mocking
270
+
271
+ **If you're testing mock behavior, you violated TDD** - you added mocks without watching test fail against real code first.
272
+
273
+ ## Quick Reference
274
+
275
+ | Anti-Pattern | Fix |
276
+ |--------------|-----|
277
+ | Assert on mock elements | Test real component or unmock it |
278
+ | Test-only methods in production | Move to test utilities |
279
+ | Mock without understanding | Understand dependencies first, mock minimally |
280
+ | Incomplete mocks | Mirror real API completely |
281
+ | Tests as afterthought | TDD - tests first |
282
+ | Over-complex mocks | Consider integration tests |
283
+
284
+ ## Red Flags
285
+
286
+ - Assertion checks for `*-mock` test IDs
287
+ - Methods only called in test files
288
+ - Mock setup is >50% of test
289
+ - Test fails when you remove mock
290
+ - Can't explain why mock is needed
291
+ - Mocking "just to be safe"
292
+
293
+ ## The Bottom Line
294
+
295
+ **Mocks are tools to isolate, not things to test.**
296
+
297
+ If TDD reveals you're testing mock behavior, you've gone wrong.
298
+
299
+ Fix: Test real behavior or question why you're mocking at all.