oh-my-opencode 4.13.0 → 4.14.0

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 (445) hide show
  1. package/.agents/skills/codex-qa/SKILL.md +15 -0
  2. package/.agents/skills/codex-qa/references/logging-debug.md +12 -0
  3. package/.agents/skills/opencode-qa/SKILL.md +17 -0
  4. package/.agents/skills/opencode-qa/references/tui-tmux.md +17 -0
  5. package/.agents/skills/work-with-pr/SKILL.md +18 -10
  6. package/.opencode/skills/work-with-pr/SKILL.md +18 -10
  7. package/README.md +2 -2
  8. package/dist/cli/doctor/checks/telemetry.d.ts +2 -0
  9. package/dist/cli/doctor/framework/constants.d.ts +1 -0
  10. package/dist/cli/doctor/framework/doctor-target.d.ts +1 -1
  11. package/dist/cli/index.js +24651 -16452
  12. package/dist/cli-node/index.js +24651 -16452
  13. package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
  14. package/dist/features/team-mode/test-support/async-test-helpers.d.ts +19 -0
  15. package/dist/hooks/atlas/final-wave-approval-gate.d.ts +1 -0
  16. package/dist/hooks/atlas/subagent-completion-reminder.d.ts +30 -0
  17. package/dist/hooks/atlas/types.d.ts +2 -0
  18. package/dist/hooks/atlas/verification-reminders.d.ts +3 -0
  19. package/dist/hooks/team-session-events/team-idle-wake-hint.d.ts +1 -0
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.js +33232 -19559
  22. package/dist/mcp/context7.d.ts +9 -8
  23. package/dist/oh-my-opencode.schema.json +4 -0
  24. package/dist/shared/posthog.d.ts +17 -10
  25. package/dist/shared/telemetry-product-identity.d.ts +2 -0
  26. package/dist/skills/coding-agent-sessions/SKILL.md +128 -0
  27. package/dist/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  28. package/dist/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  29. package/dist/skills/coding-agent-sessions/references/claude.md +32 -0
  30. package/dist/skills/coding-agent-sessions/references/codex.md +30 -0
  31. package/dist/skills/coding-agent-sessions/references/opencode.md +43 -0
  32. package/dist/skills/coding-agent-sessions/references/senpi.md +17 -0
  33. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  34. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  35. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  36. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  37. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  38. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  39. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  40. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  41. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  42. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  43. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  44. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  45. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  46. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  47. package/dist/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  48. package/dist/skills/frontend/ATTRIBUTION.md +52 -8
  49. package/dist/skills/frontend/SKILL.md +29 -8
  50. package/dist/skills/frontend/references/design/README.md +29 -12
  51. package/dist/skills/frontend/references/design/_INDEX.md +3 -3
  52. package/dist/skills/frontend/references/design/design-system-architecture.md +22 -19
  53. package/dist/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  54. package/dist/skills/frontend/references/designpowers/README.md +48 -0
  55. package/dist/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  56. package/dist/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  57. package/dist/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  58. package/dist/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  59. package/dist/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  60. package/dist/skills/frontend/references/designpowers/orchestration.md +80 -0
  61. package/dist/skills/frontend/references/designpowers/routing.md +79 -0
  62. package/dist/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  63. package/dist/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  64. package/dist/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  65. package/dist/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  66. package/dist/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  67. package/dist/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  68. package/dist/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  69. package/dist/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  70. package/dist/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  71. package/dist/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  72. package/dist/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  73. package/dist/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  74. package/dist/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  75. package/dist/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  76. package/dist/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  77. package/dist/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  78. package/dist/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  79. package/dist/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  80. package/dist/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  81. package/dist/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  82. package/dist/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  83. package/dist/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  84. package/dist/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  85. package/dist/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  86. package/dist/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  87. package/dist/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  88. package/dist/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  89. package/dist/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  90. package/dist/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  91. package/dist/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  92. package/dist/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  93. package/dist/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  94. package/dist/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  95. package/dist/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  96. package/dist/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  97. package/dist/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  98. package/dist/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  99. package/dist/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  100. package/dist/skills/frontend/references/ui-ux-db/scripts/core.py +0 -0
  101. package/dist/skills/git-master/SKILL.md +4 -0
  102. package/dist/skills/review-work/SKILL.md +3 -3
  103. package/dist/skills/start-work/SKILL.md +7 -5
  104. package/dist/skills/ultraresearch/SKILL.md +4 -252
  105. package/dist/skills/ulw-plan/SKILL.md +8 -6
  106. package/dist/skills/ulw-plan/references/full-workflow.md +11 -6
  107. package/dist/skills/ulw-plan/references/intent-clear.md +3 -3
  108. package/dist/skills/ulw-plan/references/intent-unclear.md +1 -1
  109. package/dist/skills/{ultraresearch → ulw-research}/ATTRIBUTION.md +1 -1
  110. package/dist/skills/ulw-research/SKILL.md +260 -0
  111. package/dist/skills/visual-qa/SKILL.md +105 -14
  112. package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +120 -1
  113. package/dist/testing/create-plugin-module.d.ts +2 -0
  114. package/dist/tui.js +23917 -16117
  115. package/docs/reference/github-attachment-upload.md +51 -0
  116. package/docs/reference/web-terminal-visual-qa.md +81 -0
  117. package/package.json +20 -14
  118. package/packages/lsp-core/src/lsp/process.ts +4 -1
  119. package/packages/lsp-core/src/mcp.ts +1 -0
  120. package/packages/lsp-daemon/dist/cli.js +5 -1
  121. package/packages/lsp-daemon/dist/index.js +5 -1
  122. package/packages/lsp-daemon/dist/proxy.js +1 -0
  123. package/packages/lsp-tools-mcp/dist/cli.js +5 -1
  124. package/packages/lsp-tools-mcp/dist/lsp/manager.js +4 -1
  125. package/packages/lsp-tools-mcp/dist/mcp.js +5 -1
  126. package/packages/lsp-tools-mcp/dist/tools.js +4 -1
  127. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  128. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +323 -62
  129. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  130. package/packages/omo-codex/plugin/components/bootstrap/scripts/bootstrap.ps1 +37 -68
  131. package/packages/omo-codex/plugin/components/bootstrap/scripts/node-dispatch.ps1 +75 -0
  132. package/packages/omo-codex/plugin/components/bootstrap/src/cli.ts +1 -1
  133. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +2 -18
  134. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +575 -334
  135. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +204 -39
  136. package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
  137. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +7 -1
  138. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +103 -3
  139. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +114 -0
  140. package/packages/omo-codex/plugin/components/codegraph/src/serve-invocation.ts +29 -0
  141. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +31 -57
  142. package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +7 -4
  143. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +43 -9
  144. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +146 -0
  145. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +12 -7
  146. package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +71 -1
  147. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  148. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  149. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  150. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +4 -1
  151. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  152. package/packages/omo-codex/plugin/components/rules/dist/cli.js +2 -2
  153. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  154. package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +2 -2
  155. package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +11 -2
  156. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +6 -6
  157. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  158. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +23 -0
  159. package/packages/omo-codex/plugin/components/teammode/dist/cli.js +22 -4
  160. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  161. package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +40 -2
  162. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +32 -5
  163. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +7 -3
  164. package/packages/omo-codex/plugin/components/teammode/src/codex-hook.ts +19 -4
  165. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +32 -2
  166. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  167. package/packages/omo-codex/plugin/components/ultrawork/README.md +1 -1
  168. package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -1
  169. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
  170. package/packages/omo-codex/plugin/components/ultrawork/directive.md +23 -7
  171. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
  172. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  173. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +6 -4
  174. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +11 -6
  175. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +3 -3
  176. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +1 -1
  177. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
  178. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +24 -0
  179. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +6 -1
  180. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
  181. package/packages/omo-codex/plugin/components/ulw-loop/README.md +25 -21
  182. package/packages/omo-codex/plugin/components/ulw-loop/biome.json +1 -1
  183. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +381 -0
  184. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +14 -1
  185. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +145 -14
  186. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +6 -3
  187. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +16 -6
  188. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +5 -0
  189. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +104 -0
  190. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +1 -1
  191. package/packages/omo-codex/plugin/components/ulw-loop/package.json +2 -1
  192. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +19 -11
  193. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +14 -1
  194. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +4 -2
  195. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +28 -6
  196. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +113 -0
  197. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +33 -2
  198. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-kind-guidance.test.ts +31 -0
  199. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +13 -0
  200. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +36 -0
  201. package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +12 -0
  202. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +64 -0
  203. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +2 -1
  204. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +2 -1
  205. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +2 -1
  206. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +2 -1
  207. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +2 -1
  208. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +2 -1
  209. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +2 -1
  210. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +2 -1
  211. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +2 -1
  212. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +2 -1
  213. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -1
  214. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -1
  215. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +2 -1
  216. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -1
  217. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +2 -1
  218. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +2 -1
  219. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -1
  220. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +2 -1
  221. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +2 -1
  222. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +2 -1
  223. package/packages/omo-codex/plugin/package-lock.json +13 -13
  224. package/packages/omo-codex/plugin/package.json +1 -1
  225. package/packages/omo-codex/plugin/scripts/auto-update.mjs +9 -5
  226. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +1 -0
  227. package/packages/omo-codex/plugin/scripts/migrate-codex-config/context7-placeholder-guard.mjs +131 -0
  228. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-mode-guard.mjs +60 -0
  229. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +3 -10
  230. package/packages/omo-codex/plugin/scripts/migrate-codex-config/root-settings.mjs +31 -1
  231. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +73 -0
  232. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +20 -3
  233. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +30 -8
  234. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +128 -0
  235. package/packages/omo-codex/plugin/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  236. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  237. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/claude.md +32 -0
  238. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/codex.md +30 -0
  239. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/opencode.md +43 -0
  240. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +17 -0
  241. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  242. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  243. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  244. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  245. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  246. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  247. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  248. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  249. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  250. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  251. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  252. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  253. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  254. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  255. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  256. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +52 -8
  257. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +29 -8
  258. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +29 -12
  259. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +3 -3
  260. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +22 -19
  261. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  262. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +48 -0
  263. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  264. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  265. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  266. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  267. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  268. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/orchestration.md +80 -0
  269. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/routing.md +79 -0
  270. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  271. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  272. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  273. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  274. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  275. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  276. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  277. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  278. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  279. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  280. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  281. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  282. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  283. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  284. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  285. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  286. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  287. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  288. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  289. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  290. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  291. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  292. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  293. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  294. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  295. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  296. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  297. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  298. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  299. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  300. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  301. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  302. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  303. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  304. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  305. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  306. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  307. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  308. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/core.py +0 -0
  309. package/packages/omo-codex/plugin/skills/git-master/SKILL.md +4 -0
  310. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +4 -0
  311. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +4 -0
  312. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +4 -0
  313. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +12 -4
  314. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +14 -8
  315. package/packages/omo-codex/plugin/skills/teammode/SKILL.md +40 -2
  316. package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +32 -5
  317. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +7 -3
  318. package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +4 -250
  319. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +19 -11
  320. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +6 -4
  321. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +11 -6
  322. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +3 -3
  323. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +1 -1
  324. package/packages/{shared-skills/skills/ultraresearch → omo-codex/plugin/skills/ulw-research}/ATTRIBUTION.md +1 -1
  325. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +262 -0
  326. package/packages/omo-codex/plugin/skills/ulw-research/agents/openai.yaml +2 -0
  327. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +109 -14
  328. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -0
  329. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -0
  330. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +1 -0
  331. package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +24 -1
  332. package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +23 -5
  333. package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +38 -0
  334. package/packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs +25 -0
  335. package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +1 -7
  336. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +206 -6
  337. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +44 -0
  338. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +50 -1
  339. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +10 -7
  340. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +28 -2
  341. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +20 -0
  342. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +117 -0
  343. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +5 -2
  344. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +285 -0
  345. package/packages/omo-codex/scripts/install-bin-links.test.mjs +6 -1
  346. package/packages/omo-codex/scripts/install-cache-copy.test.mjs +51 -0
  347. package/packages/omo-codex/scripts/install-config.test.mjs +198 -17
  348. package/packages/omo-codex/scripts/install-dist/install-local.mjs +701 -282
  349. package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +24 -15
  350. package/packages/omo-codex/scripts/install-local.test.mjs +5 -1
  351. package/packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs +84 -0
  352. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +128 -0
  353. package/packages/shared-skills/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  354. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  355. package/packages/shared-skills/skills/coding-agent-sessions/references/claude.md +32 -0
  356. package/packages/shared-skills/skills/coding-agent-sessions/references/codex.md +30 -0
  357. package/packages/shared-skills/skills/coding-agent-sessions/references/opencode.md +43 -0
  358. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +17 -0
  359. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  360. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  361. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  362. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  363. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  364. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  365. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  366. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  367. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  368. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  369. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  370. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  371. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  372. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  373. package/packages/shared-skills/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  374. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +52 -8
  375. package/packages/shared-skills/skills/frontend/SKILL.md +29 -8
  376. package/packages/shared-skills/skills/frontend/references/design/README.md +29 -12
  377. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +3 -3
  378. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +22 -19
  379. package/packages/shared-skills/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  380. package/packages/shared-skills/skills/frontend/references/designpowers/README.md +48 -0
  381. package/packages/shared-skills/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  382. package/packages/shared-skills/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  383. package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  384. package/packages/shared-skills/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  385. package/packages/shared-skills/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  386. package/packages/shared-skills/skills/frontend/references/designpowers/orchestration.md +80 -0
  387. package/packages/shared-skills/skills/frontend/references/designpowers/routing.md +79 -0
  388. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  389. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  390. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  391. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  392. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  393. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  394. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  395. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  396. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  397. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  398. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  399. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  400. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  401. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  402. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  403. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  404. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  405. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  406. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  407. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  408. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  409. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  410. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  411. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  412. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  413. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  414. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  415. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  416. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  417. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  418. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  419. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  420. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  421. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  422. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  423. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  424. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  425. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  426. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/core.py +0 -0
  427. package/packages/shared-skills/skills/git-master/SKILL.md +4 -0
  428. package/packages/shared-skills/skills/review-work/SKILL.md +3 -3
  429. package/packages/shared-skills/skills/start-work/SKILL.md +7 -5
  430. package/packages/shared-skills/skills/ultraresearch/SKILL.md +4 -252
  431. package/packages/shared-skills/skills/ulw-plan/SKILL.md +8 -6
  432. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +11 -6
  433. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +3 -3
  434. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +1 -1
  435. package/packages/{omo-codex/plugin/skills/ultraresearch → shared-skills/skills/ulw-research}/ATTRIBUTION.md +1 -1
  436. package/packages/shared-skills/skills/ulw-research/SKILL.md +260 -0
  437. package/packages/shared-skills/skills/visual-qa/SKILL.md +105 -14
  438. package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +120 -1
  439. package/script/qa/web-terminal-redaction.d.mts +13 -0
  440. package/script/qa/web-terminal-redaction.mjs +43 -0
  441. package/script/qa/web-terminal-renderer.mjs +218 -0
  442. package/script/qa/web-terminal-visual-qa.mjs +264 -0
  443. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +0 -110
  444. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +0 -245
  445. package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +0 -204
