oh-my-opencode 4.16.3 → 4.17.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 (177) hide show
  1. package/.agents/command/omomomo.md +1 -1
  2. package/.agents/skills/hyperplan/SKILL.md +3 -3
  3. package/.agents/skills/omomomo/SKILL.md +1 -1
  4. package/.opencode/command/omomomo.md +1 -1
  5. package/.opencode/skills/hyperplan/SKILL.md +3 -3
  6. package/.opencode/skills/pre-publish-review/SKILL.md +3 -0
  7. package/README.ja.md +4 -4
  8. package/README.ko.md +4 -4
  9. package/README.md +2 -2
  10. package/README.ru.md +4 -4
  11. package/README.zh-cn.md +4 -4
  12. package/dist/cli/index.js +179 -63
  13. package/dist/cli-node/index.js +179 -63
  14. package/dist/features/team-mode/test-support/async-test-helpers.d.ts +2 -2
  15. package/dist/index.js +121 -58
  16. package/dist/plugin/chat-message/types.d.ts +4 -0
  17. package/dist/plugin/command-execute-before.d.ts +1 -0
  18. package/dist/plugin/stop-continuation.d.ts +17 -0
  19. package/dist/skills/remove-ai-slops/SKILL.md +2 -2
  20. package/dist/skills/start-work/SKILL.md +5 -2
  21. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
  22. package/dist/tui.js +71 -29
  23. package/package.json +15 -14
  24. package/packages/git-bash-mcp/package.json +27 -0
  25. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
  26. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +84 -19
  27. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  28. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  29. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  31. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  33. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +2 -2
  35. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +6 -2
  36. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +6 -2
  37. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +2 -2
  38. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  39. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +6 -2
  40. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
  41. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +67 -2
  42. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  43. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +0 -13
  45. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +1 -1
  46. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  47. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  48. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  49. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  50. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +1 -79
  51. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  52. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  54. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +2 -2
  56. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
  57. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +6 -6
  58. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +5 -5
  59. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +26 -0
  60. package/packages/omo-codex/plugin/components/ultrawork/agents/{lazycodex-executor.toml → lazycodex-worker-low.toml} +6 -4
  61. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +26 -0
  62. package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +2 -2
  63. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +4 -4
  64. package/packages/omo-codex/plugin/components/ultrawork/directive.md +55 -28
  65. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  66. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  67. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +55 -28
  68. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
  69. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -0
  70. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -68
  71. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
  72. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
  73. package/packages/omo-codex/plugin/components/ulw-loop/README.md +3 -1
  74. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +55 -28
  75. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +6 -1
  76. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
  77. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -2
  78. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +405 -25
  79. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +12 -1
  80. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +4 -2
  81. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +7 -0
  82. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +16 -1
  83. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -0
  84. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.d.ts +6 -0
  85. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +20 -0
  86. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +1 -0
  87. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +12 -9
  88. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +3 -0
  89. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +148 -0
  90. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.d.ts +2 -0
  91. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +209 -0
  92. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +25 -2
  93. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  94. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -15
  95. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +29 -27
  96. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +6 -1
  97. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +14 -3
  98. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +10 -0
  99. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +12 -1
  100. package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +4 -2
  101. package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +27 -1
  102. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -0
  103. package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +23 -0
  104. package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +16 -9
  105. package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +138 -0
  106. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +208 -0
  107. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +12 -0
  108. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +4 -1
  109. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +8 -35
  110. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +24 -13
  111. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -2
  112. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +43 -8
  113. package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +55 -2
  114. package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +228 -0
  115. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +193 -0
  116. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  117. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  118. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  119. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  120. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  121. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  122. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  123. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  124. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  125. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +18 -0
  126. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  127. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  128. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  129. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  130. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  131. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  132. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  133. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +17 -0
  134. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  135. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -2
  136. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  137. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  138. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  139. package/packages/omo-codex/plugin/model-catalog.json +16 -7
  140. package/packages/omo-codex/plugin/package-lock.json +13 -13
  141. package/packages/omo-codex/plugin/package.json +1 -1
  142. package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +16 -7
  143. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -2
  144. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +2 -2
  145. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +2 -2
  146. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +4 -4
  147. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +8 -2
  148. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +5 -2
  149. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +55 -28
  150. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -15
  151. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +29 -27
  152. package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
  153. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
  154. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +2 -2
  155. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +76 -16
  156. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -2
  157. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
  158. package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +4 -4
  159. package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -4
  160. package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
  161. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +4 -101
  162. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +14 -14
  163. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +11 -0
  164. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
  165. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -2
  166. package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +9 -40
  167. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +4 -277
  168. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +5 -5
  169. package/packages/omo-codex/scripts/install-config.test.mjs +22 -3
  170. package/packages/omo-codex/scripts/install-dist/install-local.mjs +91 -21
  171. package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +2 -2
  172. package/packages/shared-skills/skills/start-work/SKILL.md +5 -2
  173. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
  174. package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
  175. package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +0 -70
  176. package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +0 -98
  177. package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
@@ -23,17 +23,15 @@ Run each criterion's real-surface proof yourself through the channel that faithf
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, 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.
26
+ For TUI visual QA (mandatory when a PR or review must inspect the terminal screen),
27
+ run `node script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}"
28
+ --evidence-dir <dir>` (live pty + xterm.js in Chrome; `--from-file` replays a raw
29
+ stream) and record `terminal.png`, `terminal.txt`, and `metadata.json`.
32
30
 
33
31
  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
32
 
35
33
  ## Delegation model (ATLAS-STYLE — YOU CONDUCT, WORKERS PLAY)
