oh-my-opencode 4.18.2 → 4.19.1

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 (307) hide show
  1. package/.agents/command/omomomo.md +1 -1
  2. package/.agents/skills/omomomo/SKILL.md +1 -1
  3. package/.opencode/command/omomomo.md +1 -1
  4. package/README.ja.md +6 -6
  5. package/README.ko.md +6 -6
  6. package/README.md +8 -8
  7. package/README.ru.md +6 -6
  8. package/README.zh-cn.md +6 -6
  9. package/dist/agents/atlas/agent.d.ts +7 -6
  10. package/dist/agents/gpt-prompt-identity.d.ts +3 -0
  11. package/dist/agents/sisyphus/gpt-5-5.d.ts +1 -1
  12. package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +1 -0
  13. package/dist/agents/sisyphus/index.d.ts +5 -0
  14. package/dist/agents/sisyphus/kimi-k3.d.ts +19 -0
  15. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  16. package/dist/agents/sisyphus-junior/agent.d.ts +8 -4
  17. package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
  18. package/dist/agents/sisyphus-junior/index.d.ts +2 -0
  19. package/dist/agents/sisyphus-junior/kimi-k3.d.ts +12 -0
  20. package/dist/agents/types.d.ts +2 -2
  21. package/dist/cli/index.js +781 -215
  22. package/dist/cli-node/index.js +781 -215
  23. package/dist/config/index.d.ts +1 -1
  24. package/dist/config/schema/agent-overrides.d.ts +48 -48
  25. package/dist/config/schema/browser-automation.d.ts +1 -0
  26. package/dist/config/schema/categories.d.ts +6 -6
  27. package/dist/config/schema/codegraph.d.ts +2 -0
  28. package/dist/config/schema/commands.d.ts +1 -3
  29. package/dist/config/schema/default-mode.d.ts +1 -1
  30. package/dist/config/schema/fallback-models.d.ts +5 -5
  31. package/dist/config/schema/goal.d.ts +7 -0
  32. package/dist/config/schema/hooks.d.ts +1 -1
  33. package/dist/config/schema/oh-my-opencode-config.d.ts +56 -58
  34. package/dist/config/schema/ralph-loop.d.ts +1 -1
  35. package/dist/config/schema.d.ts +1 -1
  36. package/dist/create-hooks.d.ts +1 -1
  37. package/dist/features/builtin-commands/templates/goal.d.ts +1 -0
  38. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
  39. package/dist/features/builtin-commands/types.d.ts +1 -1
  40. package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
  41. package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
  42. package/dist/hooks/goal/command-arguments.d.ts +13 -0
  43. package/dist/hooks/goal/controller.d.ts +26 -0
  44. package/dist/hooks/goal/index.d.ts +23 -0
  45. package/dist/hooks/goal/prompt.d.ts +3 -0
  46. package/dist/hooks/goal/store.d.ts +8 -0
  47. package/dist/hooks/goal/tools.d.ts +10 -0
  48. package/dist/hooks/goal/types.d.ts +93 -0
  49. package/dist/hooks/goal/validation.d.ts +4 -0
  50. package/dist/hooks/index.d.ts +1 -0
  51. package/dist/hooks/keyword-detector/hook.d.ts +1 -2
  52. package/dist/hooks/ralph-loop/types.d.ts +1 -1
  53. package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
  54. package/dist/hooks/start-work/notepad-scaffold.d.ts +10 -0
  55. package/dist/index.js +5398 -5109
  56. package/dist/oh-my-opencode.schema.json +34 -19
  57. package/dist/plugin/chat-message/loop-commands.d.ts +1 -1
  58. package/dist/plugin/chat-message/types.d.ts +23 -10
  59. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
  60. package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
  61. package/dist/plugin/hooks/create-transform-hooks.d.ts +0 -2
  62. package/dist/plugin/stop-continuation.d.ts +2 -2
  63. package/dist/shared/omo-process-sweep.d.ts +18 -0
  64. package/dist/shared/system-directive.d.ts +0 -1
  65. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
  66. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  67. package/dist/skills/ulw-plan/SKILL.md +31 -8
  68. package/dist/skills/ulw-plan/references/full-workflow.md +117 -6
  69. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  70. package/dist/skills/ulw-research/SKILL.md +3 -3
  71. package/dist/testing/create-plugin-module.d.ts +1 -0
  72. package/dist/tools/delegate-task/types.d.ts +0 -1
  73. package/dist/tui.js +138 -80
  74. package/package.json +14 -14
  75. package/packages/git-bash-mcp/dist/cli.js +54 -8
  76. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +60 -0
  77. package/packages/lsp-core/src/lsp/client.ts +14 -1
  78. package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +2 -2
  79. package/packages/lsp-core/src/mcp.ts +9 -0
  80. package/packages/lsp-daemon/dist/cli.js +319 -51
  81. package/packages/lsp-daemon/dist/client.js +136 -48
  82. package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -10
  83. package/packages/lsp-daemon/dist/daemon-client.js +4 -34
  84. package/packages/lsp-daemon/dist/daemon-failure-result.d.ts +3 -0
  85. package/packages/lsp-daemon/dist/daemon-failure-result.js +38 -0
  86. package/packages/lsp-daemon/dist/daemon-request-error.d.ts +14 -0
  87. package/packages/lsp-daemon/dist/daemon-request-error.js +26 -0
  88. package/packages/lsp-daemon/dist/daemon-server.js +5 -1
  89. package/packages/lsp-daemon/dist/index.js +137 -48
  90. package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
  91. package/packages/lsp-daemon/dist/proxy.js +1 -0
  92. package/packages/lsp-daemon/dist/version-reap.d.ts +26 -0
  93. package/packages/lsp-daemon/dist/version-reap.js +182 -0
  94. package/packages/lsp-tools-mcp/dist/cli.js +61 -10
  95. package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -1
  96. package/packages/lsp-tools-mcp/dist/mcp.js +61 -10
  97. package/packages/lsp-tools-mcp/dist/tools.js +6 -1
  98. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  99. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +416 -25
  100. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  101. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  102. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +22 -2
  103. package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +7 -6
  104. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +638 -267
  105. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +178 -89
  106. package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
  107. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
  108. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +3 -1
  109. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +98 -32
  110. package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +5 -0
  111. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +15 -6
  112. package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +6 -2
  113. package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +1 -0
  114. package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +1 -1
  115. package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +148 -0
  116. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +31 -2
  117. package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +1 -1
  118. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +65 -1
  119. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -7
  120. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +1 -1
  121. package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +57 -3
  122. package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +41 -0
  123. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +109 -8
  124. package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +2 -2
  125. package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +43 -0
  126. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  127. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  128. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  129. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  130. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  131. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  132. package/packages/omo-codex/plugin/components/lsp/AGENTS.md +1 -0
  133. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  134. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +80 -40
  135. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  136. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  137. package/packages/omo-codex/plugin/components/rules/dist/cli.js +11 -0
  138. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  139. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  140. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +11 -0
  141. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +60 -0
  142. package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +8 -0
  143. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +147 -60
  144. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  145. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  146. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +3 -71
  147. package/packages/omo-codex/plugin/components/start-work-continuation/src/plan-checklist.ts +171 -0
  148. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +198 -23
  149. package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +4 -3
  150. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +6 -5
  151. package/packages/omo-codex/plugin/components/start-work-continuation/test/fixtures/plan-scaffold.md +15 -0
  152. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  153. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  154. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  155. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  156. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +10 -10
  157. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +2 -2
  158. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
  159. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
  160. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
  161. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +2 -2
  162. package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +3 -3
  163. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
  164. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
  165. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  166. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  167. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +31 -8
  168. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +117 -6
  169. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  170. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
  171. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +42 -0
  172. package/packages/omo-codex/plugin/components/ulw-loop/README.md +6 -4
  173. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.d.ts +21 -0
  174. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +64 -0
  175. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +15 -2
  176. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +1 -1
  177. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
  178. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
  179. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +3 -3
  180. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +3 -0
  181. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +85 -0
  182. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +0 -1
  183. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -33
  184. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +998 -593
  185. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +1 -0
  186. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -1
  187. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +2 -0
  188. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +6 -0
  189. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +1 -0
  190. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +3 -0
  191. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +1 -0
  192. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +4 -0
  193. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
  194. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +10 -2
  195. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +1 -1
  196. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.d.ts +15 -0
  197. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +84 -0
  198. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +5 -0
  199. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +81 -0
  200. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +7 -59
  201. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +12 -4
  202. package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.d.ts +9 -0
  203. package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.js +122 -0
  204. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  205. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  206. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -6
  207. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +84 -0
  208. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +13 -2
  209. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +1 -1
  210. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +1 -1
  211. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +3 -3
  212. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +49 -0
  213. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +13 -45
  214. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -0
  215. package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +2 -0
  216. package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +7 -0
  217. package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +4 -0
  218. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +4 -1
  219. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +20 -2
  220. package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +1 -1
  221. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +125 -0
  222. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +59 -0
  223. package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +6 -58
  224. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +12 -4
  225. package/packages/omo-codex/plugin/components/ulw-loop/src/validation-batch.ts +122 -0
  226. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +76 -0
  227. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +111 -0
  228. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +67 -0
  229. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +57 -0
  230. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +1 -0
  231. package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +152 -0
  232. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +29 -0
  233. package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch-checkpoint.test.ts +147 -0
  234. package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch.test.ts +73 -0
  235. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  236. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  237. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  238. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  239. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  240. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  241. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  242. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  243. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  244. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  245. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  246. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -2
  247. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  248. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -2
  249. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  250. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -2
  251. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  252. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  253. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  254. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  255. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  256. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  257. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  258. package/packages/omo-codex/plugin/package-lock.json +41 -41
  259. package/packages/omo-codex/plugin/package.json +1 -1
  260. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +32 -28
  261. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +17 -45
  262. package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +455 -0
  263. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +3 -18
  264. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +43 -0
  265. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  266. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
  267. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +31 -8
  268. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +117 -6
  269. package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  270. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +11 -11
  271. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +26 -0
  272. package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +41 -0
  273. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +2 -2
  274. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +6 -6
  275. package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +3 -3
  276. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +62 -0
  277. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +271 -14
  278. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +3 -18
  279. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +0 -5
  280. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +293 -0
  281. package/packages/omo-codex/scripts/install-config.test.mjs +10 -10
  282. package/packages/omo-codex/scripts/install-dist/install-local.mjs +401 -22
  283. package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +39 -2
  284. package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
  285. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
  286. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  287. package/packages/shared-skills/skills/ulw-plan/SKILL.md +31 -8
  288. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +117 -6
  289. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
  290. package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
  291. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +0 -3
  292. package/dist/skills/ultraresearch/SKILL.md +0 -10
  293. package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +0 -273
  294. package/packages/shared-skills/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -12
  295. package/packages/shared-skills/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -107
  296. package/packages/shared-skills/skills/lcx-doctor/SKILL.md +0 -128
  297. package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +0 -11
  298. package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +0 -268
  299. package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +0 -11
  300. package/packages/shared-skills/skills/ultraresearch/SKILL.md +0 -10
  301. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/SKILL.md +0 -0
  302. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -0
  303. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -0
  304. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/SKILL.md +0 -0
  305. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/agents/openai.yaml +0 -0
  306. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/SKILL.md +0 -0
  307. /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/agents/openai.yaml +0 -0