@@ -0,0 +1,381 @@
1
+ <ultrawork-mode>
2
+
3
+ **MANDATORY**: First user-visible line this turn MUST be exactly:
4
+ `ULTRAWORK MODE ENABLED!`
5
+
6
+ [CODE RED] Maximum precision. Outcome-first. Evidence-driven.
7
+
8
+ # Role
9
+ Expert coding agent. Plan obsessively. Ship verified work. No process
10
+ narration.
11
+
12
+ # Goal
13
+ Deliver EXACTLY what the user asked, end-to-end working, proven by
14
+ captured evidence: a failing-first proof that went RED→GREEN through
15
+ the cheapest faithful channel, plus real-surface proof sized by the
16
+ tier below. TESTS ALONE NEVER PROVE DONE — a green suite means the
17
+ unit-level contract holds, not that the user-facing behavior works.
18
+
19
+ # Tier triage (classify ONCE at bootstrap; record tier + one-line
20
+ justification in the notepad; ratchet up only)
21
+ Default is LIGHT. Take HEAVY only when the change set hits a fact you
22
+ can point to: a new module / layer / domain model / abstraction;
23
+ auth, security, session, or permissions; an external integration
24
+ (API, queue, payment, webhook); a DB schema or migration; concurrency,
25
+ transaction boundaries, or cache invalidation; a refactor crossing
26
+ domain boundaries; or the user signaled care ("carefully",
27
+ "thoroughly", "design first") or demanded review.
28
+ When unsure, take HEAVY. If a HEAVY fact surfaces mid-task, upgrade
29
+ immediately and redo whatever the LIGHT path skipped; never downgrade
30
+ mid-task. The tier sizes process, never honesty: both tiers capture
31
+ evidence, record cleanup receipts, and obey the never-suppress rules.
32
+
33
+ LIGHT — a narrow change inside existing layers (one-spot bugfix, a
34
+ method or endpoint following an existing pattern, a validation rule,
35
+ a query tweak, copy/constants): plan directly in the notepad; 1-2
36
+ success criteria (happy path + the riskiest edge); one real-surface
37
+ proof of the user-visible deliverable, where auxiliary surfaces are
38
+ first-class for CLI- or data-shaped work; self-review recorded in the
39
+ notepad instead of the reviewer loop.
40
+ HEAVY — anything a fact above names: the `plan` agent decides waves;
41
+ 3+ success criteria (happy, edge, regression, adversarial risk), each
42
+ with its own channel scenario and both evidence pieces; reviewer loop
43
+ until unconditional approval.
44
+
45
+ # Manual-QA channels
46
+ Run real-surface proof yourself through the channel that faithfully
47
+ exercises the surface; capture the artifact.
48
+
49
+ 1. HTTP call — hit the live endpoint with `curl -i` (or a
50
+ Playwright APIRequestContext); capture status line + headers +
51
+ body.
52
+ 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with
53
+ `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript
54
+ is the artifact.
55
+ 3. Browser use — in Codex, use `browser:control-in-app-browser`
56
+ first when available and no authenticated/persistent user browser
57
+ profile is required. Otherwise use Chrome to drive the REAL page;
58
+ if Chrome is not available, download and use agent-browser
59
+ (https://github.com/vercel-labs/agent-browser). Capture action
60
+ log + screenshot path. Never downgrade to a non-browser surface
61
+ for a browser-facing criterion.
62
+ 4. Computer use — when the surface is a desktop/GUI app rather than a
63
+ page, drive it via OS-level automation (a computer-use agent,
64
+ AppleScript, xdotool, etc.) against the running app; capture
65
+ action log + screenshot. USE THIS for any non-browser GUI
66
+ criterion; do not substitute a CLI dump for it.
67
+
68
+ For EVERY scenario name the exact tool and the exact invocation
69
+ upfront: the literal command / API call / page action with its concrete
70
+ inputs (URL, payload, keystrokes, selectors) and the single binary
71
+ observable that decides PASS vs FAIL. "run the endpoint", "open the
72
+ page", "check it works" are NOT scenarios — write the `curl ...`, the
73
+ `send-keys ...`, the Browser plugin action, the `page.click(...)`, the
74
+ expected status/text.
75
+
76
+ Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump)
77
+ are first-class evidence for CLI- or data-shaped criteria; use a
78
+ channel scenario when the behavior is user-facing. `--dry-run`,
79
+ printing the command, "should respond", and "looks correct" never
80
+ count.
81
+
82
+ For TUI visual QA, terminal transcripts alone are not enough when a
83
+ visual surface is being evaluated. In this repo, prefer
84
+ `node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`
85
+ or the helper's `--command` tmux-backed PTY connector when available.
86
+ Outside this repo, capture equivalent browser/computer-use rendered
87
+ terminal evidence: screenshot, plain transcript, rendered HTML or action
88
+ log, and cleanup receipt.
89
+
90
+ # Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
91
+
92
+ ## 0. Survey the skills, then size the work
93
+ First, survey the loaded skill list and read the description of each
94
+ loosely relevant skill. Decide explicitly which skills this task will
95
+ use and prefer using every genuinely applicable one — name them in the
96
+ notepad with a one-line reason each. Skipping a skill that fits the
97
+ task is a defect.
98
+ Then run Tier triage (above) on the change set and record the tier.
99
+ HEAVY: spawn the `plan` agent with the gathered context, follow its
100
+ wave order and parallel grouping exactly, and run the verification it
101
+ specifies. LIGHT: plan directly in the notepad.
102
+
103
+ ## 1. Create the goal with binding success criteria
104
+ Call `create_goal` (or open your reply with a `# Goal` block treated as
105
+ binding) using exactly `objective`. Do not include `status`. Goals are
106
+ unlimited; never invent a numeric budget or limit.
107
+ The criteria MUST list, upfront:
108
+ - The user-visible deliverable in one line, and the tier with its
109
+ justification.
110
+ - Success criteria sized by tier (LIGHT 1-2, HEAVY 3+ covering happy
111
+ path, edge cases — boundary / empty / malformed / concurrent — and
112
+ adjacent-surface regression named by file + function), each naming
113
+ its exact scenario: the literal command / page action / payload and
114
+ the binary PASS/FAIL observable, plus the evidence artifact it will
115
+ capture.
116
+ - For each criterion, the failing-first proof (test id or scenario)
117
+ that will be captured RED BEFORE the implementation and GREEN after.
118
+ Evidence added after the green code does NOT satisfy this.
119
+
120
+ These scenarios are the contract. You are not done until every one of
121
+ them PASSES with its evidence captured.
122
+
123
+ ## 2. Open the durable notepad
124
+ Run: `NOTE=$(mktemp -t ulw-$(date +%Y%m%d-%H%M%S).XXXXXX.md)`. Echo the
125
+ path. Initialise it with these sections and APPEND (never rewrite) as
126
+ you work:
127
+
128
+ ```
129
+ # Ultrawork Notepad — <one-line goal>
130
+ Started: <ISO timestamp>
131
+
132
+ ## Plan (exhaustively detailed)
133
+ <every step you will take, in order, broken to atomic actions>
134
+
135
+ ## Success criteria + QA scenarios
136
+ <copied from the goal>
137
+
138
+ ## Now
139
+ <the single step in progress>
140
+
141
+ ## Todo
142
+ <every remaining step, ordered>
143
+
144
+ ## Findings
145
+ <every non-obvious fact discovered, with file:line refs>
146
+
147
+ ## Learnings
148
+ <patterns / pitfalls / principles to remember next turn>
149
+ ```
150
+
151
+ Append each finding, decision, command, RED/GREEN capture, and QA
152
+ artifact path the moment it happens. Update `## Now` and
153
+ `## Todo` on every transition. Append-only — never rewrite. This notepad
154
+ is your durable memory and it OUTLIVES the context window. After any
155
+ compaction or context loss (a `Context compacted` notice, a summarized
156
+ history, or you no longer see your own earlier steps), STOP and re-read
157
+ the WHOLE notepad FIRST — `omo sparkshell cat "$NOTE"`, or read the path
158
+ directly — before any other action, then resume from `## Now`. Recover
159
+ state from the notepad; do not re-plan from scratch or re-run completed
160
+ steps.
161
+
162
+ ## 3. Register obsessive todos via `update_plan`
163
+ The todo tool is Codex `update_plan` — your live, user-visible
164
+ checklist. Translate every action from the plan into one `update_plan`
165
+ step — one step per atomic work unit: an edit plus its verification, a
166
+ QA scenario run, a teardown. Keep each step small enough to finish
167
+ within a few tool calls.
168
+ Call `update_plan` on EVERY state transition — the instant a step starts
169
+ (mark it `in_progress`) and the instant it finishes (mark it `completed`
170
+ and the next `in_progress`). Exactly ONE `in_progress` at a time. Mark
171
+ completed IMMEDIATELY — never batch, never let the rendered plan lag
172
+ behind reality. Add newly discovered steps the moment they surface
173
+ instead of waiting for the next pass. Step text encodes WHERE / WHY
174
+ (which criterion it advances) / HOW / VERIFY:
175
+ `path: <action> for <criterion> — verify by <check>`.
176
+
177
+ GOOD pair (test-first, ordered):
178
+ `foo.test.ts: Write FAILING case invalid-email→ValidationError for criterion 2 — verify by RED with assertion msg`
179
+ `src/foo/bar.ts: Implement validateEmail() RFC-5322-lite for criterion 2 — verify by foo.test.ts GREEN + curl 400 body`
180
+ BAD: "Implement feature" / "Fix bug" / "Add tests later" / writing
181
+ production code before its failing test → rewrite.
182
+
183
+ # Finding things (lead with these, parallel-flood the first wave)
184
+ Never guess from memory — locate with the right tool, and re-read before
185
+ you claim or change. Fire 3+ independent lookups in one action;
186
+ serialize only when one output strictly feeds the next.
187
+ - CodeGraph, when `codegraph_*` tools exist -> use `codegraph_explore`
188
+ first for how/where/what/flow questions and before edits; if absent,
189
+ inactive/uninitialized, or cold-start unavailable, keep moving with
190
+ Read/Grep/Glob/LSP and the ast-grep skill.
191
+ - Repo-wide inspection, CLI smoke tests, git/history, bounded command
192
+ output → use `omo sparkshell <command> [args...]` first. Pass ordinary
193
+ commands as executable and arguments in separate argv tokens, for
194
+ example `omo sparkshell rg --files`; not `omo sparkshell 'rg --files'`,
195
+ because the quoted string is treated as one executable name. Raw
196
+ `rg`/`grep`/`cat`/`git` are fallbacks when Sparkshell is unavailable
197
+ or too narrow. `--shell` is only for shell syntax such as
198
+ metacharacters, pipelines, redirects, command substitution, or
199
+ variable expansion; `--tmux-pane` is only for inspecting an existing
200
+ pane, never for launching ordinary commands. Sparkshell is your
201
+ default lens.
202
+ - Symbols — definitions, references, rename impact, diagnostics →
203
+ `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`,
204
+ `lsp_diagnostics`. Use the LSP, not text search, for anything
205
+ symbol-shaped.
206
+ - Structural shapes — call/function/class/import patterns, codemods →
207
+ the `ast-grep` skill or `sg` CLI with `$VAR` / `$$$` metavars.
208
+ - Text / strings / comments / logs → `rg`. File-name discovery →
209
+ `glob` / `find`. Verbatim content → `read`.
210
+ When discovery needs multiple angles or the module layout is
211
+ unfamiliar, delegate to the `explorer` subagent (read-only codebase
212
+ search, absolute-path results). For research that leaves the repo —
213
+ library/API/docs/web — delegate to the `librarian` subagent. Spawn them
214
+ `fork_context: false` and keep doing root work while they run.
215
+
216
+ # Execution loop (PIN → RED → GREEN → SURFACE → CLEAN)
217
+ Until every success criterion PASSES with its evidence captured:
218
+ 1. Pick next criterion → mark in_progress → update notepad `## Now`.
219
+ 2. PIN + RED: when touching existing behavior, first pin it with a
220
+ characterization test that passes on the unchanged code. Then
221
+ capture the failing-first proof through the cheapest faithful
222
+ channel — a unit test where a seam exists, an integration/e2e test
223
+ where the behavior lives in wiring, or the criterion's real-surface
224
+ scenario captured failing when no test seam exists. It must fail
225
+ for the RIGHT reason (not a syntax error, not a missing import).
226
+ Paste RED output into the notepad. No production code yet.
227
+ 3. GREEN: write the SMALLEST production change that flips RED→GREEN.
228
+ Before GREEN work that depends on external review, PR, issue, or
229
+ branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
230
+ separate compatibility detection from policy changes unless the goal
231
+ explicitly asks to change policy.
232
+ Re-run the proof. Capture GREEN output. A GREEN far larger than the
233
+ criterion implies means the proof was too coarse — split it.
234
+ 4. SURFACE: run the real-surface proof the criterion named (channel
235
+ table above; auxiliary surface for CLI- or data-shaped criteria),
236
+ end-to-end, yourself. If the RED proof was the scenario itself,
237
+ re-run it now and capture it passing. Paste the artifact path into
238
+ the notepad.
239
+ 5. CLEANUP (PAIRED — NEVER SKIP): the moment a QA scenario spawns any
240
+ resource, register its teardown as its own todo (e.g.
241
+ `cleanup: kill server pid for criterion 2 — verify kill -0 fails`).
242
+ Every runtime artifact the QA spawned in step 4 MUST be torn down
243
+ before this step completes:
244
+ server PIDs (`kill <pid>`; verify `kill -0` fails), `tmux` sessions
245
+ (`tmux kill-session -t ulw-qa-<criterion>`; verify with `tmux ls`),
246
+ browser / Playwright contexts (`.close()`), containers
247
+ (`docker rm -f`), bound ports (`lsof -i :<port>` empty), temp
248
+ sockets / files / dirs (`rm -rf` the `mktemp` paths), QA-only env
249
+ vars. Append a one-line cleanup receipt to the notepad next to the
250
+ artifact, e.g. `cleanup: killed 12345; tmux kill-session ulw-qa-foo;
251
+ rm -rf /tmp/ulw.aB12cD`. No receipt → criterion stays in_progress.
252
+ 6. Verify: LSP diagnostics clean on changed files + full test suite
253
+ green (no skipped, no xfail added this turn).
254
+ 7. Mark completed. Append non-obvious findings / learnings.
255
+ 8. After each increment, re-run every criterion's scenario. Record
256
+ PASS/FAIL inline with the evidence paths AND the cleanup receipt.
257
+ Loop until all PASS.
258
+
259
+ Parallel-batch independent reads / searches / subagents within a step,
260
+ but NEVER parallelise RED and GREEN of the same criterion.
261
+
262
+ # Codex subagent reliability
263
+ Every `multi_agent_v1.spawn_agent` message is self-contained and starts with
264
+ `TASK: <imperative assignment>`, then names `DELIVERABLE`, `SCOPE`, and
265
+ `VERIFY`. State that it is an executable assignment, not a context
266
+ handoff. Use `fork_context: false` unless full history is truly
267
+ required; paste only the context the child needs. Full-history forks can
268
+ make the child continue old parent context instead of the delegated task.
269
+
270
+ # TOML-backed subagent routing compatibility
271
+ Treat TOML-backed role routing as **routing-unverified**. The
272
+ `multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
273
+ `agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
274
+ effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
275
+ role requirements into the message, and judge the result from delivered
276
+ evidence. Never claim the reviewer, planner, or explorer role was
277
+ selected from TOML unless runtime evidence confirms it.
278
+
279
+ Treat child status as a progress signal, not a timeout counter. For
280
+ work likely to exceed one wait cycle, tell the child to send
281
+ `WORKING: <task> - <current phase>` before long reading, testing, or
282
+ review passes, and `BLOCKED: <reason>` only when it cannot progress.
283
+ Track spawned agent names locally. Use `multi_agent_v1.wait_agent` for mailbox
284
+ signals, but a timeout only means no new mailbox update arrived.
285
+ Treat a running child as alive and keep doing independent root work.
286
+ Fallback only when the child is completed without the
287
+ deliverable, ack-only, or no longer running. If that followup is still
288
+ silent or ack-only, record the result as inconclusive, do not count it
289
+ as approval/pass, close it if safe, and respawn a smaller
290
+ `fork_context: false` task with the missing deliverable.
291
+
292
+ # Subagent-dependent transition barrier
293
+ Do not mark an `update_plan` step `completed` while an active child owns
294
+ evidence for that step. Do not start dependent implementation until the
295
+ audit, research, or review result is integrated or explicitly recorded
296
+ as inconclusive. Do not generate a plan before spawned research lanes
297
+ that feed the plan have returned or been closed as inconclusive.
298
+ Do not write the final answer, PR handoff, or completion summary while
299
+ active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
300
+ After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
301
+ BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
302
+ inconclusive, record that it is not approval, and respawn smaller only
303
+ if the deliverable is still required.
304
+
305
+ # Verification gate (TRIGGERED, NOT OPTIONAL)
306
+
307
+ Trigger when ANY apply:
308
+ - Tier is HEAVY.
309
+ - User demanded strict, rigorous, or proper review.
310
+ LIGHT tier records a self-review in the notepad instead: re-read the
311
+ diff, run diagnostics, confirm each criterion's evidence, and state in
312
+ one line why the tier held.
313
+
314
+ Procedure (NON-NEGOTIABLE):
315
+ 1. Spawn a child with `fork_context: false` and a self-contained reviewer
316
+ assignment in `message`. The `multi_agent_v1.spawn_agent` schema cannot select a
317
+ TOML-backed reviewer role, so paste the reviewer requirements into
318
+ the message.
319
+ Pass: goal, success-criteria, scenario evidence, full diff, notepad
320
+ path.
321
+ 2. Treat the reviewer's verdict as binding. There is NO "false
322
+ positive". Every concern is real. Do not argue. Do not minimise. Do
323
+ not explain it away.
324
+ 3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
325
+ evidence. Update notepad.
326
+ 4. Re-submit to the SAME reviewer. Loop until you receive an
327
+ UNCONDITIONAL approval ("looks good but..." = REJECTION).
328
+ 5. Only on unconditional approval may you declare done. Stopping early
329
+ IS failure.
330
+
331
+ # Commits
332
+ Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
333
+ fix / refactor / test / docs / chore / build / ci / perf). One logical
334
+ change per commit; each commit builds + tests green on its own. No WIP
335
+ on the final branch. If a plan file exists, final commit footer:
336
+ `Plan: .omo/plans/<slug>.md`. Do NOT auto-`git commit` unless the user
337
+ requested or preauthorised this session — default is stage + draft
338
+ message + present for approval.
339
+
340
+ # Constraints
341
+ - Every behavior change needs a failing-first proof captured BEFORE
342
+ the production change, through the cheapest faithful channel (unit
343
+ test at a seam; integration/e2e in wiring; the real-surface scenario
344
+ when no test seam exists). If you typed production code first, STOP,
345
+ revert, capture the proof failing, then redo the change. Exempt
346
+ only: pure formatting, comment-only edits, dependency bumps with no
347
+ behavior delta, rename-only moves — justify each in `## Findings`.
348
+ - A test that mirrors its implementation — asserting mocks were
349
+ called, pinning a constant, or unable to fail under any plausible
350
+ regression — is NOT evidence. Prefer a real-surface proof with no
351
+ new test over a tautological test.
352
+ - Refactors: characterization tests pinning current observable
353
+ behavior FIRST, green against the old code, green throughout.
354
+ - Smallest correct change. No drive-by refactors.
355
+ - Never suppress lints / errors / test failures. Never delete, skip,
356
+ `.only`, `.skip`, `xfail`, or comment out tests to green the suite.
357
+ - Never claim done from inference — only from captured evidence.
358
+ - Parallel tool calls for any independent work.
359
+
360
+ # Output discipline
361
+ - First line literally: `ULTRAWORK MODE ENABLED!`
362
+ - After bootstrap: 1-2 paragraph plan summary + notepad path.
363
+ - During execution: surface only state changes (RED captured, GREEN
364
+ captured, scenario PASS/FAIL with evidence paths, reviewer verdict).
365
+ - Final message: outcome + success-criteria checklist with evidence
366
+ refs + notepad path + reviewer approval (if gate triggered) + commit
367
+ list (`<sha> <subject>`). No file-by-file changelog unless asked.
368
+
369
+ # Stop rules
370
+ - Stop ONLY when every scenario PASSES with captured evidence, every
371
+ cleanup receipt is recorded, notepad is current, and (if gate
372
+ triggered) reviewer approved unconditionally.
373
+ - Leftover QA state (live process, `tmux` session, browser context,
374
+ bound port, temp file / dir) means NOT done. Tear it down, record
375
+ the receipt, then continue.
376
+ - After 2 identical failed attempts at one step, surface what was tried
377
+ and ask the user before another retry.
378
+ - After 2 parallel exploration waves yield no new useful facts, stop
379
+ exploring and act.
380
+
381
+ </ultrawork-mode>
@@ -3,10 +3,23 @@ import { parseGoalArg, readJsonInput, readValue } from "./cli-arg-parser.js";
3
3
  import { printJson, printStatus } from "./cli-output.js";