36
- You read, search, plan, integrate, and QA. You DELEGATE every code edit, test write, bug fix, and QA execution to a right-sized `multi_agent_v1.spawn_agent` worker, then verify what comes back. Fan out independent tasks in PARALLEL in one response; serialize only on a NAMED dependency (one task consumes another's output or edits the same file).
34
+ You read, search, plan, integrate, and QA. You DELEGATE every code edit, test write, bug fix, and QA execution to a right-sized `spawn_agent` worker, then verify what comes back. Fan out independent tasks in PARALLEL in one response; serialize only on a NAMED dependency (one task consumes another's output or edits the same file). Tool names here are MultiAgentV2 (gpt-5.6 sol/terra); on v1 models (gpt-5.5, gpt-5.6-luna) use the `multi_agent_v1.*` equivalents in the skill's Codex Tool Mapping.
37
35
 
38
36
  Size each worker to the task. Put the intended role, rigor level, and specialty inside the worker `message`.
39
37
 
@@ -44,21 +42,24 @@ Size each worker to the task. Put the intended role, rigor level, and specialty
44
42
  | Deep debugging / race / perf / subtle cross-module reasoning | `TASK: act as a deep debugging worker. ...` |
45
43
  | QA execution (drive a channel, capture evidence) | `TASK: act as a QA execution worker. ...` |
46
44
  | Read-only codebase search | `TASK: act as an explorer. ...` |
45
+ | Implementation — pick the tier by change SIZE: LOW small (one-file fix, boilerplate) / MEDIUM mid-sized (standard feature, a few files) / HIGH large (new module, cross-module, concurrency/security/migration, or a big complex problem with one clear goal) | `TASK: act as a <low|medium|high>-difficulty implementation worker. ...` + `agent_type: "lazycodex-worker-<low|medium|high>"` when exposed |
47
46
  | External library / docs research | `TASK: act as a librarian. ...` |
48
47
  | Final verification audit | `TASK: act as a rigorous final verification reviewer. ...` |
49
48
 
50
49
  For reviewer work, use a self-contained reviewer assignment, tight scope, and explicit verification in `message`. Never spawn a context-only child for review.
51
50
 
51
+ Difficulty is orthogonal to LIGHT/HEAVY rigor. Tier roles bind via `agent_type` (v1); the deployed v2 spawn schema omits it — state the tier inside `message` there.
52
+
52
53
  Every worker message MUST carry: goal + exact files in scope; the PIN + failing-first proof before production code; constraints + project rules; verification commands; the ONE Manual-QA channel and exact artifact; for git-tracked edits, require `git-master` plus repo and touched-path commit history before commit. Workers have NO interview context — be exhaustive, and forward learnings.
53
54
 
54
55
  Codex subagent reliability:
55
- - Start every `multi_agent_v1.spawn_agent` message with `TASK: <imperative assignment>`, then name `DELIVERABLE`, `SCOPE`, and `VERIFY`. State that it is an executable assignment, not a context handoff.
56
- - Use `fork_context: false` unless full history is truly required; paste only the context the child needs. Full-history forks can make the child continue old parent context instead of the delegated task.
57
- - Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short `multi_agent_v1.wait_agent` cycles. Never use a single long blocking wait for them.
56
+ - Start every `spawn_agent` message with `TASK: <imperative assignment>`, then name `DELIVERABLE`, `SCOPE`, and `VERIFY`. State that it is an executable assignment, not a context handoff.
57
+ - Use `fork_turns: "none"` (v1: `fork_context: false`) unless full history is truly required; paste only the context the child needs. Full-history forks can make the child continue old parent context instead of the delegated task.
58
+ - Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short `wait_agent` cycles. Never use a single long blocking wait for them.
58
59
  - For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long reading, testing, or review passes, and `BLOCKED: <reason>` only when it cannot progress.
59
60
  - While any child is active, keep the parent visibly alive with active subagent count, agent names, latest `WORKING:` phase, and whether the parent is waiting for mailbox updates.
60
- - Track spawned agent names locally. Use `multi_agent_v1.wait_agent` for mailbox signals, not proof of completion. A timeout only means no new mailbox update arrived. Treat a running child as alive.
61
- - Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running. Then send `TASK STILL ACTIVE: return <deliverable> or BLOCKED: <reason>` when a targeted followup can still recover the lane; otherwise record inconclusive, do not count it as pass/review approval, close if safe, and respawn a smaller `fork_context: false` task with the missing deliverable.
61
+ - Track spawned agent names locally. Use `wait_agent` for mailbox signals, not proof of completion. A timeout only means no new mailbox update arrived. Treat a running child as alive.
62
+ - Fallback only when the child is completed without the deliverable, ack-only after `followup_task`, explicitly `BLOCKED:`, or no longer running. Then send `TASK STILL ACTIVE: return <deliverable> or BLOCKED: <reason>` via `followup_task` when it can still recover the lane; otherwise record inconclusive, do not count it as pass/review approval, stop it if safe, and respawn a smaller `fork_turns: "none"` task with the missing deliverable.
62
63
 
63
64
  ## Artifacts
64
65
  - `.omo/ulw-loop/brief.md`: original brief and durable constraints.
@@ -131,7 +132,7 @@ Research-shape goals change the cycle: BEFORE each investigation, read this goal
131
132
  For each criterion, define upfront: `id`, exact `scenario` (tool + inputs + binary pass/fail), `expectedEvidence` artifact path, adversarial classes, stop condition, and Manual-QA channel. Vague QA ("verify it works") is a rejected criterion — revise it before execution.
132
133
  For optimization work, capture baseline speed before changes plus behavior/regression proof. Every attempt records speed, behavior/regression, and the keep/revert/iterate decision.
133
134
  A criterion's adversarial classes are the ultraqa classes a fact about the change triggers: malformed input, prompt injection, cancel/resume, stale state, dirty worktree, hung or long commands, flaky tests, misleading success output, repeated interruptions. Record untriggered classes as not-applicable in one line.
134
- Use channel-table evidence verbs (tmux transcript, curl status+body, screenshot, action log, CLI stdout, DB diff, parsed config dump) — not vibes.
135
+ Use channel-table evidence verbs — not vibes.
135
136
 
136
137
  **Plan for maximum parallelism (HEAVY goals).** Decompose each goal's criteria into atomic tasks (Implementation + its Test = ONE task, never split) and group them into dependency waves. Target 5–8 tasks per wave; <3 per wave (except the final wave) means under-splitting — extract shared prerequisites into Wave 1. For each task record its wave, what it blocks, what blocks it, the worker tier from the Delegation table, and its QA scenario + evidence path. Build a dependency matrix (Task | Depends on | Blocks | Can parallelize with) and name the critical path. Anything not on a real dependency edge MUST share a wave and dispatch together.
137
138
  Revise any criterion that lacks observable `expectedEvidence` or a named channel before execution.
@@ -159,14 +160,14 @@ Loop per goal. Cap at 5 cycles per goal. Cap identical same-criterion failures a
159
160
  ### Per-Criterion Cycle
160
161
  1. PLAN: read `criterion.scenario`, `criterion.expectedEvidence`, prior ledger entries, and safety bounds. Identify which tasks in the current wave are independent.
161
162
  2. Register atomic todos via `update_plan` — one ultra-granular step per action, `path: <action> for <criterion> - verify by <check>`. Call `update_plan` on every transition (start → `in_progress`, finish → `completed`); exactly one `in_progress`, mark completed immediately, never batch, never let the rendered plan lag behind reality.
162
- 3. DELEGATE-IN-PARALLEL: dispatch every independent task in the wave at once via right-sized `multi_agent_v1.spawn_agent` workers (Delegation table). Each worker captures evidence failing-first: when the task touches EXISTING behavior, PIN it FIRST — a characterization test that asserts the current observable behavior and PASSES on the unchanged code, as rigorous as the new-behavior scenario (exact inputs, exact observable, exact assertion). Then RED through the cheapest faithful channel — a unit test where a seam exists, an integration/e2e test where the behavior lives in wiring, or the criterion's scenario captured failing when no test seam exists — failing for the RIGHT reason (no syntax/import error). A test that mirrors its implementation (mock-call assertions, pinned constants, cannot fail under plausible regression) is not evidence; use the scenario as the failing proof instead. Then the SMALLEST GREEN change; before GREEN work that depends on external review, PR, issue, or branch state, refresh current branch/PR/issue state, preserve existing ordering/policy, and separate compatibility detection from policy changes unless the goal explicitly asks to change policy. A GREEN far larger than the criterion implies means the proof was too coarse — instruct a split. Serialize only on a NAMED dependency.
163
+ 3. DELEGATE-IN-PARALLEL: dispatch every independent task in the wave at once via right-sized `spawn_agent` workers (Delegation table). Each worker captures evidence failing-first: when the task touches EXISTING behavior, PIN it FIRST — a characterization test that asserts the current observable behavior and PASSES on the unchanged code, as rigorous as the new-behavior scenario (exact inputs, exact observable, exact assertion). Then RED through the cheapest faithful channel — a unit test where a seam exists, an integration/e2e test where the behavior lives in wiring, or the criterion's scenario captured failing when no test seam exists — failing for the RIGHT reason (no syntax/import error). A test that mirrors its implementation (mock-call assertions, pinned constants, cannot fail under plausible regression) is not evidence; use the scenario as the failing proof instead. **When the target is PROSE (a prompt, `SKILL.md`, rule, or markdown/instruction file), the "observable behavior" is NOT the wording** — never pin sentences, phrase presence/absence, or word/char counts. PIN only a value a MACHINE consumes (a parsed frontmatter field, a sentinel token a hook greps, the doc's JSON sample run through its real validator), or guard two shipped copies with one `toBe` equality; a pure-prose change with no machine consumer has NO seam, so ship it on review + Manual-QA-by-read with NO automated test (a text grep there is pretend-coverage, not a RED proof). Then the SMALLEST GREEN change; before GREEN work that depends on external review, PR, issue, or branch state, refresh current branch/PR/issue state, preserve existing ordering/policy, and separate compatibility detection from policy changes unless the goal explicitly asks to change policy. A GREEN far larger than the criterion implies means the proof was too coarse — instruct a split. Serialize only on a NAMED dependency.
163
164
  4. INTEGRATE + CRITICAL SELF-QA + GIT CHECKPOINT (EVERY WORKER RETURN): do NOT trust the worker's report. Read the diff yourself, re-run its tests, and run LSP diagnostics on the changed files. Treat "done" as a claim to disprove. If the diff drifts, the test is hollow, or evidence is missing, RESPAWN the worker with the specific failure context. Once the work unit is verified, use `git-master` before staging: inspect recent repository commits and touched-path history to infer commit language, Conventional Commit scope, message shape, and unit size. Stage only that unit's files and commit in the observed style; do not carry verified work forward into a later omnibus commit. If no git-tracked files changed or committing is unsafe, record the no-commit reason as evidence. Forward every finding/learning to subsequent workers.
164
- 5. EXECUTE-AS-SCENARIO: ACTUALLY run the Manual-QA scenario the criterion named (channel table above). Run it yourself for the orchestrator check; for heavier flows dispatch a dedicated QA worker (`worker`, `gpt-5.6-sol`, `xhigh`) whose ONLY job is to drive the channel and write the artifact to the named evidence path. If the scenario FAILS, respawn the implementing worker with the captured failure — do not hand-patch around it.
165
+ 5. EXECUTE-AS-SCENARIO: ACTUALLY run the Manual-QA scenario the criterion named (channel table above). Run it yourself for the orchestrator check; for heavier flows dispatch a dedicated QA execution worker (`lazycodex-worker-medium` by default; `lazycodex-worker-high` when the QA flow itself is hard) whose ONLY job is to drive the channel and write the artifact to the named evidence path. If the scenario FAILS, respawn the implementing worker with the captured failure — do not hand-patch around it.
165
166
  6. CAPTURE: collect the observable artifact path: transcript, stdout, screenshot, assertion, status+body, diff, or parsed dump. No artifact written at the evidence path — not done; record BLOCKED and respawn QA.
166
- 7. CLEAN (PAIRED, NEVER SKIP): tear down every runtime artifact step 5 spawned BEFORE recording — server PIDs (`kill`, verify `kill -0` fails), `tmux` sessions (`tmux kill-session -t ulw-qa-<criterion>`; confirm `tmux ls`), browser / Playwright contexts (`.close()`), containers (`docker rm -f`), bound ports (`lsof -i :<port>` empty), temp sockets / files / dirs (`rm -rf` the `mktemp` paths), QA-only env vars, AND `multi_agent_v1.close_agent` on every finished worker. Register each teardown as its own todo the moment the QA spawns the resource (scripts, tmux assets, browsers / agent-browser sessions, PIDs, ports) so none is forgotten. Embed a one-line cleanup receipt in the evidence string, e.g. `cleanup: killed 12345; tmux kill-session ulw-qa-foo; rm -rf /tmp/ulw.aB12cD; multi_agent_v1.close_agent w-3`. Missing receipt → record BLOCKED, not PASS.
167
- 8. RECORD exactly one result:
168
- - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> | <cleanup receipt>" --json`
169
- - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> | <cleanup receipt>" --notes "<diagnosis>" --json`
167
+ 7. CLEAN (PAIRED, NEVER SKIP): tear down every runtime artifact step 5 spawned BEFORE recording — server PIDs (`kill`, verify `kill -0` fails), `tmux` sessions (`tmux kill-session -t ulw-qa-<criterion>`; confirm `tmux ls`), browser / Playwright contexts (`.close()`), containers (`docker rm -f`), bound ports (`lsof -i :<port>` empty), temp sockets / files / dirs (`rm -rf` the `mktemp` paths), QA-only env vars, AND close every finished worker (v1 `close_agent`; on V2 finished workers end on their own — `interrupt_agent` any still running). Register each teardown as its own todo the moment the QA spawns the resource (scripts, tmux assets, browsers / agent-browser sessions, PIDs, ports) so none is forgotten. Embed a one-line cleanup receipt in the evidence string, e.g. `cleanup: killed 12345; tmux kill-session ulw-qa-foo; rm -rf /tmp/ulw.aB12cD; interrupt_agent w-3`. Missing receipt → record BLOCKED, not PASS.
168
+ 8. RECORD one result immediately from the artifact you just wrote — never from memory or a later turn — stamping the capture commit `$(git rev-parse --short HEAD)` into the evidence:
169
+ - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> @<short-sha> | <cleanup receipt>" --json`
170
+ - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> @<short-sha> | <cleanup receipt>" --notes "<diagnosis>" --json`
170
171
  - BLOCKED: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status blocked --evidence "<observable>" --notes "<safety/blocker/leftover-state>" --json`
171
172
  9. If actual does not match expected, diagnose, respawn the right-sized worker with the failure context to fix minimally, and rerun the SAME criterion (including a fresh cleanup).
172
173
  10. After 3 same-criterion failures, exit the goal with diagnosis.
@@ -183,9 +184,10 @@ Loop per goal. Cap at 5 cycles per goal. Cap identical same-criterion failures a
183
184
  ## Final Quality Gate
184
185
  Trigger only for the final aggregate goal after every criterion in every goal is `pass`.
185
186
  1. Run targeted verification for changed behavior.
186
- 2. Run Manual-QA for every criterion; confirm each artifact exists and is non-empty.
187
- 3. Spawn final reviewers with `fork_context: false`: code review, QA review, gate review. Include original brief, goals, desired outcome, and diff.
188
- 4. Treat timeout, missing deliverable, ack-only, `BLOCKED:`, or inconclusive review as a blocker. Fix, rerun affected verification/Manual-QA, and repeat review.
187
+ 2. FREEZE first — no more edits or rebases. At the frozen `git rev-parse HEAD`, re-run Manual-QA for any PASS criterion whose stamped commit is not HEAD, so every criterion is proven at HEAD; each artifact exists and is non-empty.
188
+ 3a. Spawn lazycodex-code-reviewer and lazycodex-qa-executor in parallel (`fork_context: false` on v1; `fork_turns: "none"` on v2) with brief, goals, desired outcome, diff, evidence; wait for BOTH and confirm their report artifacts exist on disk.
189
+ 3b. Only then spawn lazycodex-gate-reviewer with those artifact paths.
190
+ 4. Treat timeout, missing deliverable, ack-only, `BLOCKED:`, or inconclusive review as a blocker. Any fix restarts the freeze at the new HEAD: re-run ONLY the proofs it invalidated and stamp the fresh output — never regenerate all evidence or relabel stale output to HEAD — re-review the delta at most TWICE; then record-review-blockers (step 5) and surface to the user.
189
191
  5. If review remains blocked, run `omo ulw-loop record-review-blockers --goal-id <id> --title "<...>" --objective "<...>" --evidence "<review findings>" --codex-goal-json <snapshot> --json`.
190
192
  6. If clean, checkpoint final completion:
191
193
  ```sh
@@ -201,7 +203,7 @@ omo ulw-loop checkpoint --goal-id <id> --status complete --evidence "<e2e eviden
201
203
  "criteriaCoverage":{"totalCriteria":3,"passCount":3,"originalIntent":"User wanted artifact-backed completion.","desiredOutcome":"Behavior ships with review and QA evidence.","userOutcomeReview":"Result matches brief and goals.","adversarialClassesCovered":["malformed_input","stale_state"]}
202
204
  }
