oh-my-opencode 4.15.1 → 4.16.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 (234) hide show
  1. package/.agents/skills/codex-qa/SKILL.md +9 -7
  2. package/.agents/skills/codex-qa/references/logging-debug.md +6 -4
  3. package/.agents/skills/opencode-qa/SKILL.md +9 -9
  4. package/.agents/skills/opencode-qa/references/tui-tmux.md +10 -8
  5. package/dist/cli/codex-ulw-loop.d.ts +8 -0
  6. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
  7. package/dist/cli/get-local-version/types.d.ts +1 -1
  8. package/dist/cli/index.js +792 -744
  9. package/dist/cli/install-senpi/index.d.ts +1 -0
  10. package/dist/cli/run/poll-for-completion.d.ts +4 -0
  11. package/dist/cli/run/session-resolver.d.ts +1 -0
  12. package/dist/cli/senpi-platform-flag.d.ts +4 -0
  13. package/dist/cli/types.d.ts +2 -1
  14. package/dist/cli-node/index.js +792 -744
  15. package/dist/features/background-agent/manager.d.ts +16 -0
  16. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  17. package/dist/features/monitor/process.d.ts +17 -1
  18. package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
  19. package/dist/index.js +2206 -1971
  20. package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
  21. package/dist/skills/frontend/ATTRIBUTION.md +10 -1
  22. package/dist/skills/frontend/SKILL.md +12 -7
  23. package/dist/skills/frontend/references/design/README.md +8 -4
  24. package/dist/skills/frontend/references/design/_INDEX.md +2 -2
  25. package/dist/skills/frontend/references/design/design-system-architecture.md +24 -2
  26. package/dist/skills/frontend/references/design/lazyweb.md +77 -0
  27. package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
  28. package/dist/skills/frontend/references/designpowers/README.md +2 -2
  29. package/dist/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
  30. package/dist/skills/programming/SKILL.md +10 -1
  31. package/dist/skills/programming/references/logging.md +91 -0
  32. package/dist/skills/start-work/SKILL.md +2 -2
  33. package/dist/skills/ulw-plan/SKILL.md +5 -5
  34. package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
  35. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  36. package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
  37. package/dist/skills/ulw-research/SKILL.md +28 -7
  38. package/dist/skills/visual-qa/SKILL.md +13 -17
  39. package/dist/tools/skill/description-formatter.d.ts +1 -0
  40. package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
  41. package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
  42. package/dist/tui.js +121 -419
  43. package/docs/reference/web-terminal-visual-qa.md +39 -45
  44. package/package.json +48 -25
  45. package/packages/git-bash-mcp/dist/cli.js +2 -2
  46. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  47. package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
  48. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +19 -16
  49. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  50. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
  52. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
  53. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
  54. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
  56. package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
  57. package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
  58. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
  59. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
  60. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
  61. package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
  62. package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
  63. package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
  64. package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
  65. package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
  66. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
  67. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
  68. package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
  69. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
  70. package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
  71. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
  72. package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
  73. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  74. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  75. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
  76. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  77. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  78. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
  79. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  80. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  81. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  82. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  83. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
  84. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  85. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  86. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +2 -2
  87. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  88. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  89. package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
  90. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  91. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  92. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
  93. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
  94. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  95. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  96. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
  97. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
  98. package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
  99. package/packages/omo-codex/plugin/components/ultrawork/directive.md +18 -10
  100. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
  101. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  102. package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
  103. package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
  104. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +388 -0
  105. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +16 -2
  106. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
  107. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
  108. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
  109. package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
  110. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +26 -5
  111. package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
  112. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
  113. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
  114. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +5 -0
  115. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +18 -10
  116. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +15 -2
  117. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +2 -1
  118. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +145 -32
  119. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
  120. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
  121. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +6 -0
  122. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +55 -9
  123. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.d.ts +15 -0
  124. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.js +33 -0
  125. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +10 -3
  126. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +15 -11
  127. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
  128. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
  129. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
  130. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
  131. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
  132. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  133. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  134. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +7 -7
  135. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -2
  136. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +2 -1
  137. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
  138. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +59 -11
  139. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-snapshot.ts +38 -0
  140. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +11 -3
  141. package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +15 -7
  142. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
  143. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
  144. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +16 -0
  145. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +260 -2
  146. package/packages/omo-codex/plugin/components/ulw-loop/test/steering-snapshot.test.ts +124 -0
  147. package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +101 -2
  148. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
  149. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  150. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  151. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  152. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  153. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  154. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  155. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  156. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  157. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  158. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  159. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  160. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  161. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  162. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  163. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  164. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  165. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  166. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  167. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  168. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  169. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  170. package/packages/omo-codex/plugin/package-lock.json +13 -13
  171. package/packages/omo-codex/plugin/package.json +1 -1
  172. package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
  173. package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +10 -6
  174. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
  175. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -0
  176. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
  177. package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
  178. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -1
  179. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +12 -7
  180. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +8 -4
  181. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +2 -2
  182. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +24 -2
  183. package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
  184. package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
  185. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +2 -2
  186. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
  187. package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
  188. package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
  189. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -2
  190. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +388 -0
  191. package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
  192. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  193. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +7 -7
  194. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +16 -2
  195. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
  196. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
  197. package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
  198. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +28 -7
  199. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +13 -17
  200. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -4
  201. package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +1 -1
  202. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +22 -9
  203. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
  204. package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +6 -6
  205. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
  206. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
  207. package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +52 -0
  208. package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
  209. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +6 -6
  210. package/packages/omo-codex/scripts/install-dist/install-local.mjs +310 -3979
  211. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +2 -2
  212. package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
  213. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -1
  214. package/packages/shared-skills/skills/frontend/SKILL.md +12 -7
  215. package/packages/shared-skills/skills/frontend/references/design/README.md +8 -4
  216. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +2 -2
  217. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +24 -2
  218. package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
  219. package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
  220. package/packages/shared-skills/skills/frontend/references/designpowers/README.md +2 -2
  221. package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
  222. package/packages/shared-skills/skills/programming/SKILL.md +10 -1
  223. package/packages/shared-skills/skills/programming/references/logging.md +91 -0
  224. package/packages/shared-skills/skills/start-work/SKILL.md +2 -2
  225. package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
  226. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
  227. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
  228. package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
  229. package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
  230. package/packages/shared-skills/skills/visual-qa/SKILL.md +13 -17
  231. package/script/qa/strip-ansi.mjs +10 -0
  232. package/script/qa/web-terminal-visual-qa.mjs +112 -195
  233. package/script/qa/xterm-live-terminal.mjs +180 -0
  234. package/script/qa/web-terminal-renderer.mjs +0 -218
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: programming
3
- description: "MUST USE for ANY work on .py .pyi .rs .ts .tsx .mts .cts .go files. One philosophy: strict types, modern stacks (Pydantic v2 / serde+thiserror / Zod / gin+sqlc+pgx+slog), modern toolchains (uv+basedpyright+ruff / cargo+clippy+miri / Bun+Biome+tsc / gofumpt+golangci-lint v2+nilaway+go-race), parse-don't-validate, exhaustive match, typed errors, no any/unwrap/panic, 250 LOC ceiling, TDD. Routes to references/{python,rust,typescript,rust-ub,go}/. Triggers: write/edit Python/Rust/TypeScript/Go code, new project, gin server, bubbletea TUI, CJK IME, connect-go RPC, sqlc pgx, branded ids, exhaustive match, unsafe Rust, miri, oversized file, refactor, TDD, e2e test, arena, allocator, bumpalo, const fn, const generics, comptime, zero-alloc, bitfield, repr, scopeguard, errdefer, Zig-like, zerocopy, packed struct."
3
+ description: "MUST USE for ANY work on .py .pyi .rs .ts .tsx .mts .cts .go files. One philosophy: strict types, modern stacks (Pydantic v2 / serde+thiserror / Zod / gin+sqlc+pgx+slog), modern toolchains (uv+basedpyright+ruff / cargo+clippy+miri / Bun+Biome+tsc / gofumpt+golangci-lint v2+nilaway+go-race), parse-don't-validate, exhaustive match, typed errors, no any/unwrap/panic, 250 LOC ceiling, TDD, consumer-routed logging. Routes to references/{python,rust,typescript,rust-ub,go}/ + references/logging.md. Triggers: write/edit Python/Rust/TypeScript/Go code, new project, gin server, bubbletea TUI, CJK IME, connect-go RPC, sqlc pgx, branded ids, exhaustive match, unsafe Rust, miri, oversized file, refactor, TDD, e2e test, logging, log levels, structured logging, observability, arena, allocator, bumpalo, const fn, const generics, comptime, zero-alloc, bitfield, repr, scopeguard, errdefer, Zig-like, zerocopy, packed struct."
4
4
  ---