4
4
  import { ULW_LOOP_STEERING_MUTATION_KINDS, ULW_LOOP_SUCCESS_CRITERION_USER_MODELS, UlwLoopError } from "./types.js";
5
5
  const SOURCES = ["user_prompt_submit", "finding", "cli"];
6
+ const STEERING_KIND_HELP = [
7
+ `Allowed --kind values: ${ULW_LOOP_STEERING_MUTATION_KINDS.join(", ")}`,
8
+ "Kind-specific required flags:",
9
+ " add_subgoal: --title, --objective, --evidence, --rationale",
10
+ " split_subgoal: --goal-id, --children, --evidence, --rationale",
11
+ " reorder_pending: --order, --evidence, --rationale",
12
+ " revise_pending_wording: --goal-id, --title or --objective, --evidence, --rationale",
13
+ " revise_criterion: --goal-id, --criterion-id, one of --scenario/--expected-evidence/--user-model, --evidence, --rationale",
14
+ " annotate_ledger: --evidence, --rationale",
15
+ " mark_blocked_superseded: --goal-id, optional --replacements, --evidence, --rationale",
16
+ "Example: omo ulw-loop steer --kind annotate_ledger --evidence \"observed behavior\" --rationale \"why this changes the plan\" --json",
17
+ ].join("\n");
6
18
  function isKind(value) { return value !== undefined && ULW_LOOP_STEERING_MUTATION_KINDS.some((kind) => kind === value); }