203
205
  ```
204
- Artifacts must be non-empty; counts alone fail. LIGHT without adversarial class records `"adversarialClassesCovered": ["none-applicable: <reason>"]`.
206
+ Artifacts must be non-empty; counts alone fail. LIGHT without adversarial class records `"adversarialClassesCovered": ["none-applicable: <reason>"]`; untriggered adversarialCases may use verdict `not_applicable` + `reason`; WATCH passes, notes surfaced.
205
207
 
206
208
  ## Dynamic Steering
207
209
  Use steering only for structured evidence-backed mutation. Reject natural-language steering requests.
@@ -222,18 +224,18 @@ Structured prompt directives accepted: `OMO_ULW_LOOP_STEER: { ... }`, `omo.ulw-l
222
224
  ## Constraints
223
225
  1. NEVER call `update_goal` mid-aggregate; only on final story after the quality gate passes.
224
226
  2. NEVER call `create_goal` when `get_goal` shows a different active goal.
225
- 3. NEVER mark `criterion.status == "pass"` without captured observable evidence in `record-evidence`.
227
+ 3. Evidence is bound to the commit it was captured at; a later fix, rebase, or merge invalidates it — re-run the QA at the current HEAD and re-record. NEVER mark PASS from memory, and NEVER relabel, pin, refresh, or regenerate prior output to a moved HEAD.
226
228
  4. NEVER bypass the criteria gate: non-final aggregate completion requires all essential criteria; final aggregate completion requires all criteria across the whole plan.
