oh-my-copilot 5.5.0 → 5.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +1 -0
  4. package/bridge/__pycache__/gyoshu_bridge.cpython-312.pyc +0 -0
  5. package/bridge/claude-md-coordinator.cjs +2 -2
  6. package/bridge/cli.cjs +6290 -3436
  7. package/bridge/mcp-server.cjs +637 -503
  8. package/bridge/runtime-cli.cjs +516 -213
  9. package/bridge/team-bridge.cjs +141 -135
  10. package/bridge/team-mcp.cjs +201 -129
  11. package/bridge/team.js +473 -237
  12. package/copilot/hooks.json +43 -0
  13. package/dist/__tests__/chain-enqueuer-registration.test.d.ts +11 -0
  14. package/dist/__tests__/chain-enqueuer-registration.test.d.ts.map +1 -0
  15. package/dist/__tests__/chain-enqueuer-registration.test.js +122 -0
  16. package/dist/__tests__/chain-enqueuer-registration.test.js.map +1 -0
  17. package/dist/__tests__/copilot-hooks-manifest.test.js +3 -1
  18. package/dist/__tests__/copilot-hooks-manifest.test.js.map +1 -1
  19. package/dist/__tests__/directory-context-injector.test.js +41 -1
  20. package/dist/__tests__/directory-context-injector.test.js.map +1 -1
  21. package/dist/__tests__/hook-bridge-main-module.test.d.ts +2 -0
  22. package/dist/__tests__/hook-bridge-main-module.test.d.ts.map +1 -0
  23. package/dist/__tests__/hook-bridge-main-module.test.js +48 -0
  24. package/dist/__tests__/hook-bridge-main-module.test.js.map +1 -0
  25. package/dist/__tests__/ralph-prd-stale.test.js +12 -1
  26. package/dist/__tests__/ralph-prd-stale.test.js.map +1 -1
  27. package/dist/__tests__/ralph-prd.test.js +56 -0
  28. package/dist/__tests__/ralph-prd.test.js.map +1 -1
  29. package/dist/__tests__/run-cjs-graceful-fallback.test.js +2 -0
  30. package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -1
  31. package/dist/__tests__/session-end-forwarder-fallback.test.d.ts +2 -0
  32. package/dist/__tests__/session-end-forwarder-fallback.test.d.ts.map +1 -0
  33. package/dist/__tests__/session-end-forwarder-fallback.test.js +138 -0
  34. package/dist/__tests__/session-end-forwarder-fallback.test.js.map +1 -0
  35. package/dist/cli/__tests__/autoresearch-setup-session.test.js +67 -3
  36. package/dist/cli/__tests__/autoresearch-setup-session.test.js.map +1 -1
  37. package/dist/cli/__tests__/launch.test.js +73 -11
  38. package/dist/cli/__tests__/launch.test.js.map +1 -1
  39. package/dist/cli/__tests__/plugin-dir-capture.test.js +45 -0
  40. package/dist/cli/__tests__/plugin-dir-capture.test.js.map +1 -1
  41. package/dist/cli/__tests__/ralph-afk.test.d.ts +2 -0
  42. package/dist/cli/__tests__/ralph-afk.test.d.ts.map +1 -0
  43. package/dist/cli/__tests__/ralph-afk.test.js +312 -0
  44. package/dist/cli/__tests__/ralph-afk.test.js.map +1 -0
  45. package/dist/cli/__tests__/team.test.js +170 -0
  46. package/dist/cli/__tests__/team.test.js.map +1 -1
  47. package/dist/cli/__tests__/tmux-utils.test.js +132 -16
  48. package/dist/cli/__tests__/tmux-utils.test.js.map +1 -1
  49. package/dist/cli/autoresearch-setup-session.d.ts.map +1 -1
  50. package/dist/cli/autoresearch-setup-session.js +29 -9
  51. package/dist/cli/autoresearch-setup-session.js.map +1 -1
  52. package/dist/cli/commands/__tests__/factory-init.test.d.ts +2 -0
  53. package/dist/cli/commands/__tests__/factory-init.test.d.ts.map +1 -0
  54. package/dist/cli/commands/__tests__/factory-init.test.js +90 -0
  55. package/dist/cli/commands/__tests__/factory-init.test.js.map +1 -0
  56. package/dist/cli/commands/__tests__/intake-headless-flag.test.d.ts +2 -0
  57. package/dist/cli/commands/__tests__/intake-headless-flag.test.d.ts.map +1 -0
  58. package/dist/cli/commands/__tests__/intake-headless-flag.test.js +30 -0
  59. package/dist/cli/commands/__tests__/intake-headless-flag.test.js.map +1 -0
  60. package/dist/cli/commands/__tests__/intake.test.d.ts +2 -0
  61. package/dist/cli/commands/__tests__/intake.test.d.ts.map +1 -0
  62. package/dist/cli/commands/__tests__/intake.test.js +257 -0
  63. package/dist/cli/commands/__tests__/intake.test.js.map +1 -0
  64. package/dist/cli/commands/factory.d.ts +61 -0
  65. package/dist/cli/commands/factory.d.ts.map +1 -0
  66. package/dist/cli/commands/factory.js +190 -0
  67. package/dist/cli/commands/factory.js.map +1 -0
  68. package/dist/cli/commands/intake.d.ts +94 -0
  69. package/dist/cli/commands/intake.d.ts.map +1 -0
  70. package/dist/cli/commands/intake.js +311 -0
  71. package/dist/cli/commands/intake.js.map +1 -0
  72. package/dist/cli/commands/ralph.d.ts +88 -0
  73. package/dist/cli/commands/ralph.d.ts.map +1 -0
  74. package/dist/cli/commands/ralph.js +456 -0
  75. package/dist/cli/commands/ralph.js.map +1 -0
  76. package/dist/cli/commands/team.d.ts.map +1 -1
  77. package/dist/cli/commands/team.js +25 -5
  78. package/dist/cli/commands/team.js.map +1 -1
  79. package/dist/cli/index.d.ts.map +1 -1
  80. package/dist/cli/index.js +7 -0
  81. package/dist/cli/index.js.map +1 -1
  82. package/dist/cli/launch.d.ts.map +1 -1
  83. package/dist/cli/launch.js +32 -7
  84. package/dist/cli/launch.js.map +1 -1
  85. package/dist/cli/team.d.ts.map +1 -1
  86. package/dist/cli/team.js +61 -7
  87. package/dist/cli/team.js.map +1 -1
  88. package/dist/cli/tmux-utils.d.ts +26 -0
  89. package/dist/cli/tmux-utils.d.ts.map +1 -1
  90. package/dist/cli/tmux-utils.js +61 -9
  91. package/dist/cli/tmux-utils.js.map +1 -1
  92. package/dist/config/__tests__/loader.test.js +138 -0
  93. package/dist/config/__tests__/loader.test.js.map +1 -1
  94. package/dist/config/loader.d.ts.map +1 -1
  95. package/dist/config/loader.js +17 -0
  96. package/dist/config/loader.js.map +1 -1
  97. package/dist/factory/__tests__/check-run.test.d.ts +2 -0
  98. package/dist/factory/__tests__/check-run.test.d.ts.map +1 -0
  99. package/dist/factory/__tests__/check-run.test.js +213 -0
  100. package/dist/factory/__tests__/check-run.test.js.map +1 -0
  101. package/dist/factory/__tests__/listener.test.d.ts +2 -0
  102. package/dist/factory/__tests__/listener.test.d.ts.map +1 -0
  103. package/dist/factory/__tests__/listener.test.js +312 -0
  104. package/dist/factory/__tests__/listener.test.js.map +1 -0
  105. package/dist/factory/__tests__/map-frontier.test.d.ts +2 -0
  106. package/dist/factory/__tests__/map-frontier.test.d.ts.map +1 -0
  107. package/dist/factory/__tests__/map-frontier.test.js +128 -0
  108. package/dist/factory/__tests__/map-frontier.test.js.map +1 -0
  109. package/dist/factory/__tests__/map-ingest.test.d.ts +2 -0
  110. package/dist/factory/__tests__/map-ingest.test.d.ts.map +1 -0
  111. package/dist/factory/__tests__/map-ingest.test.js +166 -0
  112. package/dist/factory/__tests__/map-ingest.test.js.map +1 -0
  113. package/dist/factory/__tests__/map-run.test.d.ts +2 -0
  114. package/dist/factory/__tests__/map-run.test.d.ts.map +1 -0
  115. package/dist/factory/__tests__/map-run.test.js +148 -0
  116. package/dist/factory/__tests__/map-run.test.js.map +1 -0
  117. package/dist/factory/__tests__/status.test.d.ts +2 -0
  118. package/dist/factory/__tests__/status.test.d.ts.map +1 -0
  119. package/dist/factory/__tests__/status.test.js +77 -0
  120. package/dist/factory/__tests__/status.test.js.map +1 -0
  121. package/dist/factory/listener.d.ts +98 -0
  122. package/dist/factory/listener.d.ts.map +1 -0
  123. package/dist/factory/listener.js +315 -0
  124. package/dist/factory/listener.js.map +1 -0
  125. package/dist/factory/map-frontier.d.ts +73 -0
  126. package/dist/factory/map-frontier.d.ts.map +1 -0
  127. package/dist/factory/map-frontier.js +147 -0
  128. package/dist/factory/map-frontier.js.map +1 -0
  129. package/dist/factory/map-ingest.d.ts +79 -0
  130. package/dist/factory/map-ingest.d.ts.map +1 -0
  131. package/dist/factory/map-ingest.js +232 -0
  132. package/dist/factory/map-ingest.js.map +1 -0
  133. package/dist/factory/map-run.d.ts +74 -0
  134. package/dist/factory/map-run.d.ts.map +1 -0
  135. package/dist/factory/map-run.js +229 -0
  136. package/dist/factory/map-run.js.map +1 -0
  137. package/dist/factory/status.d.ts +33 -0
  138. package/dist/factory/status.d.ts.map +1 -0
  139. package/dist/factory/status.js +93 -0
  140. package/dist/factory/status.js.map +1 -0
  141. package/dist/factory/watchdog.d.ts +46 -0
  142. package/dist/factory/watchdog.d.ts.map +1 -0
  143. package/dist/factory/watchdog.js +130 -0
  144. package/dist/factory/watchdog.js.map +1 -0
  145. package/dist/factory/watchdog.test.d.ts +2 -0
  146. package/dist/factory/watchdog.test.d.ts.map +1 -0
  147. package/dist/factory/watchdog.test.js +111 -0
  148. package/dist/factory/watchdog.test.js.map +1 -0
  149. package/dist/graph/runtime/native-contained-fs.js +1 -1
  150. package/dist/graph/runtime/native-contained-fs.js.map +1 -1
  151. package/dist/hooks/__tests__/compaction-concurrency.test.js +20 -20
  152. package/dist/hooks/__tests__/compaction-concurrency.test.js.map +1 -1
  153. package/dist/hooks/__tests__/workflow-drift-guard-script.test.js +27 -0
  154. package/dist/hooks/__tests__/workflow-drift-guard-script.test.js.map +1 -1
  155. package/dist/hooks/bridge.d.ts +8 -0
  156. package/dist/hooks/bridge.d.ts.map +1 -1
  157. package/dist/hooks/bridge.js +38 -9
  158. package/dist/hooks/bridge.js.map +1 -1
  159. package/dist/hooks/code-simplifier/__tests__/global-config-path.test.d.ts +2 -0
  160. package/dist/hooks/code-simplifier/__tests__/global-config-path.test.d.ts.map +1 -0
  161. package/dist/hooks/code-simplifier/__tests__/global-config-path.test.js +89 -0
  162. package/dist/hooks/code-simplifier/__tests__/global-config-path.test.js.map +1 -0
  163. package/dist/hooks/code-simplifier/index.d.ts +1 -1
  164. package/dist/hooks/code-simplifier/index.js +1 -1
  165. package/dist/hooks/code-simplifier/jev-shadow.d.ts +5 -4
  166. package/dist/hooks/code-simplifier/jev-shadow.d.ts.map +1 -1
  167. package/dist/hooks/code-simplifier/jev-shadow.js +9 -4
  168. package/dist/hooks/code-simplifier/jev-shadow.js.map +1 -1
  169. package/dist/hooks/directory-readme-injector/index.d.ts.map +1 -1
  170. package/dist/hooks/directory-readme-injector/index.js +11 -2
  171. package/dist/hooks/directory-readme-injector/index.js.map +1 -1
  172. package/dist/hooks/jev/__tests__/active-mode.test.d.ts +9 -0
  173. package/dist/hooks/jev/__tests__/active-mode.test.d.ts.map +1 -0
  174. package/dist/hooks/jev/__tests__/active-mode.test.js +252 -0
  175. package/dist/hooks/jev/__tests__/active-mode.test.js.map +1 -0
  176. package/dist/hooks/jev/points.d.ts +3 -1
  177. package/dist/hooks/jev/points.d.ts.map +1 -1
  178. package/dist/hooks/jev/points.js +1 -0
  179. package/dist/hooks/jev/points.js.map +1 -1
  180. package/dist/hooks/jev/resolver.d.ts.map +1 -1
  181. package/dist/hooks/jev/resolver.js +17 -1
  182. package/dist/hooks/jev/resolver.js.map +1 -1
  183. package/dist/hooks/keyword-detector/index.d.ts +2 -0
  184. package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
  185. package/dist/hooks/keyword-detector/index.js +3 -3
  186. package/dist/hooks/keyword-detector/index.js.map +1 -1
  187. package/dist/hooks/keyword-detector/jev-shadow.d.ts +6 -4
  188. package/dist/hooks/keyword-detector/jev-shadow.d.ts.map +1 -1
  189. package/dist/hooks/keyword-detector/jev-shadow.js +18 -4
  190. package/dist/hooks/keyword-detector/jev-shadow.js.map +1 -1
  191. package/dist/hooks/learner/jev-shadow.d.ts +4 -3
  192. package/dist/hooks/learner/jev-shadow.d.ts.map +1 -1
  193. package/dist/hooks/learner/jev-shadow.js +14 -3
  194. package/dist/hooks/learner/jev-shadow.js.map +1 -1
  195. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  196. package/dist/hooks/persistent-mode/index.js +22 -6
  197. package/dist/hooks/persistent-mode/index.js.map +1 -1
  198. package/dist/hooks/persistent-mode/jev-shadow.d.ts +7 -5
  199. package/dist/hooks/persistent-mode/jev-shadow.d.ts.map +1 -1
  200. package/dist/hooks/persistent-mode/jev-shadow.js +28 -6
  201. package/dist/hooks/persistent-mode/jev-shadow.js.map +1 -1
  202. package/dist/hooks/preemptive-compaction/__tests__/jev-shadow.test.js +3 -3
  203. package/dist/hooks/preemptive-compaction/__tests__/jev-shadow.test.js.map +1 -1
  204. package/dist/hooks/preemptive-compaction/index.d.ts +5 -1
  205. package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
  206. package/dist/hooks/preemptive-compaction/index.js +13 -8
  207. package/dist/hooks/preemptive-compaction/index.js.map +1 -1
  208. package/dist/hooks/preemptive-compaction/jev-shadow.d.ts +6 -5
  209. package/dist/hooks/preemptive-compaction/jev-shadow.d.ts.map +1 -1
  210. package/dist/hooks/preemptive-compaction/jev-shadow.js +18 -5
  211. package/dist/hooks/preemptive-compaction/jev-shadow.js.map +1 -1
  212. package/dist/hooks/ralph/__tests__/feedback-baseline.test.d.ts +2 -0
  213. package/dist/hooks/ralph/__tests__/feedback-baseline.test.d.ts.map +1 -0
  214. package/dist/hooks/ralph/__tests__/feedback-baseline.test.js +250 -0
  215. package/dist/hooks/ralph/__tests__/feedback-baseline.test.js.map +1 -0
  216. package/dist/hooks/ralph/feedback-baseline.d.ts +58 -0
  217. package/dist/hooks/ralph/feedback-baseline.d.ts.map +1 -0
  218. package/dist/hooks/ralph/feedback-baseline.js +141 -0
  219. package/dist/hooks/ralph/feedback-baseline.js.map +1 -0
  220. package/dist/hooks/ralph/index.d.ts +1 -1
  221. package/dist/hooks/ralph/index.d.ts.map +1 -1
  222. package/dist/hooks/ralph/index.js +1 -1
  223. package/dist/hooks/ralph/index.js.map +1 -1
  224. package/dist/hooks/ralph/jev-shadow.d.ts +4 -3
  225. package/dist/hooks/ralph/jev-shadow.d.ts.map +1 -1
  226. package/dist/hooks/ralph/jev-shadow.js +14 -4
  227. package/dist/hooks/ralph/jev-shadow.js.map +1 -1
  228. package/dist/hooks/ralph/loop.d.ts +7 -0
  229. package/dist/hooks/ralph/loop.d.ts.map +1 -1
  230. package/dist/hooks/ralph/loop.js +21 -0
  231. package/dist/hooks/ralph/loop.js.map +1 -1
  232. package/dist/hooks/ralph/prd.d.ts +17 -0
  233. package/dist/hooks/ralph/prd.d.ts.map +1 -1
  234. package/dist/hooks/ralph/prd.js +26 -1
  235. package/dist/hooks/ralph/prd.js.map +1 -1
  236. package/dist/hooks/registry/__tests__/registry.test.js +12 -4
  237. package/dist/hooks/registry/__tests__/registry.test.js.map +1 -1
  238. package/dist/hooks/rules-injector/matcher.d.ts.map +1 -1
  239. package/dist/hooks/rules-injector/matcher.js +35 -7
  240. package/dist/hooks/rules-injector/matcher.js.map +1 -1
  241. package/dist/hooks/rules-injector/matcher.test.d.ts +2 -0
  242. package/dist/hooks/rules-injector/matcher.test.d.ts.map +1 -0
  243. package/dist/hooks/rules-injector/matcher.test.js +58 -0
  244. package/dist/hooks/rules-injector/matcher.test.js.map +1 -0
  245. package/dist/hooks/session-end/__tests__/action-runner.test.js +51 -0
  246. package/dist/hooks/session-end/__tests__/action-runner.test.js.map +1 -1
  247. package/dist/hooks/session-end/__tests__/chain-enqueuer.test.d.ts +2 -0
  248. package/dist/hooks/session-end/__tests__/chain-enqueuer.test.d.ts.map +1 -0
  249. package/dist/hooks/session-end/__tests__/chain-enqueuer.test.js +274 -0
  250. package/dist/hooks/session-end/__tests__/chain-enqueuer.test.js.map +1 -0
  251. package/dist/hooks/session-end/__tests__/check-evidence.test.d.ts +2 -0
  252. package/dist/hooks/session-end/__tests__/check-evidence.test.d.ts.map +1 -0
  253. package/dist/hooks/session-end/__tests__/check-evidence.test.js +171 -0
  254. package/dist/hooks/session-end/__tests__/check-evidence.test.js.map +1 -0
  255. package/dist/hooks/session-end/__tests__/cleanup-manifest.test.js +21 -0
  256. package/dist/hooks/session-end/__tests__/cleanup-manifest.test.js.map +1 -1
  257. package/dist/hooks/session-end/__tests__/foreground-bootstrap.test.d.ts +10 -0
  258. package/dist/hooks/session-end/__tests__/foreground-bootstrap.test.d.ts.map +1 -0
  259. package/dist/hooks/session-end/__tests__/foreground-bootstrap.test.js +123 -0
  260. package/dist/hooks/session-end/__tests__/foreground-bootstrap.test.js.map +1 -0
  261. package/dist/hooks/session-end/__tests__/guardrails.test.d.ts +2 -0
  262. package/dist/hooks/session-end/__tests__/guardrails.test.d.ts.map +1 -0
  263. package/dist/hooks/session-end/__tests__/guardrails.test.js +184 -0
  264. package/dist/hooks/session-end/__tests__/guardrails.test.js.map +1 -0
  265. package/dist/hooks/session-end/__tests__/process-session-end-worker-spawn.test.d.ts +9 -0
  266. package/dist/hooks/session-end/__tests__/process-session-end-worker-spawn.test.d.ts.map +1 -0
  267. package/dist/hooks/session-end/__tests__/process-session-end-worker-spawn.test.js +96 -0
  268. package/dist/hooks/session-end/__tests__/process-session-end-worker-spawn.test.js.map +1 -0
  269. package/dist/hooks/session-end/__tests__/routing.test.d.ts +2 -0
  270. package/dist/hooks/session-end/__tests__/routing.test.d.ts.map +1 -0
  271. package/dist/hooks/session-end/__tests__/routing.test.js +135 -0
  272. package/dist/hooks/session-end/__tests__/routing.test.js.map +1 -0
  273. package/dist/hooks/session-end/__tests__/spawn-next.test.d.ts +2 -0
  274. package/dist/hooks/session-end/__tests__/spawn-next.test.d.ts.map +1 -0
  275. package/dist/hooks/session-end/__tests__/spawn-next.test.js +501 -0
  276. package/dist/hooks/session-end/__tests__/spawn-next.test.js.map +1 -0
  277. package/dist/hooks/session-end/__tests__/worker.test.js +102 -0
  278. package/dist/hooks/session-end/__tests__/worker.test.js.map +1 -1
  279. package/dist/hooks/session-end/action-runner.d.ts.map +1 -1
  280. package/dist/hooks/session-end/action-runner.js +24 -2
  281. package/dist/hooks/session-end/action-runner.js.map +1 -1
  282. package/dist/hooks/session-end/chain-enqueuer.d.ts +45 -0
  283. package/dist/hooks/session-end/chain-enqueuer.d.ts.map +1 -0
  284. package/dist/hooks/session-end/chain-enqueuer.js +191 -0
  285. package/dist/hooks/session-end/chain-enqueuer.js.map +1 -0
  286. package/dist/hooks/session-end/check-evidence.d.ts +29 -0
  287. package/dist/hooks/session-end/check-evidence.d.ts.map +1 -0
  288. package/dist/hooks/session-end/check-evidence.js +52 -0
  289. package/dist/hooks/session-end/check-evidence.js.map +1 -0
  290. package/dist/hooks/session-end/cleanup-manifest.d.ts +1 -1
  291. package/dist/hooks/session-end/cleanup-manifest.d.ts.map +1 -1
  292. package/dist/hooks/session-end/cleanup-manifest.js +22 -2
  293. package/dist/hooks/session-end/cleanup-manifest.js.map +1 -1
  294. package/dist/hooks/session-end/foreground-bootstrap.d.ts.map +1 -1
  295. package/dist/hooks/session-end/foreground-bootstrap.js +30 -4
  296. package/dist/hooks/session-end/foreground-bootstrap.js.map +1 -1
  297. package/dist/hooks/session-end/guardrails.d.ts +67 -0
  298. package/dist/hooks/session-end/guardrails.d.ts.map +1 -0
  299. package/dist/hooks/session-end/guardrails.js +149 -0
  300. package/dist/hooks/session-end/guardrails.js.map +1 -0
  301. package/dist/hooks/session-end/index.d.ts.map +1 -1
  302. package/dist/hooks/session-end/index.js +14 -6
  303. package/dist/hooks/session-end/index.js.map +1 -1
  304. package/dist/hooks/session-end/routing.d.ts +53 -0
  305. package/dist/hooks/session-end/routing.d.ts.map +1 -0
  306. package/dist/hooks/session-end/routing.js +75 -0
  307. package/dist/hooks/session-end/routing.js.map +1 -0
  308. package/dist/hooks/session-end/spawn-next.d.ts +117 -0
  309. package/dist/hooks/session-end/spawn-next.d.ts.map +1 -0
  310. package/dist/hooks/session-end/spawn-next.js +292 -0
  311. package/dist/hooks/session-end/spawn-next.js.map +1 -0
  312. package/dist/hooks/session-end/worker.d.ts.map +1 -1
  313. package/dist/hooks/session-end/worker.js +45 -5
  314. package/dist/hooks/session-end/worker.js.map +1 -1
  315. package/dist/hooks/task-size-detector/jev-shadow.d.ts +2 -1
  316. package/dist/hooks/task-size-detector/jev-shadow.d.ts.map +1 -1
  317. package/dist/hooks/task-size-detector/jev-shadow.js +19 -1
  318. package/dist/hooks/task-size-detector/jev-shadow.js.map +1 -1
  319. package/dist/installer/__tests__/hook-command-portability.test.js +57 -1
  320. package/dist/installer/__tests__/hook-command-portability.test.js.map +1 -1
  321. package/dist/installer/__tests__/mcp-registry.test.js +98 -0
  322. package/dist/installer/__tests__/mcp-registry.test.js.map +1 -1
  323. package/dist/installer/hooks.d.ts +7 -0
  324. package/dist/installer/hooks.d.ts.map +1 -1
  325. package/dist/installer/hooks.js +15 -0
  326. package/dist/installer/hooks.js.map +1 -1
  327. package/dist/installer/index.d.ts +12 -0
  328. package/dist/installer/index.d.ts.map +1 -1
  329. package/dist/installer/index.js +3 -1
  330. package/dist/installer/index.js.map +1 -1
  331. package/dist/installer/mcp-registry.d.ts.map +1 -1
  332. package/dist/installer/mcp-registry.js +56 -6
  333. package/dist/installer/mcp-registry.js.map +1 -1
  334. package/dist/lib/__tests__/host-load-gate.test.d.ts +2 -0
  335. package/dist/lib/__tests__/host-load-gate.test.d.ts.map +1 -0
  336. package/dist/lib/__tests__/host-load-gate.test.js +377 -0
  337. package/dist/lib/__tests__/host-load-gate.test.js.map +1 -0
  338. package/dist/lib/__tests__/runs-ledger.test.d.ts +2 -0
  339. package/dist/lib/__tests__/runs-ledger.test.d.ts.map +1 -0
  340. package/dist/lib/__tests__/runs-ledger.test.js +99 -0
  341. package/dist/lib/__tests__/runs-ledger.test.js.map +1 -0
  342. package/dist/lib/atomic-write.d.ts +16 -0
  343. package/dist/lib/atomic-write.d.ts.map +1 -1
  344. package/dist/lib/atomic-write.js +27 -4
  345. package/dist/lib/atomic-write.js.map +1 -1
  346. package/dist/lib/host-load-gate.d.ts +110 -0
  347. package/dist/lib/host-load-gate.d.ts.map +1 -0
  348. package/dist/lib/host-load-gate.js +228 -0
  349. package/dist/lib/host-load-gate.js.map +1 -0
  350. package/dist/lib/mode-state-io.d.ts.map +1 -1
  351. package/dist/lib/mode-state-io.js +55 -18
  352. package/dist/lib/mode-state-io.js.map +1 -1
  353. package/dist/lib/runs-ledger.d.ts +45 -0
  354. package/dist/lib/runs-ledger.d.ts.map +1 -0
  355. package/dist/lib/runs-ledger.js +141 -0
  356. package/dist/lib/runs-ledger.js.map +1 -0
  357. package/dist/platform/executable-resolution.d.ts +13 -0
  358. package/dist/platform/executable-resolution.d.ts.map +1 -1
  359. package/dist/platform/executable-resolution.js +16 -0
  360. package/dist/platform/executable-resolution.js.map +1 -1
  361. package/dist/shared/types.d.ts +3 -0
  362. package/dist/shared/types.d.ts.map +1 -1
  363. package/dist/team/__tests__/model-contract.test.js +63 -1
  364. package/dist/team/__tests__/model-contract.test.js.map +1 -1
  365. package/dist/team/__tests__/stage-router.test.js +22 -0
  366. package/dist/team/__tests__/stage-router.test.js.map +1 -1
  367. package/dist/team/__tests__/team-owner-epoch.test.js +33 -0
  368. package/dist/team/__tests__/team-owner-epoch.test.js.map +1 -1
  369. package/dist/team/__tests__/tmux-session.create-team.test.js +60 -2
  370. package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -1
  371. package/dist/team/__tests__/tmux-session.psmux.test.js +12 -0
  372. package/dist/team/__tests__/tmux-session.psmux.test.js.map +1 -1
  373. package/dist/team/__tests__/tmux-session.test.js +230 -7
  374. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  375. package/dist/team/__tests__/worker-launch-ack.test.js +62 -0
  376. package/dist/team/__tests__/worker-launch-ack.test.js.map +1 -1
  377. package/dist/team/model-contract.d.ts +3 -2
  378. package/dist/team/model-contract.d.ts.map +1 -1
  379. package/dist/team/model-contract.js +35 -10
  380. package/dist/team/model-contract.js.map +1 -1
  381. package/dist/team/runtime-v2.d.ts +13 -0
  382. package/dist/team/runtime-v2.d.ts.map +1 -1
  383. package/dist/team/runtime-v2.js +112 -7
  384. package/dist/team/runtime-v2.js.map +1 -1
  385. package/dist/team/scaling.d.ts.map +1 -1
  386. package/dist/team/scaling.js +4 -1
  387. package/dist/team/scaling.js.map +1 -1
  388. package/dist/team/stage-router.d.ts.map +1 -1
  389. package/dist/team/stage-router.js +3 -1
  390. package/dist/team/stage-router.js.map +1 -1
  391. package/dist/team/team-owner-epoch.d.ts.map +1 -1
  392. package/dist/team/team-owner-epoch.js +4 -7
  393. package/dist/team/team-owner-epoch.js.map +1 -1
  394. package/dist/team/tmux-session.d.ts +8 -1
  395. package/dist/team/tmux-session.d.ts.map +1 -1
  396. package/dist/team/tmux-session.js +71 -19
  397. package/dist/team/tmux-session.js.map +1 -1
  398. package/dist/team/worker-launch-ack.d.ts +1 -1
  399. package/dist/team/worker-launch-ack.d.ts.map +1 -1
  400. package/dist/team/worker-launch-ack.js +28 -1
  401. package/dist/team/worker-launch-ack.js.map +1 -1
  402. package/dist/tools/lsp/__tests__/client-handle-data.test.js +83 -0
  403. package/dist/tools/lsp/__tests__/client-handle-data.test.js.map +1 -1
  404. package/dist/tools/lsp/client.d.ts.map +1 -1
  405. package/dist/tools/lsp/client.js +41 -11
  406. package/dist/tools/lsp/client.js.map +1 -1
  407. package/docs/CLAUDE.md +1 -1
  408. package/docs/HOOKS.md +235 -0
  409. package/docs/MIGRATION.md +132 -0
  410. package/docs/REFERENCE.md +26 -1
  411. package/docs/adr/03672-env-activated-active-mode.md +18 -1
  412. package/docs/design/FACTORY-FINAL-DESIGN.md +114 -0
  413. package/docs/design/P2-RUN-LEDGER-AND-INTAKE-PLAN.md +83 -0
  414. package/docs/factory/t6-acceptance/acceptance-comment.md +36 -0
  415. package/hooks/hooks.json +22 -1
  416. package/package.json +6 -2
  417. package/plugin.json +1 -1
  418. package/scripts/build-contained-fs.mjs +24 -2
  419. package/scripts/ci/check-multirepo-paths.mjs +3 -0
  420. package/scripts/code-simplifier.mjs +24 -2
  421. package/scripts/dev/repro-state-lock.mjs +67 -0
  422. package/scripts/git-guardrails.mjs +581 -0
  423. package/scripts/keyword-detector.mjs +21 -4
  424. package/scripts/lib/atomic-write.mjs +31 -8
  425. package/scripts/lib/jev-shadow.mjs +68 -29
  426. package/scripts/lib/run-reaper.mjs +114 -0
  427. package/scripts/lib/state-lock.mjs +22 -13
  428. package/scripts/post-tool-verifier.mjs +8 -2
  429. package/scripts/postinstall-contained-fs.mjs +56 -0
  430. package/scripts/pre-tool-enforcer.mjs +25 -8
  431. package/scripts/run.cjs +18 -0
  432. package/scripts/runs-reconciler.mjs +103 -0
  433. package/scripts/stale-run-reporter.mjs +73 -0
  434. package/scripts/workflow-drift-guard.mjs +6 -1
  435. package/skills/autopilot/SKILL.md +10 -2
  436. package/skills/harbor/SKILL.md +8 -0
  437. package/skills/omc-setup/phases/04-welcome.md +1 -1
  438. package/skills/ralph/SKILL.md +32 -15
  439. package/skills/refit/SKILL.md +8 -0
  440. package/skills/team/SKILL.md +2 -0
  441. package/templates/hooks/code-simplifier.mjs +24 -2
  442. package/templates/hooks/lib/atomic-write.mjs +31 -8
  443. package/templates/hooks/session-end.mjs +99 -0
  444. package/templates/hooks/workflow-drift-guard.mjs +6 -1