5
5
 
6
6
  # Programming
@@ -216,6 +216,14 @@ Naming variables, functions, or flags by the **absence** of a quality (`isNotVal
216
216
 
217
217
  ---
218
218
 
219
+ ## LOGGING — CROSS-CUTTING RULES
220
+
221
+ Logging is part of the code you ship, and it has iron rules of its own: levels chosen by naming the consumer (never by severity vibes), placement at decision points (never inside helpers), stable messages with structured fields — and, above everything else, **the project's existing practice wins: a project with a designated logger gets that logger and nothing else, and a project that does not log does not get logging uninvited.**
222
+
223
+ **Read [`references/logging.md`](references/logging.md) BEFORE the change** whenever your edit adds or modifies log lines, sets up a logger or a new service entrypoint, or handles errors at a boundary.
224
+
225
+ ---
226
+
219
227
  ## MANDATORY POST-WRITE REVIEW LOOP
220
228
 
221
229
  **This runs EVERY time you finish writing or substantively editing code, before you claim the task is done.** No exceptions.
@@ -261,6 +269,7 @@ After every code-writing session, answer these out loud (in your reply) before d
261
269
  8. **Parameter bloat?** Any function I wrote or modified that takes more than 3 parameters — or smuggles them through a dict/kwargs/`...args`/throwaway options object? If yes, group related params into a typed value object. See [Smell 2](references/code-smells.md#smell-2--function-with-more-than-3-parameters).
262
270
  9. **Redundant verification?** Did I perform a destructive action (delete, remove, clear) and then immediately re-query to "confirm" it worked? Did I call a setter then a getter to "verify"? If yes, delete the verification — the operation's contract IS the proof. See [Smell 3](references/code-smells.md#smell-3--redundant-verification-after-a-destructive-action).
263
271
  10. **Negative naming?** Any variable, function, or flag named by the absence of a quality (`isNotValid`, `noErrors`, `DisableX`) when a positive name (`isValid`, `isClean`, `EnableX`) would work? If yes, rename to positive form and invert the branch. See [Smell 4](references/code-smells.md#smell-4--negative-form-names-and-conditions).
272
+ 11. **Logging?** If I touched log lines, logger setup, or error boundaries: did I follow the project's existing practice (including its absence)? Is every new line leveled by its consumer, placed at a decision point, and message-stable with data in fields? See [`references/logging.md`](references/logging.md).
264
273
 
265
274
  **If any answer fails, fix it before declaring done.** This loop is the difference between "the code compiles" and "the code is correct."
266
275
 
@@ -0,0 +1,91 @@
1
+ # Logging — Cross-Language Methodology
2
+
3
+ Every log line has exactly two legitimate readers: the operator reconstructing an incident and the developer reproducing a bug. A line that serves neither is cost — storage, noise, and attention stolen from the lines that matter. Everything below derives from that.
4
+
5
+ This reference is deliberately stack-agnostic. It never tells you which logging library to use — the ecosystem table in SKILL.md owns stack defaults, and the project's existing practice overrides everything (Rule 0).
6
+
7
+ ---
8
+
9
+ ## Rule 0 — Discover the project's practice before emitting anything
10
+
11
+ **BEFORE adding a single log line, find out how this project logs.** Grep for the logger initialization, a wrapper module, prior art in sibling files, and the project's agent docs (AGENTS.md / CLAUDE.md).
12
+
13
+ | What you find | Required behavior |
14
+ |---|---|
15
+ | A designated logger or wrapper | Use it exactly — its levels, its field conventions, its error-passing shape. Copy the call shape of the nearest well-written call site, not your habit. |
16
+ | A logging lib you like better | Irrelevant. NEVER introduce a second logging framework into a project that already has one. |
17
+ | Raw `console.*` / `print` culture | Follow it for user-facing CLI output. For diagnostics, propose structured logging in your reply — do not unilaterally convert the project. |
18
+ | **No logging at all** (library, small CLI, script) | **Respect the absence.** A library that suddenly logs is a behavior change its consumers never asked for; a 40-line script does not need a logging framework. If logging would genuinely help, say so in your reply — add it only when the user asks or the task itself is about observability. |
19
+
20
+ Bypassing the project's designated logger with a bare `console.log` / `print` "just for this one line" is the logging equivalent of `as any`: it escapes every contract the project set up — stage routing, formatting, redaction, shipping.
21
+
22
+ Serialization contracts (reserved field names, argument order, the key an Error must be passed under) are project knowledge. Discover the contract from the logger config and existing call sites; if the project's agent docs do not record it, record what you found there as part of your change.
23
+
24
+ ## Greenfield — when you own the setup
25
+
26
+ A new service earns exactly this much logging infrastructure, and no more:
27
+
28
+ 1. **One init module.** Callers import a ready logger; only the init module knows the stage. No call site ever checks `NODE_ENV`-style vars to decide how to log.
29
+ 2. **Stage split by environment.** Dev = human-readable (pretty, colorized). Prod = structured, machine-parseable (JSON to stdout). Same logger API on both — the stage changes the sink and format, never the call sites.
30
+ 3. **Level threshold per stage.** Dev = `debug`, prod = `info`, overridable with a `LOG_LEVEL`-style env var.
31
+ 4. **The stack's standard structured logger** (the ecosystem table in SKILL.md names the default) — never a hand-rolled one.
32
+ 5. **Error-serialization proof.** Before trusting error logging, pass a real Error/exception through the PROD formatter once and assert the output preserves type, message, and stack. Every structured-logging stack has a reserved-key contract, and violating it typically produces an empty `{}` where the stack trace should have been — discovered during the incident. This is a one-line test; write it at setup time and the whole bug class is dead permanently.
33
+
34
+ ## Choosing the level — consumer, not severity
35
+
36
+ **A level is a routing decision, not a severity vibe. Choose it by naming who consumes the line and what they do about it. If you cannot name the consumer, do not emit the line.**
37
+
38
+ | Level | Consumer and action | The line earns this level when |
39
+ |---|---|---|
40
+ | `error` | Alerting wakes a human NOW | **The service failed** at a user-visible operation and cannot recover on its own. |
41
+ | `warn` | Reviewed in batch — dashboards, weekly triage | The request SUCCEEDED but took an abnormal path: retry needed, fallback engaged, degraded mode, suspicious data. |
42
+ | `info` | Read during an incident to reconstruct the timeline | A state transition without which the request's story does not reconstruct: session/job/connection created, completed, destroyed. |
43
+ | `debug` | The developer reproducing locally | Detailed tracing. **Does not exist in prod.** |
44
+
45
+ Two corollaries that get violated constantly:
46
+
47
+ - **`error` means the SERVICE failed, not the request.** A 4xx is the client's mistake handled correctly — that is `warn` at most, `info` for routine misses. Reserve `error` for 5xx-class outcomes: the service could not do its job. Log 4xx as `error` and the alert channel drowns in noise from every crawler probing `/wp-admin`; a drowned alert channel is equivalent to no alerting.
48
+ - **A failure logged at `info` is invisible.** If the message says "failed", the level is `warn` or `error` — never `info`.
49
+
50
+ ## Placement — log decisions, not work
51
+
52
+ Log where the system decides something, not where it does something:
53
+
54
+ - **Boundaries** — request in / response out, calls to external systems (and their failures).
55
+ - **State transitions** — create / complete / destroy of sessions, jobs, connections.
56
+ - **Decision points** — retry chosen, fallback engaged, cache bypassed, degraded mode entered.
57
+ - **The one place an error is finally handled.**
58
+
59
+ Never log inside pure functions, utilities, or private helpers — callers with context log outcomes; internals stay silent. Two mechanical rules:
60
+
61
+ - **One event, one line.** Log-and-rethrow at every layer turns one incident into five look-alike incidents. Log where the error is handled; layers that only propagate stay silent.
62
+ - **Mechanical logging belongs to middleware.** Request/response logging is wired once at the framework layer, never hand-assembled per handler. High-volume zero-signal paths (health probes, metrics scrapes) are excluded there as data — an exclusion set — not as scattered `if` statements.
63
+
64
+ **No speculative logs.** "Might need it later" is not a consumer. A log line earns its place through evidence: a debugging session that burned rounds because this state was invisible (see the debugging bridge below), an incident postmortem, an alert that needs the field.
65
+
66
+ ## The line contract
67
+
68
+ - **The message is a stable, grep-able constant; data goes in fields.** `logger.warn({orderId, attempt}, "payment retry")` — never `` `retrying payment for ${orderId}` ``. An interpolated message cannot be counted, aggregated, or alerted on.
69
+ - **Correlation or it did not happen.** Request-scoped lines carry the trace/request id; entity-scoped lines carry the entity id. A line you cannot join to its request is noise during the only moments logs matter.
70
+ - **Name events semantically** (`session.destroy`, `payment.fallback`), never positionally ("Step 3"). Step numbers couple the log stream to today's call structure; the first refactor makes them lie.
71
+ - **No secrets.** Tokens, credentials, session cookies, and PII never enter a log line; URLs are sanitized (strip or redact query params like `token`, `key`) before logging. A leaked log is a leaked credential.
72
+ - **The logging path may not break the program.** If a log call can itself fail (serializing exotic state, a wrapper that touches I/O), that failure is caught, downgraded to a `warn` through a channel that cannot fail, and the operation continues. An empty catch around logging is still an empty catch.
73
+
74
+ ## Anti-patterns
75
+
76
+ | Anti-pattern | Why it fails |
77
+ |---|---|
78
+ | `console.*` / `print` bypassing the project's designated logger | Escapes stage routing, redaction, and shipping — invisible in prod |
79
+ | Introducing a logging framework to a project that has none | Uninvited behavior change; Rule 0 violation |
80
+ | 4xx logged as `error` | Alert noise buries real pages |
81
+ | Log-and-rethrow at every layer | One incident looks like five |
82
+ | Variables interpolated into the message string | Un-aggregatable, un-alertable |
83
+ | "Might need it later" logs | No consumer → pure cost |
84
+ | Debug-time prints promoted to permanent `info` | Narration, not state transitions |
85
+ | Trusting Error serialization without the proof | `error: {}` in prod, discovered during the incident |
86
+
87
+ ## Debugging bridge — how logs earn their place
88
+
89
+ When a `debugging`-skill session takes extra rounds *because state was invisible* — no line told you which branch ran, what the value was, whether the fallback engaged — that invisibility is a defect adjacent to the bug. **The fix ships with the log line that would have made diagnosis one round**: placed at a decision point, leveled by consumer, fields not interpolation, through the project's designated logger.
90
+
91
+ The inverse also holds: every temporary `print` / `dbg!` / `console.log` planted *during* diagnosis is a debug artifact and gets scrubbed at cleanup. The triage between the two is the consumer test — a line whose ongoing consumer you can name is part of the fix; a line that only served today's session is an artifact.
@@ -108,10 +108,10 @@ Each sub-task message must include:
108
108
  4. Automated verification commands to run.
109
109
  5. One Manual-QA channel, named with the exact tool and exact invocation (the literal `curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`, payload, selectors, and the binary observable that decides PASS/FAIL), not "verify it works". A LIGHT checkbox needs one real-surface proof of its deliverable, and auxiliary surfaces (CLI stdout, DB state diff, parsed config dump) are first-class when the surface is CLI- or data-shaped:
110
110
  - HTTP call: `curl -i` against the live endpoint.
111
- - tmux: a `tmux` session driven with `send-keys`, dumped via `capture-pane`.
111
+ - Terminal / TUI: drive a real pty; `tmux send-keys` is fine for a boot/behavior smoke, but color/layout/CJK evidence goes through the xterm.js web terminal below, NEVER `tmux capture-pane`.
112
112
  - Browser use: in Codex, use `browser:control-in-app-browser` first when available and the scenario does not need an authenticated or persistent user browser profile; otherwise drive the real page with Chrome, or agent-browser (https://github.com/vercel-labs/agent-browser) when Chrome is unavailable.
113
113
  - Computer use: OS-level GUI automation against the running desktop app when the surface is not a page.
114
- - TUI visual evidence: when a tmux/TUI claim needs visual QA or PR proof, run `node script/qa/web-terminal-visual-qa.mjs --from-file <capture.txt> --evidence-dir <dir>` and attach `terminal.png` plus `metadata.json`.
114
+ - TUI visual evidence: when a TUI claim needs visual QA or PR proof, run `node script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}" --evidence-dir <dir>` (real pty rendered through xterm.js in Chrome) and attach `terminal.png` plus `metadata.json`.
115
115
  6. The adversarial classes that apply to this sub-task (from the 9 ultraqa classes) and how each is probed.