227
229
  5. Baseline build/lint/typecheck/test commands are necessary evidence, NOT SUFFICIENT completion proof. Criteria coverage with observable evidence is the gate.
228
230
  6. Treat `.omo/ulw-loop/ledger.jsonl` as the durable audit trail; checkpoint after every success or failure.
229
231
  7. Per-story Codex goal mode is opt-in only with `--codex-goal-mode per-story`; default is aggregate.
230
232
  8. Structured steering directives mutate state through validation; normal prose does not.
231
- 9. Evidence MUST be observable from the real surface: tmux transcript, curl status+body, Browser plugin action result or browser/Playwright assertion, CLI stdout, DB state diff, parsed config dump.
233
+ 9. Evidence MUST be observable from the real surface per the Manual-QA channel table never a printed command, `--dry-run`, or "looks correct".
232
234
  10. Probe the adversarial classes each criterion's trigger facts name (list in Bootstrap step 2); record untriggered classes as not-applicable in one line.
233
235
  11. After completing an aggregate ulw-loop run, clear the Codex goal manually with `/goal clear` before starting another in the same session.
234
236
  12. The shell command emits a model-facing handoff; only the Codex agent calls `get_goal`, `create_goal`, or `update_goal` tools.
235
- 13. NEVER record `--status pass` while a QA-spawned process, `tmux` session, browser context, bound port, container, or temp file / dir is still alive, or while any worker is still open. The evidence string MUST include the cleanup receipt. Leftover runtime state = BLOCKED, not PASS.
236
- 14. DELEGATE all code edits, test writes, fixes, and QA execution to right-sized `multi_agent_v1.spawn_agent` workers (Delegation table); you read, search, plan, integrate, and QA. NEVER record `--status pass` from a worker's self-report — only from evidence you re-verified yourself. Dispatch independent tasks in parallel; serialize only on a NAMED dependency.
237
+ 13. NEVER record PASS while any QA-spawned process, `tmux` session, browser context, bound port, container, temp path, or open worker is still alive; the evidence MUST carry the cleanup receipt. Leftover state = BLOCKED.
238
+ 14. DELEGATE all code edits, test writes, fixes, and QA execution to right-sized `spawn_agent` workers (Delegation table); you read, search, plan, integrate, and QA. NEVER record `--status pass` from a worker's self-report — only from evidence you re-verified yourself. Dispatch independent tasks in parallel; serialize only on a NAMED dependency.
237
239
  15. Every verified work unit that touched git-tracked files must leave either an atomic `git-master`-style commit hash or explicit no-commit blocker evidence before the next unit starts.