@@ -59,9 +59,7 @@
59
59
  "items": {
60
60
  "type": "string",
61
61
  "enum": [
62
- "ralph-loop",
63
- "ulw-loop",
64
- "cancel-ralph",
62
+ "goal",
65
63
  "refactor",
66
64
  "start-work",
67
65
  "stop-continuation",
@@ -6131,38 +6129,38 @@
6131
6129
  }
6132
6130
  ]
6133
6131
  },
6134
- "ralph_loop": {
6132
+ "goal": {
6135
6133
  "type": "object",
6136
6134
  "properties": {
6137
6135
  "enabled": {
6138
6136
  "default": false,
6139
6137
  "type": "boolean"
6140
6138
  },
6139
+ "auto_start": {
6140
+ "default": false,
6141
+ "type": "boolean"
6142
+ },
6141
6143
  "default_max_iterations": {
6142
6144
  "default": 100,
6143
6145
  "type": "number",
6144
6146
  "minimum": 1,
6145
6147
  "maximum": 1000
6146
- },
6147
- "state_dir": {
6148
- "type": "string"
6149
- },
6150
- "default_strategy": {
6151
- "default": "continue",
6152
- "type": "string",
6153
- "enum": [
6154
- "reset",
6155
- "continue"
6156
- ]
6157
6148
  }
6158
6149
  },
6159
6150
  "required": [
6160
6151
  "enabled",
6161
- "default_max_iterations",
6162
- "default_strategy"
6152
+ "auto_start",
6153
+ "default_max_iterations"
6163
6154
  ],
6164
6155
  "additionalProperties": false
6165
6156
  },
6157
+ "ralph_loop": {
6158
+ "type": "object",
6159
+ "propertyNames": {
6160
+ "type": "string"
6161
+ },
6162
+ "additionalProperties": {}
6163
+ },
6166
6164
  "runtime_fallback": {
6167
6165
  "anyOf": [
6168
6166
  {
@@ -6558,10 +6556,20 @@
6558
6556
  "default": true,
6559
6557
  "type": "boolean"
6560
6558
  },
6559
+ "daemon": {
6560
+ "default": false,
6561
+ "type": "boolean"
6562
+ },
6561
6563
  "enabled": {
6562
6564
  "default": true,
6563
6565
  "type": "boolean"
6564
6566
  },
6567
+ "excluded_roots": {
6568
+ "type": "array",
6569
+ "items": {
6570
+ "type": "string"
6571
+ }
6572
+ },
6565
6573
  "install_dir": {
6566
6574
  "type": "string"
6567
6575
  },
@@ -6576,6 +6584,7 @@
6576
6584
  "required": [
6577
6585
  "auto_init",
6578
6586
  "auto_provision",
6587
+ "daemon",
6579
6588
  "enabled"
6580
6589
  ],
6581
6590
  "additionalProperties": false
@@ -6747,6 +6756,12 @@
6747
6756
  "dev-browser",
6748
6757
  "playwright-cli"
6749
6758
  ]
6759
+ },
6760
+ "playwright_mcp_args": {
6761
+ "type": "array",
6762
+ "items": {
6763
+ "type": "string"
6764
+ }
6750
6765
  }
6751
6766
  },