package/docs/HOOKS.md CHANGED
@@ -399,6 +399,24 @@ or
399
399
 
400
400
  `cancel` removes state files for all active modes: ralph, autopilot, team, and any others; it also clears legacy/retired `ultrawork` state.
401
401
 
402
+ #### Git Guardrails (`git-guardrails.mjs`)
403
+
404
+ A PreToolUse hook (matcher: `Bash`) that checks shell command positions and blocks destructive Git operations from agent-driven Bash calls with an authority message. It scans commands separated by shell chains and newlines, so a destructive command is still blocked when it follows a safe command. Quoted arguments and ordinary text commands such as `echo git push` are not mistaken for Git invocations. Git's global options before the subcommand are skipped, including `-C <dir>`, `-c key=value`, `--git-dir`/`--work-tree` (in `=` or separate-word form), `--no-pager`/`-P`, and the other flags `git help git` lists, so `git --no-pager push` is blocked like `git push`.
405
+
406
+ - **Enable**: Set `OMC_GIT_GUARDRAILS=1` to enable in any session. The guard also auto-enables when the canonical state resolver finds an active ralph, autopilot, team, or ultragoal state owned by the current session. If the payload has no session ID, auto-enable fails open rather than borrowing another session's legacy state. `OMC_GIT_GUARDRAILS=0` disables both activation paths; otherwise the hook fails open when no active mode is found.
407
+ - **Blocked operations**: non-dry-run `git push`, `git reset --hard`, non-dry-run `git clean -f/--force`, forced branch deletion (`git branch -D`, `-d --force`, or `--force --delete` in either order), and `git checkout .` / `git checkout -- .` or `git restore .` (working-tree discard). The hook ignores Git option-looking arguments after `--`; those are refspecs or pathspecs, not options.
408
+ - **Safe operations**: `git push --dry-run` / `git push -n`, clean dry-runs (`git clean -n`, including `git clean -n -- -f`), soft resets, non-forced branch deletes (`-d`), and path-specific checkout/restore commands such as `git checkout ./path` and `git restore ./file` pass. Malformed, absent, or command-less payloads fail open. An unset guard variable outside an active mode also fails open after a bounded stdin read; explicit `=0` exits before reading stdin.
409
+ - **Message**: the hook refuses with “You do not have authority for this operation” and names the two legitimate exits — the user runs it themselves, or explicitly sets `OMC_GIT_GUARDRAILS=0`. When auto-enabled by an active mode, the refusal names the mode.
410
+ - **Prove it bites**: before trusting the guardrail in a session, feed it a planted violation once and watch it block (see the `refit` skill's landing rule). An installed guardrail nobody has seen fire is decoration, not protection.
411
+
412
+ #### Stale Run Reporter (`stale-run-reporter.mjs`)
413
+
414
+ A SessionStart hook: the unattended-run **watchdog**. It scans the resolved `.omg` state root for persistent unattended-mode state files — ralph, autopilot, team, ultragoal — left `active: true` with a stale mtime (the signature of a run whose process died mid-flight), and surfaces them as advisory `[STALE RUN]` context naming the mode, approximate age, and state path.
415
+
416
+ - **Threshold**: 2 hours of mtime silence (matching the persistent-mode freshness window); tunable via `OMC_STALE_RUN_HOURS`.
417
+ - **Coverage**: both layouts — legacy `.omg/state/<mode>-state.json` and session-scoped `.omg/state/sessions/<sessionId>/<mode>-state.json`. The starting session's own state is excluded; malformed state files are ignored, never findings.
418
+ - **Doctrine**: the watchdog observes and reports only. It never mutates state, never resumes a run, and never infers approval — reclaiming a dead run (`/oh-my-copilot:cancel` to clean up, or re-entering the mode to resume from artifacts) is always a human decision.
419
+
402
420
 
403
421
  ---
404
422
 
@@ -593,3 +611,220 @@ stopomc
593
611
  ```
594
612
  /oh-my-copilot:team 3:executor "build a fullstack todo app"
595
613
  ```
614
+
615
+ ---
616
+
617
+ ## Jev Judgment Points
618
+
619
+ **Jev** is a System One API (TypeSafe) that provides calibrated decision-making for OMC's orchestration points. It replaces keyword lists and heuristics for critical decisions like skill triggering, model-tier routing, loop continuation, and context pruning.
620
+
621
+ ### Zero Egress by Default
622
+
623
+ Jev is **zero egress** — nothing is sent anywhere without explicit configuration:
624
+ - No `TYPESAFE_API_KEY` → Jev is disabled; all points run heuristic twins
625
+ - No `OMC_JEV` configuration → no points are opted in; even with a key, zero requests are sent
626
+ - Heuristic fallback → if Jev times out, is unavailable, or over budget, every point runs its heuristic twin and workflows never block on Jev
627
+
628
+ ### Configuration
629
+
630
+ Enable Jev with two environment variables:
631
+
632
+ ```bash
633
+ # 1. Authenticate to TypeSafe (required, but not sufficient on its own)
634
+ export TYPESAFE_API_KEY="your-api-key"
635
+
636
+ # 2. Explicitly opt in to judgment points
637
+ export OMC_JEV="point1,point2:active,all"
638
+ ```
639
+
640
+ #### Environment Variables
641
+
642
+ | Variable | Default | Description |
643
+ |----------|---------|-------------|
644
+ | `TYPESAFE_API_KEY` | (absent) | API key for TypeSafe System One. Required to enable Jev; the key alone does not enable any points. |
645
+ | `OMC_JEV` | (absent) | Per-point opt-in: `point`, `point:active`, `all` (every point, shadow), or `all:active` (every point, active). Comma-separated; unknown point names are ignored. |
646
+ | `OMC_JEV_TIMEOUT_MS` | `2000` | Per-call timeout in milliseconds (single round-trip measured at 465–605 ms; default allows margin). |
647
+ | `OMC_JEV_MAX_REQUESTS` | `0` (unlimited) | Maximum Jev requests per process. When reached, heuristic twins run for remaining calls. |
648
+ | `OMC_JEV_EXCERPT_CHARS` | `200` | Maximum string length sent in state and shadow log. Recursively bounds all strings in the judgment payload. |
649
+ | `OMC_JEV_ENDPOINT` | `https://api.typesafe.ai/v1/systemone` | Override for stub servers or tests. |
650
+ | `OMC_JEV_LOG_DIR` | `.omg/state/jev` | Shadow-log directory override (test only). |
651
+ | `OMC_JEV_QUIET` | (unset) | Set to `1` to silence the env-activation stderr warning. |
652
+ | `OMC_JEV=off` | — | Master switch: disables every point regardless of key or other config. |
653
+
654
+ #### Point Activation Syntax
655
+
656
+ `OMC_JEV` accepts comma-separated entries with three syntax forms:
657
+
658
+ ```bash
659
+ # Shadow mode (Jev runs but decision is not used, heuristic twin is authoritative)
660
+ export OMC_JEV="intent,model-routing,task-size"
661
+
662
+ # Active mode (Jev decision is used if blocking; non-blocking points fire-and-record)
663
+ export OMC_JEV="intent:active,model-routing:active"
664
+
665
+ # Wildcard: all registered points in shadow
666
+ export OMC_JEV="all"
667
+
668
+ # Wildcard: all registered points in active
669
+ export OMC_JEV="all:active"
670
+
671
+ # Master disable
672
+ export OMC_JEV="off"
673
+ ```
674
+
675
+ Unknown point names are ignored. Activation unions across sources: code-time `ACTIVATED_POINTS` (empty in every release) plus env `:active` suffix; either source activates a point.
676
+
677
+ ### Shadow vs. Active Mode
678
+
679
+ Each judgment point operates in one of three states:
680
+
681
+ | State | Behavior | When It Occurs |
682
+ |-------|----------|----------------|
683
+ | **off** | Point does not run; heuristic twin is used | No `TYPESAFE_API_KEY`, `OMC_JEV=off`, or point not opted in |
684
+ | **shadow** | Both Jev and heuristic run; Jev answer is logged but NOT acted on; heuristic is authoritative; fire-and-forget for non-blocking points | Point is opted in but not activated; Jev unavailable, times out, or over budget |
685
+ | **active** | Jev answer IS acted on; blocking points gate behavior, non-blocking points wait (bounded by `OMC_JEV_TIMEOUT_MS`) | Point is opted in and activated via env `:active` or code-time `ACTIVATED_POINTS` |
686
+
687
+ Once a point is opted in (e.g., `OMC_JEV="model-routing"`), it automatically degrades to shadow if Jev is unavailable, times out, or exceeds the request budget — no workflow blocks on Jev. In active mode, non-blocking points wait for Jev up to `OMC_JEV_TIMEOUT_MS` (default 2000ms); if Jev fails, the heuristic twin is used and the call returns immediately.
688
+
689
+ ### Shadow Log Location
690
+
691
+ Every Jev call—whether shadow or active—is recorded in the shadow log:
692
+
693
+ ```
694
+ .omg/state/jev/<point>-shadow.jsonl
695
+ ```
696
+
697
+ Each line is a JSON record with:
698
+ - `ts`: ISO timestamp
699
+ - `point`: judgment-point name
700
+ - `state`: the payload sent to Jev (bounded to `OMC_JEV_EXCERPT_CHARS`)
701
+ - `mode`: `"shadow"` or `"active"`
702
+ - `jev_answer`: Jev's response (if successful)
703
+ - `twin_answer`: the heuristic twin's result
704
+ - `match`: `true` if Jev and twin agree
705
+ - `error`: error message (if the call failed)
706
+ - `latencyMs`: round-trip time
707
+
708
+ Use shadow logs to collect evidence for promotion decisions (ticket 07) and to debug mismatches.
709
+
710
+ ### Heuristic Fallback on Failure
711
+
712
+ Jev never blocks the workflow:
713
+
714
+ - **Timeout**: If a call exceeds `OMC_JEV_TIMEOUT_MS`, the heuristic twin runs immediately.
715
+ - **Over budget**: If `OMC_JEV_MAX_REQUESTS` is reached, all remaining calls use heuristic twins.
716
+ - **Unavailable**: If the API is unreachable or returns an error, heuristic twin is used and the failure is logged.
717
+ - **Blocking points**: Even in active mode, if Jev fails, the heuristic twin's decision is used and the workflow continues.
718
+
719
+ ### Judgment Points Registry
720
+
721
+ Every registered judgment point with its lifecycle hook, decision type, and blocking behavior:
722
+
723
+ | Point Name | Event | Hook | Decision | Type | Blocking | Activated* |
724
+ |------------|-------|------|----------|------|----------|------------|
725
+ | `intent` | UserPromptSubmit | keyword-detector | Is this an Intent-intake request? | Noul (yes/no) | No | — |
726
+ | `skill-trigger` | UserPromptSubmit | keyword-detector | Which skill should this prompt trigger? | Choice (cancel/ralph/autopilot/…) | No | — |
727
+ | `task-size` | UserPromptSubmit | task-size-detector | Is this small/medium/large? | Choice (small/medium/large) | No | — |
728
+ | `model-routing` | PreToolUse | delegation-enforcer | Which model tier (haiku/sonnet/opus)? | Choice (haiku/sonnet/opus) | No | — |
729
+ | `slop-warning` | PreToolUse | jev-slop-warning | Does this tool input have advisory language? | Noul (yes/no) | No | — |
730
+ | `context-pruning` | PostToolUse | post-tool-verifier | How stale is this context candidate? | Score (fresh/recent/aging/stale) | No | — |
731
+ | `loop-continuation` | Stop | persistent-mode | Is task complete? + Progress level? | Noul + Score | **Yes** | — |
732
+ | `ralph-verdict` | Stop | ralph | Does completion satisfy PRD criteria? | Noul (yes/no) | **Yes** | — |
733
+ | `learner-extraction` | Stop | learner | Does this message have extractable memory? | Noul (yes/no) | No | — |
734
+ | `simplifier-trigger` | Stop | code-simplifier | Is this change simplification-worthy? | Noul (yes/no) | No | — |
735
+
736
+ **Activated**: asterisk (`*`) means the point is in `ACTIVATED_POINTS` (empty in all releases; promoted by ticket 07). Use `OMC_JEV=<point>:active` to activate via environment instead.
737
+
738
+ **Advisory vs. Blocking**:
739
+ - **Advisory points** (Blocking=No): Jev answers are recorded in shadow log but do not affect workflow. Useful for collecting calibration data.
740
+ - **Blocking points** (Blocking=Yes): In active mode, Jev's yes/no answer gates behavior (e.g., ralph stops when `ralph-verdict` decides completion is met). Timeout, unavailability, or budget exhaustion reverts to heuristic twin.
741
+
742
+ ### Request Budget and Latency
743
+
744
+ Set limits to control cost and latency:
745
+
746
+ ```bash
747
+ # Limit to 100 requests per process
748
+ export OMC_JEV_MAX_REQUESTS=100
749
+
750
+ # Raise timeout for slow networks
751
+ export OMC_JEV_TIMEOUT_MS=5000
752
+
753
+ # Truncate large state excerpts
754
+ export OMC_JEV_EXCERPT_CHARS=500
755
+ ```
756
+
757
+ Once the request budget is exhausted, all remaining points run heuristic twins.
758
+
759
+ ### Example Configurations
760
+
761
+ #### Shadow Mode (Collect Data)
762
+
763
+ Run every point in shadow to collect calibration evidence:
764
+
765
+ ```bash
766
+ export TYPESAFE_API_KEY="sk-..."
767
+ export OMC_JEV="all" # All points in shadow; heuristic is authoritative
768
+ ```
769
+
770
+ Review shadow logs at `.omg/state/jev/` to see how well Jev matches your heuristics.
771
+
772
+ #### Active Model Routing Only
773
+
774
+ Activate Jev only for model-tier decisions:
775
+
776
+ ```bash
777
+ export TYPESAFE_API_KEY="sk-..."
778
+ export OMC_JEV="model-routing:active" # Only this point, active
779
+ ```
780
+
781
+ #### Production (All Points Active)
782
+
783
+ When evidence shows Jev outperforms heuristics on all points:
784
+
785
+ ```bash
786
+ export TYPESAFE_API_KEY="sk-..."
787
+ export OMC_JEV="all:active" # All points, active; Jev decides
788
+ export OMC_JEV_MAX_REQUESTS=1000 # Cost control
789
+ ```
790
+
791
+ #### Disable Jev Globally
792
+
793
+ ```bash
794
+ export OMC_JEV="off" # Master switch
795
+ ```
796
+
797
+ Or simply omit `TYPESAFE_API_KEY`.
798
+
799
+ ### Debugging
800
+
801
+ #### Check What Was Decided
802
+
803
+ Read the shadow log for a point:
804
+
805
+ ```bash
806
+ cat .omg/state/jev/model-routing-shadow.jsonl | jq '.'
807
+ ```
808
+
809
+ #### Verify Jev is Running
810
+
811
+ Look for stderr output on point activation:
812
+
813
+ ```
814
+ [jev] model-routing: ACTIVE via env — Jev decides
815
+ ```
816
+
817
+ If this does not appear, the point is not activated or Jev is disabled.
818
+
819
+ #### Quiet the Warning
820
+
821
+ ```bash
822
+ export OMC_JEV_QUIET=1 # Suppress the activation message
823
+ ```
824
+
825
+ ### References
826
+
827
+ - **Decision Model**: [Jev Issue #3669](https://github.com/Yeachan-Heo/oh-my-claudecode/issues/3669) — user stories and design
828
+ - **Degradation Contract**: [ADR 03665](adr/03665-jev-degradation-contract.md) — how Jev fails gracefully
829
+ - **Env Activation**: [ADR 03672](adr/03672-env-activated-active-mode.md) — `:active` syntax and union semantics
830
+ - **Script-Side Points**: [ADR 03671](adr/03671-script-side-judgment-channel.md) — hook-script integration points
package/docs/MIGRATION.md CHANGED
@@ -8,6 +8,8 @@ This guide covers all migration paths for oh-my-copilot. Find your current versi
8
8
 
9
9
  - [Unreleased: Team Instance Ownership](#unreleased-team-instance-ownership)
10
10
  - [Unreleased: Cancellation Scope](#unreleased-cancellation-scope)
11
+ - [v5.6.1 → v5.6.2: Postinstall Hook](#v561--v562-postinstall-hook)
12
+ - [v5.5.0 → v5.6.1: Fork Upgrade Guide](#v550--v561-fork-upgrade-guide)
11
13
  - [v5.1.0 → v5.5.0: Fork Upgrade Guide](#v510--v550-fork-upgrade-guide)
12
14
  - [v4.13.102 → v5.0.0: Fork Upgrade Guide](#v413102--v500-fork-upgrade-guide)
13
15
  - [v4.x → v5.0: Workflow Retirement](#v4x--v50-workflow-retirement)
@@ -120,6 +122,136 @@ locations and descendants of system temp/OS roots are never used as roots.
120
122
 
121
123
  ---
122
124
 
125
+ ## v5.6.1 → v5.6.2: Postinstall Hook
126
+
127
+ Fork **v5.6.2** ports upstream oh-my-claudecode `dev` 4280efb1f..486b85bbb.
128
+ There is nothing to migrate: no config, command or skill changes.
129
+
130
+ - Update with `npm install -g oh-my-copilot@5.6.2` or
131
+ `copilot plugin update oh-my-copilot@omc`.
132
+ - `npm install` now runs `scripts/postinstall-contained-fs.mjs`. On macOS it
133
+ builds the contained-fs native addon if it is missing; if Node headers or
134
+ Xcode Command Line Tools are unavailable it prints a warning and you can
135
+ build later with `node scripts/build-contained-fs.mjs` from the package
136
+ root. On Linux and Windows it does nothing. The hook always exits 0, so it
137
+ never fails the install.
138
+
139
+ ---
140
+
141
+ ## v5.5.0 → v5.6.1: Fork Upgrade Guide
142
+
143
+ This section covers the upgrade from fork **v5.5.0** to fork **v5.6.1**. The
144
+ release ports upstream oh-my-claudecode v5.6.0, v5.6.1 and `dev` through
145
+ 4280efb1f, and it runs the new unattended-run commands on Copilot under a
146
+ scoped permission profile. Nothing is renamed or removed, so there are no
147
+ breaking changes.
148
+
149
+ ### TL;DR
150
+
151
+ 1. Update the package (`npm install -g oh-my-copilot@5.6.1`) or the plugin
152
+ (`copilot plugin update oh-my-copilot@omc`). No config edits are required.
153
+ 2. If you export `COPILOT_ALLOW_ALL`, note that unattended children now
154
+ ignore it (see [Behaviour change](#copilot_allow_all-on-unattended-children)).
155
+ 3. Optional: try `omg factory init`, `omg intake run` and `omg ralph afk`.
156
+ They need the host binary on PATH and `gh` authenticated.
157
+
158
+ ### New commands
159
+
160
+ | Command | What it does |
161
+ |---|---|
162
+ | `omg factory init [--no-narrow] [--force] [--cwd <dir>]` | Seeds `.omg/factory-routes.json`, the chain-routing source of truth. Refuses unless `.omg/state/` and `docs/design/` exist, and never overwrites a table without `--force`. |
163
+ | `omg factory listen --repo <owner/name,...> [--port 7788] [--host 127.0.0.1] [--cwd <dir>]` | Tracker intake daemon. Requires `OMC_FACTORY_HMAC_SECRET`; binds to 127.0.0.1 unless `--host` says otherwise. |
164
+ | `omg factory status [--json]` | Read-only audit of factory chains. |
165
+ | `omg intake run [--headless] [--allow-docket-only] [--host-bin <bin>] [--cwd <dir>]` | One headless harbor sweep. Refuses without a verified notification channel unless `--allow-docket-only` is passed. |
166
+ | `omg intake schedule --cron <expr> [--off] [--cwd <dir>]` | Installs (or with `--off` removes) the sweep in cron, or in Task Scheduler on Windows (`*/N * * * *` and `M H * * *` only). |
167
+ | `omg ralph afk "<task>" [--verify <command>]...` | Launches an isolated headless ralph run. `--verify` is repeatable. |
168
+ | `omg ralph verify [--write-baseline] [--session <id>] [--json]` | The only command that records or judges the feedback baseline. |
169
+ | `omg ralph from-map --map <repo#number> [--repo <name>] [--execute] [--launch] [--finalize] [--session <id>] [--json]` | Plans, claims and launches a ralph run from a wayfinder map. |
170
+
171
+ ### What these commands need on Copilot
172
+
173
+ - **The host binary on PATH.** Factory links and ralph AFK runs spawn
174
+ `copilot` (or `claude` under Claude Code). `omg intake run --host-bin <bin>`
175
+ overrides the binary; the value is validated like the team launch contract.
176
+ - **`gh` authenticated** for the repository. `omg intake run` refuses when
177
+ `gh repo view` or `gh label list` fails, and AFK sessions talk to the
178
+ tracker through `gh`.
179
+ - **The AFK permission profile.** Factory links and `omg ralph afk|from-map`
180
+ launch Copilot with:
181
+
182
+ ```text
183
+ --no-ask-user
184
+ --allow-tool=shell(gh issue view) --allow-tool=shell(gh issue comment)
185
+ --allow-tool=shell(gh issue edit) --allow-tool=shell(gh pr view)
186
+ --allow-tool=shell(gh pr list) --allow-tool=shell(gh label list)
187
+ --allow-tool=write --allow-url=github.com
188
+ --deny-tool=write(.git) --deny-tool=write(package.json) --deny-tool=shell(git push)
189
+ ```
190
+
191
+ Deny beats allow, so the session cannot edit git plumbing, rewrite
192
+ `package.json` (which would turn an allowed `npm test` into arbitrary
193
+ shell) or push. Ralph AFK runs also get
194
+ `--allow-tool=shell(omg ralph verify)`. Each declared `--verify` command
195
+ becomes one `--allow-tool=shell(<command>)` rule; on Copilot a command that
196
+ is a bare program or an interpreter flag (for example `node -e`) is
197
+ refused, because a prefix rule would admit arbitrary code.
198
+ - `omg intake run` launches Copilot with `-p <prompt> --no-ask-user` and no
199
+ allow rules, plus `OMC_GIT_GUARDRAILS=1`.
200
+
201
+ ### `COPILOT_ALLOW_ALL` on unattended children
202
+
203
+ This is the one behaviour change. `COPILOT_ALLOW_ALL` is no longer forwarded
204
+ by the session-end `COPILOT_*` passthrough, and every AFK child (factory
205
+ links, `omg ralph afk|from-map`, `omg intake run`) is started with
206
+ `COPILOT_ALLOW_ALL=false`. Before, an exported value widened the AFK profile
207
+ to unrestricted shell. Interactive sessions and `omg team` workers are not
208
+ affected.
209
+
210
+ ### New environment variables
211
+
212
+ | Variable | Default | Effect |
213
+ |---|---|---|
214
+ | `OMC_GIT_GUARDRAILS` | unset | `1` blocks `git push`, `git reset --hard`, `git clean -f`, `git branch -D` and `git checkout/restore .` in every session; `0` turns the hook off even during an unattended mode. Unset, it is on only while ralph, autopilot, team or ultragoal is active. |
215
+ | `OMC_STALE_RUN_HOURS` | `2` | Age after which the SessionStart watchdog reports an `active: true` unattended run as stale. It reports only; it never resumes or clears state. |
216
+ | `OMC_HOST_LOAD_THRESHOLD` | 80% of CPU cores | CPU load above which expensive operations wait. |
217
+ | `OMC_FREE_MEMORY_THRESHOLD` | `256` (MB) | Free memory below which expensive operations wait. |
218
+ | `OMC_MAX_SIBLING_SESSIONS` | `8` | Live sibling OMC sessions above which expensive operations wait. |
219
+ | `OMC_HOST_LOAD_GATE_DISABLED` | unset | Any value disables the host-load gate. The gate also proceeds when metrics are unavailable. |
220
+ | `OMC_TEAM_WORKER_ENV_PASSTHROUGH` | unset | Comma-separated variable names forwarded to team workers, for custom provider credentials. Reserved and invalid names are rejected. |
221
+ | `OMC_FACTORY_HMAC_SECRET` | unset | Required by `omg factory listen` to verify tracker events. |
222
+
223
+ ### `team.roleRouting.<role>.reasoningEffort`
224
+
225
+ `roleRouting` entries take a per-role `reasoningEffort`. The fork forwards it
226
+ only to providers with a verified CLI flag: claude workers (`--effort`) and
227
+ codex workers (`model_reasoning_effort`). **Copilot workers ignore it**,
228
+ because Copilot CLI has no verified reasoning-effort flag.
229
+
230
+ ### Windows launch change
231
+
232
+ On Windows, factory links and ralph AFK runs no longer put the prompt on a
233
+ command line. The prompt goes to the host binary on stdin (`copilot` reads a
234
+ piped prompt without `-p`, verified on Copilot CLI 1.0.91; `claude` keeps
235
+ `-p`), and a `gh --body` becomes `--body-file -`. Native `.exe` binaries are
236
+ spawned directly with an argument array; only `.cmd`/`.bat` npm shims go
237
+ through `COMSPEC`, with quoting that refuses `%`. Nothing to configure, but
238
+ wrappers that inspected the child's argv for the prompt will no longer find
239
+ it there.
240
+
241
+ ### Known limitations
242
+
243
+ - **Copilot factory chains stop after one link.** Copilot CLI has no
244
+ `--session-id`, so the next link cannot be pinned; `omg factory status` and
245
+ the watchdog report the stalled chain.
246
+ - **git-guardrails under Copilot on Windows is not live-verified.** The hook
247
+ is projected and unit-tested, but its PreToolUse payload has not been
248
+ exercised in a live Copilot session on Windows. Plant a violation (for
249
+ example ask for `git push`) before relying on it.
250
+
251
+ See [CHANGELOG.md](../CHANGELOG.md) for the full port summary.
252
+
253
+ ---
254
+
123
255
  ## v5.1.0 → v5.5.0: Fork Upgrade Guide
124
256
 
125
257
  This section covers the upgrade from fork **v5.1.0** to fork **v5.5.0**. The
package/docs/REFERENCE.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Complete reference for oh-my-copilot. For quick start, see the main [README.md](../README.md).
4
4
 
5
- For v5.5.0, the plugin ships 20 agents, 61 skills, 21 command files, and one configured MCP server exposing exactly 55 tools.
5
+ For v5.6.2, the plugin ships 20 agents, 61 skills, 21 command files, and one configured MCP server exposing exactly 55 tools.
6
6
 
7
7
  ---
8
8
 
@@ -132,6 +132,31 @@ If both configurations exist, **project-scoped takes precedence** over global:
132
132
  | `OMC_DISABLE_MULTIREPO` | _(unset)_ | Set to `1` to disable workspace-marker resolution and fall back to git-root + cwd resolution order. `OMC_STATE_DIR` is still honoured. See [Rollback / disable multi-repo](#rollback--disable-multi-repo-omc_disable_multirepo) below. |
133
133
  | `DISABLE_OMC` | _(unset)_ | Set to `1` or `true` to disable all OMC hooks |
134
134
  | `OMC_SKIP_HOOKS` | _(unset)_ | Comma-separated list of hook names to skip |
135
+ | `OMC_GIT_GUARDRAILS` | _(unset)_ | `1` force-enables the destructive-git PreToolUse guard in any session; `0` always disables it (immediate exit, wins over everything). With the variable unset, the guard is on by default while an active unattended mode (ralph/autopilot/team/ultragoal) is detected. |
136
+ | `OMC_RUN_BUDGET_TOKENS` | _(unset)_ | Opt-in session token budget for unattended modes. Ralph and autopilot compare spend at iteration/phase boundaries (via the `trace_summary` tool): warn at 90%, stop with a resumable budget report at 100%. Advisory today — the model reads the tool output. |
137
+ | `OMC_STALE_RUN_HOURS` | `2` | Stale-run watchdog threshold in hours. A SessionStart hook reports unattended-mode state files left `active: true` with no mtime progress for this long (the signature of a crashed run). Advisory only — the watchdog never mutates state or resumes runs. |
138
+ | `OMC_HOST_LOAD_THRESHOLD` | _(dynamic)_ | CPU load threshold (1-minute average). Gate blocks operations when load exceeds this. Default: 80% of available cores. Set to negative value to disable. |
139
+ | `OMC_FREE_MEMORY_THRESHOLD` | `256` | Free memory threshold in MB. Gate blocks operations when free memory falls below this. Set to negative value to disable. |
140
+ | `OMC_MAX_SIBLING_SESSIONS` | `8` | Maximum concurrent OMC sessions before gating expensive operations. Set to negative value to disable. |
141
+ | `OMC_HOST_LOAD_GATE_DISABLED` | _(unset)_ | Set to any value to disable the host load gate entirely. |
142
+
143
+ #### Host Load Gate
144
+
145
+ OMC monitors host resources (CPU load, free memory, concurrent sessions) to prevent resource exhaustion when multiple sessions are active. When thresholds are exceeded, expensive operations (browser launches, test runners, package installs) are gated with a back-off message.
146
+
147
+ **Behavior**:
148
+ - **Fail-open**: if metrics are unavailable, the gate allows operations immediately (never deadlocks)
149
+ - **Configurable thresholds**: set environment variables or override via code
150
+ - **Disable-able**: set `OMC_HOST_LOAD_GATE_DISABLED=1` to bypass gating entirely
151
+
152
+ **Example**: limit concurrent sessions to 4 and free memory to 512 MB:
153
+
154
+ ```bash
155
+ export OMC_MAX_SIBLING_SESSIONS=4
156
+ export OMC_FREE_MEMORY_THRESHOLD=512
157
+ ```
158
+
159
+ **Timeout**: gates wait up to 30 seconds by default before allowing operations (fail-open).
135
160
 
136
161
  #### Centralized State with `OMC_STATE_DIR`
137
162
 
@@ -1,3 +1,20 @@
1
1
  # Env-activated active mode: one env line enables every judgment point
2
2
 
3
- Judgment points default to shadow, and the only path to active was the compile-time `ACTIVATED_POINTS` set, which is empty in every release — so Jev shipped but never decided anything. Promotion was designed as evidence-driven (shadow collection, jev-eval agreement report, ticket 07 promotion), but evidence cannot exist before someone can run Jev for real, and the compile-time set made that impossible without a code change: Jev was permanently inert. We widen the model: `OMC_JEV` entries accept an `:active` suffix (`OMC_JEV=task-size:active`, or `all:active` for every point, `all` for all-shadow), env activation unions with code activation, and a warn-once stderr line (`[jev] <point>: ACTIVE via env — Jev decides`) makes the behavioral flip observable. Degrade-never-block is unchanged: timeout, HTTP error, invalid response, request cap, and circuit-open still fall back to the heuristic twin, and the shadow log keeps recording in active mode so the evidence chain continues. Rejected alternatives: a separate `OMC_JEV_ACTIVE` env (two opt-in channels fork the opt-in semantics); a global `OMC_JEV_MODE=active` (too coarse — would flip gate-type points like ralph-verdict with no per-point control). Status: accepted.
3
+ Judgment points default to shadow, and the only path to active was the compile-time `ACTIVATED_POINTS` set, which is empty in every release — so Jev shipped but never decided anything. Promotion was designed as evidence-driven (shadow collection, jev-eval agreement report, ticket 07 promotion), but evidence cannot exist before someone can run Jev for real, and the compile-time set made that impossible without a code change: Jev was permanently inert.
4
+
5
+ ## Solution
6
+
7
+ `OMC_JEV` entries accept an `:active` suffix: `OMC_JEV=task-size:active`, or `all:active` for every point, `all` for all-shadow. Env activation unions with code-time `ACTIVATED_POINTS` activation, and a warn-once stderr line (`[jev] <point>: ACTIVE via env — Jev decides`) makes the behavioral flip observable.
8
+
9
+ **Active mode behavior**:
10
+ - Blocking points: Jev answer gates behavior; timeout/error falls back to heuristic twin
11
+ - Non-blocking points (script-side): spawn synchronously and await Jev result (bounded by `OMC_JEV_TIMEOUT_MS`, default 2000ms); on timeout/error, use heuristic twin immediately
12
+ - Script hooks (pre-tool-enforcer, keyword-detector): when Jev provides an answer in active mode, that answer overrides the heuristic (model injection, skill override, etc.)
13
+
14
+ **Degrade-never-block**: Unchanged. Timeout, HTTP error, invalid response, request cap, and circuit-open still fall back to the heuristic twin. Shadow log keeps recording in active mode so the evidence chain continues.
15
+
16
+ **Rejected alternatives**:
17
+ - Separate `OMC_JEV_ACTIVE` env (two opt-in channels fork the opt-in semantics)
18
+ - Global `OMC_JEV_MODE=active` (too coarse — would flip gate-type points like ralph-verdict with no per-point control)
19
+
20
+ Status: accepted and implemented.
@@ -0,0 +1,114 @@
1
+ # Software Factory — Final Design
2
+
3
+ **Status:** design contract; synthesized from the Patterns-of-Work foundation (13 terms), the mattpocock/skills v1.3 borrowings, and the shipped enforcement layer (#4117, #4142, #4143, #4113)
4
+ **Owner:** Yeachan-Heo (decisions marked **[OWNER]**)
5
+ **Predecessors:** #4113 (dark-factory gaps), #4141 (P2 contract), #4142 (run ledger), #4143 (intake CLI), T6 acceptance (8/8)
6
+
7
+ ## 0. Design stance
8
+
9
+ The Patterns-of-Work vocabulary is the factory's specification: each of the 13 terms is a foundation stone, each stone yields one design rule, and the factory stands on all 13 or it is not done. The goal shape is a **software factory** — triggers start sessions, humans sit at named gates — with **dark-factory mode structurally prevented for merges** (review-approve is always human). Borrowings from mattpocock/skills v1.3 are adopted as mechanics, never as text.
10
+
11
+ ## 1. The full loop
12
+
13
+ ```
14
+ TRIGGERS CHAIN SESSION (AFK link) GATES LEDGERS REFLECTION
15
+ issue created/labeled ──▶ listener ──▶ spawn-next ──▶ headless session ──▶ SessionEnd ──▶ gradeGate ──▶ run ledger ──▶ chain ends ──▶ refit
16
+ cron (intake schedule) ──▶ (AFK profile: (reason → outcome) (human/auto) (closeout (stall (mechanical →
17
+ CI failure ─────────────▶ [to build: check-run route] narrow tools, SessionEnd enqueuer (3 criteria, flag) watchdog checks; judgment
18
+ session ended ──────────▶ chain enqueuer ──▶ budget guard, route table SSOT) 4 gates) (30 min) → standards)
19
+ checks+review gates)
20
+ ```
21
+
22
+ Humans sit only at the graded gates; everything between gates runs AFK.
23
+
24
+ ## 2. Foundation stones → design rules → state
25
+
26
+ | Stone | Design rule | Mechanism | State |
27
+ |---|---|---|---|
28
+ | Human-in-the-loop | humans can sit anywhere; which decisions stay human is the main design question | 4 named gates, graded by `gradeGate` | ✅ shipped |
29
+ | AFK | before: kill ambiguity (grilling/spec/assumption protocol); during: checks + narrow tools; after: a PR worth reviewing | assumption protocol (#4113), `AFK_ALLOWED_TOOLS`, budget-guard, PR ending | ✅ shipped |
30
+ | Automated check | the only verification during AFK; **flaky = broken**; chain advances only on green checks | per-skill doctrine; **chain-level check gate: to build**; win32 flaky spawn tests: **to fix/bound** | ⚠️ partial |
31
+ | Automated review | fresh-context reviewer, scoped prompt, **filter before the human gate — not a gate** | code-reviewer agent exists; **not a chain stage: to build** | ⚠️ partial |
32
+ | Human review | **the diff is the primary source; the summary is not** | review-approve gate is human; **diff-first requirement: to build** | ❌ violates stone |
33
+ | Vibe coding | the stance the factory makes explicit; visibility of dark vs gated areas | factory status view (#4180) | 🟡 open PR |
34
+ | Design concept | concept before fixation; spec too early durably captures misalignment | intent stage (non-engineer intake → review → accepted) | ✅ T6-validated |
35
+ | Grilling | one decision at a time, recommended answers | deep-interview (ambiguity scoring, frontier batching) | ✅ shipped |
36
+ | Prototyping | when words are too low-fidelity | loft | ✅ shipped |
37
+ | DX | the human contrast; informs where AX investment differs | — | — |
38
+ | AX | the environment is the only support in AFK runs | state-root fix (#4115), skill map (#4116), narrow tool profile, lean inventory | ✅ shipped |
39
+ | Software factory | triggers start sessions; **start small** (narrow loop → trust → widen); 4 trigger classes | listener (issue) ✅, intake schedule (cron) ✅, session-end enqueuer ✅, **CI-failure route: to build**, **narrow starter loop: to build** | ⚠️ 3/4 triggers |
40
+ | Dark factory | structurally prevented for merges; made visible where it exists | review-approve always human (gradeGate); status view (#4180) | ✅ prevented + visible |
41
+
42
+ ## 3. Component design (shipped vs to build)
43
+
44
+ ### 3.1 Trigger layer
45
+
46
+ - **Issue webhook** ✅ — listener daemon: HMAC, repo whitelist, intake label gate, serial.
47
+ - **Cron** ✅ — `omg intake schedule` (host-native timer, no daemon) → headless sweep.
48
+ - **Session end** ✅ — chain enqueuer: reason → outcome → route table → next link.
49
+ - **CI failure** ⚠️ **to build** — check-run failure webhook → listener route → diagnose/fix session (`diagnose:ci-failure` route entry). Same HMAC/whitelist path as issue intake.
50
+ - **Narrow starter loop** ⚠️ **to build** — `omg factory init --narrow`: one cron trigger + one session type + one reviewable PR (the "one lint rule a night" shape). The start-small configuration ships as the default; the full-pipeline route table is the widening, gated on the narrow loop's review track record.
51
+
52
+ ### 3.2 Chain layer
53
+
54
+ - Route table SSOT ✅ (`.omg/factory-routes.json`, #4176). **`omg factory init` to build** — seeds the route table (narrow loop by default, full pipeline as widening), validates harbor labels and shipyard prerequisites, documents the format; makes `DAILY_CHAIN_LIMIT` configurable (env override, default 10).
55
+ - Gate grading ✅ (3 criteria + mechanical checks; intent-accept and review-approve always human).
56
+ - Guardrails ✅ (serial single-session, daily cap); **cap configurability included in factory init**.
57
+ - Watchdog ✅ (stall detection → `harbor:need-info`); stall naming + status view in #4180.
58
+
59
+ ### 3.3 Session layer (the AFK link)
60
+
61
+ - **Before** ✅ — grilling (deep-interview), design-concept building (intent), prototyping detour (loft), assumption protocol.
62
+ - **During** ✅/⚠️ — budget guard (shipped); AFK tool profile (shipped); **tdd-driven implementers to build**: factory build-stage links mandate the tdd skill (implement-spec v1.3 mechanic — implementers call tdd, never free-form); **integration disciplines to build**: base-reset at start + integration-tip pull before reporting (implement-spec v1.3 mechanics — bounds drift to one work session); **check gate to build**: the link's checks must run green before the SessionEnd reports success.
63
+ - **After** ✅/⚠️ — ends in a PR worth reviewing (diff attached); run ledger + reconciliation (shipped).
64
+
65
+ ### 3.4 Gate layer
66
+
67
+ - gradeGate ✅ — 3 criteria; intent-accept and review-approve structurally human.
68
+ - **Diff-first human review to build** — a review-approve signoff must attach the diff or changed-file list (primary source); summary-only signoffs are recorded as invalid. Fixes the one foundation-stone violation (stone 5).
69
+ - **Automated review stage to build** — before review-approve, a fresh-context reviewer agent (scoped system prompt: security/contract/performance per change type) runs as a filter; the human gate sees the filtered findings plus the diff. The filter never replaces the gate.
70
+
71
+ ### 3.5 Ledger layer
72
+
73
+ - Run ledger ✅ (#4142), enforcement shadow log ✅ (#4117), chain ledger ✅ (#4153 family), reconciliation ✅.
74
+ - **Factory status view** — #4180 (open): names silent stalls, shows dark vs gated areas per the vibe-coding stone.
75
+
76
+ ### 3.6 Reflection layer
77
+
78
+ - refit ✅ (user-invoked; categories match the retro skill's).
79
+ - **Chain-termination → refit trigger to build** — implement-spec v1.3 places retro as the step that "closes the loop; the next build starts from a better environment". The factory route table gains a terminal edge: chain end → refit suggestion (advisory). Mechanical mistakes become checks; judgment calls become standards — the loop Matt draws, wired into our chain.
80
+
81
+ ## 4. Borrowings from mattpocock/skills v1.3 (mechanics only, never text)
82
+
83
+ | Borrowing | Source | Lands in |
84
+ |---|---|---|
85
+ | Integration-branch goal framing | implement-spec v1.3 | build-stage link doctrine |
86
+ | Tracker pointer (ticket status source) | implement-spec v1.3 | chain ledger `tracker` (already shipped) |
87
+ | tdd-driven implementers | implement-spec v1.3 | build-stage link gate |
88
+ | Worktree base-reset + tip-pull | implement-spec v1.3 | build-stage link conventions |
89
+ | Draft PR after first merge (empty branch can't open one) | implement-spec v1.3 | PR timing in the chain |
90
+ | Retro closes the loop | retro graduated + ask-matt placement | chain-termination → refit trigger |
91
+ | pr is model-invoked | pr graduated | our pr skill stays model-invocable |
92
+ | Glossary naming (`GLOSSARY.md`, collision with agent-context) + `GLOSSARY-MAP.md` multi-context map | v1.3 rename | **[OWNER]** breaking rename of `CONTEXT.md` |
93
+ | Start-small narrow loop | software-factory essay | `omg factory init --narrow` default |
94
+ | Retro's environment categories | retro skill | refit (already absorbed, #4110) |
95
+
96
+ ## 5. Defect register (foundation-stone violations and gaps)
97
+
98
+ 1. **Stone 5 violation** — review-approve accepts summary-only signoffs. Fix: diff-first requirement (§3.4).
99
+ 2. **Stone 4 gap** — no automated-review stage in the chain. Fix: §3.4.
100
+ 3. **Stone 3 poisoning** — win32 flaky spawn tests; no chain-level check gate. Fix: bound or fix (§3.3).
101
+ 4. **Stone 12 gap** — CI-failure trigger missing. Fix: §3.1.
102
+ 5. **Start-small missing** — full-pipeline route table as the only config. Fix: narrow starter default (§3.1).
103
+ 6. **Adoption gaps** — route-table authoring story, cap configurability, shipyard prerequisite check. Fix: `omg factory init` (§3.2).
104
+
105
+ ## 6. Sequencing
106
+
107
+ 1. Land #4180 + #4179 (visibility + AFK verify commands).
108
+ 2. **This contract's implementation waves**: (a) diff-first review doctrine + automated-review stage; (b) chain check gate + win32 bounding; (c) `omg factory init` + CI-failure trigger; (d) narrow starter loop config.
109
+ 3. Shadow accumulation on real usage → promotion per protocol (≥20 samples, zero false blocks) **[OWNER]**.
110
+ 4. T7 acceptance: full pipeline chained on a real repository — the actual "fully implemented" verdict.
111
+
112
+ ## 7. Non-goals
113
+
114
+ No dark-factory mode for merges (structurally prevented). No auto-resume. No inferred approvals. No production-monitoring daemon (ecosystem seam). No daemon beyond the opt-in listener.