238
240
 
239
241
  ## Stop Rules
@@ -221,7 +221,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
221
221
  ## Verification strategy
222
222
  > Zero human intervention - all verification is agent-executed.
223
223
  - Test decision: <TDD | tests-after | none> + framework
224
- - Evidence: .omo/evidence/task-<N>-${slug}.<ext>
224
+ - Evidence: <attemptDir>/task-<N>-${slug}.<ext> (attemptDir = currentAttemptDir from 'omo ulw-loop status --json', .omo/evidence/ulw/<session>/<goalId>/a<attempt>; outside ulw-loop use .omo/evidence/)
225
225
 
226
226
  ## Execution strategy
227
227
  ### Parallel execution waves
@@ -239,7 +239,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
239
239
  Parallelization: Wave <N> | Blocked by: <...> | Blocks: <...>
240
240
  References (executor has NO interview context - be exhaustive): <src/path:lines>
241
241
  Acceptance criteria (agent-executable): <exact command or assertion>
242
- QA scenarios (name the exact tool + invocation): happy + failure, Evidence .omo/evidence/task-1-${slug}.<ext>
242
+ QA scenarios (name the exact tool + invocation): happy + failure, Evidence <attemptDir>/task-1-${slug}.<ext>
243
243
  Commit: <Y/N> | <type>(<scope>): <summary>
244
244
 
245
245
  ## Final verification wave
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
19
19
 
20
20
  Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
21
21
 
22
- Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.
22
+ Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
23
23
 
24
24
  When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
25
25
 
26
- For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
26
+ For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
27
27
 
28
28
  ---
29
29
 
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
19
19
 
20
20
  Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
21
21
 