7
19
  function isSource(value) { return value !== undefined && SOURCES.some((source) => source === value); }
8
20
  function isModel(value) { return ULW_LOOP_SUCCESS_CRITERION_USER_MODELS.some((model) => model === value); }
9
21
  function fail(message, code, details) { throw new UlwLoopError(message, code, { details }); }
22
+ function kindMessage(prefix) { return `${prefix}\n\n${STEERING_KIND_HELP}`; }
10
23
  function text(value, field) { if (value === undefined)
11
24
  return undefined; const trimmed = value.trim(); if (trimmed.length > 0)
12
25
  return trimmed; return fail(`Empty ${field}.`, "ULW_LOOP_STEERING_FIELD_EMPTY", { field }); }
@@ -19,7 +32,7 @@ export function parseSteeringKind(argv) {
19
32
  const value = readValue(argv, "--kind");
20
33
  if (isKind(value))
21
34
  return value;
22
- return value === undefined ? fail("Missing --kind.", "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind" }) : fail(`Invalid --kind: ${value}.`, "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS });
35
+ return value === undefined ? fail(kindMessage("Missing --kind."), "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind", expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP }) : fail(kindMessage(`Invalid --kind: ${value}.`), "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP });
23
36
  }
24
37
  export function parseSteeringSource(argv) {
25
38
  const value = readValue(argv, "--source");
@@ -1137,6 +1137,19 @@ async function checkpointUlwLoop(repoRoot, args, scope) {
1137
1137
 
1138
1138
  // components/ulw-loop/src/cli-steering.ts
1139
1139
  var SOURCES = ["user_prompt_submit", "finding", "cli"];
1140
+ var STEERING_KIND_HELP = [
1141
+ `Allowed --kind values: ${ULW_LOOP_STEERING_MUTATION_KINDS.join(", ")}`,
1142
+ "Kind-specific required flags:",
1143
+ " add_subgoal: --title, --objective, --evidence, --rationale",
1144
+ " split_subgoal: --goal-id, --children, --evidence, --rationale",
1145
+ " reorder_pending: --order, --evidence, --rationale",
1146
+ " revise_pending_wording: --goal-id, --title or --objective, --evidence, --rationale",
1147
+ " revise_criterion: --goal-id, --criterion-id, one of --scenario/--expected-evidence/--user-model, --evidence, --rationale",
1148
+ " annotate_ledger: --evidence, --rationale",
1149
+ " mark_blocked_superseded: --goal-id, optional --replacements, --evidence, --rationale",
1150
+ 'Example: omo ulw-loop steer --kind annotate_ledger --evidence "observed behavior" --rationale "why this changes the plan" --json'
1151
+ ].join(`
1152
+ `);
1140
1153
  function isKind(value) {
1141
1154
  return value !== undefined && ULW_LOOP_STEERING_MUTATION_KINDS.some((kind) => kind === value);
1142
1155
  }
@@ -1149,6 +1162,11 @@ function isModel(value) {
1149
1162
  function fail(message, code, details) {
1150
1163
  throw new UlwLoopError(message, code, { details });
1151
1164
  }
1165
+ function kindMessage(prefix) {
1166
+ return `${prefix}
1167
+
1168
+ ${STEERING_KIND_HELP}`;
1169
+ }
1152
1170
  function text(value, field) {
1153
1171
  if (value === undefined)
1154
1172
  return;
@@ -1179,7 +1197,7 @@ function parseSteeringKind(argv) {
1179
1197
  const value = readValue(argv, "--kind");
1180
1198
  if (isKind(value))
1181
1199
  return value;
1182
- return value === undefined ? fail("Missing --kind.", "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind" }) : fail(`Invalid --kind: ${value}.`, "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS });
1200
+ return value === undefined ? fail(kindMessage("Missing --kind."), "ULW_LOOP_STEERING_KIND_REQUIRED", { flag: "--kind", expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP }) : fail(kindMessage(`Invalid --kind: ${value}.`), "ULW_LOOP_STEERING_KIND_INVALID", { value, expected: ULW_LOOP_STEERING_MUTATION_KINDS, usage: STEERING_KIND_HELP });
1183
1201
  }
1184
1202
  function parseSteeringSource(argv) {
1185
1203
  const value = readValue(argv, "--source");
@@ -2251,6 +2269,111 @@ function commandScope(argv) {
2251
2269
  return sessionId === null ? undefined : { sessionId };
2252
2270
  }
2253
2271
 
2272
+ // components/ulw-loop/src/ultrawork-directive.ts
2273
+ import { readFileSync } from "node:fs";
2274
+ var ULTRAWORK_DIRECTIVE = readFileSync(new URL("../directive.md", import.meta.url), "utf8");
2275
+ var ULTRAWORK_CURRENT_PROMPT_PATTERN = /(?:ultrawork|ulw)/i;
2276
+ var ULTRAWORK_DIRECTIVE_MARKER = "<ultrawork-mode>";
2277
+ var TRANSCRIPT_SEARCH_BYTES = 512000;
2278
+ var CONTEXT_PRESSURE_MARKERS = [
2279
+ "context compacted",
2280
+ "context_length_exceeded",
2281
+ "skill descriptions were shortened",
2282
+ "context_too_large",
2283
+ "codex ran out of room in the model's context window",
2284
+ "your input exceeds the context window",
2285
+ "long threads and multiple compactions"
2286
+ ];
2287
+ function buildUltraworkDirectiveOutput(input) {
2288
+ if (isContextPressureRecoveryPrompt(input.prompt))
2289
+ return "";
2290
+ if (hasUltraworkDirectiveAlreadyInTranscript(input.transcript_path))
2291
+ return "";
2292
+ if (isContextPressureTranscript(input.transcript_path))
2293
+ return "";
2294
+ return isUltraworkPrompt(input.prompt) ? formatAdditionalContextOutput(ULTRAWORK_DIRECTIVE) : "";
2295
+ }
2296
+ function hasUltraworkDirectiveAlreadyInTranscript(transcriptPath) {
2297
+ if (transcriptPath === undefined || transcriptPath === null)
2298
+ return false;
2299
+ try {
2300
+ const rawTranscript = readTranscriptTail(transcriptPath);
2301
+ for (const line of rawTranscript.split(/\r?\n/)) {
2302
+ const parsed = parseJsonLine(line);
2303
+ if (!isRecord3(parsed))
2304
+ continue;
2305
+ const hookSpecificOutput = parsed["hookSpecificOutput"];
2306
+ if (!isRecord3(hookSpecificOutput))
2307
+ continue;
2308
+ if (hookSpecificOutput["hookEventName"] !== "UserPromptSubmit")
2309
+ continue;
2310
+ if (typeof hookSpecificOutput["additionalContext"] === "string" && hookSpecificOutput["additionalContext"].includes(ULTRAWORK_DIRECTIVE_MARKER)) {
2311
+ return true;
2312
+ }
2313
+ }
2314
+ } catch (error) {
2315
+ if (error instanceof Error)
2316
+ return false;
2317
+ throw error;
2318
+ }
2319
+ return false;
2320
+ }
2321
+ function readTranscriptTail(transcriptPath) {
2322
+ const rawTranscript = readFileSync(transcriptPath);
2323
+ return rawTranscript.subarray(Math.max(0, rawTranscript.byteLength - TRANSCRIPT_SEARCH_BYTES)).toString("utf8");
2324
+ }
2325
+ function isUltraworkPrompt(prompt) {
2326
+ return ULTRAWORK_CURRENT_PROMPT_PATTERN.test(prompt);
2327
+ }
2328
+ function isContextPressureRecoveryPrompt(prompt) {
2329
+ const normalizedPrompt = prompt.toLowerCase();
2330
+ return CONTEXT_PRESSURE_MARKERS.some((marker) => normalizedPrompt.includes(marker));
2331
+ }
2332
+ function isContextPressureTranscript(transcriptPath) {
2333
+ if (transcriptPath === undefined || transcriptPath === null)
2334
+ return false;
2335
+ try {
2336
+ return isContextPressureRecoveryPrompt(readTranscriptTail(transcriptPath));
2337
+ } catch (error) {
2338
+ if (error instanceof Error)
2339
+ return false;
2340
+ throw error;
2341
+ }
2342
+ }
2343
+ function formatAdditionalContextOutput(additionalContext) {
2344
+ const normalizedContext = normalizeAdditionalContext(additionalContext);
2345
+ if (normalizedContext.length === 0)
2346
+ return "";
2347
+ const output = {
2348
+ hookSpecificOutput: {
2349
+ hookEventName: "UserPromptSubmit",
2350
+ additionalContext: normalizedContext
2351
+ }
2352
+ };
2353
+ return `${JSON.stringify(output)}
2354
+ `;
2355
+ }
2356
+ function normalizeAdditionalContext(additionalContext) {
2357
+ return additionalContext.replace(/\r\n/g, `
2358
+ `).replace(/\r/g, `
2359
+ `).trim();
2360
+ }
2361
+ function parseJsonLine(line) {
2362
+ if (line.trim().length === 0)
2363
+ return null;
2364
+ try {
2365
+ const parsed = JSON.parse(line);
2366
+ return parsed;
2367
+ } catch (error) {
2368
+ if (error instanceof Error)
2369
+ return null;
2370
+ throw error;
2371
+ }
2372
+ }
2373
+ function isRecord3(value) {
2374
+ return typeof value === "object" && value !== null && !Array.isArray(value);
2375
+ }
2376
+
2254
2377
  // components/ulw-loop/src/codex-hook.ts
2255
2378
  var CREATE_GOAL_TOOL_NAME = "create_goal";
2256
2379
  var CREATE_GOAL_PAYLOAD_WARNING = "Use create_goal with objective only. Omit token_budget so the goal stays unlimited, and put lifecycle status changes on update_goal.";
@@ -2278,13 +2401,16 @@ function parsePreToolUsePayload(raw) {
2278
2401
  return null;
2279
2402
  }
2280
2403
  }
2281
- async function applyUserPromptUlwLoopSteering(payload) {
2404
+ async function applyUserPromptUlwLoopSteering(payload, options = {}) {
2282
2405
  try {
2283
2406
  if (payload.hook_event_name !== "UserPromptSubmit")
2284
2407
  return "";
2285
2408
  const proposal = parseUlwLoopSteeringDirective(payload.prompt);
2286
- if (proposal === null)
2287
- return "";
2409
+ if (proposal === null) {
2410
+ if (hasSteeringDirectiveMarker(payload.prompt))
2411
+ return "";
2412
+ return options.includeUltraworkDirective ? buildUltraworkDirectiveOutput(payload) : "";
2413
+ }
2288
2414
  const result = await steerUlwLoop(payload.cwd, proposal, payloadScope(payload));
2289
2415
  if (!result.accepted)
2290
2416
  return "";
@@ -2300,6 +2426,9 @@ async function applyUserPromptUlwLoopSteering(payload) {
2300
2426
  return "";
2301
2427
  }
2302
2428
  }
2429
+ function hasSteeringDirectiveMarker(prompt) {
2430
+ return /(?:^|\s)(?:OMO_ULW_LOOP_STEER|omo\.ulw-loop\.steer|omo ulw-loop steer):/u.test(prompt);
2431
+ }
2303
2432
  function payloadScope(payload) {
2304
2433
  return { sessionId: payload.session_id };
2305
2434
  }
@@ -2321,12 +2450,12 @@ function applyPreToolUseGoalBudgetGuard(payload) {
2321
2450
  return `${JSON.stringify(output)}
2322
2451
  `;
2323
2452
  }
2324
- async function runUlwLoopHookCli(stdin, stdout) {
2453
+ async function runUlwLoopHookCli(stdin, stdout, options = {}) {
2325
2454
  try {
2326
2455
  const payload = parseUserPromptSubmitPayload(await readAll(stdin));
2327
2456
  if (payload === null)
2328
2457
  return;
2329
- const output = await applyUserPromptUlwLoopSteering(payload);
2458
+ const output = await applyUserPromptUlwLoopSteering(payload, options);
2330
2459
  if (output.length > 0)
2331
2460
  stdout.write(output);
2332
2461
  } catch (error) {
@@ -2350,19 +2479,19 @@ async function runPreToolUseGoalBudgetGuardCli(stdin, stdout) {
2350
2479
  }
2351
2480
  }
2352
2481
  function isUserPromptSubmitPayload(value) {
2353
- if (!isRecord3(value))
2482
+ if (!isRecord4(value))
2354
2483
  return false;
2355
- return value["hook_event_name"] === "UserPromptSubmit" && typeof value["cwd"] === "string" && typeof value["prompt"] === "string" && typeof value["session_id"] === "string" && ["model", "permission_mode", "transcript_path", "turn_id"].every((key) => optionalString(value[key]));
2484
+ return value["hook_event_name"] === "UserPromptSubmit" && typeof value["cwd"] === "string" && typeof value["prompt"] === "string" && typeof value["session_id"] === "string" && ["model", "permission_mode", "turn_id"].every((key) => optionalString(value[key])) && (value["transcript_path"] === undefined || value["transcript_path"] === null || typeof value["transcript_path"] === "string");
2356
2485
  }
2357
2486
  function isPreToolUsePayload(value) {
2358
- if (!isRecord3(value))
2487
+ if (!isRecord4(value))
2359
2488
  return false;
2360
2489
  return value["hook_event_name"] === "PreToolUse" && typeof value["cwd"] === "string" && typeof value["model"] === "string" && typeof value["permission_mode"] === "string" && typeof value["session_id"] === "string" && typeof value["tool_name"] === "string" && typeof value["tool_use_id"] === "string" && (value["transcript_path"] === null || typeof value["transcript_path"] === "string") && typeof value["turn_id"] === "string" && Object.hasOwn(value, "tool_input");
2361
2490
  }
2362
2491
  function hasInvalidCreateGoalInput(value) {
2363
- return isRecord3(value) && Object.keys(value).some((key) => key !== "objective");
2492
+ return isRecord4(value) && Object.keys(value).some((key) => key !== "objective");
2364
2493
  }
2365
- function isRecord3(value) {
2494
+ function isRecord4(value) {
2366
2495
  return typeof value === "object" && value !== null && !Array.isArray(value);
2367
2496
  }
2368
2497
  function optionalString(value) {
@@ -2383,8 +2512,8 @@ function readAll(stdin) {
2383
2512
  // components/ulw-loop/src/cli.ts
2384
2513
  var TOP_LEVEL_HELP = `Usage:
2385
2514
  omo ulw-loop <subcommand> [args]
2386
- omo hook user-prompt-submit (Codex UserPromptSubmit hook)
2387
- omo help | --help | -h (this message)
2515
+ omo hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)
2516
+ omo help | --help | -h (this message)
2388
2517
 
2389
2518
  Run \`omo ulw-loop help\` for ulw-loop subcommands.
2390
2519
  `;
@@ -2400,7 +2529,9 @@ async function main() {
2400
2529
  if (command === "hook") {
2401
2530
  const sub = argv[1];
2402
2531
  if (sub === "user-prompt-submit") {
2403
- await runUlwLoopHookCli(process.stdin, process.stdout);
2532
+ await runUlwLoopHookCli(process.stdin, process.stdout, {
2533
+ includeUltraworkDirective: argv.includes("--with-ultrawork")
2534
+ });
2404
2535
  return 0;
2405
2536
  }
2406
2537
  if (sub === "pre-tool-use") {