116
116
  7. Required artifact path and cleanup receipt.
117
117
 
@@ -0,0 +1,388 @@
1
+ ---
2
+ name: ultrawork
3
+ description: Binding ultrawork mode directive for omo on Codex. When a prompt contains ultrawork or ulw, the omo UserPromptSubmit hook injects a short bootstrap that points at this file. Read the whole file and follow every rule in it for the rest of the task.
4
+ metadata:
5
+ short-description: Binding ultrawork mode directive
6
+ ---
7
+
8
+ <ultrawork-mode>
9
+
10
+ **MANDATORY**: First user-visible line this turn MUST be exactly:
11
+ `ULTRAWORK MODE ENABLED!`
12
+
13
+ [CODE RED] Maximum precision. Outcome-first. Evidence-driven.
14
+
15
+ # Role
16
+ Expert coding agent. Plan obsessively. Ship verified work. No process
17
+ narration.
18
+
19
+ # Goal
20
+ Deliver EXACTLY what the user asked, end-to-end working, proven by
21
+ captured evidence: a failing-first proof that went RED→GREEN through
22
+ the cheapest faithful channel, plus real-surface proof sized by the
23
+ tier below. TESTS ALONE NEVER PROVE DONE — a green suite means the
24
+ unit-level contract holds, not that the user-facing behavior works.
25
+
26
+ # Tier triage (classify ONCE at bootstrap; record tier + one-line
27
+ justification in the notepad; ratchet up only)
28
+ Default is LIGHT. Take HEAVY only when the change set hits a fact you
29
+ can point to: a new module / layer / domain model / abstraction;
30
+ auth, security, session, or permissions; an external integration
31
+ (API, queue, payment, webhook); a DB schema or migration; concurrency,
32
+ transaction boundaries, or cache invalidation; a refactor crossing
33
+ domain boundaries; or the user signaled care ("carefully",
34
+ "thoroughly", "design first") or demanded review.
35
+ When unsure, take HEAVY. If a HEAVY fact surfaces mid-task, upgrade
36
+ immediately and redo whatever the LIGHT path skipped; never downgrade
37
+ mid-task. The tier sizes process, never honesty: both tiers capture
38
+ evidence, record cleanup receipts, and obey the never-suppress rules.
39
+
40
+ LIGHT — a narrow change inside existing layers (one-spot bugfix, a
41
+ method or endpoint following an existing pattern, a validation rule,
42
+ a query tweak, copy/constants): plan directly in the notepad; 1-2
43
+ success criteria (happy path + the riskiest edge); one real-surface
44
+ proof of the user-visible deliverable, where auxiliary surfaces are
45
+ first-class for CLI- or data-shaped work; self-review recorded in the
46
+ notepad instead of the reviewer loop.
47
+ HEAVY — anything a fact above names: the `plan` agent decides waves;
48
+ 3+ success criteria (happy, edge, regression, adversarial risk), each
49
+ with its own channel scenario and both evidence pieces; reviewer loop
50
+ until unconditional approval.
51
+
52
+ # Manual-QA channels
53
+ Run real-surface proof yourself through the channel that faithfully
54
+ exercises the surface; capture the artifact.
55
+
56
+ 1. HTTP call — hit the live endpoint with `curl -i` (or a
57
+ Playwright APIRequestContext); capture status line + headers +
58
+ body.
59
+ 2. Terminal / TUI - drive a real pty and prove it through the
60
+ xterm.js web terminal (see the TUI visual QA note below). tmux
61
+ `send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`
62
+ for color / layout / CJK evidence, which degrades truecolor.
63
+ 3. Browser use — in Codex, use `browser:control-in-app-browser`
64
+ first when available and no authenticated/persistent user browser
65
+ profile is required. Otherwise use Chrome to drive the REAL page;
66
+ if Chrome is not available, download and use agent-browser
67
+ (https://github.com/vercel-labs/agent-browser). Capture action
68
+ log + screenshot path. Never downgrade to a non-browser surface
69
+ for a browser-facing criterion.
70
+ 4. Computer use — when the surface is a desktop/GUI app rather than a
71
+ page, drive it via OS-level automation (a computer-use agent,
72
+ AppleScript, xdotool, etc.) against the running app; capture
73
+ action log + screenshot. USE THIS for any non-browser GUI
74
+ criterion; do not substitute a CLI dump for it.
75
+
76
+ For EVERY scenario name the exact tool and the exact invocation
77
+ upfront: the literal command / API call / page action with its concrete
78
+ inputs (URL, payload, keystrokes, selectors) and the single binary
79
+ observable that decides PASS vs FAIL. "run the endpoint", "open the
80
+ page", "check it works" are NOT scenarios — write the `curl ...`, the
81
+ `send-keys ...`, the Browser plugin action, the `page.click(...)`, the
82
+ expected status/text.
83
+
84
+ Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump)
85
+ are first-class evidence for CLI- or data-shaped criteria; use a
86
+ channel scenario when the behavior is user-facing. `--dry-run`,
87
+ printing the command, "should respond", and "looks correct" never
88
+ count.
89
+
90
+ For TUI visual QA, render the terminal through the real xterm.js web
91
+ terminal and screenshot it - never a `tmux capture-pane` dump, which
92
+ degrades color and wide-glyph width. In this repo:
93
+ `node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`
94
+ (live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw
95
+ stream). Outside this repo, capture equivalent browser-rendered terminal
96
+ evidence: screenshot + plain transcript + cleanup receipt.
97
+
98
+ # Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
99
+
100
+ ## 0. Survey the skills, then size the work
101
+ First, survey the loaded skill list and read the description of each
102
+ loosely relevant skill. Decide explicitly which skills this task will
103
+ use and prefer using every genuinely applicable one — name them in the
104
+ notepad with a one-line reason each. Skipping a skill that fits the
105
+ task is a defect.
106
+ Then run Tier triage (above) on the change set and record the tier.
107
+ HEAVY: spawn the `plan` agent with the gathered context, follow its
108
+ wave order and parallel grouping exactly, and run the verification it
109
+ specifies. LIGHT: plan directly in the notepad.
110
+
111
+ ## 1. Create the goal with binding success criteria
112
+ Call `create_goal` (or open your reply with a `# Goal` block treated as
113
+ binding) using exactly `objective`. Do not include `status`. Goals are
114
+ unlimited; never invent a numeric budget or limit.
115
+ The criteria MUST list, upfront:
116
+ - The user-visible deliverable in one line, and the tier with its
117
+ justification.
118
+ - Success criteria sized by tier (LIGHT 1-2, HEAVY 3+ covering happy
119
+ path, edge cases — boundary / empty / malformed / concurrent — and
120
+ adjacent-surface regression named by file + function), each naming
121
+ its exact scenario: the literal command / page action / payload and
122
+ the binary PASS/FAIL observable, plus the evidence artifact it will
123
+ capture.
124
+ - For each criterion, the failing-first proof (test id or scenario)
125
+ that will be captured RED BEFORE the implementation and GREEN after.
126
+ Evidence added after the green code does NOT satisfy this.
127
+
128
+ These scenarios are the contract. You are not done until every one of
129
+ them PASSES with its evidence captured.
130
+
131
+ ## 2. Open the durable notepad
132
+ Run: `NOTE=$(mktemp -t ulw-$(date +%Y%m%d-%H%M%S).XXXXXX.md)`. Echo the
133
+ path. Initialise it with these sections and APPEND (never rewrite) as
134
+ you work:
135
+
136
+ ```
137
+ # Ultrawork Notepad — <one-line goal>
138
+ Started: <ISO timestamp>
139
+
140
+ ## Plan (exhaustively detailed)
141
+ <every step you will take, in order, broken to atomic actions>
142
+
143
+ ## Success criteria + QA scenarios
144
+ <copied from the goal>
145
+
146
+ ## Now
147
+ <the single step in progress>
148
+
149
+ ## Todo
150
+ <every remaining step, ordered>
151
+
152
+ ## Findings
153
+ <every non-obvious fact discovered, with file:line refs>
154
+
155
+ ## Learnings
156
+ <patterns / pitfalls / principles to remember next turn>
157
+ ```
158
+
159
+ Append each finding, decision, command, RED/GREEN capture, and QA
160
+ artifact path the moment it happens. Update `## Now` and
161
+ `## Todo` on every transition. Append-only — never rewrite. This notepad
162
+ is your durable memory and it OUTLIVES the context window. After any
163
+ compaction or context loss (a `Context compacted` notice, a summarized
164
+ history, or you no longer see your own earlier steps), STOP and re-read
165
+ the WHOLE notepad FIRST before any other action, then resume from
166
+ `## Now`. Recover
167
+ state from the notepad; do not re-plan from scratch or re-run completed
168
+ steps.
169
+
170
+ ## 3. Register obsessive todos via `update_plan`
171
+ The todo tool is Codex `update_plan` — your live, user-visible
172
+ checklist. Translate every action from the plan into one `update_plan`
173
+ step — one step per atomic work unit: an edit plus its verification, a
174
+ QA scenario run, a teardown. Keep each step small enough to finish
175
+ within a few tool calls.
176
+ Call `update_plan` on EVERY state transition — the instant a step starts
177
+ (mark it `in_progress`) and the instant it finishes (mark it `completed`
178
+ and the next `in_progress`). Exactly ONE `in_progress` at a time. Mark
179
+ completed IMMEDIATELY — never batch, never let the rendered plan lag
180
+ behind reality. Add newly discovered steps the moment they surface
181
+ instead of waiting for the next pass. Step text encodes WHERE / WHY
182
+ (which criterion it advances) / HOW / VERIFY:
183
+ `path: <action> for <criterion> — verify by <check>`.
184
+
185
+ GOOD pair (test-first, ordered):
186
+ `foo.test.ts: Write FAILING case invalid-email→ValidationError for criterion 2 — verify by RED with assertion msg`
187
+ `src/foo/bar.ts: Implement validateEmail() RFC-5322-lite for criterion 2 — verify by foo.test.ts GREEN + curl 400 body`
188
+ BAD: "Implement feature" / "Fix bug" / "Add tests later" / writing
189
+ production code before its failing test → rewrite.
190
+
191
+ # Finding things (lead with these, parallel-flood the first wave)
192
+ Never guess from memory — locate with the right tool, and re-read before
193
+ you claim or change. Fire 3+ independent lookups in one action;
194
+ serialize only when one output strictly feeds the next.
195
+ - CodeGraph, when `codegraph_*` tools exist -> use `codegraph_explore`
196
+ first for how/where/what/flow questions and before edits; if absent,
197
+ inactive/uninitialized, or cold-start unavailable, keep moving with
198
+ Read/Grep/Glob/LSP and the ast-grep skill.
199
+ - Repo-wide inspection, CLI smoke tests, git/history, bounded command
200
+ output → use native shell commands directly: `rg`, `rg --files`,
201
+ `cat`, and `git`. Narrow huge output before reading it.
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
+ Spawn every independent child for the current wave first. After the wave
299
+ is launched, run `multi_agent_v1.wait_agent` for each spawned child until
300
+ each reaches terminal status (`completed`, `failed`, `blocked`, or
301
+ explicitly recorded inconclusive) before any dependent `update_plan`
302
+ transition, `create_goal` continuation, implementation tool call, plan
303
+ drafting, approval-gate work, PR handoff, or final response. A timeout is
304
+ not terminal status.
305
+ Do not write the final answer, PR handoff, or completion summary while
306
+ active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
307
+ After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
308
+ BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
309
+ inconclusive, record that it is not approval, and respawn smaller only
310
+ if the deliverable is still required.
311
+
312
+ # Verification gate (TRIGGERED, NOT OPTIONAL)
313
+
314
+ Trigger when ANY apply:
315
+ - Tier is HEAVY.
316
+ - User demanded strict, rigorous, or proper review.
317
+ LIGHT tier records a self-review in the notepad instead: re-read the
318
+ diff, run diagnostics, confirm each criterion's evidence, and state in
319
+ one line why the tier held.
320
+
321
+ Procedure (NON-NEGOTIABLE):
322
+ 1. Spawn a child with `fork_context: false` and a self-contained reviewer
323
+ assignment in `message`. The `multi_agent_v1.spawn_agent` schema cannot select a
324
+ TOML-backed reviewer role, so paste the reviewer requirements into
325
+ the message.
326
+ Pass: goal, success-criteria, scenario evidence, full diff, notepad
327
+ path.
328
+ 2. Treat the reviewer's verdict as binding. There is NO "false
329
+ positive". Every concern is real. Do not argue. Do not minimise. Do
330
+ not explain it away.
331
+ 3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
332
+ evidence. Update notepad.
333
+ 4. Re-submit to the SAME reviewer. Loop until you receive an
334
+ UNCONDITIONAL approval ("looks good but..." = REJECTION).
335
+ 5. Only on unconditional approval may you declare done. Stopping early
336
+ IS failure.
337
+
338
+ # Commits
339
+ Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
340
+ fix / refactor / test / docs / chore / build / ci / perf). One logical
341
+ change per commit; each commit builds + tests green on its own. No WIP
342
+ on the final branch. If a plan file exists, final commit footer:
343
+ `Plan: .omo/plans/<slug>.md`. Do NOT auto-`git commit` unless the user
344
+ requested or preauthorised this session — default is stage + draft
345
+ message + present for approval.
346
+
347
+ # Constraints
348
+ - Every behavior change needs a failing-first proof captured BEFORE
349
+ the production change, through the cheapest faithful channel (unit
350
+ test at a seam; integration/e2e in wiring; the real-surface scenario
351
+ when no test seam exists). If you typed production code first, STOP,
352
+ revert, capture the proof failing, then redo the change. Exempt
353
+ only: pure formatting, comment-only edits, dependency bumps with no
354
+ behavior delta, rename-only moves — justify each in `## Findings`.
355
+ - A test that mirrors its implementation — asserting mocks were
356
+ called, pinning a constant, or unable to fail under any plausible
357
+ regression — is NOT evidence. Prefer a real-surface proof with no
358
+ new test over a tautological test.
359
+ - Refactors: characterization tests pinning current observable
360
+ behavior FIRST, green against the old code, green throughout.
361
+ - Smallest correct change. No drive-by refactors.
362
+ - Never suppress lints / errors / test failures. Never delete, skip,
363
+ `.only`, `.skip`, `xfail`, or comment out tests to green the suite.
364
+ - Never claim done from inference — only from captured evidence.
365
+ - Parallel tool calls for any independent work.
366
+
367
+ # Output discipline
368
+ - First line literally: `ULTRAWORK MODE ENABLED!`
369
+ - After bootstrap: 1-2 paragraph plan summary + notepad path.
370
+ - During execution: surface only state changes (RED captured, GREEN
371
+ captured, scenario PASS/FAIL with evidence paths, reviewer verdict).
372
+ - Final message: outcome + success-criteria checklist with evidence
373
+ refs + notepad path + reviewer approval (if gate triggered) + commit
374
+ list (`<sha> <subject>`). No file-by-file changelog unless asked.
375
+
376
+ # Stop rules
377
+ - Stop ONLY when every scenario PASSES with captured evidence, every
378
+ cleanup receipt is recorded, notepad is current, and (if gate
379
+ triggered) reviewer approved unconditionally.
380
+ - Leftover QA state (live process, `tmux` session, browser context,
381
+ bound port, temp file / dir) means NOT done. Tear it down, record
382
+ the receipt, then continue.
383
+ - After 2 identical failed attempts at one step, surface what was tried
384
+ and ask the user before another retry.
385
+ - After 2 parallel exploration waves yield no new useful facts, stop
386
+ exploring and act.
387
+
388
+ </ultrawork-mode>
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) ultrawork"
@@ -22,7 +22,7 @@ This skill is intentionally compact. The full workflow lives in `references/full
22
22
  - Use the ulw-loop CLI state under `.omo/ulw-loop`; do not hand-edit goal state.
23
23
  - After any compaction or context loss, re-read brief + goals + ledger FIRST plus `omo ulw-loop status --json`, then resume; never re-plan from scratch.
24
24
  - If `omo ulw-loop create-goals` says the existing aggregate is already complete, start unrelated new work with a fresh `--session-id <new-id>` instead of steering or forcing the completed default state. Use `--force` only to intentionally overwrite completed evidence.
25
- - Every success criterion needs observable evidence from a real surface: a channel (tmux, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).
25
+ - Every success criterion needs observable evidence from a real surface: a channel (terminal/TUI via the xterm.js web terminal, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).
26
26
  - Record evidence through the CLI only after cleanup receipts are available.
27
27
  - Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.
28
28
  - Every `multi_agent_v1.spawn_agent` message starts with `TASK:`, then names `DELIVERABLE`, `SCOPE`, and `VERIFY`; put role and specialty instructions inside `message`; use `fork_context: false` unless full history is truly required.
@@ -19,16 +19,16 @@ Audit each pass, fail, block, steering change, and checkpoint in `.omo/ulw-loop/
19
19
  Run each criterion's real-surface proof yourself through the channel that faithfully exercises it; capture the artifact before recording PASS.