22
- Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type` works the same on both surfaces. If a code block below conflicts with this section, this section wins.
22
+ Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
23
23
 
24
24
  When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
25
25
 
26
- For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
26
+ For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
27
27
 
28
28
  # Visual QA - Dual-Oracle Web and TUI Verification
29
29
 
@@ -19,16 +19,16 @@ const lazycodexAgentInvariants = new Map([
19
19
  [
20
20
  "explorer.toml",
21
21
  {
22
- model: "gpt-5.6-terra",
23
- effort: "medium",
22
+ model: "gpt-5.6-luna",
23
+ effort: "low",
24
24
  includes: [/Read-only/, /working tree/, /rg/],
25
25
  },
26
26
  ],
27
27
  [
28
28
  "librarian.toml",
29
29
  {
30
- model: "gpt-5.6-terra",
31
- effort: "medium",
30
+ model: "gpt-5.6-luna",
31
+ effort: "low",
32
32
  includes: [/Read-only/, /SHA-pinned GitHub permalink/, /external/],
33
33
  },
34
34
  ],
@@ -52,16 +52,32 @@ const lazycodexAgentInvariants = new Map([
52
52
  "plan.toml",
53
53
  {
54
54
  model: "gpt-5.6-sol",
55
- effort: "xhigh",
55
+ effort: "max",
56
56
  includes: [/strategic planning consultant/i, /\.omo\/plans\/<slug>\.md/, /never implements/i],
57
57
  },
58
58
  ],
59
59
  [
60
- "lazycodex-executor.toml",
60
+ "lazycodex-worker-low.toml",
61
61
  {
62
- model: "gpt-5.6-sol",
62
+ model: "gpt-5.6-luna",
63
63
  effort: "high",
64
- includes: [/EVIDENCE_RECORDED: <path>/, /scenario/i, /artifact/i],
64
+ includes: [/EVIDENCE_RECORDED: <path>/, /low-difficulty/i, /smallest correct change/i],
65
+ },
66
+ ],
67
+ [
68
+ "lazycodex-worker-medium.toml",
69
+ {
70
+ model: "gpt-5.6-luna",
71
+ effort: "max",
72
+ includes: [/EVIDENCE_RECORDED: <path>/, /medium-difficulty/i, /smallest correct change/i],
73
+ },
74
+ ],
75
+ [
76
+ "lazycodex-worker-high.toml",
77
+ {
78
+ model: "gpt-5.6-sol",
79
+ effort: "max",
80
+ includes: [/EVIDENCE_RECORDED: <path>/, /high-difficulty/i, /smallest correct change/i],
65
81
  },
66
82
  ],
67
83
  [
@@ -77,23 +93,23 @@ const lazycodexAgentInvariants = new Map([
77
93
  {
78
94
  model: "gpt-5.6-sol",
79
95
  effort: "xhigh",
80
- includes: [/codeQualityStatus/, /recommendation/, /\.omo\/evidence\/<goal>-code-review\.md/],
96
+ includes: [/codeQualityStatus/, /recommendation/, /<attemptDir>\/<goalId>-code-review\.md/, /currentAttemptDir/],
81
97
  },
82
98
  ],
83
99
  [
84
100
  "lazycodex-qa-executor.toml",
85
101
  {
86
- model: "gpt-5.6-terra",
87
- effort: "medium",
88
- includes: [/not_applicable/, /surfaceEvidence/, /adversarialCases/],
102
+ model: "gpt-5.6-luna",
103
+ effort: "high",
104
+ includes: [/not_applicable/, /surfaceEvidence/, /adversarialCases/, /<attemptDir>\/<goalId>-manual-qa\.md/],
89
105
  },
90
106
  ],
91
107
  [
92
108
  "lazycodex-gate-reviewer.toml",
93
109
  {
94
110
  model: "gpt-5.6-sol",
95
- effort: "xhigh",
96
- includes: [/APPROVE\/REJECT/, /blockers/, /\.omo\/evidence\/<goal>-gate-review\.md/],
111
+ effort: "high",
112
+ includes: [/APPROVE\/REJECT/, /blockers/, /<attemptDir>\/<goalId>-gate-review\.md/, /currentAttemptDir/],
97
113
  },
98
114
  ],
99
115
  ]);
@@ -114,9 +130,11 @@ test("#given bundled Codex agents #when components/ultrawork/agents directory is
114
130
  "explorer.toml",
115
131
  "lazycodex-clone-fidelity-reviewer.toml",
116
132
  "lazycodex-code-reviewer.toml",
117
- "lazycodex-executor.toml",
118
133
  "lazycodex-gate-reviewer.toml",
119
134
  "lazycodex-qa-executor.toml",
135
+ "lazycodex-worker-high.toml",
136
+ "lazycodex-worker-low.toml",
137
+ "lazycodex-worker-medium.toml",
120
138
  "librarian.toml",
121
139
  "metis.toml",
122
140
  "momus.toml",
@@ -139,11 +157,29 @@ test("#given bundled Codex agents #when components/ultrawork/agents directory is
139
157
  }
140
158
  });
141
159
 
160
+ test("#given bundled agent TOMLs #when nickname_candidates are inspected #then they use only the codex-accepted charset", async () => {
161
+ // given: codex_app_server ignores a role whose nickname has characters outside
162
+ // ASCII letters, digits, spaces, hyphens, underscores (observed live in task-15 QA)
163
+ const agentsDir = join(root, "components", "ultrawork", "agents");
164
+ const files = (await readdir(agentsDir)).filter((name) => name.endsWith(".toml"));
165
+
166
+ // when/then
167
+ for (const file of files) {
168
+ const text = await readFile(join(agentsDir, file), "utf8");
169
+ for (const match of text.matchAll(/nickname_candidates\s*=\s*\[([^\]]*)\]/g)) {
170
+ for (const nickname of match[1].matchAll(/"([^"]*)"/g)) {
171
+ assert.match(nickname[1], /^[A-Za-z0-9 _-]+$/, `${file}: nickname "${nickname[1]}"`);
172
+ }
173
+ }
174
+ }
175
+ });
176
+
142
177
  test("#given planner agent prompt #when inspected #then generated artifacts stay under .omo", async () => {
143
178
  const prompt = await readFile(join(root, "components", "ultrawork", "agents", "plan.toml"), "utf8");
144
179
 
145
180
  assert.match(prompt, /\.omo\/plans\/<slug>\.md/);
146
- assert.match(prompt, /\.omo\/evidence\/task-<N>-<slug>\.<ext>/);
181
+ assert.match(prompt, /<attemptDir>\/task-<N>-<slug>\.<ext>/);
182
+ assert.match(prompt, /\.omo\/evidence\/ulw\/<session>\/<goalId>\/a<attempt>/);
147
183
  assert.doesNotMatch(prompt, /(?<!\.omo\/)plans\/<slug>\.md/);
148
184
  assert.doesNotMatch(prompt, /(?<!\.omo\/)evidence\/task-/);
149
185
  });
@@ -207,3 +243,27 @@ test("#given LazyCodex reviewer prompts #when inspected #then anti-slop review c
207
243
  "gate reviewer must perform the overfit/slop pass directly before checking report coverage",
208
244
  );
209
245
  });
246
+
247
+ test("#given done-gate reviewer prompts #when inspected #then burden of proof is approve-unless-cited and reject priors are gone", async () => {
248
+ const agentsDir = join(root, "components", "ultrawork", "agents");
249
+ const gateReviewer = await readFile(join(agentsDir, "lazycodex-gate-reviewer.toml"), "utf8");
250
+ const qaExecutor = await readFile(join(agentsDir, "lazycodex-qa-executor.toml"), "utf8");
251
+ const codeReviewer = await readFile(join(agentsDir, "lazycodex-code-reviewer.toml"), "utf8");
252
+
253
+ assert.match(gateReviewer, /APPROVE unless you can cite/);
254
+ assert.match(gateReviewer, /violatedCriterion/);
255
+ assert.match(gateReviewer, /evidencePointer/);
256
+ assert.match(gateReviewer, /top blockers inline/);
257
+ assert.match(gateReviewer, /is a NOTE, not a blocker/);
258
+ assert.match(gateReviewer, /You do NOT check/);
259
+ assert.doesNotMatch(gateReviewer, /Assume the work has already failed/);
260
+ assert.doesNotMatch(gateReviewer, /Return exactly one recommendation: APPROVE\/REJECT\./);
261
+
262
+ assert.match(qaExecutor, /one-line reason/);
263
+ assert.match(qaExecutor, /rejecting a legitimately untriggered class is itself an error/);
264
+ assert.doesNotMatch(qaExecutor, /Trust nothing\./);
265
+
266
+ assert.match(codeReviewer, /MEDIUM by default/);
267
+ assert.doesNotMatch(codeReviewer, /Treat useless tests or needless production complexity as CRITICAL\/HIGH/);
268
+ });
269
+
@@ -48,6 +48,22 @@ test("#given isolated components #when hooks are inspected #then commands stay i
48
48
  assert.equal(await exists("scripts/migrate-codex-config.mjs"), true);
49
49
  });
50
50
 
51
+ test("#given aggregate Stop hooks #when inspected #then start-work continuation and ulw-loop resume are separate groups", async () => {
52
+ // given
53
+ const manifests = await readAggregateHookManifests();
54
+
55
+ // when
56
+ const stopCommands = manifests
57
+ .filter(({ hooks }) => hooks.hooks.Stop)
58
+ .flatMap(({ hooks }) => hooks.hooks.Stop)
59
+ .flatMap((group) => group.hooks.map((handler) => handler.command));
60
+
61
+ // then
62
+ assert.equal(stopCommands.length, 2);
63
+ assert.ok(stopCommands.some((command) => command.includes("start-work-continuation/dist/cli.js")));
64
+ assert.ok(stopCommands.some((command) => command.includes("ulw-loop/dist/cli.js\" hook stop")));
65
+ });
66
+
51
67
  test("#given aggregate SubagentStop hooks #when inspected #then start-work and LazyCodex executor verifier are separate groups", async () => {
52
68
  // given
53
69
  const manifests = await readAggregateHookManifests();
@@ -64,7 +80,7 @@ test("#given aggregate SubagentStop hooks #when inspected #then start-work and L
64
80
  // then
65
81
  assert.equal(subagentStopGroups.length, 2);
66
82
  assert.equal(subagentStopGroups[0]?.matcher, undefined);
67
- assert.equal(subagentStopGroups[1]?.matcher, "^lazycodex-executor$");
83
+ assert.equal(subagentStopGroups[1]?.matcher, "^lazycodex-worker-(low|medium|high)$");
68
84
  assert.equal(verifierGroups.length, 1);
69
85
  assert.equal(verifierGroups[0]?.groupIndex, 0);
70
86
  assert.equal(verifierGroups[0]?.handler.timeout, 10);
@@ -158,7 +174,12 @@ test("#given aggregate OMO plugin is enabled #when hooks are inspected #then she
158
174
  assert.match(text, /Resetting Git Bash MCP Reminder/);
159
175
  assert.match(text, /components\/ulw-loop\/dist\/cli\.js/);
160
176
  assert.match(text, /hook pre-tool-use/);
161
- assert.deepEqual(preToolUseGroups.map((group) => group.matcher), ["^Bash$", "^create_goal$"]);
177
+ assert.deepEqual(preToolUseGroups.map((group) => group.matcher), [
178
+ "^Bash$",
179
+ "^create_goal$",
180
+ "^(spawn_agent|collaborationspawn_agent|collaboration\\.spawn_agent)$",
181
+ ]);
182
+ assert.match(text, /hook pre-tool-use-spawn/);
162
183
  });
163
184
 
164
185
  test("#given aggregate OMO plugin has a dedicated ultrawork trigger #when hooks are inspected #then ulw-loop does not duplicate ultrawork injection", async () => {
@@ -17,7 +17,7 @@ test("#given aggregate plugin manifest #when inspected #then it owns the omo nam
17
17
  // then
18
18
  assert.equal(manifest.name, "omo");
19
19
  assert(Array.isArray(hookPaths));
20
- assert.equal(hookPaths.length, 21);
20
+ assert.equal(hookPaths.length, 23);
21
21
  assert(hookPaths.every((hookPath) => typeof hookPath === "string" && hookPath.startsWith("./hooks/")));
22
22
  assert(!hookPaths.includes("./hooks/hooks.json"));
23
23
  assert(!hookPaths.includes("./hooks/user-prompt-submit-selecting-lazycodex-workflow.json"));
@@ -8,17 +8,17 @@ import { root } from "./aggregate-plugin-fixture.mjs";
8
8
  test("#given bundled model catalog #when inspected #then default verifier and worker roles are pinned", async () => {
9
9
  const catalog = JSON.parse(await readFile(join(root, "model-catalog.json"), "utf8"));
10
10
 
11
- assert.equal(catalog.current.model, "gpt-5.5");
12
- assert.equal(catalog.current.model_context_window, 400000);
11
+ assert.equal(catalog.current.model, "gpt-5.6-sol");
12
+ assert.equal(catalog.current.model_context_window, 372000);
13
13
  assert.equal(catalog.current.model_reasoning_effort, "high");
14
14
  assert.equal(catalog.current.plan_mode_reasoning_effort, "xhigh");
15
15
  assert.deepEqual(catalog.roles.default, catalog.current);
16
16
  assert.deepEqual(catalog.roles.verifier, {
17
- model: "gpt-5.5",
17
+ model: "gpt-5.6-sol",
18
18
  model_reasoning_effort: "high",
19
19
  });
20
20
  assert.deepEqual(catalog.roles.worker, {
21
- model: "gpt-5.5",
21
+ model: "gpt-5.6-sol",
22
22
  model_reasoning_effort: "high",
23
23
  });
24
24
  });
@@ -225,7 +225,7 @@ test("#given test command override #when running check #then records state and l
225
225
  toVersion: "1.0.1",
226
226
  },
227
227
  ]);
228
- assert.match(await readFile(join(env.CODEX_HOME, "config.toml"), "utf8"), /model = "gpt-5\.5"/);
228
+ assert.match(await readFile(join(env.CODEX_HOME, "config.toml"), "utf8"), /model = "gpt-5\.6-sol"/);
229
229
  });
230
230
 
231
231
  test("#given failed waited update #when retry window passes #then next update is not blocked by success throttle", async () => {
@@ -279,7 +279,7 @@ test("#given active lock #when running check #then skips concurrent update", asy
279
279
 
280
280
  assert.equal(result.started, false);
281
281
  assert.equal(result.reason, "locked");
282
- assert.match(await readFile(join(root, "codex-home", "config.toml"), "utf8"), /model_context_window = 400000/);
282
+ assert.match(await readFile(join(root, "codex-home", "config.toml"), "utf8"), /model_context_window = 372000/);
283
283
  });
284
284
 
285
285
  test("#given stale lock #when running check #then removes lock and runs update", async () => {
@@ -645,8 +645,8 @@ test("#given throttled updater and stale Codex config #when running check #then
645
645
  const content = await readFile(join(codexHome, "config.toml"), "utf8");
646
646
  assert.equal(result.started, false);
647
647
  assert.equal(result.reason, "throttled");
648
- assert.match(content, /model = "gpt-5\.5"/);
649
- assert.match(content, /model_context_window = 400000/);
648
+ assert.match(content, /model = "gpt-5\.6-sol"/);
649
+ assert.match(content, /model_context_window = 372000/);
650
650
  assert.match(content, /model_reasoning_effort = "high"/);
651
651
  assert.match(content, /plan_mode_reasoning_effort = "xhigh"/);
652
652
  assert.doesNotMatch(content, /gpt-5\.2/);
@@ -180,12 +180,12 @@ export function componentHookContractCases(tempRoot) {
180
180
  },
181
181
  },
182
182
  {
183
- name: "lazycodex executor verifier subagent-stop blocks missing evidence",
183
+ name: "lazycodex worker verifier subagent-stop blocks missing evidence",
184
184
  component: "lazycodex-executor-verify",
185
185
  event: "subagent-stop",
186
186
  payload: {
187
187
  hook_event_name: "SubagentStop",
188
- agent_type: "lazycodex-executor",
188
+ agent_type: "lazycodex-worker-medium",
189
189
  agent_id: "agent-task12",
190
190
  session_id: "s-task12",
191
191
  transcript_path: join(tempRoot, "transcript.jsonl"),
@@ -7,109 +7,12 @@ import { fileURLToPath } from "node:url";
7
7
  const pluginRoot = dirname(dirname(fileURLToPath(import.meta.url)));
8
8
  const sharedSkillsRoot = join(pluginRoot, "..", "..", "shared-skills");
9
9
 
10
- async function readSkill(name) {
11
- return readFile(join(sharedSkillsRoot, "skills", name, "SKILL.md"), "utf8");
12
- }
13
-
14
- test("#given synced lcx-report-bug skill #when inspected #then it files LazyCodex bug issues with generated labels", async () => {
15
- // given
16
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-report-bug");
17
-
18
- // when
19
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
20
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
21
-
22
- // then
23
- assert.match(skill, /^---\r?\nname: lcx-report-bug\r?\n/m);
24
- assert.match(skill, /Never create a PR or push a branch against `code-yeongyu\/lazycodex`/);
25
- assert.match(skill, /gh pr create --repo openai\/codex/);
26
- assert.doesNotMatch(skill, /gh pr create --repo "\$TARGET_REPO"/);
27
- assert.doesNotMatch(skill, /gh pr create --repo code-yeongyu\/lazycodex/);
28
- assert.match(interfaceMetadata, /display_name: "lcx-report-bug \(omo\)"/);
29
- assert.match(interfaceMetadata, /- "lazycodex bug"/);
30
- assert.match(interfaceMetadata, /- "openai codex bug"/);
31
- });
32
-
33
- test("#given synced lcx-contribute-bug-fix skill #when inspected #then it delivers LazyCodex fixes as issues and upstream fixes as fork PRs", async () => {
34
- // given
35
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-contribute-bug-fix");
36
-
37
- // when
38
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
39
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
40
-
41
- // then
42
- assert.match(skill, /^---\r?\nname: lcx-contribute-bug-fix\r?\n/m);
43
- assert.match(skill, /NEVER open a PR or push a branch against this repo/);
44
- assert.match(skill, /gh issue create --repo code-yeongyu\/lazycodex/);
45
- assert.match(skill, /gh pr create --repo openai\/codex/);
46
- assert.doesNotMatch(skill, /gh pr create --repo "\$TARGET_REPO"/);
47
- assert.doesNotMatch(skill, /gh pr create --repo code-yeongyu\/lazycodex/);
48
- assert.match(interfaceMetadata, /display_name: "lcx-contribute-bug-fix \(omo\)"/);
49
- assert.match(interfaceMetadata, /- "contribute a bug fix"/);
50
- assert.match(interfaceMetadata, /- "fix bug pr"/);
51
- });
52
-
53
- test("#given synced lcx-doctor skill #when inspected #then it diagnoses installs against latest temp-root sources without mutating them", async () => {
54
- // given
55
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-doctor");
56
-
57
- // when
58
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
59
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
60
-
61
- // then
62
- assert.match(skill, /^---\r?\nname: lcx-doctor\r?\n/m);
63
- assert.match(interfaceMetadata, /display_name: "lcx-doctor \(omo\)"/);
64
- assert.match(interfaceMetadata, /- "lazycodex doctor"/);
65
- assert.match(interfaceMetadata, /- "lazycodex health check"/);
66
- });
67
-
68
- test("#given lcx source-sync skills #when inspected #then source caches are validated before reuse", async () => {
69
- // given
70
- const skillNames = ["lcx-doctor", "lcx-report-bug", "lcx-contribute-bug-fix"];
71
-
72
- for (const skillName of skillNames) {
10
+ test("#given lcx skills #when frontmatter is inspected #then each exposes the loader-parsed skill name", async () => {
11
+ for (const skillName of ["lcx-report-bug", "lcx-contribute-bug-fix", "lcx-doctor"]) {
73
12
  // when
74
- const skill = await readSkill(skillName);
13
+ const skill = await readFile(join(sharedSkillsRoot, "skills", skillName, "SKILL.md"), "utf8");
75
14
 
76
15
  // then
77
- assert.match(skill, /LAZYCODEX_SOURCE_ROOT="\$\{LAZYCODEX_SOURCE_ROOT:-\$\{TMPDIR:-\/tmp\}\/lazycodex-sources\}"/);
78
- assert.match(skill, /git -C "\$DEST" rev-parse --is-inside-work-tree/);
79
- assert.match(skill, /git -C "\$DEST" config --get remote\.origin\.url/);
80
- assert.match(skill, /DEST\.corrupt\.\$\(date \+%Y%m%d%H%M%S\)/);
81
- assert.doesNotMatch(skill, /if \[ ! -d "\$DEST\/\.git" \]; then/);
82
- assert.doesNotMatch(skill, /sync_latest_source code-yeongyu\/lazycodex \/tmp\/lazycodex-source/);
83
- assert.doesNotMatch(skill, /sync_latest_source openai\/codex \/tmp\/openai-codex-source/);
16
+ assert.match(skill, new RegExp(`^name: ${skillName}$`, "m"), `${skillName}: frontmatter must expose ${skillName}`);
84
17
  }
85
18
  });
86
-
87
- test("#given lcx-doctor skill #when inspected #then aggregate hook validation follows the current manifest", async () => {
88
- // given
89
- const skill = await readSkill("lcx-doctor");
90
-
91
- // then
92
- assert.match(skill, /\.codex-plugin\/plugin\.json/);
93
- assert.match(skill, /manifest declares a `hooks` array/);
94
- assert.match(skill, /validate every direct hook path declared by the manifest/);
95
- assert.match(skill, /`hooks\/hooks\.json` only when the manifest declares it/);
96
- assert.match(skill, /do not require retired paths such as `components\/workflow-selector`/);
97
- assert.match(skill, /`hooks\/user-prompt-submit-selecting-lazycodex-workflow\.json` unless the current manifest declares them/);
98
- assert.doesNotMatch(skill, /Plugin payload present and non-empty: `hooks\/hooks\.json`/);
99
- });
100
-
101
- test("#given lcx-doctor skill #when inspected #then runtime probes and materialized payloads distinguish expected rewrites from missing files", async () => {
102
- // given
103
- const skill = await readSkill("lcx-doctor");
104
-
105
- // then
106
- assert.match(skill, /manifest-declared runtime payload/);
107
- assert.match(skill, /`dist\/cli\/index\.js` and `dist\/cli-node\/index\.js`/);
108
- assert.match(skill, /install-time materialization rewrites as expected/);
109
- assert.match(skill, /absolute `\.mcp\.json` runtime paths/);
110
- assert.match(skill, /Missing or zero-byte rewritten targets are FAIL/);
111
- assert.match(skill, /Use the configured Codex default model/);
112
- assert.match(skill, /unless the user explicitly passed a model override/);
113
- assert.match(skill, /never force a guessed\/rejected model such as `gpt-5\.5-codex-mini`/);
114
- assert.doesNotMatch(skill, /--model gpt-5\.5-codex-mini/);
115
- });