6752
6767
  "required": [
@@ -6896,14 +6911,14 @@
6896
6911
  "default": false,
6897
6912
  "type": "boolean"
6898
6913
  },
6899
- "ralph_loop": {
6914
+ "goal": {
6900
6915
  "default": false,
6901
6916
  "type": "boolean"
6902
6917
  }
6903
6918
  },
6904
6919
  "required": [
6905
6920
  "ultrawork",
6906
- "ralph_loop"
6921
+ "goal"
6907
6922
  ],
6908
6923
  "additionalProperties": false
6909
6924
  },
@@ -1,6 +1,6 @@
1
1
  import type { OhMyOpenCodeConfig } from "../../config";
2
2
  import type { ChatMessageHooks, ChatMessageHandlerOutput, ChatMessageInput } from "./types";
3
- export declare function handleRalphLoopMessage(args: {
3
+ export declare function handleGoalMessage(args: {
4
4
  readonly hooks: ChatMessageHooks;
5
5
  readonly input: ChatMessageInput;
6
6
  readonly output: ChatMessageHandlerOutput;
@@ -39,15 +39,28 @@ type StopContinuationGuard = {
39
39
  isStopped: (sessionID: string) => boolean;
40
40
  clear: (sessionID: string) => void;
41
41
  };
42
- type RalphLoopHook = {
43
- startLoop: (sessionID: string, prompt: string, options?: {
44
- readonly ultrawork?: boolean;
45
- readonly maxIterations?: number;
46
- readonly completionPromise?: string;
47
- readonly strategy?: "continue" | "reset";
48
- }) => boolean | void;
49
- resumeLoop?: (sessionID: string) => boolean;
50
- cancelLoop: (sessionID: string) => boolean | void;
42
+ type GoalHook = {
43
+ setGoal: (sessionID: string, objective: string) => {
44
+ readonly objective: string;
45
+ readonly status: string;
46
+ } | null;
47
+ getGoal: (sessionID: string) => {
48
+ readonly objective: string;
49
+ readonly status: string;
50
+ } | null;
51
+ pauseGoal: (sessionID: string) => {
52
+ readonly objective: string;
53
+ readonly status: string;
54
+ } | null;
55
+ resumeGoal: (sessionID: string) => {
56
+ readonly objective: string;
57
+ readonly status: string;
58
+ } | null;
59
+ clearGoal: (sessionID: string) => boolean;
60
+ markComplete: (sessionID: string) => {
61
+ readonly objective: string;
62
+ readonly status: string;
63
+ } | null;
51
64
  };
52
65
  type TodoContinuationEnforcerHook = {
53
66
  cancelAllCountdowns: () => void;
@@ -65,7 +78,7 @@ export type ChatMessageHooks = {
65
78
  noHephaestusNonGpt?: ChatMessageHook | null;
66
79
  hephaestusAgentsMdInjector?: ChatMessageHook | null;
67
80
  startWork?: ChatMessageHook | null;
68
- ralphLoop?: RalphLoopHook | null;
81
+ goal?: GoalHook | null;
69
82
  todoContinuationEnforcer?: TodoContinuationEnforcerHook | null;
70
83
  };
71
84
  export {};
@@ -50,7 +50,7 @@ export declare function createCoreHooks(args: {
50
50
  agentUsageReminder: ReturnType<typeof import("../../hooks").createAgentUsageReminderHook> | null;
51
51
  nonInteractiveEnv: ReturnType<typeof import("../../hooks").createNonInteractiveEnvHook> | null;
52
52
  interactiveBashSession: ReturnType<typeof import("../../hooks").createInteractiveBashSessionHook> | null;
53
- ralphLoop: ReturnType<typeof import("../../hooks").createRalphLoopHook> | null;
53
+ goal: ReturnType<typeof import("../../hooks").createGoalHook> | null;
54
54
  editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
55
55
  delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
56
56
  startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
@@ -3,7 +3,8 @@ import type { BackgroundManager } from "../../features/background-agent";
3
3
  import type { ModelFallbackControllerAccessor } from "../../hooks/model-fallback";
4
4
  import type { ModelCacheState } from "../../plugin-state";
5
5
  import type { PluginContext } from "../types";
6
- import { createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createCodegraphBootstrapHook, createAstGrepSgProvisionHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createHephaestusAgentsMdInjectorHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook, createLegacyPluginToastHook } from "../../hooks";
6
+ import { createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createCodegraphBootstrapHook, createAstGrepSgProvisionHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createHephaestusAgentsMdInjectorHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook, createLegacyPluginToastHook } from "../../hooks";
7
+ import { createGoalHook } from "../../hooks/goal";
7
8
  export type SessionHooks = {
8
9
  preemptiveCompaction: ReturnType<typeof createPreemptiveCompactionHook> | null;
9
10
  sessionNotification: ReturnType<typeof createSessionNotification> | null;
@@ -16,7 +17,7 @@ export type SessionHooks = {
16
17
  agentUsageReminder: ReturnType<typeof createAgentUsageReminderHook> | null;
17
18
  nonInteractiveEnv: ReturnType<typeof createNonInteractiveEnvHook> | null;
18
19
  interactiveBashSession: ReturnType<typeof createInteractiveBashSessionHook> | null;
19
- ralphLoop: ReturnType<typeof createRalphLoopHook> | null;
20
+ goal: ReturnType<typeof createGoalHook> | null;
20
21
  editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null;
21
22
  delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null;
22
23
  startWork: ReturnType<typeof createStartWorkHook> | null;
@@ -1,7 +1,6 @@
1
1
  import type { OhMyOpenCodeConfig } from "../../config";
2
2
  import type { MonitorManager } from "../../features/monitor";
3
3
  import type { PluginContext } from "../types";
4
- import type { RalphLoopHook } from "../../hooks/ralph-loop";
5
4
  import { createClaudeCodeHooksHook, createKeywordDetectorHook, createMonitorStatusInjectorHook, createTeamMailboxInjector, createTeamModeStatusInjector, createToolPairValidatorHook } from "../../hooks";
6
5
  import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
7
6
  export type TransformHooks = {
@@ -18,6 +17,5 @@ export declare function createTransformHooks(args: {
18
17
  pluginConfig: OhMyOpenCodeConfig;
19
18
  isHookEnabled: (hookName: string) => boolean;
20
19
  safeHookEnabled?: boolean;
21
- ralphLoop?: RalphLoopHook | null;
22
20
  monitorManager?: MonitorManager;
23
21
  }): TransformHooks;
@@ -5,8 +5,8 @@ type StopContinuationHooks = {
5
5
  readonly todoContinuationEnforcer?: {
6
6
  readonly cancelAllCountdowns: () => void;
7
7
  } | null;
8
- readonly ralphLoop?: {
9
- readonly cancelLoop: (sessionID: string) => boolean | void;
8
+ readonly goal?: {
9
+ readonly clearGoal: (sessionID: string) => boolean;
10
10
  } | null;
11
11
  };
12
12
  export declare function stopContinuation(args: {
@@ -0,0 +1,18 @@
1
+ import { sweepCodegraphZombies, sweepOrphanedLspDaemonProxies, sweepStaleLspDaemonVersions } from "@oh-my-opencode/utils/process-sweep";
2
+ export interface OmoFamilySweepOptions {
3
+ readonly log?: (message: string) => void;
4
+ }
5
+ export interface OmoFamilySweeps {
6
+ readonly sweepCodegraph: typeof sweepCodegraphZombies;
7
+ readonly sweepLspProxies: typeof sweepOrphanedLspDaemonProxies;
8
+ readonly sweepStaleLspDaemons: typeof sweepStaleLspDaemonVersions;
9
+ }
10
+ export declare function sweepCodegraphZombiesBestEffort(options: OmoFamilySweepOptions, sweep?: typeof sweepCodegraphZombies): Promise<void>;
11
+ export declare function sweepOrphanedLspDaemonProxiesBestEffort(options: OmoFamilySweepOptions, sweep?: typeof sweepOrphanedLspDaemonProxies): Promise<void>;
12
+ export declare function sweepStaleLspDaemonVersionsBestEffort(options: OmoFamilySweepOptions, sweep?: typeof sweepStaleLspDaemonVersions): Promise<void>;
13
+ /**
14
+ * Runs all three omo sweep families concurrently. NEVER rejects: each family
15
+ * is wrapped best-effort so a sweep failure can only produce a log line, not
16
+ * a startup failure. Callers fire-and-forget the returned promise.
17
+ */
18
+ export declare function sweepOmoFamiliesBestEffort(options?: OmoFamilySweepOptions, sweeps?: OmoFamilySweeps): Promise<void>;
@@ -34,7 +34,6 @@ export declare function hasSystemReminder(text: string): boolean;
34
34
  export declare function removeSystemReminders(text: string): string;
35
35
  export declare const SystemDirectiveTypes: {
36
36
  readonly TODO_CONTINUATION: "TODO CONTINUATION";
37
- readonly RALPH_LOOP: "RALPH LOOP";
38
37
  readonly BOULDER_CONTINUATION: "BOULDER CONTINUATION";
39
38
  readonly DELEGATION_REQUIRED: "DELEGATION REQUIRED";
40
39
  readonly SINGLE_TASK_ONLY: "SINGLE TASK ONLY";
@@ -0,0 +1,87 @@
1
+ import { afterAll, beforeAll, describe, expect, test } from "bun:test"
2
+ import { spawnSync } from "node:child_process"
3
+ import { copyFileSync, mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node:fs"
4
+ import { createRequire } from "node:module"
5
+ import { tmpdir } from "node:os"
6
+ import { dirname, join } from "node:path"
7
+
8
+ // Regression for lazycodex#111: the script must resolve `typescript` from the
9
+ // caller project (cwd), not from the script's own location, so it works when
10
+ // executed from an installed `~/.codex/...` skill cache.
11
+
12
+ const scriptSource = join(import.meta.dir, "check-no-excuse-rules.ts")
13
+ const repoRequire = createRequire(import.meta.url)
14
+ const typescriptPackageDir = dirname(repoRequire.resolve("typescript/package.json"))
15
+
16
+ let tempRoot = ""
17
+ let cachedScript = ""
18
+ let callerDir = ""
19
+ let callerWithoutTypescriptDir = ""
20
+
21
+ function runNoExcuse(cwd: string, target: string) {
22
+ return spawnSync(process.execPath, ["--no-install", cachedScript, target], {
23
+ cwd,
24
+ encoding: "utf8",
25
+ timeout: 60_000,
26
+ })
27
+ }
28
+
29
+ describe("#given the no-excuse script is executed from an installed ~/.codex-style skill cache", () => {
30
+ beforeAll(() => {
31
+ // given a cache copy of the script outside any project, and two caller projects:
32
+ // one providing node_modules/typescript, one without typescript at all
33
+ tempRoot = mkdtempSync(join(tmpdir(), "no-excuse-cache-repro-"))
34
+ const cacheDir = join(tempRoot, ".codex", "skills", "programming", "scripts", "typescript")
35
+ mkdirSync(cacheDir, { recursive: true })
36
+ cachedScript = join(cacheDir, "check-no-excuse-rules.ts")
37
+ copyFileSync(scriptSource, cachedScript)
38
+
39
+ callerDir = join(tempRoot, "caller-project")
40
+ mkdirSync(join(callerDir, "node_modules"), { recursive: true })
41
+ symlinkSync(typescriptPackageDir, join(callerDir, "node_modules", "typescript"), "junction")
42
+ writeFileSync(join(callerDir, "clean.ts"), "export const answer: number = 42\n")
43
+ writeFileSync(join(callerDir, "violating.ts"), "const x = foo as any\nexport default x\n")
44
+
45
+ callerWithoutTypescriptDir = join(tempRoot, "caller-without-typescript")
46
+ mkdirSync(callerWithoutTypescriptDir, { recursive: true })
47
+ writeFileSync(join(callerWithoutTypescriptDir, "clean.ts"), "export const answer: number = 42\n")
48
+ })
49
+
50
+ afterAll(() => {
51
+ rmSync(tempRoot, { recursive: true, force: true })
52
+ })
53
+
54
+ // A generous timeout: the first run does a cold TypeScript program load in a
55
+ // spawned subprocess, which can exceed bun test's 5s default on a cold cache
56
+ // (matches the 60s spawnSync ceiling). This bounds the subprocess, it does not
57
+ // wait on wall-clock time as behavior.
58
+ test("#when the caller project provides typescript #then it resolves the caller's typescript and exits 0", () => {
59
+ // when no-excuse runs from the cache copy against the caller project
60
+ const result = runNoExcuse(callerDir, "clean.ts")
61
+
62
+ // then the caller's own typescript is used and the clean file passes
63
+ expect(result.error).toBeUndefined()
64
+ expect(result.status).toBe(0)
65
+ expect(result.stdout).toContain("No violations in 1 file(s).")
66
+ }, 60_000)
67
+
68
+ test("#when a checked file violates the rules #then violations are still reported with exit 1", () => {
69
+ // when no-excuse runs against a file containing `as any`
70
+ const result = runNoExcuse(callerDir, "violating.ts")
71
+
72
+ // then the existing CLI behavior is unchanged
73
+ expect(result.error).toBeUndefined()
74
+ expect(result.status).toBe(1)
75
+ expect(result.stderr).toContain("[no-any-assertion]")
76
+ }, 60_000)
77
+
78
+ test("#when the caller project genuinely lacks typescript #then it fails with a clear error and exit 2", () => {
79
+ // when no-excuse runs from a caller project with no local typescript
80
+ const result = runNoExcuse(callerWithoutTypescriptDir, "clean.ts")
81
+
82
+ // then it reports the resolution problem instead of crashing mid-analysis
83
+ expect(result.error).toBeUndefined()
84
+ expect(result.status).toBe(2)
85
+ expect(result.stderr).toContain('cannot resolve "typescript" from the caller project')
86
+ }, 60_000)
87
+ })
@@ -19,6 +19,10 @@
19
19
  * Usage:
20
20
  * bun run scripts/check-no-excuse-rules.ts <file-or-dir>...
21
21
  *
22
+ * The `typescript` package is resolved from the caller project (process.cwd()),
23
+ * not from this script's location, so the script works when executed from an
24
+ * installed skill-cache path (e.g. ~/.codex/...) against a project checkout.
25
+ *
22
26
  * Exit codes:
23
27
  * 0 - no violations
24
28
  * 1 - violations found
@@ -26,9 +30,35 @@
26
30
  */
27
31
 
28
32
  import fs from "node:fs"
33
+ import { createRequire } from "node:module"
29
34
  import path from "node:path"
30
35
  import process from "node:process"
31
- import ts from "typescript"
36
+ import type * as tsTypes from "typescript"
37
+
38
+ type TsModule = typeof import("typescript")
39
+
40
+ function loadTypescriptFromCaller(): TsModule {
41
+ // A static `import ts from "typescript"` resolves from this script's location —
42
+ // an installed skill-cache path (e.g. ~/.codex/...) with no node_modules of its
43
+ // own — and fails even when the checked project has typescript. Resolve from the
44
+ // caller project (cwd) instead. When the caller has no local typescript, Bun
45
+ // falls back to a version-only stub from its global install cache instead of
46
+ // throwing, so the loaded module's API shape is verified as well.
47
+ const callerRequire = createRequire(path.join(process.cwd(), "no-excuse-anchor.cjs"))
48
+ try {
49
+ const loaded: Partial<TsModule> = callerRequire("typescript")
50
+ if (typeof loaded.createSourceFile === "function") return loaded as TsModule
51
+ } catch { // no-excuse-ok: catch
52
+ // fall through to the clear error below
53
+ }
54
+ console.error(
55
+ `error: cannot resolve "typescript" from the caller project (${process.cwd()}). ` +
56
+ "Install it in the project being checked (e.g. `bun add -d typescript`) and re-run.",
57
+ )
58
+ process.exit(2)
59
+ }
60
+
61
+ const ts: TsModule = loadTypescriptFromCaller()
32
62
 
33
63
  type RuleId =
34
64
  | "no-any-assertion"
@@ -95,7 +125,7 @@ function discoverFiles(inputs: string[]): string[] {
95
125
  return files
96
126
  }
97
127
 
98
- function getLineText(sourceFile: ts.SourceFile, line: number): string {
128
+ function getLineText(sourceFile: tsTypes.SourceFile, line: number): string {
99
129
  const lineStarts = sourceFile.getLineStarts()
100
130
  const start = lineStarts[line]
101
131
  const end = line + 1 < lineStarts.length ? lineStarts[line + 1] : sourceFile.getEnd()
@@ -107,17 +137,17 @@ function analyzeFile(filePath: string): Violation[] {
107
137
  const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true)
108
138
  const violations: Violation[] = []
109
139
 
110
- function pos(node: ts.Node): { line: number; column: number } {
140
+ function pos(node: tsTypes.Node): { line: number; column: number } {
111
141
  const { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile))
112
142
  return { line: line + 1, column: character + 1 }
113
143
  }
114
144
 
115
- function lineHasOptOut(node: ts.Node): boolean {
145
+ function lineHasOptOut(node: tsTypes.Node): boolean {
116
146
  const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile))
117
147
  return OPT_OUT_RE.test(getLineText(sourceFile, line))
118
148
  }
119
149
 
120
- function visit(node: ts.Node): void {
150
+ function visit(node: tsTypes.Node): void {
121
151
  // ── as any / as unknown ──
122
152
  if (ts.isAsExpression(node)) {
123
153
  const typeText = node.type.getText(sourceFile)
@@ -13,35 +13,58 @@ You are **Prometheus**, a planning consultant. You turn a vague or large request
13
13
 
14
14
  Outcome-first: explore a lot, ask few sharp questions - or none, when the intent is fuzzy (see routing) - and stop the moment the plan is done.
15
15
 
16
+ ## MANDATORY OPENING ANNOUNCEMENT
17
+
18
+ The FIRST user-visible line of the turn that activates this skill MUST be exactly:
19
+
20
+ `ULW-PLAN MODE ENABLED!`
21
+
22
+ If another active mode mandates its own first line (ultrawork does), print that line first and this marker on the next line - both contracts stay satisfied.
23
+
24
+ Directly under the marker, before any exploration, state the working contract once, in your own words, carrying ALL of these commitments:
25
+
26
+ 1. **Persona + no-implementation pledge** - from now on you work as Prometheus, a planning consultant, and you will never start implementation - no product-code edits, no implementer subagents - until the user explicitly says okay; even then, approval authorizes writing the plan only, and execution starts in a separate worker session (e.g. `$start-work`).
27
+ 2. **Workflow preview** - the order of what happens next: parallel read-only exploration (plus outside research when the repo cannot answer) until the open unknowns are resolved; the intent verdict from INTENT ROUTING, announced; questions to the user ONLY when a genuine owner-decision survives exploration - or when exploration and research both come back empty on a fork the plan cannot proceed without; then the approval brief, and the plan is written only after the explicit okay.
28
+
29
+ Example opening (adapt the wording, keep every commitment):
30
+
31
+ > ULW-PLAN MODE ENABLED!
32
+ > From now on I am working as Prometheus, a planning consultant. I will not start any implementation until you explicitly say okay - and approval authorizes writing the plan only; execution starts separately (e.g. `$start-work`).
33
+ > Next, in order: (1) parallel read-only exploration and research, (2) intent verdict announced (CLEAR or UNCLEAR, plus whether high-accuracy review is required), (3) questions only for the forks exploration cannot settle - or where research finds nothing on a blocking decision, (4) approval brief, then (5) the plan is written after your okay.
34
+
16
35
  ## INTENT ROUTING - pick ONE intent reference
17
36
 
18
37
  **Review modifiers are a gate trigger, not a style cue.** If the user says "high accuracy", "ultra high accuracy", "고정밀", "deep review", or equivalent - in ANY turn, even appended to a follow-up question and even after the plan already exists - set `review_required: true` in the draft: the dual high-accuracy review (native `momus` + the independent Oracle review) is now REQUIRED before handoff, and if the plan already exists you run it this same turn. Answering the current question more carefully does NOT satisfy it. This does NOT choose CLEAR/UNCLEAR and does NOT suppress interview.
19
38
 
20
- After grounding, make ONE judgment, record `intent: clear|unclear` plus `review_required`, **ANNOUNCE both to the user in one line**, then load ONE intent reference (you ALSO read `references/full-workflow.md` for the shared mechanics - see below). The test keys on whether the desired **OUTCOME** is clear, NOT on request length. The announcement is the user's first signal of whether they will be interviewed and whether high-accuracy review is already requested - never skip it.
39
+ After grounding, make ONE judgment, record `intent: clear|unclear` plus `review_required`, **ANNOUNCE both to the user in one line**, then load ONE intent reference (you ALSO read `references/full-workflow.md` for the shared mechanics - see below). The test keys on whether the desired **OUTCOME** is clear, NOT on request length. This verdict line and the opening announcement above are the two mandatory user-visible signals of a planning session - it tells the user whether they will be interviewed and whether high-accuracy review is already requested; never skip either.
21
40
 
22
41
  > "Intent: **CLEAR**, review required - you specified the endpoint and asked for high accuracy. I will ask only the genuine forks, then run the high-accuracy review after approval."
23
42
  > "Intent: **UNCLEAR**, review required - 'make auth better' is open-ended and you asked for high accuracy. I will choose best-practice defaults, then run the high-accuracy review automatically."
24
43
 
25
44
  - **OVERRIDE - explicit ask wins:** if the user explicitly asks to be questioned or interviewed ("ask me", "interview me", "why aren't you asking me" - in any language), route **CLEAR**, run the interview, and turn the adopt-default filter OFF: the user has claimed the forks, so every surviving one is ASKED, not defaulted. This beats the OUTCOME test below, even on a fuzzy brief.
26
45
  - **CLEAR** - the user knows the outcome; the only open items are preferences/tradeoffs the repo cannot answer (genuine owner-decisions). Read **`references/intent-clear.md`**: ask the surviving forks with WHY, run the normal approval gate, and offer high-accuracy review only when `review_required` is false.
27
- - **UNCLEAR** - the outcome itself is fuzzy (a vague brief, a bootstrap, `$start-work` with no selectable plan, a goal the user cannot yet articulate). Asking would offload your own job onto the user. Read **`references/intent-unclear.md`**: research maximally, adopt and ANNOUNCE best-practice defaults, do NOT ask the user extra questions, and run high-accuracy review AUTOMATICALLY (unless Classify sized the work Trivial).
46
+ - **UNCLEAR** - the outcome itself is fuzzy (a vague brief, a bootstrap, `$start-work` with no selectable plan, a goal the user cannot yet articulate). Asking would offload your own job onto the user. Read **`references/intent-unclear.md`**: research maximally, adopt and ANNOUNCE best-practice defaults, do NOT ask the user extra questions, and, unless Classify sized the work Trivial, set `review_required: true` before the approval gate and run high-accuracy review AUTOMATICALLY.
28
47
  - **ON THE FENCE** - when CLEAR vs UNCLEAR is genuinely ambiguous, treat it as CLEAR and ask exactly ONE question. A user wrongly silenced is worse than one extra question. The dominant failure to guard against is mis-routing a CLEAR request to UNCLEAR, which silently applies defaults and overrides forks the user wanted to own.
29
48
 
30
49
  WORKED: "add a 5/min-per-IP rate-limit to `/login`" = CLEAR. "make auth better" = UNCLEAR.
31
50
 
32
51
  Both intent paths ALSO read **`references/full-workflow.md`** for the shared mechanics - the plan template, the final verification wave, the APPEND protocol, and the full delegation/wait syntax. Read the phase you are in.
33
52
 
34
- ## RUN THE SCRIPT - do not hand-build the plan files
53
+ ## RUN THE SCRIPT - do not hand-build artifacts
35
54
 
36
- Before writing any plan or draft by hand, RUN:
55
+ As soon as `<slug>` and intent are known, before recording draft state, RUN:
37
56
 
38
57
  ```
39
- node "<skill-root>/scripts/scaffold-plan.mjs" <slug> [--clear|--unclear]
58
+ node "<skill-root>/scripts/scaffold-plan.mjs" <slug> [--clear|--unclear] --draft-only [--review-required]
40
59
  ```
41
60
 
42
- (Replace `<skill-root>` with this skill's own directory; `bun` is an accepted substitute for `node`.) It creates `.omo/drafts/<slug>.md` (your durable, compaction-safe resume point) and `.omo/plans/<slug>.md` (skeleton with the human `## TL;DR (For humans)` block on top and every plan header below). Then **APPEND** task batches into the marked `## Todos` region with edit/apply_patch - **never rewrite the script-emitted headers**. This replaces ~10 manual file writes and guarantees the human-readable summary always leads the plan.
61
+ (Replace `<skill-root>` with this skill's own directory; `bun` is accepted.) This creates only `.omo/drafts/<slug>.md`, the compaction-safe resume point; it does not create a plan before approval. Include `--review-required` when an explicit modifier requires review or the classified route is non-Trivial UNCLEAR, so the first durable write contains the complete pending review request. After approval, rerun without `--draft-only` to create `.omo/plans/<slug>.md`, then **APPEND** task batches into `## Todos` - never rewrite script-emitted headers.
62
+
63
+ Both invocations are resume-safe no-ops for artifacts already present. Do NOT hand-build them; use `--reset` only for a structural reset (`--reset --force` discards edits). If a same-named non-artifact file exists, choose another slug.
64
+
65
+ ## Plan artifact producer contract
43
66
 
44
- Run it ONCE at plan generation. A plain re-run on an existing plan is a safe no-op - it never overwrites your appended todos - so resuming after compaction cannot crash the turn or clobber the plan. Do NOT hand-build these files; if a structural reset is ever needed, use `--reset` (and `--reset --force` to discard hand edits). If it refuses because a same-named NON-artifact file exists, pick a different `<slug>` - do NOT `--reset` over a human file you did not create.
67
+ When producing the plan, encode every executable item as a column-zero Markdown task row: implementation rows MUST match `- [ ] N. <title>` (where `N` is a positive decimal integer), and final-verifier rows MUST match `- [ ] F<number>. <title>`. Prose headings, numbered paragraphs, and ordinary bullets are not task substitutes and MUST NOT be counted as implementation or final-verifier tasks. Before handoff, run a structural self-check over the plan: verify that every implementation row and final-verifier row is column-zero, matches its required grammar, and appears in the intended `## Todos` or `## Final verification wave` section; verify that no prose heading or bullet is being used as a task; and repair the plan before handoff if any check fails.
45
68
 
46
69
  ## Universal invariants (hold on every path)
47
70
 
@@ -58,7 +81,7 @@ Run it ONCE at plan generation. A plain re-run on an existing plan is a safe no-
58
81
 
59
82
  ## Approval gate
60
83
 
61
- When exploration is exhausted and the unknowns are answered, record the gate in the draft (`status: awaiting-approval`, the pending action `write .omo/plans/<slug>.md`, the approach), present a short brief once, then **wait for the user's explicit okay**. Read their next reply as a decision (approve / scope-change / still-unclear). Full gate mechanics: `references/full-workflow.md`.
84
+ When exploration is exhausted and the unknowns are answered, record the gate in the draft (`status: awaiting-approval`, approach, and the next workflow action), present a short brief once, then **wait for the user's explicit okay**. Approval authorizes plan creation only; any already-required review runs afterward under its existing authorization. Full mechanics: `references/full-workflow.md`.
62
85
 
63
86
  ## Delegation (OpenCode-native)
64
87