claudecode-omc 4.4.5 → 4.4.6

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 (839) hide show
  1. package/.mcp.json +2 -6
  2. package/README.es.md +64 -8
  3. package/README.ja.md +64 -8
  4. package/README.ko.md +64 -8
  5. package/README.pt.md +29 -0
  6. package/README.vi.md +29 -0
  7. package/README.zh.md +64 -8
  8. package/agents/architect.md +17 -7
  9. package/agents/code-reviewer.md +6 -7
  10. package/agents/critic.md +14 -1
  11. package/agents/deep-executor.md +6 -7
  12. package/agents/designer.md +6 -8
  13. package/agents/executor.md +6 -7
  14. package/agents/planner.md +21 -0
  15. package/agents/quality-reviewer.md +6 -7
  16. package/agents/security-reviewer.md +6 -7
  17. package/agents/test-engineer.md +6 -7
  18. package/bridge/mcp-server.cjs +517 -202
  19. package/bridge/runtime-cli.cjs +1547 -0
  20. package/bridge/team-bridge.cjs +348 -92
  21. package/bridge/{gemini-server.cjs → team-mcp.cjs} +10914 -10240
  22. package/dist/__tests__/auto-update.test.js +1 -1
  23. package/dist/__tests__/auto-update.test.js.map +1 -1
  24. package/dist/__tests__/cli-win32-warning.test.d.ts +2 -0
  25. package/dist/__tests__/cli-win32-warning.test.d.ts.map +1 -0
  26. package/dist/__tests__/cli-win32-warning.test.js +46 -0
  27. package/dist/__tests__/cli-win32-warning.test.js.map +1 -0
  28. package/dist/__tests__/codex-callsite-normalization.test.js +112 -0
  29. package/dist/__tests__/consensus-execution-handoff.test.d.ts +2 -0
  30. package/dist/__tests__/consensus-execution-handoff.test.d.ts.map +1 -1
  31. package/dist/__tests__/consensus-execution-handoff.test.js +48 -0
  32. package/dist/__tests__/consensus-execution-handoff.test.js.map +1 -1
  33. package/dist/__tests__/context-safety.test.d.ts +2 -0
  34. package/dist/__tests__/context-safety.test.d.ts.map +1 -0
  35. package/dist/__tests__/context-safety.test.js +59 -0
  36. package/dist/__tests__/context-safety.test.js.map +1 -0
  37. package/dist/__tests__/hooks.test.js +15 -0
  38. package/dist/__tests__/hooks.test.js.map +1 -1
  39. package/dist/__tests__/hud/call-counts.test.js +0 -3
  40. package/dist/__tests__/hud/call-counts.test.js.map +1 -1
  41. package/dist/__tests__/hud/defaults.test.js +3 -5
  42. package/dist/__tests__/hud/defaults.test.js.map +1 -1
  43. package/dist/__tests__/hud/prompt-time.test.d.ts +2 -0
  44. package/dist/__tests__/hud/prompt-time.test.d.ts.map +1 -0
  45. package/dist/__tests__/hud/prompt-time.test.js +24 -0
  46. package/dist/__tests__/hud/prompt-time.test.js.map +1 -0
  47. package/dist/__tests__/hud/render.test.js +0 -1
  48. package/dist/__tests__/hud/render.test.js.map +1 -1
  49. package/dist/__tests__/hud/version-display.test.js +1 -0
  50. package/dist/__tests__/hud/version-display.test.js.map +1 -1
  51. package/dist/__tests__/hud/windows-platform.test.js +0 -4
  52. package/dist/__tests__/hud/windows-platform.test.js.map +1 -1
  53. package/dist/__tests__/hud-windows.test.js +5 -3
  54. package/dist/__tests__/hud-windows.test.js.map +1 -1
  55. package/dist/__tests__/installer-hud-skip.test.js +12 -2
  56. package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
  57. package/dist/__tests__/job-management-sqlite.test.js +0 -15
  58. package/dist/__tests__/job-management-sqlite.test.js.map +1 -1
  59. package/dist/__tests__/job-management.test.js +0 -16
  60. package/dist/__tests__/job-management.test.js.map +1 -1
  61. package/dist/__tests__/load-agent-prompt.test.js +0 -23
  62. package/dist/__tests__/load-agent-prompt.test.js.map +1 -1
  63. package/dist/__tests__/model-routing.test.js +3 -2
  64. package/dist/__tests__/model-routing.test.js.map +1 -1
  65. package/dist/__tests__/omc-tools-server-interop.test.js +1 -1
  66. package/dist/__tests__/omc-tools-server-interop.test.js.map +1 -1
  67. package/dist/__tests__/pre-tool-enforcer.test.d.ts +2 -0
  68. package/dist/__tests__/pre-tool-enforcer.test.d.ts.map +1 -0
  69. package/dist/__tests__/pre-tool-enforcer.test.js +194 -0
  70. package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -0
  71. package/dist/__tests__/prompt-injection.test.js +0 -26
  72. package/dist/__tests__/prompt-injection.test.js.map +1 -1
  73. package/dist/__tests__/purge-stale-cache.test.js +3 -2
  74. package/dist/__tests__/purge-stale-cache.test.js.map +1 -1
  75. package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts +2 -0
  76. package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts.map +1 -0
  77. package/dist/__tests__/run-cjs-graceful-fallback.test.js +167 -0
  78. package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -0
  79. package/dist/__tests__/session-start-cache-cleanup.test.d.ts +2 -0
  80. package/dist/__tests__/session-start-cache-cleanup.test.d.ts.map +1 -0
  81. package/dist/__tests__/session-start-cache-cleanup.test.js +150 -0
  82. package/dist/__tests__/session-start-cache-cleanup.test.js.map +1 -0
  83. package/dist/__tests__/skills.test.js +10 -8
  84. package/dist/__tests__/skills.test.js.map +1 -1
  85. package/dist/__tests__/team-server-validation.test.d.ts +2 -0
  86. package/dist/__tests__/team-server-validation.test.d.ts.map +1 -0
  87. package/dist/__tests__/team-server-validation.test.js +122 -0
  88. package/dist/__tests__/team-server-validation.test.js.map +1 -0
  89. package/dist/agents/index.d.ts +0 -1
  90. package/dist/agents/index.d.ts.map +1 -1
  91. package/dist/agents/index.js +0 -2
  92. package/dist/agents/index.js.map +1 -1
  93. package/dist/agents/prompt-helpers.d.ts +74 -0
  94. package/dist/agents/prompt-helpers.d.ts.map +1 -0
  95. package/dist/agents/prompt-helpers.js +187 -0
  96. package/dist/agents/prompt-helpers.js.map +1 -0
  97. package/dist/agents/utils.d.ts +1 -5
  98. package/dist/agents/utils.d.ts.map +1 -1
  99. package/dist/agents/utils.js +1 -34
  100. package/dist/agents/utils.js.map +1 -1
  101. package/dist/cli/__tests__/launch.test.d.ts +1 -2
  102. package/dist/cli/__tests__/launch.test.d.ts.map +1 -1
  103. package/dist/cli/__tests__/launch.test.js +442 -48
  104. package/dist/cli/__tests__/launch.test.js.map +1 -1
  105. package/dist/cli/__tests__/teleport-help.test.d.ts +2 -0
  106. package/dist/cli/__tests__/teleport-help.test.d.ts.map +1 -0
  107. package/dist/cli/__tests__/teleport-help.test.js +17 -0
  108. package/dist/cli/__tests__/teleport-help.test.js.map +1 -0
  109. package/dist/cli/commands/teleport.d.ts +2 -1
  110. package/dist/cli/commands/teleport.d.ts.map +1 -1
  111. package/dist/cli/commands/teleport.js +6 -3
  112. package/dist/cli/commands/teleport.js.map +1 -1
  113. package/dist/cli/index.js +40 -290
  114. package/dist/cli/index.js.map +1 -1
  115. package/dist/cli/launch.d.ts +83 -3
  116. package/dist/cli/launch.d.ts.map +1 -1
  117. package/dist/cli/launch.js +213 -48
  118. package/dist/cli/launch.js.map +1 -1
  119. package/dist/cli/win32-warning.d.ts +6 -0
  120. package/dist/cli/win32-warning.d.ts.map +1 -0
  121. package/dist/cli/win32-warning.js +15 -0
  122. package/dist/cli/win32-warning.js.map +1 -0
  123. package/dist/config/loader.d.ts +9 -1
  124. package/dist/config/loader.d.ts.map +1 -1
  125. package/dist/config/loader.js +29 -19
  126. package/dist/config/loader.js.map +1 -1
  127. package/dist/config/models.d.ts +33 -0
  128. package/dist/config/models.d.ts.map +1 -0
  129. package/dist/config/models.js +49 -0
  130. package/dist/config/models.js.map +1 -0
  131. package/dist/constants/names.d.ts +2 -0
  132. package/dist/constants/names.d.ts.map +1 -1
  133. package/dist/constants/names.js +2 -0
  134. package/dist/constants/names.js.map +1 -1
  135. package/dist/features/auto-update.d.ts.map +1 -1
  136. package/dist/features/auto-update.js +21 -11
  137. package/dist/features/auto-update.js.map +1 -1
  138. package/dist/features/background-agent/manager.d.ts.map +1 -1
  139. package/dist/features/background-agent/manager.js +1 -2
  140. package/dist/features/background-agent/manager.js.map +1 -1
  141. package/dist/features/boulder-state/storage.d.ts.map +1 -1
  142. package/dist/features/boulder-state/storage.js +9 -5
  143. package/dist/features/boulder-state/storage.js.map +1 -1
  144. package/dist/features/boulder-state/types.d.ts +4 -0
  145. package/dist/features/boulder-state/types.d.ts.map +1 -1
  146. package/dist/features/builtin-skills/skills.d.ts.map +1 -1
  147. package/dist/features/builtin-skills/skills.js +25 -78
  148. package/dist/features/builtin-skills/skills.js.map +1 -1
  149. package/dist/features/delegation-enforcer.d.ts.map +1 -1
  150. package/dist/features/delegation-enforcer.js +4 -1
  151. package/dist/features/delegation-enforcer.js.map +1 -1
  152. package/dist/features/delegation-routing/__tests__/resolver.test.js +47 -122
  153. package/dist/features/delegation-routing/__tests__/resolver.test.js.map +1 -1
  154. package/dist/features/delegation-routing/resolver.d.ts.map +1 -1
  155. package/dist/features/delegation-routing/resolver.js +24 -47
  156. package/dist/features/delegation-routing/resolver.js.map +1 -1
  157. package/dist/features/delegation-routing/types.d.ts.map +1 -1
  158. package/dist/features/delegation-routing/types.js +2 -0
  159. package/dist/features/delegation-routing/types.js.map +1 -1
  160. package/dist/features/model-routing/external-model-policy.d.ts.map +1 -1
  161. package/dist/features/model-routing/external-model-policy.js.map +1 -1
  162. package/dist/features/model-routing/router.d.ts.map +1 -1
  163. package/dist/features/model-routing/router.js +12 -2
  164. package/dist/features/model-routing/router.js.map +1 -1
  165. package/dist/features/model-routing/types.d.ts +5 -1
  166. package/dist/features/model-routing/types.d.ts.map +1 -1
  167. package/dist/features/model-routing/types.js +7 -6
  168. package/dist/features/model-routing/types.js.map +1 -1
  169. package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
  170. package/dist/features/rate-limit-wait/daemon.js +40 -4
  171. package/dist/features/rate-limit-wait/daemon.js.map +1 -1
  172. package/dist/features/task-decomposer/index.js +14 -4
  173. package/dist/features/task-decomposer/index.js.map +1 -1
  174. package/dist/hooks/__tests__/bridge-openclaw.test.d.ts +2 -0
  175. package/dist/hooks/__tests__/bridge-openclaw.test.d.ts.map +1 -0
  176. package/dist/hooks/__tests__/bridge-openclaw.test.js +124 -0
  177. package/dist/hooks/__tests__/bridge-openclaw.test.js.map +1 -0
  178. package/dist/hooks/__tests__/bridge-security.test.js +1 -1
  179. package/dist/hooks/__tests__/bridge-security.test.js.map +1 -1
  180. package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
  181. package/dist/hooks/auto-slash-command/executor.js +38 -61
  182. package/dist/hooks/auto-slash-command/executor.js.map +1 -1
  183. package/dist/hooks/bridge.d.ts +11 -0
  184. package/dist/hooks/bridge.d.ts.map +1 -1
  185. package/dist/hooks/bridge.js +154 -82
  186. package/dist/hooks/bridge.js.map +1 -1
  187. package/dist/hooks/comment-checker/index.d.ts.map +1 -1
  188. package/dist/hooks/comment-checker/index.js +3 -1
  189. package/dist/hooks/comment-checker/index.js.map +1 -1
  190. package/dist/hooks/keyword-detector/__tests__/index.test.js +348 -1
  191. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
  192. package/dist/hooks/keyword-detector/index.d.ts +29 -0
  193. package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
  194. package/dist/hooks/keyword-detector/index.js +123 -1
  195. package/dist/hooks/keyword-detector/index.js.map +1 -1
  196. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +40 -0
  197. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
  198. package/dist/hooks/mode-registry/index.d.ts.map +1 -1
  199. package/dist/hooks/mode-registry/index.js +135 -52
  200. package/dist/hooks/mode-registry/index.js.map +1 -1
  201. package/dist/hooks/notepad/index.d.ts.map +1 -1
  202. package/dist/hooks/notepad/index.js +5 -3
  203. package/dist/hooks/notepad/index.js.map +1 -1
  204. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts +2 -0
  205. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts.map +1 -0
  206. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js +73 -0
  207. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js.map +1 -0
  208. package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js +89 -13
  209. package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js.map +1 -1
  210. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts +2 -0
  211. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts.map +1 -0
  212. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js +156 -0
  213. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js.map +1 -0
  214. package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts +2 -3
  215. package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts.map +1 -1
  216. package/dist/hooks/persistent-mode/idle-cooldown.test.js +19 -4
  217. package/dist/hooks/persistent-mode/idle-cooldown.test.js.map +1 -1
  218. package/dist/hooks/persistent-mode/index.d.ts +2 -2
  219. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  220. package/dist/hooks/persistent-mode/index.js +144 -26
  221. package/dist/hooks/persistent-mode/index.js.map +1 -1
  222. package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
  223. package/dist/hooks/plugin-patterns/index.js +22 -31
  224. package/dist/hooks/plugin-patterns/index.js.map +1 -1
  225. package/dist/hooks/pre-compact/index.js +1 -1
  226. package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
  227. package/dist/hooks/preemptive-compaction/index.js +3 -1
  228. package/dist/hooks/preemptive-compaction/index.js.map +1 -1
  229. package/dist/hooks/project-memory/index.d.ts.map +1 -1
  230. package/dist/hooks/project-memory/index.js +9 -0
  231. package/dist/hooks/project-memory/index.js.map +1 -1
  232. package/dist/hooks/project-memory/learner.d.ts.map +1 -1
  233. package/dist/hooks/project-memory/learner.js +107 -85
  234. package/dist/hooks/project-memory/learner.js.map +1 -1
  235. package/dist/hooks/project-memory/storage.d.ts.map +1 -1
  236. package/dist/hooks/project-memory/storage.js +3 -2
  237. package/dist/hooks/project-memory/storage.js.map +1 -1
  238. package/dist/hooks/recovery/context-window.d.ts +4 -0
  239. package/dist/hooks/recovery/context-window.d.ts.map +1 -1
  240. package/dist/hooks/recovery/context-window.js +22 -1
  241. package/dist/hooks/recovery/context-window.js.map +1 -1
  242. package/dist/hooks/recovery/session-recovery.js +1 -1
  243. package/dist/hooks/recovery/session-recovery.js.map +1 -1
  244. package/dist/hooks/session-end/index.d.ts.map +1 -1
  245. package/dist/hooks/session-end/index.js +13 -22
  246. package/dist/hooks/session-end/index.js.map +1 -1
  247. package/dist/hooks/setup/__tests__/windows-patch.test.d.ts +2 -0
  248. package/dist/hooks/setup/__tests__/windows-patch.test.d.ts.map +1 -0
  249. package/dist/hooks/setup/__tests__/windows-patch.test.js +110 -0
  250. package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -0
  251. package/dist/hooks/setup/index.d.ts +18 -0
  252. package/dist/hooks/setup/index.d.ts.map +1 -1
  253. package/dist/hooks/setup/index.js +59 -1
  254. package/dist/hooks/setup/index.js.map +1 -1
  255. package/dist/hooks/skill-bridge.cjs +1 -0
  256. package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts +2 -0
  257. package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts.map +1 -0
  258. package/dist/hooks/skill-state/__tests__/skill-state.test.js +301 -0
  259. package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -0
  260. package/dist/hooks/skill-state/index.d.ts +79 -0
  261. package/dist/hooks/skill-state/index.d.ts.map +1 -0
  262. package/dist/hooks/skill-state/index.js +245 -0
  263. package/dist/hooks/skill-state/index.js.map +1 -0
  264. package/dist/hooks/team-pipeline/state.d.ts.map +1 -1
  265. package/dist/hooks/team-pipeline/state.js +5 -0
  266. package/dist/hooks/team-pipeline/state.js.map +1 -1
  267. package/dist/hooks/todo-continuation/index.d.ts +17 -0
  268. package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
  269. package/dist/hooks/todo-continuation/index.js +44 -2
  270. package/dist/hooks/todo-continuation/index.js.map +1 -1
  271. package/dist/hud/elements/call-counts.d.ts.map +1 -1
  272. package/dist/hud/elements/call-counts.js +6 -4
  273. package/dist/hud/elements/call-counts.js.map +1 -1
  274. package/dist/hud/elements/index.d.ts +1 -0
  275. package/dist/hud/elements/index.d.ts.map +1 -1
  276. package/dist/hud/elements/index.js +1 -0
  277. package/dist/hud/elements/index.js.map +1 -1
  278. package/dist/hud/elements/prompt-time.d.ts +13 -0
  279. package/dist/hud/elements/prompt-time.d.ts.map +1 -0
  280. package/dist/hud/elements/prompt-time.js +21 -0
  281. package/dist/hud/elements/prompt-time.js.map +1 -0
  282. package/dist/hud/index.d.ts +2 -1
  283. package/dist/hud/index.d.ts.map +1 -1
  284. package/dist/hud/index.js +40 -215
  285. package/dist/hud/index.js.map +1 -1
  286. package/dist/hud/render.d.ts.map +1 -1
  287. package/dist/hud/render.js +7 -108
  288. package/dist/hud/render.js.map +1 -1
  289. package/dist/hud/state.d.ts.map +1 -1
  290. package/dist/hud/state.js +4 -3
  291. package/dist/hud/state.js.map +1 -1
  292. package/dist/hud/stdin.d.ts +10 -0
  293. package/dist/hud/stdin.d.ts.map +1 -1
  294. package/dist/hud/stdin.js +43 -0
  295. package/dist/hud/stdin.js.map +1 -1
  296. package/dist/hud/types.d.ts +6 -18
  297. package/dist/hud/types.d.ts.map +1 -1
  298. package/dist/hud/types.js +6 -46
  299. package/dist/hud/types.js.map +1 -1
  300. package/dist/index.d.ts +1 -1
  301. package/dist/index.d.ts.map +1 -1
  302. package/dist/index.js +2 -11
  303. package/dist/index.js.map +1 -1
  304. package/dist/installer/hooks.d.ts +5 -0
  305. package/dist/installer/hooks.d.ts.map +1 -1
  306. package/dist/installer/hooks.js +8 -0
  307. package/dist/installer/hooks.js.map +1 -1
  308. package/dist/installer/index.d.ts.map +1 -1
  309. package/dist/installer/index.js +26 -11
  310. package/dist/installer/index.js.map +1 -1
  311. package/dist/interop/omx-team-state.d.ts.map +1 -1
  312. package/dist/interop/omx-team-state.js +38 -6
  313. package/dist/interop/omx-team-state.js.map +1 -1
  314. package/dist/interop/shared-state.d.ts.map +1 -1
  315. package/dist/interop/shared-state.js +58 -7
  316. package/dist/interop/shared-state.js.map +1 -1
  317. package/dist/lib/__tests__/worktree-paths.test.js +250 -1
  318. package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
  319. package/dist/lib/job-state-db.d.ts +150 -0
  320. package/dist/lib/job-state-db.d.ts.map +1 -0
  321. package/dist/lib/job-state-db.js +650 -0
  322. package/dist/lib/job-state-db.js.map +1 -0
  323. package/dist/lib/mode-names.d.ts +46 -0
  324. package/dist/lib/mode-names.d.ts.map +1 -0
  325. package/dist/lib/mode-names.js +73 -0
  326. package/dist/lib/mode-names.js.map +1 -0
  327. package/dist/lib/session-isolation.d.ts +32 -0
  328. package/dist/lib/session-isolation.d.ts.map +1 -0
  329. package/dist/lib/session-isolation.js +39 -0
  330. package/dist/lib/session-isolation.js.map +1 -0
  331. package/dist/lib/worktree-paths.d.ts +38 -8
  332. package/dist/lib/worktree-paths.d.ts.map +1 -1
  333. package/dist/lib/worktree-paths.js +124 -56
  334. package/dist/lib/worktree-paths.js.map +1 -1
  335. package/dist/mcp/__tests__/team-cleanup.test.d.ts +11 -0
  336. package/dist/mcp/__tests__/team-cleanup.test.d.ts.map +1 -0
  337. package/dist/mcp/__tests__/team-cleanup.test.js +228 -0
  338. package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -0
  339. package/dist/mcp/cli-detection.d.ts +4 -8
  340. package/dist/mcp/cli-detection.d.ts.map +1 -1
  341. package/dist/mcp/cli-detection.js +5 -8
  342. package/dist/mcp/cli-detection.js.map +1 -1
  343. package/dist/mcp/codex-request-normalizer.js +59 -0
  344. package/dist/mcp/codex-server.js +16 -4
  345. package/dist/mcp/codex-standalone-server.js +13 -4
  346. package/dist/mcp/index.d.ts +2 -4
  347. package/dist/mcp/index.d.ts.map +1 -1
  348. package/dist/mcp/index.js +1 -5
  349. package/dist/mcp/index.js.map +1 -1
  350. package/dist/mcp/job-management.d.ts.map +1 -1
  351. package/dist/mcp/job-management.js +11 -9
  352. package/dist/mcp/job-management.js.map +1 -1
  353. package/dist/mcp/job-state-db.d.ts +1 -149
  354. package/dist/mcp/job-state-db.d.ts.map +1 -1
  355. package/dist/mcp/job-state-db.js +2 -649
  356. package/dist/mcp/job-state-db.js.map +1 -1
  357. package/dist/mcp/mcp-config.d.ts +1 -1
  358. package/dist/mcp/mcp-config.js +1 -1
  359. package/dist/mcp/prompt-injection.d.ts +14 -76
  360. package/dist/mcp/prompt-injection.d.ts.map +1 -1
  361. package/dist/mcp/prompt-injection.js +34 -175
  362. package/dist/mcp/prompt-injection.js.map +1 -1
  363. package/dist/mcp/standalone-server.js +2 -0
  364. package/dist/mcp/standalone-server.js.map +1 -1
  365. package/dist/mcp/team-server.d.ts +16 -0
  366. package/dist/mcp/team-server.d.ts.map +1 -0
  367. package/dist/mcp/team-server.js +356 -0
  368. package/dist/mcp/team-server.js.map +1 -0
  369. package/dist/notifications/__tests__/formatter.test.js +62 -0
  370. package/dist/notifications/__tests__/formatter.test.js.map +1 -1
  371. package/dist/notifications/__tests__/hook-config.test.d.ts +14 -0
  372. package/dist/notifications/__tests__/hook-config.test.d.ts.map +1 -0
  373. package/dist/notifications/__tests__/hook-config.test.js +210 -0
  374. package/dist/notifications/__tests__/hook-config.test.js.map +1 -0
  375. package/dist/notifications/__tests__/platform-gating.test.d.ts +12 -0
  376. package/dist/notifications/__tests__/platform-gating.test.d.ts.map +1 -0
  377. package/dist/notifications/__tests__/platform-gating.test.js +140 -0
  378. package/dist/notifications/__tests__/platform-gating.test.js.map +1 -0
  379. package/dist/notifications/__tests__/template-engine.test.d.ts +13 -0
  380. package/dist/notifications/__tests__/template-engine.test.d.ts.map +1 -0
  381. package/dist/notifications/__tests__/template-engine.test.js +378 -0
  382. package/dist/notifications/__tests__/template-engine.test.js.map +1 -0
  383. package/dist/notifications/config.d.ts.map +1 -1
  384. package/dist/notifications/config.js +54 -18
  385. package/dist/notifications/config.js.map +1 -1
  386. package/dist/notifications/dispatcher.d.ts +2 -2
  387. package/dist/notifications/dispatcher.d.ts.map +1 -1
  388. package/dist/notifications/dispatcher.js +10 -6
  389. package/dist/notifications/dispatcher.js.map +1 -1
  390. package/dist/notifications/formatter.d.ts.map +1 -1
  391. package/dist/notifications/formatter.js +22 -0
  392. package/dist/notifications/formatter.js.map +1 -1
  393. package/dist/notifications/hook-config-types.d.ts +44 -0
  394. package/dist/notifications/hook-config-types.d.ts.map +1 -0
  395. package/dist/notifications/hook-config-types.js +8 -0
  396. package/dist/notifications/hook-config-types.js.map +1 -0
  397. package/dist/notifications/hook-config.d.ts +36 -0
  398. package/dist/notifications/hook-config.d.ts.map +1 -0
  399. package/dist/notifications/hook-config.js +95 -0
  400. package/dist/notifications/hook-config.js.map +1 -0
  401. package/dist/notifications/index.d.ts +3 -0
  402. package/dist/notifications/index.d.ts.map +1 -1
  403. package/dist/notifications/index.js +31 -3
  404. package/dist/notifications/index.js.map +1 -1
  405. package/dist/notifications/reply-listener.d.ts.map +1 -1
  406. package/dist/notifications/reply-listener.js +1 -0
  407. package/dist/notifications/reply-listener.js.map +1 -1
  408. package/dist/notifications/session-registry.d.ts.map +1 -1
  409. package/dist/notifications/session-registry.js +13 -5
  410. package/dist/notifications/session-registry.js.map +1 -1
  411. package/dist/notifications/template-engine.d.ts +34 -0
  412. package/dist/notifications/template-engine.d.ts.map +1 -0
  413. package/dist/notifications/template-engine.js +248 -0
  414. package/dist/notifications/template-engine.js.map +1 -0
  415. package/dist/notifications/types.d.ts +0 -2
  416. package/dist/notifications/types.d.ts.map +1 -1
  417. package/dist/openclaw/__tests__/config.test.d.ts +2 -0
  418. package/dist/openclaw/__tests__/config.test.d.ts.map +1 -0
  419. package/dist/openclaw/__tests__/config.test.js +200 -0
  420. package/dist/openclaw/__tests__/config.test.js.map +1 -0
  421. package/dist/openclaw/__tests__/dispatcher.test.d.ts +2 -0
  422. package/dist/openclaw/__tests__/dispatcher.test.d.ts.map +1 -0
  423. package/dist/openclaw/__tests__/dispatcher.test.js +348 -0
  424. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -0
  425. package/dist/openclaw/__tests__/index.test.d.ts +2 -0
  426. package/dist/openclaw/__tests__/index.test.d.ts.map +1 -0
  427. package/dist/openclaw/__tests__/index.test.js +235 -0
  428. package/dist/openclaw/__tests__/index.test.js.map +1 -0
  429. package/dist/openclaw/config.d.ts +33 -0
  430. package/dist/openclaw/config.d.ts.map +1 -0
  431. package/dist/openclaw/config.js +83 -0
  432. package/dist/openclaw/config.js.map +1 -0
  433. package/dist/openclaw/dispatcher.d.ts +47 -0
  434. package/dist/openclaw/dispatcher.d.ts.map +1 -0
  435. package/dist/openclaw/dispatcher.js +138 -0
  436. package/dist/openclaw/dispatcher.js.map +1 -0
  437. package/dist/openclaw/index.d.ts +25 -0
  438. package/dist/openclaw/index.d.ts.map +1 -0
  439. package/dist/openclaw/index.js +132 -0
  440. package/dist/openclaw/index.js.map +1 -0
  441. package/dist/openclaw/types.d.ts +102 -0
  442. package/dist/openclaw/types.d.ts.map +1 -0
  443. package/dist/openclaw/types.js +8 -0
  444. package/dist/openclaw/types.js.map +1 -0
  445. package/dist/platform/index.d.ts +5 -0
  446. package/dist/platform/index.d.ts.map +1 -1
  447. package/dist/platform/index.js +17 -0
  448. package/dist/platform/index.js.map +1 -1
  449. package/dist/platform/process-utils.d.ts.map +1 -1
  450. package/dist/platform/process-utils.js +55 -9
  451. package/dist/platform/process-utils.js.map +1 -1
  452. package/dist/shared/types.d.ts +7 -5
  453. package/dist/shared/types.d.ts.map +1 -1
  454. package/dist/team/__tests__/bridge-integration.test.js +10 -8
  455. package/dist/team/__tests__/bridge-integration.test.js.map +1 -1
  456. package/dist/team/__tests__/edge-cases.test.js +40 -29
  457. package/dist/team/__tests__/edge-cases.test.js.map +1 -1
  458. package/dist/team/__tests__/idle-nudge.test.d.ts +11 -0
  459. package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
  460. package/dist/team/__tests__/idle-nudge.test.js +282 -0
  461. package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
  462. package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js +2 -2
  463. package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js.map +1 -1
  464. package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts +2 -0
  465. package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts.map +1 -0
  466. package/dist/team/__tests__/mcp-team-bridge.usage.test.js +49 -0
  467. package/dist/team/__tests__/mcp-team-bridge.usage.test.js.map +1 -0
  468. package/dist/team/__tests__/model-contract.test.d.ts +2 -0
  469. package/dist/team/__tests__/model-contract.test.d.ts.map +1 -0
  470. package/dist/team/__tests__/model-contract.test.js +121 -0
  471. package/dist/team/__tests__/model-contract.test.js.map +1 -0
  472. package/dist/team/__tests__/phase-controller.test.d.ts +2 -0
  473. package/dist/team/__tests__/phase-controller.test.d.ts.map +1 -0
  474. package/dist/team/__tests__/phase-controller.test.js +45 -0
  475. package/dist/team/__tests__/phase-controller.test.js.map +1 -0
  476. package/dist/team/__tests__/runtime-assign.test.d.ts +2 -0
  477. package/dist/team/__tests__/runtime-assign.test.d.ts.map +1 -0
  478. package/dist/team/__tests__/runtime-assign.test.js +43 -0
  479. package/dist/team/__tests__/runtime-assign.test.js.map +1 -0
  480. package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts +2 -0
  481. package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts.map +1 -0
  482. package/dist/team/__tests__/runtime-gemini-prompt.test.js +153 -0
  483. package/dist/team/__tests__/runtime-gemini-prompt.test.js.map +1 -0
  484. package/dist/team/__tests__/runtime-prompt-mode.test.d.ts +2 -0
  485. package/dist/team/__tests__/runtime-prompt-mode.test.d.ts.map +1 -0
  486. package/dist/team/__tests__/runtime-prompt-mode.test.js +162 -0
  487. package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -0
  488. package/dist/team/__tests__/runtime.test.d.ts +2 -0
  489. package/dist/team/__tests__/runtime.test.d.ts.map +1 -0
  490. package/dist/team/__tests__/runtime.test.js +37 -0
  491. package/dist/team/__tests__/runtime.test.js.map +1 -0
  492. package/dist/team/__tests__/task-file-ops.test.js +63 -59
  493. package/dist/team/__tests__/task-file-ops.test.js.map +1 -1
  494. package/dist/team/__tests__/team-name.test.d.ts +2 -0
  495. package/dist/team/__tests__/team-name.test.d.ts.map +1 -0
  496. package/dist/team/__tests__/team-name.test.js +18 -0
  497. package/dist/team/__tests__/team-name.test.js.map +1 -0
  498. package/dist/team/__tests__/team-status.test.js +52 -6
  499. package/dist/team/__tests__/team-status.test.js.map +1 -1
  500. package/dist/team/__tests__/tmux-comm.test.d.ts +2 -0
  501. package/dist/team/__tests__/tmux-comm.test.d.ts.map +1 -0
  502. package/dist/team/__tests__/tmux-comm.test.js +26 -0
  503. package/dist/team/__tests__/tmux-comm.test.js.map +1 -0
  504. package/dist/team/__tests__/tmux-session.create-team.test.d.ts +2 -0
  505. package/dist/team/__tests__/tmux-session.create-team.test.d.ts.map +1 -0
  506. package/dist/team/__tests__/tmux-session.create-team.test.js +104 -0
  507. package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -0
  508. package/dist/team/__tests__/tmux-session.spawn.test.d.ts +2 -0
  509. package/dist/team/__tests__/tmux-session.spawn.test.d.ts.map +1 -0
  510. package/dist/team/__tests__/tmux-session.spawn.test.js +61 -0
  511. package/dist/team/__tests__/tmux-session.spawn.test.js.map +1 -0
  512. package/dist/team/__tests__/tmux-session.test.js +161 -2
  513. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  514. package/dist/team/__tests__/worker-bootstrap.test.d.ts +2 -0
  515. package/dist/team/__tests__/worker-bootstrap.test.d.ts.map +1 -0
  516. package/dist/team/__tests__/worker-bootstrap.test.js +58 -0
  517. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -0
  518. package/dist/team/bridge-entry.d.ts.map +1 -1
  519. package/dist/team/bridge-entry.js +4 -0
  520. package/dist/team/bridge-entry.js.map +1 -1
  521. package/dist/team/capabilities.d.ts.map +1 -1
  522. package/dist/team/capabilities.js +3 -0
  523. package/dist/team/capabilities.js.map +1 -1
  524. package/dist/team/cli-detection.d.ts +9 -0
  525. package/dist/team/cli-detection.d.ts.map +1 -0
  526. package/dist/team/cli-detection.js +29 -0
  527. package/dist/team/cli-detection.js.map +1 -0
  528. package/dist/team/idle-nudge.d.ts +53 -0
  529. package/dist/team/idle-nudge.d.ts.map +1 -0
  530. package/dist/team/idle-nudge.js +124 -0
  531. package/dist/team/idle-nudge.js.map +1 -0
  532. package/dist/team/inbox-outbox.d.ts.map +1 -1
  533. package/dist/team/inbox-outbox.js +7 -3
  534. package/dist/team/inbox-outbox.js.map +1 -1
  535. package/dist/team/index.d.ts +14 -1
  536. package/dist/team/index.d.ts.map +1 -1
  537. package/dist/team/index.js +12 -1
  538. package/dist/team/index.js.map +1 -1
  539. package/dist/team/mcp-team-bridge.d.ts +9 -0
  540. package/dist/team/mcp-team-bridge.d.ts.map +1 -1
  541. package/dist/team/mcp-team-bridge.js +82 -3
  542. package/dist/team/mcp-team-bridge.js.map +1 -1
  543. package/dist/team/model-contract.d.ts +37 -0
  544. package/dist/team/model-contract.d.ts.map +1 -0
  545. package/dist/team/model-contract.js +139 -0
  546. package/dist/team/model-contract.js.map +1 -0
  547. package/dist/team/phase-controller.d.ts +33 -0
  548. package/dist/team/phase-controller.d.ts.map +1 -0
  549. package/dist/team/phase-controller.js +79 -0
  550. package/dist/team/phase-controller.js.map +1 -0
  551. package/dist/team/runtime-cli.d.ts +9 -0
  552. package/dist/team/runtime-cli.d.ts.map +1 -0
  553. package/dist/team/runtime-cli.js +188 -0
  554. package/dist/team/runtime-cli.js.map +1 -0
  555. package/dist/team/runtime.d.ts +95 -0
  556. package/dist/team/runtime.d.ts.map +1 -0
  557. package/dist/team/runtime.js +692 -0
  558. package/dist/team/runtime.js.map +1 -0
  559. package/dist/team/state-paths.d.ts +72 -0
  560. package/dist/team/state-paths.d.ts.map +1 -0
  561. package/dist/team/state-paths.js +87 -0
  562. package/dist/team/state-paths.js.map +1 -0
  563. package/dist/team/task-file-ops.d.ts +27 -7
  564. package/dist/team/task-file-ops.d.ts.map +1 -1
  565. package/dist/team/task-file-ops.js +116 -55
  566. package/dist/team/task-file-ops.js.map +1 -1
  567. package/dist/team/team-name.d.ts +2 -0
  568. package/dist/team/team-name.d.ts.map +1 -0
  569. package/dist/team/team-name.js +8 -0
  570. package/dist/team/team-name.js.map +1 -0
  571. package/dist/team/team-registration.d.ts +1 -1
  572. package/dist/team/team-registration.d.ts.map +1 -1
  573. package/dist/team/team-registration.js.map +1 -1
  574. package/dist/team/team-status.d.ts +11 -1
  575. package/dist/team/team-status.d.ts.map +1 -1
  576. package/dist/team/team-status.js +32 -3
  577. package/dist/team/team-status.js.map +1 -1
  578. package/dist/team/tmux-comm.d.ts +36 -0
  579. package/dist/team/tmux-comm.d.ts.map +1 -0
  580. package/dist/team/tmux-comm.js +115 -0
  581. package/dist/team/tmux-comm.js.map +1 -0
  582. package/dist/team/tmux-session.d.ts +92 -0
  583. package/dist/team/tmux-session.d.ts.map +1 -1
  584. package/dist/team/tmux-session.js +533 -2
  585. package/dist/team/tmux-session.js.map +1 -1
  586. package/dist/team/types.d.ts +10 -3
  587. package/dist/team/types.d.ts.map +1 -1
  588. package/dist/team/unified-team.d.ts.map +1 -1
  589. package/dist/team/unified-team.js +13 -3
  590. package/dist/team/unified-team.js.map +1 -1
  591. package/dist/team/worker-bootstrap.d.ts +39 -0
  592. package/dist/team/worker-bootstrap.d.ts.map +1 -0
  593. package/dist/team/worker-bootstrap.js +117 -0
  594. package/dist/team/worker-bootstrap.js.map +1 -0
  595. package/dist/team/worker-health.d.ts.map +1 -1
  596. package/dist/team/worker-health.js +15 -3
  597. package/dist/team/worker-health.js.map +1 -1
  598. package/dist/tools/ast-tools.js +1 -1
  599. package/dist/tools/ast-tools.js.map +1 -1
  600. package/dist/tools/diagnostics/lsp-aggregator.d.ts.map +1 -1
  601. package/dist/tools/diagnostics/lsp-aggregator.js +4 -2
  602. package/dist/tools/diagnostics/lsp-aggregator.js.map +1 -1
  603. package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts +2 -0
  604. package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts.map +1 -0
  605. package/dist/tools/lsp/__tests__/client-handle-data.test.js +138 -0
  606. package/dist/tools/lsp/__tests__/client-handle-data.test.js.map +1 -0
  607. package/dist/tools/lsp/client.d.ts +13 -0
  608. package/dist/tools/lsp/client.d.ts.map +1 -1
  609. package/dist/tools/lsp/client.js +64 -8
  610. package/dist/tools/lsp/client.js.map +1 -1
  611. package/dist/tools/lsp/servers.d.ts.map +1 -1
  612. package/dist/tools/lsp/servers.js +4 -9
  613. package/dist/tools/lsp/servers.js.map +1 -1
  614. package/dist/tools/lsp-tools.d.ts.map +1 -1
  615. package/dist/tools/lsp-tools.js +4 -0
  616. package/dist/tools/lsp-tools.js.map +1 -1
  617. package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -1
  618. package/dist/tools/python-repl/bridge-manager.js +15 -1
  619. package/dist/tools/python-repl/bridge-manager.js.map +1 -1
  620. package/dist/tools/python-repl/session-lock.d.ts.map +1 -1
  621. package/dist/tools/python-repl/session-lock.js +35 -15
  622. package/dist/tools/python-repl/session-lock.js.map +1 -1
  623. package/dist/tools/state-tools.d.ts.map +1 -1
  624. package/dist/tools/state-tools.js +10 -0
  625. package/dist/tools/state-tools.js.map +1 -1
  626. package/dist/utils/__tests__/frontmatter.test.d.ts +2 -0
  627. package/dist/utils/__tests__/frontmatter.test.d.ts.map +1 -0
  628. package/dist/utils/__tests__/frontmatter.test.js +147 -0
  629. package/dist/utils/__tests__/frontmatter.test.js.map +1 -0
  630. package/dist/utils/frontmatter.d.ts +24 -0
  631. package/dist/utils/frontmatter.d.ts.map +1 -0
  632. package/dist/utils/frontmatter.js +62 -0
  633. package/dist/utils/frontmatter.js.map +1 -0
  634. package/dist/utils/paths.d.ts.map +1 -1
  635. package/dist/utils/paths.js +4 -2
  636. package/dist/utils/paths.js.map +1 -1
  637. package/dist/utils/string-width.d.ts.map +1 -1
  638. package/dist/utils/string-width.js +15 -4
  639. package/dist/utils/string-width.js.map +1 -1
  640. package/dist/verification/tier-selector.js +1 -1
  641. package/dist/verification/tier-selector.js.map +1 -1
  642. package/docs/AGENTS.md +4 -2
  643. package/docs/CLAUDE.md +8 -48
  644. package/docs/MIGRATION.md +114 -0
  645. package/docs/REFERENCE.md +35 -102
  646. package/hooks/hooks.json +23 -23
  647. package/package.json +8 -8
  648. package/scripts/build-runtime-cli.mjs +24 -0
  649. package/scripts/build-team-server.mjs +28 -0
  650. package/scripts/cleanup-orphans.mjs +22 -5
  651. package/scripts/context-safety.mjs +5 -1
  652. package/scripts/demo-team.mjs +26 -0
  653. package/scripts/keyword-detector.mjs +6 -76
  654. package/scripts/openclaw-gateway-demo.mjs +168 -0
  655. package/scripts/persistent-mode.cjs +30 -4
  656. package/scripts/persistent-mode.mjs +48 -3
  657. package/scripts/plugin-setup.mjs +66 -3
  658. package/scripts/post-tool-use-failure.mjs +20 -2
  659. package/scripts/post-tool-verifier.mjs +57 -6
  660. package/scripts/pre-tool-enforcer.mjs +125 -5
  661. package/scripts/run.cjs +114 -0
  662. package/scripts/session-start.mjs +56 -7
  663. package/scripts/status.mjs +144 -0
  664. package/scripts/test-codex-gemini-team.mjs +78 -0
  665. package/skills/AGENTS.md +5 -2
  666. package/skills/analyze/SKILL.md +5 -11
  667. package/skills/autopilot/SKILL.md +5 -6
  668. package/skills/ccg/SKILL.md +88 -99
  669. package/skills/configure-notifications/SKILL.md +177 -0
  670. package/skills/configure-openclaw/SKILL.md +320 -0
  671. package/skills/external-context/SKILL.md +7 -83
  672. package/skills/hud/SKILL.md +68 -46
  673. package/skills/omc-setup/SKILL.md +58 -19
  674. package/skills/omc-teams/SKILL.md +178 -0
  675. package/skills/pipeline/SKILL.md +4 -4
  676. package/skills/plan/SKILL.md +28 -16
  677. package/skills/ralph/SKILL.md +3 -4
  678. package/skills/ralph-init/SKILL.md +3 -1
  679. package/skills/ralplan/SKILL.md +93 -8
  680. package/skills/security-review/SKILL.md +5 -6
  681. package/skills/tdd/SKILL.md +5 -6
  682. package/skills/team/SKILL.md +35 -34
  683. package/templates/hooks/keyword-detector.mjs +11 -82
  684. package/templates/hooks/persistent-mode.mjs +120 -3
  685. package/templates/hooks/post-tool-use-failure.mjs +20 -2
  686. package/templates/hooks/session-start.mjs +2 -16
  687. package/dist/__tests__/analytics/backfill-dedup.test.d.ts +0 -2
  688. package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +0 -1
  689. package/dist/__tests__/analytics/backfill-dedup.test.js +0 -179
  690. package/dist/__tests__/analytics/backfill-dedup.test.js.map +0 -1
  691. package/dist/__tests__/analytics/backfill-engine.test.d.ts +0 -2
  692. package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +0 -1
  693. package/dist/__tests__/analytics/backfill-engine.test.js +0 -362
  694. package/dist/__tests__/analytics/backfill-engine.test.js.map +0 -1
  695. package/dist/__tests__/analytics/output-estimator.test.d.ts +0 -2
  696. package/dist/__tests__/analytics/output-estimator.test.d.ts.map +0 -1
  697. package/dist/__tests__/analytics/output-estimator.test.js +0 -124
  698. package/dist/__tests__/analytics/output-estimator.test.js.map +0 -1
  699. package/dist/__tests__/analytics/token-extractor.test.d.ts +0 -2
  700. package/dist/__tests__/analytics/token-extractor.test.d.ts.map +0 -1
  701. package/dist/__tests__/analytics/token-extractor.test.js +0 -165
  702. package/dist/__tests__/analytics/token-extractor.test.js.map +0 -1
  703. package/dist/__tests__/analytics/token-tracker.test.d.ts +0 -2
  704. package/dist/__tests__/analytics/token-tracker.test.d.ts.map +0 -1
  705. package/dist/__tests__/analytics/token-tracker.test.js +0 -189
  706. package/dist/__tests__/analytics/token-tracker.test.js.map +0 -1
  707. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts +0 -2
  708. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts.map +0 -1
  709. package/dist/__tests__/analytics/tokscale-adapter.test.js +0 -79
  710. package/dist/__tests__/analytics/tokscale-adapter.test.js.map +0 -1
  711. package/dist/__tests__/analytics/transcript-parser.test.d.ts +0 -2
  712. package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +0 -1
  713. package/dist/__tests__/analytics/transcript-parser.test.js +0 -285
  714. package/dist/__tests__/analytics/transcript-parser.test.js.map +0 -1
  715. package/dist/__tests__/analytics/transcript-scanner.test.d.ts +0 -2
  716. package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +0 -1
  717. package/dist/__tests__/analytics/transcript-scanner.test.js +0 -443
  718. package/dist/__tests__/analytics/transcript-scanner.test.js.map +0 -1
  719. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +0 -2
  720. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +0 -1
  721. package/dist/__tests__/analytics/transcript-token-extractor.test.js +0 -177
  722. package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +0 -1
  723. package/dist/analytics/analytics-summary.d.ts +0 -47
  724. package/dist/analytics/analytics-summary.d.ts.map +0 -1
  725. package/dist/analytics/analytics-summary.js +0 -171
  726. package/dist/analytics/analytics-summary.js.map +0 -1
  727. package/dist/analytics/backfill-dedup.d.ts +0 -49
  728. package/dist/analytics/backfill-dedup.d.ts.map +0 -1
  729. package/dist/analytics/backfill-dedup.js +0 -115
  730. package/dist/analytics/backfill-dedup.js.map +0 -1
  731. package/dist/analytics/backfill-engine.d.ts +0 -59
  732. package/dist/analytics/backfill-engine.d.ts.map +0 -1
  733. package/dist/analytics/backfill-engine.js +0 -172
  734. package/dist/analytics/backfill-engine.js.map +0 -1
  735. package/dist/analytics/cost-estimator.d.ts +0 -29
  736. package/dist/analytics/cost-estimator.d.ts.map +0 -1
  737. package/dist/analytics/cost-estimator.js +0 -135
  738. package/dist/analytics/cost-estimator.js.map +0 -1
  739. package/dist/analytics/export.d.ts +0 -7
  740. package/dist/analytics/export.d.ts.map +0 -1
  741. package/dist/analytics/export.js +0 -93
  742. package/dist/analytics/export.js.map +0 -1
  743. package/dist/analytics/index.d.ts +0 -24
  744. package/dist/analytics/index.d.ts.map +0 -1
  745. package/dist/analytics/index.js +0 -30
  746. package/dist/analytics/index.js.map +0 -1
  747. package/dist/analytics/metrics-collector.d.ts +0 -30
  748. package/dist/analytics/metrics-collector.d.ts.map +0 -1
  749. package/dist/analytics/metrics-collector.js +0 -96
  750. package/dist/analytics/metrics-collector.js.map +0 -1
  751. package/dist/analytics/output-estimator.d.ts +0 -26
  752. package/dist/analytics/output-estimator.d.ts.map +0 -1
  753. package/dist/analytics/output-estimator.js +0 -65
  754. package/dist/analytics/output-estimator.js.map +0 -1
  755. package/dist/analytics/query-engine.d.ts +0 -35
  756. package/dist/analytics/query-engine.d.ts.map +0 -1
  757. package/dist/analytics/query-engine.js +0 -239
  758. package/dist/analytics/query-engine.js.map +0 -1
  759. package/dist/analytics/session-catalog.d.ts +0 -45
  760. package/dist/analytics/session-catalog.d.ts.map +0 -1
  761. package/dist/analytics/session-catalog.js +0 -153
  762. package/dist/analytics/session-catalog.js.map +0 -1
  763. package/dist/analytics/session-manager.d.ts +0 -58
  764. package/dist/analytics/session-manager.d.ts.map +0 -1
  765. package/dist/analytics/session-manager.js +0 -396
  766. package/dist/analytics/session-manager.js.map +0 -1
  767. package/dist/analytics/session-types.d.ts +0 -37
  768. package/dist/analytics/session-types.d.ts.map +0 -1
  769. package/dist/analytics/session-types.js +0 -2
  770. package/dist/analytics/session-types.js.map +0 -1
  771. package/dist/analytics/token-extractor.d.ts +0 -31
  772. package/dist/analytics/token-extractor.d.ts.map +0 -1
  773. package/dist/analytics/token-extractor.js +0 -57
  774. package/dist/analytics/token-extractor.js.map +0 -1
  775. package/dist/analytics/token-tracker.d.ts +0 -33
  776. package/dist/analytics/token-tracker.d.ts.map +0 -1
  777. package/dist/analytics/token-tracker.js +0 -443
  778. package/dist/analytics/token-tracker.js.map +0 -1
  779. package/dist/analytics/tokscale-adapter.d.ts +0 -71
  780. package/dist/analytics/tokscale-adapter.d.ts.map +0 -1
  781. package/dist/analytics/tokscale-adapter.js +0 -223
  782. package/dist/analytics/tokscale-adapter.js.map +0 -1
  783. package/dist/analytics/transcript-parser.d.ts +0 -42
  784. package/dist/analytics/transcript-parser.d.ts.map +0 -1
  785. package/dist/analytics/transcript-parser.js +0 -90
  786. package/dist/analytics/transcript-parser.js.map +0 -1
  787. package/dist/analytics/transcript-scanner.d.ts +0 -51
  788. package/dist/analytics/transcript-scanner.d.ts.map +0 -1
  789. package/dist/analytics/transcript-scanner.js +0 -279
  790. package/dist/analytics/transcript-scanner.js.map +0 -1
  791. package/dist/analytics/transcript-token-extractor.d.ts +0 -35
  792. package/dist/analytics/transcript-token-extractor.d.ts.map +0 -1
  793. package/dist/analytics/transcript-token-extractor.js +0 -136
  794. package/dist/analytics/transcript-token-extractor.js.map +0 -1
  795. package/dist/analytics/types.d.ts +0 -119
  796. package/dist/analytics/types.d.ts.map +0 -1
  797. package/dist/analytics/types.js +0 -32
  798. package/dist/analytics/types.js.map +0 -1
  799. package/dist/cli/analytics.d.ts +0 -3
  800. package/dist/cli/analytics.d.ts.map +0 -1
  801. package/dist/cli/analytics.js +0 -105
  802. package/dist/cli/analytics.js.map +0 -1
  803. package/dist/cli/commands/agents.d.ts +0 -5
  804. package/dist/cli/commands/agents.d.ts.map +0 -1
  805. package/dist/cli/commands/agents.js +0 -31
  806. package/dist/cli/commands/agents.js.map +0 -1
  807. package/dist/cli/commands/backfill.d.ts +0 -15
  808. package/dist/cli/commands/backfill.d.ts.map +0 -1
  809. package/dist/cli/commands/backfill.js +0 -146
  810. package/dist/cli/commands/backfill.js.map +0 -1
  811. package/dist/cli/commands/cleanup.d.ts +0 -4
  812. package/dist/cli/commands/cleanup.d.ts.map +0 -1
  813. package/dist/cli/commands/cleanup.js +0 -31
  814. package/dist/cli/commands/cleanup.js.map +0 -1
  815. package/dist/cli/commands/cost.d.ts +0 -4
  816. package/dist/cli/commands/cost.d.ts.map +0 -1
  817. package/dist/cli/commands/cost.js +0 -53
  818. package/dist/cli/commands/cost.js.map +0 -1
  819. package/dist/cli/commands/export.d.ts +0 -5
  820. package/dist/cli/commands/export.d.ts.map +0 -1
  821. package/dist/cli/commands/export.js +0 -30
  822. package/dist/cli/commands/export.js.map +0 -1
  823. package/dist/cli/commands/sessions.d.ts +0 -5
  824. package/dist/cli/commands/sessions.d.ts.map +0 -1
  825. package/dist/cli/commands/sessions.js +0 -89
  826. package/dist/cli/commands/sessions.js.map +0 -1
  827. package/dist/cli/commands/stats.d.ts +0 -5
  828. package/dist/cli/commands/stats.d.ts.map +0 -1
  829. package/dist/cli/commands/stats.js +0 -84
  830. package/dist/cli/commands/stats.js.map +0 -1
  831. package/dist/cli/utils/tokscale-launcher.d.ts +0 -25
  832. package/dist/cli/utils/tokscale-launcher.d.ts.map +0 -1
  833. package/dist/cli/utils/tokscale-launcher.js +0 -70
  834. package/dist/cli/utils/tokscale-launcher.js.map +0 -1
  835. package/dist/hud/analytics-display.d.ts +0 -63
  836. package/dist/hud/analytics-display.d.ts.map +0 -1
  837. package/dist/hud/analytics-display.js +0 -190
  838. package/dist/hud/analytics-display.js.map +0 -1
  839. package/scripts/build-codex-server.mjs +0 -95