20
20
 
21
21
  1. **HTTP call** — hit the live endpoint with `curl -i` (or a Playwright APIRequestContext); capture status line + headers + body.
22
- 2. **tmux** `tmux new-session -d -s ulw-qa-<criterion>`, drive with `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript is the artifact.
22
+ 2. **Terminal / TUI** - prove it through the xterm.js web terminal; tmux `send-keys` is fine for a boot smoke, but NEVER `tmux capture-pane` for color/layout/CJK evidence (it degrades truecolor).
23
23
  3. **Browser use** — in Codex, use `browser:control-in-app-browser` first when available and the scenario does not need an authenticated or persistent user browser profile. Otherwise use Chrome to drive the REAL page; if unavailable, use agent-browser. Capture action log + screenshot path. Never downgrade a browser-facing criterion.
24
24
  4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.
25
25
 
26
- For TUI visual QA, pair the tmux transcript with a browser-rendered terminal
27
- screenshot. In this repo run `node script/qa/web-terminal-visual-qa.mjs
28
- --from-file <capture.txt> --evidence-dir <dir>` and record `terminal.png`,
29
- `terminal.html`, `terminal.txt`, and `metadata.json` as the visual evidence
30
- bundle. This is mandatory when a PR or review needs to inspect the terminal
31
- screen, not just the text.
26
+ For TUI visual QA, render the terminal through the real xterm.js web terminal and
27
+ screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph
28
+ width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command
29
+ "<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;
30
+ `--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and
31
+ `metadata.json`. Mandatory when a PR or review must inspect the terminal screen.
32
32
 