@@ -277,8 +277,8 @@ fi
277
277
 
278
278
  # Strip existing markers from downloaded content (idempotency)
279
279
  if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
280
- # Extract content between markers
281
- sed -n '/<!-- OMC:START -->/,/<!-- OMC:END -->/{//!p}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
280
+ # Extract content between markers (awk is portable across GNU/BSD)
281
+ awk '/<!-- OMC:END -->/{p=0} p; /<!-- OMC:START -->/{p=1}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
282
282
  mv "${TEMP_OMC}.clean" "$TEMP_OMC"
283
283
  fi
284
284
 
@@ -295,8 +295,9 @@ else
295
295
  # Merge: preserve user content outside OMC markers
296
296
  if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
297
297
  # Has markers: replace OMC section, keep user content
298
- BEFORE_OMC=$(sed -n '1,/<!-- OMC:START -->/{ /<!-- OMC:START -->/!p }' "$TARGET_PATH")
299
- AFTER_OMC=$(sed -n '/<!-- OMC:END -->/,${ /<!-- OMC:END -->/!p }' "$TARGET_PATH")
298
+ # Use awk instead of sed for cross-platform compatibility (GNU/BSD)
299
+ BEFORE_OMC=$(awk '/<!-- OMC:START -->/{exit} {print}' "$TARGET_PATH")
300
+ AFTER_OMC=$(awk 'p; /<!-- OMC:END -->/{p=1}' "$TARGET_PATH")
300
301
  {
301
302
  [ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
302
303
  echo '<!-- OMC:START -->'
@@ -433,8 +434,8 @@ fi
433
434
 
434
435
  # Strip existing markers from downloaded content (idempotency)
435
436
  if grep -q '<!-- OMC:START -->' "$TEMP_OMC"; then
436
- # Extract content between markers
437
- sed -n '/<!-- OMC:START -->/,/<!-- OMC:END -->/{//!p}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
437
+ # Extract content between markers (awk is portable across GNU/BSD)
438
+ awk '/<!-- OMC:END -->/{p=0} p; /<!-- OMC:START -->/{p=1}' "$TEMP_OMC" > "${TEMP_OMC}.clean"
438
439
  mv "${TEMP_OMC}.clean" "$TEMP_OMC"
439
440
  fi
440
441
 
@@ -451,8 +452,9 @@ else
451
452
  # Merge: preserve user content outside OMC markers
452
453
  if grep -q '<!-- OMC:START -->' "$TARGET_PATH"; then
453
454
  # Has markers: replace OMC section, keep user content
454
- BEFORE_OMC=$(sed -n '1,/<!-- OMC:START -->/{ /<!-- OMC:START -->/!p }' "$TARGET_PATH")
455
- AFTER_OMC=$(sed -n '/<!-- OMC:END -->/,${ /<!-- OMC:END -->/!p }' "$TARGET_PATH")
455
+ # Use awk instead of sed for cross-platform compatibility (GNU/BSD)
456
+ BEFORE_OMC=$(awk '/<!-- OMC:START -->/{exit} {print}' "$TARGET_PATH")
457
+ AFTER_OMC=$(awk 'p; /<!-- OMC:END -->/{p=1}' "$TARGET_PATH")
456
458
  {
457
459
  [ -n "$BEFORE_OMC" ] && printf '%s\n' "$BEFORE_OMC"
458
460
  echo '<!-- OMC:START -->'
@@ -653,25 +655,62 @@ echo "Default execution mode set to: USER_CHOICE"
653
655
  **Note**: This preference ONLY affects generic keywords ("fast", "parallel"). Explicit keywords ("ulw") always override this preference.
654
656
 
655
657
 
656
- ## Step 3.8: Install CLI Analytics Tools (Optional)
658
+ ## Step 3.8: Install OMC CLI Tool
657
659
 
658
- The OMC CLI provides standalone token analytics commands (`omc stats`, `omc agents`, `omc tui`).
660
+ The OMC CLI (`omc` command) provides standalone token analytics and management commands (`omc stats`, `omc agents`, `omc tui`).
659
661
 
660
- Ask user: "Would you like to install the OMC CLI for standalone analytics? (Recommended for tracking token usage and costs)"
662
+ First, check if the CLI is already installed:
663
+
664
+ ```bash
665
+ # Check if omc CLI is already available
666
+ if command -v omc &>/dev/null; then
667
+ OMC_CLI_VERSION=$(omc --version 2>/dev/null | head -1 || echo "installed")
668
+ echo "OMC CLI already installed: $OMC_CLI_VERSION"
669
+ OMC_CLI_INSTALLED="true"
670
+ else
671
+ OMC_CLI_INSTALLED="false"
672
+ fi
673
+ ```
674
+
675
+ If `OMC_CLI_INSTALLED` is `"true"`, skip the rest of this step.
676
+
677
+ If `OMC_CLI_INSTALLED` is `"false"`, use the AskUserQuestion tool to prompt the user:
678
+
679
+ **Question:** "Would you like to install the OMC CLI globally for standalone analytics? (`omc stats`, `omc agents`, `omc tui`)"
661
680
 
662
681
  **Options:**
663
- 1. **Yes (Recommended)** - Install CLI tools globally for `omc stats`, `omc agents`, etc.
664
- 2. **No** - Skip CLI installation, use only plugin skills
682
+ 1. **Yes (Recommended)** - Install `oh-my-claude-sisyphus` via `npm install -g`
683
+ 2. **No - Skip** - Skip installation (can install manually later with `npm install -g oh-my-claude-sisyphus`)
665
684
 
666
- ### CLI Installation Note
685
+ If user chooses **Yes**:
667
686
 
668
- The CLI (`omc` command) is **no longer supported** via npm/bun global install.
687
+ ```bash
688
+ # Check if npm is available
689
+ if ! command -v npm &>/dev/null; then
690
+ echo "WARNING: npm not found. Cannot install OMC CLI automatically."
691
+ echo "Install Node.js/npm first, then run: npm install -g oh-my-claude-sisyphus"
692
+ else
693
+ # Install the CLI globally
694
+ if npm install -g oh-my-claude-sisyphus 2>&1; then
695
+ echo "OMC CLI installed successfully."
696
+ # Verify installation
697
+ if command -v omc &>/dev/null; then
698
+ OMC_CLI_VERSION=$(omc --version 2>/dev/null | head -1 || echo "installed")
699
+ echo "Verified: omc $OMC_CLI_VERSION"
700
+ else
701
+ echo "Installed but 'omc' not on PATH. You may need to restart your shell."
702
+ fi
703
+ else
704
+ echo "WARNING: Failed to install OMC CLI (permission issue or network error)."
705
+ echo "You can install manually later: npm install -g oh-my-claude-sisyphus"
706
+ echo "Or with sudo: sudo npm install -g oh-my-claude-sisyphus"
707
+ fi
708
+ fi
709
+ ```
669
710
 
670
- All functionality is available through the plugin system:
671
- - Use `/oh-my-claudecode:omc-help` for guidance
672
- - Use `/oh-my-claudecode:omc-doctor` for diagnostics
711
+ If user chooses **No - Skip**, continue to the next step without installing.
673
712
 
674
- Skip this step - the plugin provides all features.
713
+ **Note**: The CLI is optional. All core functionality is also available through the plugin system (`/oh-my-claudecode:omc-help`, `/oh-my-claudecode:omc-doctor`). The CLI adds standalone terminal commands for analytics outside of Claude Code sessions.
675
714
 
676
715
  ## Step 3.8.5: Select Task Management Tool
677
716
 
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: omc-teams
3
+ description: Spawn claude, codex, or gemini CLI workers in tmux panes for parallel task execution
4
+ aliases: []
5
+ ---
6
+
7
+ # OMC Teams Skill
8
+
9
+ Spawn N CLI worker processes in tmux panes to execute tasks in parallel. Supports `claude`, `codex`, and `gemini` agent types. Unlike `/team` (which uses Claude Code's native `TeamCreate`/`Task` tools), this skill uses the tmux runtime to launch actual CLI processes in visible tmux panes.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /oh-my-claudecode:omc-teams N:claude "task description"
15
+ /oh-my-claudecode:omc-teams N:codex "task description"
16
+ /oh-my-claudecode:omc-teams N:gemini "task description"
17
+ ```
18
+
19
+ ### Parameters
20
+
21
+ - **N** - Number of CLI workers (1-10)
22
+ - **agent-type** - `claude` (Claude CLI), `codex` (OpenAI Codex CLI), or `gemini` (Google Gemini CLI)
23
+ - **task** - Task description to distribute across all workers
24
+
25
+ ### Examples
26
+
27
+ ```bash
28
+ /omc-teams 2:claude "implement auth module with tests"
29
+ /omc-teams 2:codex "review the auth module for security issues"
30
+ /omc-teams 3:gemini "redesign UI components for accessibility"
31
+ /omc-teams 1:codex "write comprehensive tests for src/api/"
32
+ ```
33
+
34
+ ## Requirements
35
+
36
+ - **tmux** must be running (`$TMUX` set in the current shell)
37
+ - **claude** CLI: `npm install -g @anthropic-ai/claude-code` (for claude workers)
38
+ - **codex** CLI: `npm install -g @openai/codex` (for codex workers)
39
+ - **gemini** CLI: `npm install -g @google/gemini-cli` (for gemini workers)
40
+
41
+ ## How It Works
42
+
43
+ 1. Claude decomposes the task into N independent subtasks (one per worker)
44
+ 2. Calls `mcp__team__omc_run_team_start` then `mcp__team__omc_run_team_wait`
45
+ 3. The OMC MCP server spawns `runtime-cli.cjs` (co-located in the same install directory)
46
+ 4. The runtime creates tmux split-panes and launches the CLI processes
47
+ 5. Each worker reads its task from an inbox file and writes `done.json` on completion
48
+ 6. The runtime collects results, shuts down workers, returns structured JSON
49
+ 7. Claude parses the result and reports to the user
50
+
51
+ ---
52
+
53
+ ## Workflow
54
+
55
+ ### Phase 1: Parse input
56
+
57
+ Extract from the user command:
58
+ - `N` — number of workers (integer, 1–10)
59
+ - `agent-type` — must be `claude`, `codex`, or `gemini`; reject anything else with an error
60
+ - `task` — the task description
61
+
62
+ ### Phase 2: Decompose task
63
+
64
+ Break the task into exactly N subtasks. Each subtask must be:
65
+ - **Independent** — no conflicting writes between workers
66
+ - **Scoped** — operates on a distinct subset of files or concerns
67
+ - **Self-contained** — completable without inter-worker coordination
68
+
69
+ Choose a `teamName` slug from the task (e.g., `auth-security-review`).
70
+
71
+ ### Phase 3: Activate team state & start the team
72
+
73
+ **CRITICAL: Activate team state BEFORE calling MCP tools.** This prevents the session from
74
+ stopping prematurely after MCP tool calls return. The persistent-mode Stop hook checks
75
+ `team-state.json` to know whether to block the stop or allow it.
76
+
77
+ ```
78
+ state_write(mode="team", current_phase="team-exec", active=true)
79
+ ```
80
+
81
+ Then call `mcp__team__omc_run_team_start` — it spawns workers in the background and returns a
82
+ `jobId` immediately. No Bash, no path resolution; the MCP server finds `runtime-cli.cjs`
83
+ from its own install directory automatically.
84
+
85
+ ```
86
+ mcp__team__omc_run_team_start({
87
+ "teamName": "{teamName}",
88
+ "agentTypes": ["{agentType}", "{agentType}", ...],
89
+ "tasks": [
90
+ {"subject": "Subtask 1 title", "description": "Full description..."},
91
+ {"subject": "Subtask 2 title", "description": "Full description..."}
92
+ ],
93
+ "cwd": "{cwd}"
94
+ })
95
+ ```
96
+
97
+ Returns: `{ "jobId": "omc-...", "pid": 12345, "message": "Team started in background..." }`
98
+
99
+ ### Phase 4: Wait for completion, then report
100
+
101
+ Call `mcp__team__omc_run_team_wait` — a single blocking call that polls internally
102
+ (500ms → 2000ms exponential backoff) and returns only when the job reaches a terminal
103
+ state. No repeated polling needed; one call instead of N.
104
+
105
+ ```
106
+ mcp__team__omc_run_team_wait({
107
+ "job_id": "{jobId}",
108
+ "timeout_ms": 60000
109
+ })
110
+ ```
111
+
112
+ > **Timeout guidance:** `timeout_ms` is optional; the default wait timeout is fine.
113
+ > If a wait call times out, **workers are left running** — wait timeout does NOT kill
114
+ > worker processes or panes. You have two options:
115
+ > - Call `omc_run_team_wait` again with the same `job_id` to keep waiting (workers continue)
116
+ > - Call `omc_run_team_cleanup` only when you explicitly want to cancel and stop panes
117
+ >
118
+ > Teams can silently stall due to stuck workers or tmux session issues. Use
119
+ > `mcp__team__omc_run_team_status` to inspect live progress before deciding to cancel.
120
+
121
+ Returns when done:
122
+ ```json
123
+ {
124
+ "jobId": "omc-...",
125
+ "status": "completed|failed",
126
+ "elapsedSeconds": "95.3",
127
+ "result": {
128
+ "status": "completed",
129
+ "teamName": "...",
130
+ "taskResults": [
131
+ {"taskId": "1", "status": "completed", "summary": "Done: added 12 tests"},
132
+ {"taskId": "2", "status": "failed", "summary": "Worker exited early"}
133
+ ],
134
+ "duration": 95.1,
135
+ "workerCount": 2
136
+ }
137
+ }
138
+ ```
139
+
140
+ > **Why no deadlock?** `omc_run_team_wait` uses `async/await` with `setTimeout`,
141
+ > which yields the Node.js event loop between polls. The `child.on('close', ...)`
142
+ > callback that updates job status fires during those yields. The background
143
+ > `runtime-cli.cjs` child process is completely independent — it never calls back
144
+ > into this MCP server.
145
+ >
146
+ > If you need non-blocking checks (e.g. to do other work while waiting), use
147
+ > `mcp__team__omc_run_team_status` instead.
148
+
149
+ Report results to the user. For `failed` or wait-timeout errors, explain what happened and suggest next steps (reduce scope, check CLI installation, verify tmux is running).
150
+
151
+ Update OMC state:
152
+ ```
153
+ state_write(mode="team", current_phase="completed", active=false)
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Error Reference
159
+
160
+ | Error | Cause | Fix |
161
+ |-------|-------|-----|
162
+ | `not inside tmux` | Shell not running inside a tmux session | Start tmux and rerun |
163
+ | `codex: command not found` | Codex CLI not installed | `npm install -g @openai/codex` |
164
+ | `gemini: command not found` | Gemini CLI not installed | `npm install -g @google/gemini-cli` |
165
+ | wait timeout error | `omc_run_team_wait` hit `timeout_ms` before completion | Call `omc_run_team_wait` again to keep waiting, or call `omc_run_team_cleanup` to explicitly stop worker panes |
166
+ | `status: failed` | All workers exited with work remaining | Check stderr for crash details |
167
+
168
+ ---
169
+
170
+ ## Relationship to `/team`
171
+
172
+ | Aspect | `/team` | `/omc-teams` |
173
+ |--------|---------|-------------|
174
+ | Worker type | Claude Code agents (`Task(subagent_type=...)`) | claude / codex / gemini CLI processes |
175
+ | Invocation | `TeamCreate` / `SendMessage` / `TeamDelete` | `mcp__team__omc_run_team_start` + `omc_run_team_wait` |
176
+ | Coordination | Native Claude Code team messaging | tmux panes + inbox files + `done.json` sentinels |
177
+ | Communication | Native Claude Code team messaging | File-based (inbox.md → done.json) |
178
+ | Use when | You want Claude agents with full tool access | You want CLI autonomy (codex/gemini) at scale |
@@ -43,7 +43,7 @@ Run multiple agents in parallel, merge their outputs.
43
43
  ```
44
44
  parallel(explore, document-specialist) -> architect -> executor
45
45
  ```
46
- <!-- NOTE: document-specialist is a legacy agent for external lookup. Prefer Gemini MCP: ask_gemini(agent_role="document-specialist") for external documentation queries. -->
46
+ <!-- NOTE: document-specialist spawns a Claude Task agent for external documentation lookup. -->
47
47
 
48
48
  ## Built-in Pipeline Presets
49
49
 
@@ -105,7 +105,7 @@ parallel(explore, document-specialist) -> architect -> executor
105
105
 
106
106
  **Stages:**
107
107
  1. `parallel(document-specialist, explore)` - External docs + internal code
108
- <!-- NOTE: document-specialist is a legacy agent for external lookup. Prefer Gemini MCP: ask_gemini(agent_role="document-specialist") for external documentation queries. -->
108
+ <!-- NOTE: document-specialist spawns a Claude Task agent for external documentation lookup. -->
109
109
  2. `architect` - Synthesize findings
110
110
  3. `writer` - Document recommendations
111
111
 
@@ -181,7 +181,7 @@ parallel(explore, document-specialist) -> architect -> executor
181
181
  ```
182
182
  /pipeline [explore, document-specialist] -> architect -> executor "implement OAuth"
183
183
  ```
184
- <!-- NOTE: document-specialist is a legacy agent for external lookup. Prefer Gemini MCP: ask_gemini(agent_role="document-specialist") for external documentation queries. -->
184
+ <!-- NOTE: document-specialist spawns a Claude Task agent for external documentation lookup. -->
185
185
 
186
186
  ## Data Passing Protocol
187
187
 
@@ -342,7 +342,7 @@ When parallel agents complete:
342
342
  /pipeline research "implement GraphQL subscriptions"
343
343
  ```
344
344
  → Triggers: parallel(document-specialist, explore) → architect → writer
345
- <!-- NOTE: document-specialist is a legacy agent for external lookup. Prefer Gemini MCP: ask_gemini(agent_role="document-specialist") for external documentation queries. -->
345
+ <!-- NOTE: document-specialist spawns a Claude Task agent for external documentation lookup. -->
346
346
 
347
347
  ## Cancellation
348
348
 
@@ -4,7 +4,7 @@ description: Strategic planning with optional interview workflow
4
4
  ---
5
5
 
6
6
  <Purpose>
7
- Plan creates comprehensive, actionable work plans through intelligent interaction. It auto-detects whether to interview the user (broad requests) or plan directly (detailed requests), and supports consensus mode (iterative Planner/Architect/Critic loop) and review mode (Critic evaluation of existing plans).
7
+ Plan creates comprehensive, actionable work plans through intelligent interaction. It auto-detects whether to interview the user (broad requests) or plan directly (detailed requests), and supports consensus mode (iterative Planner/Architect/Critic loop with RALPLAN-DR structured deliberation) and review mode (Critic evaluation of existing plans).
8
8
  </Purpose>
9
9
 
10
10
  <Use_When>
@@ -32,6 +32,7 @@ Jumping into code without understanding requirements leads to rework, scope cree
32
32
  - Gather codebase facts via `explore` agent before asking the user about them
33
33
  - Plans must meet quality standards: 80%+ claims cite file/line, 90%+ criteria are testable
34
34
  - Consensus mode runs fully automated by default; add `--interactive` to enable user prompts at draft review and final approval steps
35
+ - Consensus mode uses RALPLAN-DR short mode by default; switch to deliberate mode with `--deliberate` or when the request explicitly signals high risk (auth/security, data migration, destructive/irreversible changes, production incident, compliance/PII, public API breakage)
35
36
  </Execution_Policy>
36
37
 
37
38
  <Steps>
@@ -42,7 +43,7 @@ Jumping into code without understanding requirements leads to rework, scope cree
42
43
  |------|---------|----------|
43
44
  | Interview | Default for broad requests | Interactive requirements gathering |
44
45
  | Direct | `--direct`, or detailed request | Skip interview, generate plan directly |
45
- | Consensus | `--consensus`, "ralplan" | Planner -> Architect -> Critic loop until agreement; add `--interactive` for user prompts at draft and approval steps |
46
+ | Consensus | `--consensus`, "ralplan" | Planner -> Architect -> Critic loop until agreement with RALPLAN-DR structured deliberation (short by default, `--deliberate` for high-risk); add `--interactive` for user prompts at draft and approval steps |
46
47
  | Review | `--review`, "review this plan" | Critic evaluation of existing plan |
47
48
 
48
49
  ### Interview Mode (broad/vague requests)
@@ -62,14 +63,21 @@ Jumping into code without understanding requirements leads to rework, scope cree
62
63
 
63
64
  ### Consensus Mode (`--consensus` / "ralplan")
64
65
 
65
- 1. **Planner** creates initial plan
66
- 2. **User feedback** *(--interactive only)*: If running with `--interactive`, **MUST** use `AskUserQuestion` to present the draft plan with these options:
66
+ **RALPLAN-DR modes**: **Short** (default, bounded structure) and **Deliberate** (for `--deliberate` or explicit high-risk requests). Both modes keep the same Planner -> Architect -> Critic sequence and the same `AskUserQuestion` gates.
67
+
68
+ 1. **Planner** creates initial plan and a compact **RALPLAN-DR summary** before any Architect review. The summary **MUST** include:
69
+ - **Principles** (3-5)
70
+ - **Decision Drivers** (top 3)
71
+ - **Viable Options** (>=2) with bounded pros/cons for each option
72
+ - If only one viable option remains, an explicit **invalidation rationale** for the alternatives that were rejected
73
+ - In **deliberate mode**: a **pre-mortem** (3 failure scenarios) and an **expanded test plan** covering **unit / integration / e2e / observability**
74
+ 2. **User feedback** *(--interactive only)*: If running with `--interactive`, **MUST** use `AskUserQuestion` to present the draft plan **plus the RALPLAN-DR Principles / Decision Drivers / Options summary for early direction alignment** with these options:
67
75
  - **Proceed to review** — send to Architect and Critic for evaluation
68
76
  - **Request changes** — return to step 1 with user feedback incorporated
69
77
  - **Skip review** — go directly to final approval (step 7)
70
78
  If NOT running with `--interactive`, automatically proceed to review (step 3).
71
- 3. **Architect** reviews for architectural soundness (prefer `ask_codex` with `architect` role). **Wait for this step to complete before proceeding to step 4.** Do NOT run steps 3 and 4 in parallel parallel `ask_codex` calls can trigger a sibling cascade failure if one receives a 429 rate-limit error. If `ask_codex` fails with a rate-limit or 429 error, wait 5–10 seconds and retry once; if it fails again, fall back to spawning a `Task` with `subagent_type="oh-my-claudecode:architect"`.
72
- 4. **Critic** evaluates against quality criteria (prefer `ask_codex` with `critic` role). Run only after step 3 is complete. Apply the same retry/fallback rule: on rate-limit error, retry once after a short delay; on second failure, fall back to `Task` with `subagent_type="oh-my-claudecode:critic"`.
79
+ 3. **Architect** reviews for architectural soundness using `Task(subagent_type="oh-my-claudecode:architect", ...)`. Architect review **MUST** include: strongest steelman counterargument (antithesis) against the favored option, at least one meaningful tradeoff tension, and (when possible) a synthesis path. In deliberate mode, Architect should explicitly flag principle violations. **Wait for this step to complete before proceeding to step 4.** Do NOT run steps 3 and 4 in parallel.
80
+ 4. **Critic** evaluates against quality criteria using `Task(subagent_type="oh-my-claudecode:critic", ...)`. Critic **MUST** verify principle-option consistency, fair alternative exploration, risk mitigation clarity, testable acceptance criteria, and concrete verification steps. Critic **MUST** explicitly reject shallow alternatives, driver contradictions, vague risks, or weak verification. In deliberate mode, Critic **MUST** reject missing/weak pre-mortem or missing/weak expanded test plan. Run only after step 3 is complete.
73
81
  5. **Re-review loop** (max 5 iterations): If Critic rejects, execute this closed loop:
74
82
  a. Collect all rejection feedback from Architect + Critic
75
83
  b. Pass feedback to Planner to produce a revised plan
@@ -77,10 +85,10 @@ Jumping into code without understanding requirements leads to rework, scope cree
77
85
  d. **Return to Step 4** — Critic evaluates the revised plan
78
86
  e. Repeat until Critic approves OR max 5 iterations reached
79
87
  f. If max iterations reached without approval, present the best version to user via `AskUserQuestion` with note that expert consensus was not reached
80
- 6. **Apply improvements**: When reviewers approve with improvement suggestions, merge all accepted improvements into the plan file before proceeding. Specifically:
88
+ 6. **Apply improvements**: When reviewers approve with improvement suggestions, merge all accepted improvements into the plan file before proceeding. Final consensus output **MUST** include an **ADR** section with: **Decision**, **Drivers**, **Alternatives considered**, **Why chosen**, **Consequences**, **Follow-ups**. Specifically:
81
89
  a. Collect all improvement suggestions from Architect and Critic responses
82
90
  b. Deduplicate and categorize the suggestions
83
- c. Update the plan file in `.omc/plans/` with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, etc.)
91
+ c. Update the plan file in `.omc/plans/` with the accepted improvements (add missing details, refine steps, strengthen acceptance criteria, ADR updates, etc.)
84
92
  d. Note which improvements were applied in a brief changelog section at the end of the plan
85
93
  7. On Critic approval (with improvements applied): *(--interactive only)* If running with `--interactive`, use `AskUserQuestion` to present the plan with these options:
86
94
  - **Approve and execute** — proceed to implementation via ralph+ultrawork
@@ -98,7 +106,7 @@ Jumping into code without understanding requirements leads to rework, scope cree
98
106
  ### Review Mode (`--review`)
99
107
 
100
108
  1. Read plan file from `.omc/plans/`
101
- 2. Evaluate via Critic (prefer `ask_codex` with `critic` role)
109
+ 2. Evaluate via Critic using `Task(subagent_type="oh-my-claudecode:critic", ...)`
102
110
  3. Return verdict: APPROVED, REVISE (with specific feedback), or REJECT (replanning required)
103
111
 
104
112
  ### Plan Output Format
@@ -109,21 +117,22 @@ Every plan includes:
109
117
  - Implementation Steps (with file references)
110
118
  - Risks and Mitigations
111
119
  - Verification Steps
120
+ - For consensus/ralplan: **RALPLAN-DR summary** (Principles, Decision Drivers, Options)
121
+ - For consensus/ralplan final output: **ADR** (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups)
122
+ - For deliberate consensus mode: **Pre-mortem (3 scenarios)** and **Expanded Test Plan** (unit/integration/e2e/observability)
112
123
 
113
124
  Plans are saved to `.omc/plans/`. Drafts go to `.omc/drafts/`.
114
125
  </Steps>
115
126
 
116
127
  <Tool_Usage>
117
- - Before first MCP tool use, run the 3-step discovery: (1) `ToolSearch("mcp")`, (2) select the full name from results (e.g., `mcp__x__ask_codex`), (3) fall back to the equivalent Claude agent only if step 1 returns empty. Never use `ToolSearch("ask_codex")` as the primary search -- it can return false negatives even when MCP tools are present.
118
128
  - Use `AskUserQuestion` for preference questions (scope, priority, timeline, risk tolerance) -- provides clickable UI
119
129
  - Use plain text for questions needing specific values (port numbers, names, follow-up clarifications)
120
130
  - Use `explore` agent (Haiku, 30s timeout) to gather codebase facts before asking the user
121
- - Use `ask_codex` with `agent_role: "planner"` for planning validation on large-scope plans
122
- - Use `ask_codex` with `agent_role: "analyst"` for requirements analysis
123
- - Use `ask_codex` with `agent_role: "critic"` for plan review in consensus and review modes
124
- - If ToolSearch finds no MCP tools or Codex is unavailable, fall back to equivalent Claude agents -- never block on external tools
125
- - **CRITICAL Consensus mode `ask_codex` calls MUST be sequential, never parallel.** Claude Code cancels sibling tool calls when one fails ("Sibling tool call errored"), so running Architect and Critic `ask_codex` calls in the same tool-call batch will cause a cascade failure if either hits a 429 rate-limit. Always await the Architect call result before issuing the Critic call.
126
- - On `ask_codex` rate-limit (429) error: wait 5–10 s and retry once. If the second attempt also fails, fall back to the equivalent Claude agent (`Task` with `subagent_type="oh-my-claudecode:architect"` or `"oh-my-claudecode:critic"`).
131
+ - Use `Task(subagent_type="oh-my-claudecode:planner", ...)` for planning validation on large-scope plans
132
+ - Use `Task(subagent_type="oh-my-claudecode:analyst", ...)` for requirements analysis
133
+ - Use `Task(subagent_type="oh-my-claudecode:critic", ...)` for plan review in consensus and review modes
134
+ - **CRITICAL Consensus mode agent calls MUST be sequential, never parallel.** Always await the Architect Task result before issuing the Critic Task.
135
+ - In consensus mode, default to RALPLAN-DR short mode; enable deliberate mode on `--deliberate` or explicit high-risk signals (auth/security, migrations, destructive changes, production incidents, compliance/PII, public API breakage)
127
136
  - In consensus mode with `--interactive`: use `AskUserQuestion` for the user feedback step (step 2) and the final approval step (step 7) -- never ask for approval in plain text. Without `--interactive`, skip both prompts and output the final plan.
128
137
  - In consensus mode with `--interactive`, on user approval **MUST** invoke `Skill("oh-my-claudecode:ralph")` for execution (step 9) -- never implement directly in the planning agent
129
138
  - When user selects "Clear context and implement" in step 7 (--interactive only): invoke `Skill("compact")` first to compress the accumulated planning context, then immediately invoke `Skill("oh-my-claudecode:ralph")` with the plan path -- the compact step is critical to free up context before the implementation loop begins
@@ -193,6 +202,9 @@ Why bad: Decision fatigue. Present one option with trade-offs, get reaction, the
193
202
  - [ ] All risks have mitigations identified
194
203
  - [ ] No vague terms without metrics ("fast" -> "p99 < 200ms")
195
204
  - [ ] Plan saved to `.omc/plans/`
205
+ - [ ] In consensus mode: RALPLAN-DR summary includes 3-5 principles, top 3 drivers, and >=2 viable options (or explicit invalidation rationale)
206
+ - [ ] In consensus mode final output: ADR section included (Decision / Drivers / Alternatives considered / Why chosen / Consequences / Follow-ups)
207
+ - [ ] In deliberate consensus mode: pre-mortem (3 scenarios) + expanded test plan (unit/integration/e2e/observability) included
196
208
  - [ ] In consensus mode with `--interactive`: user explicitly approved before any execution; without `--interactive`: plan output only, no auto-execution
197
209
  </Final_Checklist>
198
210
 
@@ -60,10 +60,9 @@ Complex tasks often fail silently: partial implementations get declared "done",
60
60
  </Steps>
61
61
 
62
62
  <Tool_Usage>
63
- - Before first MCP tool use, run the 3-step discovery: (1) `ToolSearch("mcp")`, (2) select the full name from results (e.g., `mcp__x__ask_codex`), (3) fall back to the equivalent Claude agent only if step 1 returns empty. Never use `ToolSearch("ask_codex")` as the primary search -- it can return false negatives even when MCP tools are present.
64
- - Use `ask_codex` with `agent_role: "architect"` for verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integration
65
- - Skip Codex consultation for simple feature additions, well-tested changes, or time-critical verification
66
- - If ToolSearch finds no MCP tools or Codex is unavailable, proceed with architect agent verification alone -- never block on external tools
63
+ - Use `Task(subagent_type="oh-my-claudecode:architect", ...)` for verification cross-checks when changes are security-sensitive, architectural, or involve complex multi-system integration
64
+ - Skip architect consultation for simple feature additions, well-tested changes, or time-critical verification
65
+ - Proceed with architect agent verification alone -- never block on unavailable tools
67
66
  - Use `state_write` / `state_read` for ralph mode state persistence between iterations
68
67
  </Tool_Usage>
69
68
 
@@ -22,7 +22,9 @@ Initialize a PRD (Product Requirements Document) for structured ralph-loop execu
22
22
  - Acceptance criteria (testable)
23
23
  - Technical constraints
24
24
  - Implementation phases
25
- 3. **Link to Ralph** so that `/oh-my-claudecode:ralph` can use the PRD as its completion criteria
25
+ 3. **Output the PRD path** and instruct the user to run ralph separately
26
+
27
+ **IMPORTANT: This is a planning-only skill. After creating the PRD, you MUST stop and wait for user input. Do NOT automatically start execution, invoke ralph, or begin implementing the PRD. Simply tell the user the PRD path and how to start ralph with it.**
26
28
 
27
29
  ## Output
28
30
 
@@ -5,7 +5,7 @@ description: Alias for /plan --consensus
5
5
 
6
6
  # Ralplan (Consensus Planning Alias)
7
7
 
8
- Ralplan is a shorthand alias for `/oh-my-claudecode:plan --consensus`. It triggers iterative planning with Planner, Architect, and Critic agents until consensus is reached.
8
+ Ralplan is a shorthand alias for `/oh-my-claudecode:plan --consensus`. It triggers iterative planning with Planner, Architect, and Critic agents until consensus is reached, with **RALPLAN-DR structured deliberation** (short mode by default, deliberate mode for high-risk work).
9
9
 
10
10
  ## Usage
11
11
 
@@ -16,6 +16,7 @@ Ralplan is a shorthand alias for `/oh-my-claudecode:plan --consensus`. It trigge
16
16
  ## Flags
17
17
 
18
18
  - `--interactive`: Enables user prompts at key decision points (draft review in step 2 and final approval in step 6). Without this flag the workflow runs fully automated — Planner → Architect → Critic loop — and outputs the final plan without asking for confirmation.
19
+ - `--deliberate`: Forces deliberate mode for high-risk work. Adds pre-mortem (3 scenarios) and expanded test planning (unit/integration/e2e/observability). Without this flag, deliberate mode can still auto-enable when the request explicitly signals high risk (auth/security, migrations, destructive changes, production incidents, compliance/PII, public API breakage).
19
20
 
20
21
  ## Usage with interactive mode
21
22
 
@@ -32,15 +33,99 @@ This skill invokes the Plan skill in consensus mode:
32
33
  ```
33
34
 
34
35
  The consensus workflow:
35
- 1. **Planner** creates initial plan
36
- 2. **User feedback** *(--interactive only)*: If `--interactive` is set, use `AskUserQuestion` to present the draft plan before review (Proceed to review / Request changes / Skip review). Otherwise, automatically proceed to review.
37
- 3. **Architect** reviews for architectural soundness — **await completion before step 4**
38
- 4. **Critic** evaluates against quality criteria — run only after step 3 completes
39
- 5. If Critic rejects: iterate with feedback (max 5 iterations)
40
- 6. On Critic approval *(--interactive only)*: If `--interactive` is set, use `AskUserQuestion` to present the plan with approval options (Approve and execute via ralph / Approve and implement via team / Clear context and implement / Request changes / Reject). Otherwise, output the final plan and stop.
36
+ 1. **Planner** creates initial plan and a compact **RALPLAN-DR summary** before review:
37
+ - Principles (3-5)
38
+ - Decision Drivers (top 3)
39
+ - Viable Options (>=2) with bounded pros/cons
40
+ - If only one viable option remains, explicit invalidation rationale for alternatives
41
+ - Deliberate mode only: pre-mortem (3 scenarios) + expanded test plan (unit/integration/e2e/observability)
42
+ 2. **User feedback** *(--interactive only)*: If `--interactive` is set, use `AskUserQuestion` to present the draft plan **plus the Principles / Drivers / Options summary** before review (Proceed to review / Request changes / Skip review). Otherwise, automatically proceed to review.
43
+ 3. **Architect** reviews for architectural soundness and must provide the strongest steelman antithesis, at least one real tradeoff tension, and (when possible) synthesis — **await completion before step 4**. In deliberate mode, Architect should explicitly flag principle violations.
44
+ 4. **Critic** evaluates against quality criteria — run only after step 3 completes. Critic must enforce principle-option consistency, fair alternatives, risk mitigation clarity, testable acceptance criteria, and concrete verification steps. In deliberate mode, Critic must reject missing/weak pre-mortem or expanded test plan.
45
+ 5. **Re-review loop** (max 5 iterations): Any non-`APPROVE` Critic verdict (`ITERATE` or `REJECT`) MUST run the same full closed loop:
46
+ a. Collect Architect + Critic feedback
47
+ b. Revise the plan with Planner
48
+ c. Return to Architect review
49
+ d. Return to Critic evaluation
50
+ e. Repeat this loop until Critic returns `APPROVE` or 5 iterations are reached
51
+ f. If 5 iterations are reached without `APPROVE`, present the best version to the user
52
+ 6. On Critic approval *(--interactive only)*: If `--interactive` is set, use `AskUserQuestion` to present the plan with approval options (Approve and execute via ralph / Approve and implement via team / Clear context and implement / Request changes / Reject). Final plan must include ADR (Decision, Drivers, Alternatives considered, Why chosen, Consequences, Follow-ups). Otherwise, output the final plan and stop.
41
53
  7. *(--interactive only)* User chooses: Approve (ralph or team), Request changes, or Reject
42
54
  8. *(--interactive only)* On approval: invoke `Skill("oh-my-claudecode:ralph")` for sequential execution or `Skill("oh-my-claudecode:team")` for parallel team execution -- never implement directly
43
55
 
44
- > **Important:** Steps 3 and 4 MUST run sequentially. Do NOT issue both `ask_codex` calls in the same parallel batch if one hits a 429 rate-limit error, Claude Code will cancel the sibling call ("Sibling tool call errored"), causing the entire review to fail. On a rate-limit error, retry once after 5–10 s; on second failure fall back to the equivalent Claude agent.
56
+ > **Important:** Steps 3 and 4 MUST run sequentially. Do NOT issue both agent Task calls in the same parallel batch. Always await the Architect result before issuing the Critic Task.
45
57
 
46
58
  Follow the Plan skill's full documentation for consensus mode details.
59
+
60
+ ## Pre-Execution Gate
61
+
62
+ ### Why the Gate Exists
63
+
64
+ Execution modes (ralph, autopilot, team, ultrawork, ultrapilot) spin up heavy multi-agent orchestration. When launched on a vague request like "ralph improve the app", agents have no clear target — they waste cycles on scope discovery that should happen during planning, often delivering partial or misaligned work that requires rework.
65
+
66
+ The ralplan-first gate intercepts underspecified execution requests and redirects them through the ralplan consensus planning workflow. This ensures:
67
+ - **Explicit scope**: A PRD defines exactly what will be built
68
+ - **Test specification**: Acceptance criteria are testable before code is written
69
+ - **Consensus**: Planner, Architect, and Critic agree on the approach
70
+ - **No wasted execution**: Agents start with a clear, bounded task
71
+
72
+ ### Good vs Bad Prompts
73
+
74
+ **Passes the gate** (specific enough for direct execution):
75
+ - `ralph fix the null check in src/hooks/bridge.ts:326`
76
+ - `autopilot implement issue #42`
77
+ - `team add validation to function processKeywordDetector`
78
+ - `ralph do:\n1. Add input validation\n2. Write tests\n3. Update README`
79
+ - `ultrawork add the user model in src/models/user.ts`
80
+
81
+ **Gated — redirected to ralplan** (needs scoping first):
82
+ - `ralph fix this`
83
+ - `autopilot build the app`
84
+ - `team improve performance`
85
+ - `ralph add authentication`
86
+ - `ultrawork make it better`
87
+
88
+ **Bypass the gate** (when you know what you want):
89
+ - `force: ralph refactor the auth module`
90
+ - `! autopilot optimize everything`
91
+
92
+ ### When the Gate Does NOT Trigger
93
+
94
+ The gate auto-passes when it detects **any** concrete signal. You do not need all of them — one is enough:
95
+
96
+ | Signal Type | Example prompt | Why it passes |
97
+ |---|---|---|
98
+ | File path | `ralph fix src/hooks/bridge.ts` | References a specific file |
99
+ | Issue/PR number | `ralph implement #42` | Has a concrete work item |
100
+ | camelCase symbol | `ralph fix processKeywordDetector` | Names a specific function |
101
+ | PascalCase symbol | `ralph update UserModel` | Names a specific class |
102
+ | snake_case symbol | `team fix user_model` | Names a specific identifier |
103
+ | Test runner | `ralph npm test && fix failures` | Has an explicit test target |
104
+ | Numbered steps | `ralph do:\n1. Add X\n2. Test Y` | Structured deliverables |
105
+ | Acceptance criteria | `ralph add login - acceptance criteria: ...` | Explicit success definition |
106
+ | Error reference | `ralph fix TypeError in auth` | Specific error to address |
107
+ | Code block | `ralph add: \`\`\`ts ... \`\`\`` | Concrete code provided |
108
+ | Escape prefix | `force: ralph do it` or `! ralph do it` | Explicit user override |
109
+
110
+ ### End-to-End Flow Example
111
+
112
+ 1. User types: `ralph add user authentication`
113
+ 2. Gate detects: execution keyword (`ralph`) + underspecified prompt (no files, functions, or test spec)
114
+ 3. Gate redirects to **ralplan** with message explaining the redirect
115
+ 4. Ralplan consensus runs:
116
+ - **Planner** creates initial plan (which files, what auth method, what tests)
117
+ - **Architect** reviews for soundness
118
+ - **Critic** validates quality and testability
119
+ 5. On consensus approval, user chooses execution path:
120
+ - **ralph**: sequential execution with verification
121
+ - **team**: parallel coordinated agents
122
+ 6. Execution begins with a clear, bounded plan
123
+
124
+ ### Troubleshooting
125
+
126
+ | Issue | Solution |
127
+ |-------|----------|
128
+ | Gate fires on a well-specified prompt | Add a file reference, function name, or issue number to anchor the request |
129
+ | Want to bypass the gate | Prefix with `force:` or `!` (e.g., `force: ralph fix it`) |
130
+ | Gate does not fire on a vague prompt | The gate only catches prompts with <=15 effective words and no concrete anchors; add more detail or use `/ralplan` explicitly |
131
+ | Redirected to ralplan but want to skip planning | In the ralplan workflow, say "just do it" or "skip planning" to transition directly to execution |