33
33
  Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump) are first-class evidence for CLI- or data-shaped criteria; use a channel scenario when the behavior is user-facing. `--dry-run`, printing the command, "should respond", and "looks correct" never count.
34
34
 
@@ -15,9 +15,12 @@ Outcome-first: explore a lot, ask few sharp questions - or none, when the intent
15
15
 
16
16
  ## INTENT ROUTING - pick ONE intent reference
17
17
 
18
- Before routing, parse review modifiers separately. If the user says "high accuracy", "ultra high accuracy", "고정밀", "deep review", or equivalent, set `review_required: true` in the draft. This does NOT choose CLEAR/UNCLEAR and does NOT suppress interview; it only makes the high-accuracy review gate required after the plan exists.
18
+ **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 Codex CLI 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
19
 
20
- After grounding, make ONE judgment, record `intent: clear|unclear` plus `review_required`, and 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.
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.
21
+
22
+ > "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
+ > "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."
21
24
 
22
25
  - **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.
23
26
  - **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.
@@ -64,6 +67,17 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOP
64
67
  multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})
65
68
  ```
66
69
 
70
+ Spawn every independent child for the current wave first. After the wave
71
+ is launched, use `multi_agent_v1.wait_agent` for each child until each
72
+ reaches terminal status. A timeout is not terminal status. Do not start dependent planning, drafting, approval-gate work, or final handoff until each child result is integrated or recorded as inconclusive.
73
+
74
+ For work likely to exceed one wait cycle, require the child to send
75
+ `WORKING: <task> - <current phase>` before long passes and
76
+ `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent`
77
+ timeout only means no new mailbox update arrived. Treat a running child as
78
+ alive. Fallback only when the child is completed without the deliverable,
79
+ ack-only after followup, explicitly `BLOCKED:`, or no longer running.
80
+
67
81
  Roles: `explorer` (internal patterns/conventions/tests), `librarian` (external docs/contracts), `metis` (gap analysis), `momus` (high-accuracy plan review). Full spawn/wait/fallback discipline is in `references/full-workflow.md`.
68
82
 
69
83
  ## Stop rules