Skip to content

The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.

chore: sync Codex marketplace v4.17.0

github-actions[bot]f39306f1adab
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.json
index c60cc001..cdf81c76 100644
--- a/plugins/omo/.codex-plugin/plugin.json
+++ b/plugins/omo/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "omo",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "One Codex plugin namespace for Yeongyu's local Codex components.",
"author": {
"name": "Yeongyu Kim",
@@ -30,6 +30,7 @@
"./hooks/user-prompt-submit-checking-ulw-loop-steering.json",
"./hooks/pre-tool-use-recommending-git-bash-mcp.json",
"./hooks/pre-tool-use-enforcing-unlimited-goal-budget.json",
+ "./hooks/pre-tool-use-guarding-ulw-loop-spawns.json",
"./hooks/post-tool-use-checking-comments.json",
"./hooks/post-tool-use-checking-lsp-diagnostics.json",
"./hooks/post-tool-use-checking-codegraph-init-guidance.json",
@@ -39,6 +40,7 @@
"./hooks/post-compact-resetting-project-rule-cache.json",
"./hooks/post-compact-resetting-lsp-diagnostics-cache.json",
"./hooks/stop-checking-start-work-continuation.json",
+ "./hooks/stop-checking-ulw-loop-resume.json",
"./hooks/subagent-stop-checking-start-work-continuation.json",
"./hooks/subagent-stop-verifying-lazycodex-executor-evidence.json"
],
diff --git a/plugins/omo/components/bootstrap/dist/cli.js b/plugins/omo/components/bootstrap/dist/cli.js
index 050b47ad..cc37aa00 100755
--- a/plugins/omo/components/bootstrap/dist/cli.js
+++ b/plugins/omo/components/bootstrap/dist/cli.js
@@ -879,32 +879,88 @@ import { join as join8 } from "node:path";
var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
[
"explorer",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"librarian",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"momus",
- {
- previous: { model: "gpt-5.5", effort: "xhigh" },
- current: { model: "gpt-5.6-sol", effort: "ultra" }
- }
+ [
+ {
+ previous: { model: "gpt-5.5", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "ultra" }
+ }
+ ]
+ ],
+ [
+ "plan",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-worker-medium",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "high" },
+ current: { model: "gpt-5.6-luna", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-qa-executor",
+ [
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "high" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-gate-reviewer",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "high" }
+ }
+ ]
]
]);
function resolveManagedAgentReasoning(input) {
- const upgrade = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
- if (upgrade !== undefined && input.preserved.model === upgrade.previous.model && input.preserved.effort === upgrade.previous.effort && input.bundledModel === upgrade.current.model && input.bundledEffort === upgrade.current.effort) {
- return upgrade.current.effort;
- }
- return input.preserved.effort;
+ const steps = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
+ if (steps === undefined)
+ return input.preserved.effort;
+ const latest = steps[steps.length - 1];
+ if (latest === undefined)
+ return input.preserved.effort;
+ if (input.bundledModel !== latest.current.model || input.bundledEffort !== latest.current.effort) {
+ return input.preserved.effort;
+ }
+ const preservedMatchesAnyStep = steps.some((step) => input.preserved.model === step.previous.model && input.preserved.effort === step.previous.effort);
+ return preservedMatchesAnyStep ? latest.current.effort : input.preserved.effort;
}
// ../src/install/preserved-agent-settings.ts
@@ -2041,6 +2097,9 @@ function stripTomlLineComment(line) {
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
"explorer",
+ "lazycodex-worker-high",
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
"librarian",
"metis",
"momus",
@@ -2458,12 +2517,18 @@ import { readFile as readFile9 } from "node:fs/promises";
import { join as join16 } from "node:path";
var FALLBACK_CODEX_MODEL_CATALOG = {
current: {
- model: "gpt-5.5",
- modelContextWindow: 400000,
+ model: "gpt-5.6-sol",
+ modelContextWindow: 372000,
modelReasoningEffort: "high",
planModeReasoningEffort: "xhigh"
},
managedProfiles: [
+ {
+ model: "gpt-5.5",
+ modelContextWindow: 400000,
+ modelReasoningEffort: "high",
+ planModeReasoningEffort: "xhigh"
+ },
{
model: "gpt-5.5",
modelContextWindow: 1e6,
diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.json
index 2a66ba3c..29a7b82d 100644
--- a/plugins/omo/components/bootstrap/hooks/hooks.json
+++ b/plugins/omo/components/bootstrap/hooks/hooks.json
@@ -8,7 +8,7 @@
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
"timeout": 30,
- "statusMessage": "(OmO 4.16.3) Checking Bootstrap Provisioning"
+ "statusMessage": "(OmO 4.17.0) Checking Bootstrap Provisioning"
}
]
}
diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.json
index c549cbc8..641443ca 100644
--- a/plugins/omo/components/bootstrap/package.json
+++ b/plugins/omo/components/bootstrap/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-bootstrap",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/codegraph/package.json b/plugins/omo/components/codegraph/package.json
index 8046d509..4e2272b6 100644
--- a/plugins/omo/components/codegraph/package.json
+++ b/plugins/omo/components/codegraph/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-codegraph",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin MCP wrapper for CodeGraph.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.json
index 0d3aa609..18296024 100644
--- a/plugins/omo/components/comment-checker/hooks/hooks.json
+++ b/plugins/omo/components/comment-checker/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 30,
- "statusMessage": "(OmO 4.16.3) Checking Comments"
+ "statusMessage": "(OmO 4.17.0) Checking Comments"
}
]
}
diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.json
index 08fe379a..3176969f 100644
--- a/plugins/omo/components/comment-checker/package.json
+++ b/plugins/omo/components/comment-checker/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-comment-checker",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.json
index 6aca06a9..a96a9342 100644
--- a/plugins/omo/components/git-bash/hooks/hooks.json
+++ b/plugins/omo/components/git-bash/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Recommending Git Bash MCP"
+ "statusMessage": "(OmO 4.17.0) Recommending Git Bash MCP"
}
]
}
@@ -20,7 +20,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Resetting Git Bash MCP Reminder"
+ "statusMessage": "(OmO 4.17.0) Resetting Git Bash MCP Reminder"
}
]
}
diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.json
index c084f912..33ac5e3b 100644
--- a/plugins/omo/components/git-bash/package.json
+++ b/plugins/omo/components/git-bash/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-git-bash-hook",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/lazycodex-executor-verify/AGENTS.md b/plugins/omo/components/lazycodex-executor-verify/AGENTS.md
index d91c29ce..b6678e7e 100644
--- a/plugins/omo/components/lazycodex-executor-verify/AGENTS.md
+++ b/plugins/omo/components/lazycodex-executor-verify/AGENTS.md
@@ -4,7 +4,7 @@
## OVERVIEW
-Codex `SubagentStop` hook component: the evidence gate for the `lazycodex-executor` subagent (ultrawork implementation executor). When the executor stops without a valid evidence receipt, the hook emits `{"decision": "block", "reason": <directive>}` and Codex sends it back to work. Matcher is `^lazycodex-executor$` only; `lazycodex-qa-executor` and `lazycodex-gate-reviewer` (same `ultrawork/agents/` family) are NOT gated by this hook.
+Codex `SubagentStop` hook component: the evidence gate for the ultrawork implementation workers (`lazycodex-worker-low|medium|high`). When a worker stops without a valid evidence receipt, the hook emits `{"decision": "block", "reason": <directive>}` and Codex sends it back to work. Matcher is `^lazycodex-worker-(low|medium|high)$`; read-only roles like `lazycodex-qa-executor` and `lazycodex-gate-reviewer` (same `ultrawork/agents/` family) are NOT gated by this hook. (The historical `lazycodex-executor` agent was removed; this component keeps its name.)
Valid receipt: `last_assistant_message` contains `EVIDENCE_RECORDED: <path>` where `<path>` resolves to a non-empty regular file strictly inside `<cwd>/.omo/evidence/`. Symlinks and directories rejected; containment checked on realpaths (file inside evidence root inside cwd, traversal-safe). A valid receipt clears attempt state and exits silently.
@@ -30,7 +30,7 @@ Escape hatches: after 3 blocked attempts (`MAX_ATTEMPTS`) the stop passes and st
| Change the block message | `directive.md`; keep both `{{...}}` placeholders and the literal `EVIDENCE_RECORDED: <path>` final-line contract |
| Change receipt validation | `src/codex-hook.ts` (`hasValidEvidenceReceipt`, `extractEvidencePath`, `isNonEmptyFileInsideEvidenceRoot`) |
| Change the retry budget | `src/state.ts` `MAX_ATTEMPTS` |
-| Executor-side contract | `../ultrawork/agents/lazycodex-executor.toml` instructs the final `EVIDENCE_RECORDED: <path>` line this hook parses |
+| Worker-side contract | `../ultrawork/agents/lazycodex-worker-{low,medium,high}.toml` instruct the final `EVIDENCE_RECORDED: <path>` line this hook parses |
| Plugin-level wiring | `../../hooks/subagent-stop-verifying-lazycodex-executor-evidence.json` (adds `commandWindows` via `../bootstrap/scripts/node-dispatch.ps1`) |
| Wiring + contract tests | `../../test/aggregate-hooks.test.mjs`, `../../test/component-hook-contract-cases.mjs`, `../../test/hook-status-message.test.mjs`, `../../test/component-bundled-cli.test.mjs` |
diff --git a/plugins/omo/components/lazycodex-executor-verify/dist/cli.js b/plugins/omo/components/lazycodex-executor-verify/dist/cli.js
index f6467d99..569b6a54 100644
--- a/plugins/omo/components/lazycodex-executor-verify/dist/cli.js
+++ b/plugins/omo/components/lazycodex-executor-verify/dist/cli.js
@@ -66,11 +66,15 @@ function isRecord(value) {
var SUBAGENT_STOP_EVENT = "SubagentStop";
// components/lazycodex-executor-verify/src/codex-hook.ts
-var LAZYCODEX_EXECUTOR_AGENT = "lazycodex-executor";
+var RECEIPT_ENFORCED_AGENTS = new Set([
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
+ "lazycodex-worker-high"
+]);
function runSubagentStopHook(input, fs) {
if (!isSubagentStopInput(input))
return "";
- if (input.agent_type !== LAZYCODEX_EXECUTOR_AGENT)
+ if (!RECEIPT_ENFORCED_AGENTS.has(input.agent_type))
return "";
if (transcriptHasContextPressureMarker(input.transcript_path, fs))
return "";
diff --git a/plugins/omo/components/lazycodex-executor-verify/dist/codex-hook.js b/plugins/omo/components/lazycodex-executor-verify/dist/codex-hook.js
index ffc33626..06505596 100644
--- a/plugins/omo/components/lazycodex-executor-verify/dist/codex-hook.js
+++ b/plugins/omo/components/lazycodex-executor-verify/dist/codex-hook.js
@@ -3,11 +3,15 @@ import { isAbsolute, relative, resolve } from "node:path";
import { renderDirective } from "./directive.js";
import { clearAttemptState, MAX_ATTEMPTS, readAttemptState, writeAttemptState } from "./state.js";
import { SUBAGENT_STOP_EVENT } from "./types.js";
-const LAZYCODEX_EXECUTOR_AGENT = "lazycodex-executor";
+const RECEIPT_ENFORCED_AGENTS = new Set([
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
+ "lazycodex-worker-high",
+]);
export function runSubagentStopHook(input, fs) {
if (!isSubagentStopInput(input))
return "";
- if (input.agent_type !== LAZYCODEX_EXECUTOR_AGENT)
+ if (!RECEIPT_ENFORCED_AGENTS.has(input.agent_type))
return "";
if (transcriptHasContextPressureMarker(input.transcript_path, fs))
return "";
diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
index 9964a420..e79f005c 100644
--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
@@ -2,13 +2,13 @@
"hooks": {
"SubagentStop": [
{
- "matcher": "^lazycodex-executor$",
+ "matcher": "^lazycodex-worker-(low|medium|high)$",
"hooks": [
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Verifying LazyCodex Executor Evidence"
+ "statusMessage": "(OmO 4.17.0) Verifying LazyCodex Executor Evidence"
}
]
}
diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.json
index 2e866314..aa4e8b09 100644
--- a/plugins/omo/components/lazycodex-executor-verify/package.json
+++ b/plugins/omo/components/lazycodex-executor-verify/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/lazycodex-executor-verify/src/codex-hook.ts b/plugins/omo/components/lazycodex-executor-verify/src/codex-hook.ts
index 74cbd99a..8562ceea 100644
--- a/plugins/omo/components/lazycodex-executor-verify/src/codex-hook.ts
+++ b/plugins/omo/components/lazycodex-executor-verify/src/codex-hook.ts
@@ -6,11 +6,15 @@ import { clearAttemptState, MAX_ATTEMPTS, readAttemptState, writeAttemptState }
import type { HookFileSystem, StopHookOutput, SubagentStopInput } from "./types.js";
import { SUBAGENT_STOP_EVENT } from "./types.js";
-const LAZYCODEX_EXECUTOR_AGENT = "lazycodex-executor";
+const RECEIPT_ENFORCED_AGENTS = new Set([
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
+ "lazycodex-worker-high",
+]);
export function runSubagentStopHook(input: unknown, fs: HookFileSystem): string {
if (!isSubagentStopInput(input)) return "";
- if (input.agent_type !== LAZYCODEX_EXECUTOR_AGENT) return "";
+ if (!RECEIPT_ENFORCED_AGENTS.has(input.agent_type)) return "";
if (transcriptHasContextPressureMarker(input.transcript_path, fs)) return "";
if (hasValidEvidenceReceipt(input, fs)) {
clearAttemptState(input.cwd, input.session_id, input.agent_id, fs);
diff --git a/plugins/omo/components/lazycodex-executor-verify/test/cli.test.ts b/plugins/omo/components/lazycodex-executor-verify/test/cli.test.ts
index 36690dfb..d5318b48 100644
--- a/plugins/omo/components/lazycodex-executor-verify/test/cli.test.ts
+++ b/plugins/omo/components/lazycodex-executor-verify/test/cli.test.ts
@@ -110,7 +110,7 @@ function createPayload(
): Record<string, string | boolean> {
return {
hook_event_name: "SubagentStop",
- agent_type: "lazycodex-executor",
+ agent_type: "lazycodex-worker-medium",
agent_id: "agent_1",
session_id: "sess.1",
cwd,
diff --git a/plugins/omo/components/lazycodex-executor-verify/test/codex-hook.test.ts b/plugins/omo/components/lazycodex-executor-verify/test/codex-hook.test.ts
index 769217c2..5f956a7f 100644
--- a/plugins/omo/components/lazycodex-executor-verify/test/codex-hook.test.ts
+++ b/plugins/omo/components/lazycodex-executor-verify/test/codex-hook.test.ts
@@ -299,7 +299,7 @@ function existingReceiptTargetOutsideEvidenceRoot(): string {
function createInput(cwd: string, overrides: Partial<SubagentStopInput> = {}): SubagentStopInput {
return {
hook_event_name: "SubagentStop",
- agent_type: "lazycodex-executor",
+ agent_type: "lazycodex-worker-medium",
agent_id: "agent_1",
session_id: "sess.1",
cwd,
@@ -315,7 +315,7 @@ function createInput(cwd: string, overrides: Partial<SubagentStopInput> = {}): S
function createUnknownEventInput(cwd: string): Record<string, string | boolean> {
return {
hook_event_name: "Stop",
- agent_type: "lazycodex-executor",
+ agent_type: "lazycodex-worker-medium",
agent_id: "agent_1",
session_id: "sess.1",
cwd,
@@ -344,3 +344,68 @@ function isBlockOutput(value: unknown): value is BlockOutput {
typeof value.reason === "string"
);
}
+
+describe("tier worker receipt enforcement", () => {
+ // given the matcher set now covers the difficulty-tier workers
+ const workerTypes = ["lazycodex-worker-low", "lazycodex-worker-medium", "lazycodex-worker-high"] as const;
+
+ for (const agentType of workerTypes) {
+ it(`#given no evidence receipt #when a ${agentType} child stops #then blocks`, () => {
+ // given
+ const cwd = createWorkspace();
+
+ // when
+ const output = runSubagentStopHook(createInput(cwd, { agent_type: agentType }), nodeFileSystem);
+
+ // then
+ expect(parseBlockOutput(output).decision).toBe("block");
+ });
+ }
+
+ it("#given no evidence receipt #when an explorer child stops #then no-ops", () => {
+ // given
+ const cwd = createWorkspace();
+
+ // when
+ const output = runSubagentStopHook(createInput(cwd, { agent_type: "explorer" }), nodeFileSystem);
+
+ // then
+ expect(output).toBe("");
+ });
+
+ it("#given both hook manifests #when their matchers are applied #then enforced agents match and read-only roles do not", () => {
+ // given
+ const componentManifest = JSON.parse(
+ readFileSync(new URL("../hooks/hooks.json", import.meta.url), "utf8"),
+ );
+ const rootManifest = JSON.parse(
+ readFileSync(
+ new URL("../../../hooks/subagent-stop-verifying-lazycodex-executor-evidence.json", import.meta.url),
+ "utf8",
+ ),
+ );
+ for (const manifest of [componentManifest, rootManifest]) {
+ const matcher = new RegExp(manifest.hooks.SubagentStop[0].matcher);
+
+ // then
+ for (const name of workerTypes) expect(matcher.test(name)).toBe(true);
+ expect(matcher.test("lazycodex-executor")).toBe(false);
+ expect(matcher.test("explorer")).toBe(false);
+ expect(matcher.test("lazycodex-gate-reviewer")).toBe(false);
+ }
+ });
+
+ it("#given the tier worker TOMLs #when inspected #then each instructs the EVIDENCE_RECORDED receipt line", () => {
+ for (const tier of ["low", "medium", "high"]) {
+ // when
+ const toml = readFileSync(
+ new URL(`../../ultrawork/agents/lazycodex-worker-${tier}.toml`, import.meta.url),
+ "utf8",
+ );
+
+ // then
+ expect(toml).toContain("EVIDENCE_RECORDED: <path>");
+ }
+ });
+});
+
diff --git a/plugins/omo/components/lsp/.mcp.json b/plugins/omo/components/lsp/.mcp.json
deleted file mode 100644
index 2e7a0e6d..00000000
--- a/plugins/omo/components/lsp/.mcp.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "mcpServers": {
- "lsp": {
- "command": "node",
- "args": ["../../../../lsp-daemon/dist/cli.js", "mcp"],
- "cwd": "."
- }
- }
-}
diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.json
index 13280d8c..6b35f44a 100644
--- a/plugins/omo/components/lsp/hooks/hooks.json
+++ b/plugins/omo/components/lsp/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 60,
- "statusMessage": "(OmO 4.16.3) Checking LSP Diagnostics"
+ "statusMessage": "(OmO 4.17.0) Checking LSP Diagnostics"
}
]
}
@@ -21,7 +21,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Resetting LSP Diagnostics Cache"
+ "statusMessage": "(OmO 4.17.0) Resetting LSP Diagnostics Cache"
}
]
}
diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.json
index e721bf83..3ca076f6 100644
--- a/plugins/omo/components/lsp/package.json
+++ b/plugins/omo/components/lsp/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-lsp",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/lsp/test/package-smoke.test.ts b/plugins/omo/components/lsp/test/package-smoke.test.ts
index 78d56477..d1ff7d6f 100644
--- a/plugins/omo/components/lsp/test/package-smoke.test.ts
+++ b/plugins/omo/components/lsp/test/package-smoke.test.ts
@@ -56,17 +56,4 @@ describe("plugin package metadata", () => {
expect(codexHookSource).not.toContain("../../../../../lsp-daemon");
expect(sourceFiles.filter((name) => name.startsWith("lazy-mcp") || name === "lazy-lsp-mcp.ts")).toEqual([]);
});
-
- it("#given LSP skill guidance #when validating MCP tool instructions #then tool names are not framed as shell commands", () => {
- // given
- const skill = readTextFile("skills/lsp/SKILL.md");
-
- // when
- const mentionsToolInterface = skill.includes("through the tool interface");
- const rejectsShellExecution = skill.includes("not shell commands");
-
- // then
- expect(mentionsToolInterface).toBe(true);
- expect(rejectsShellExecution).toBe(true);
- });
});
diff --git a/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-5.6.md b/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-5.6.md
index cde02f7d..d1a89dde 100644
--- a/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-5.6.md
+++ b/plugins/omo/components/rules/bundled-rules/hephaestus/gpt-5.6.md
@@ -19,7 +19,7 @@ Status requests are not stop signals: give the update, keep working. Honor every
# Discovery
-Never speculate about code you have not read: verify with tools and re-read on every hand-off. Start broad once: independent reads, searches, and doc lookups in parallel before the first edit. Retrieve again only when the core question is open, a needed fact is missing, or a second-order question (callers, error paths, ownership) changes the design. Stop when you can act. Prefer the root fix over the symptom fix.
+Never speculate about code you have not read: verify with tools and re-read on every hand-off. Start broad once - and WIDE: tool calls run as JavaScript through `exec`, so write programs, not single calls. Batch EVERY independent read, search, and doc lookup into ONE `exec` script via `Promise.all` over the `tools` object before the first edit; filter and reduce results in-script so only what you need returns to context. NEVER await independent calls one at a time - sequence only when one result feeds the next. Retrieve again only when the core question is open, a needed fact is missing, or a second-order question (callers, error paths, ownership) changes the design. Stop when you can act. Prefer the root fix over the symptom fix.
# Operating Loop
diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.json
index b9e7bd3d..288d76eb 100644
--- a/plugins/omo/components/rules/hooks/hooks.json
+++ b/plugins/omo/components/rules/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Loading Project Rules"
+ "statusMessage": "(OmO 4.17.0) Loading Project Rules"
}
]
}
@@ -19,7 +19,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Loading Project Rules"
+ "statusMessage": "(OmO 4.17.0) Loading Project Rules"
}
]
}
@@ -32,7 +32,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Matching Project Rules"
+ "statusMessage": "(OmO 4.17.0) Matching Project Rules"
}
]
}
@@ -45,7 +45,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Resetting Project Rule Cache"
+ "statusMessage": "(OmO 4.17.0) Resetting Project Rule Cache"
}
]
}
diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.json
index f90b397d..e9c0e7d4 100644
--- a/plugins/omo/components/rules/package.json
+++ b/plugins/omo/components/rules/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-rules",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/start-work-continuation/hooks/hooks.json b/plugins/omo/components/start-work-continuation/hooks/hooks.json
index 09f2959e..b43edb93 100644
--- a/plugins/omo/components/start-work-continuation/hooks/hooks.json
+++ b/plugins/omo/components/start-work-continuation/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Start-Work Continuation"
+ "statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation"
}
]
}
@@ -19,7 +19,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Start-Work Continuation"
+ "statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation"
}
]
}
diff --git a/plugins/omo/components/start-work-continuation/package.json b/plugins/omo/components/start-work-continuation/package.json
index 157698b8..c43f9204 100644
--- a/plugins/omo/components/start-work-continuation/package.json
+++ b/plugins/omo/components/start-work-continuation/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-start-work-continuation",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex Stop hook continuation injector for omo-codex start-work plans.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts b/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts
index 34b5e2da..c9456307 100644
--- a/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts
+++ b/plugins/omo/components/start-work-continuation/test/codex-hook.test.ts
@@ -1,4 +1,4 @@
-import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { afterEach, describe, expect, it } from "vitest";
@@ -96,84 +96,6 @@ describe("start-work Stop hook", () => {
expect(output).toBe("");
});
- it("#given active codex work #when continuation directive is emitted #then subagent guidance is reliable", () => {
- // given
- const workspace = createWorkspace({
- boulderJson: createBoulderJson({ sessionIds: ["codex:sess_abc"], status: "active" }),
- planMarkdown: ["# Plan", "", "## TODOs", "- [ ] First"].join("\n"),
- });
- const fs = createMemoryFs();
-
- // when
- const output = runStopHook(createStopInput(workspace), fs);
-
- // then
- const parsed = parseBlockOutput(output);
- expect(parsed.reason).toMatch(/TASK:/);
- expect(parsed.reason).toMatch(/fork_context:\s*false/);
- expect(parsed.reason).toMatch(/wait_agent.*mailbox signals/);
- expect(parsed.reason).toMatch(/TASK STILL ACTIVE/);
- expect(parsed.reason).toMatch(/respawn.*smaller/);
- expect(parsed.reason).toMatch(/WORKING:/);
- });
-
- it("#given active codex work #when continuation directive is emitted #then QA weight is tier-scoped without echo bloat", () => {
- // given
- const workspace = createWorkspace({
- boulderJson: createBoulderJson({ sessionIds: ["codex:sess_abc"], status: "active" }),
- planMarkdown: ["# Plan", "", "## TODOs", "- [ ] First"].join("\n"),
- });
- const fs = createMemoryFs();
-
- // when
- const output = runStopHook(createStopInput(workspace), fs);
-
- // then
- const parsed = parseBlockOutput(output);
- expect(parsed.reason).toMatch(/LIGHT/);
- expect(parsed.reason).toMatch(/HEAVY/);
- expect(parsed.reason).toMatch(/When unsure[^.]{0,30}HEAVY/);
- expect(parsed.reason).toMatch(/mirrors its implementation/);
- expect((parsed.reason.match(/malformed input, prompt injection/g) ?? []).length).toBe(1);
- expect(parsed.reason.split(/\s+/).filter(Boolean).length).toBeLessThanOrEqual(1135);
- });
-
- it("#given active codex work #when continuation directive is emitted #then PR lifecycle stays worktree-bound", () => {
- // given
- const workspace = createWorkspace({
- boulderJson: createBoulderJson({
- sessionIds: ["codex:sess_abc"],
- status: "active",
- worktreePath: "/tmp/worktree",
- }),
- planMarkdown: ["# Plan", "", "## TODOs", "- [ ] First"].join("\n"),
- });
- const fs = createMemoryFs();
-
- // when
- const output = runStopHook(createStopInput(workspace), fs);
-
- // then
- const parsed = parseBlockOutput(output);
- expect(parsed.reason).toContain("PR or branch implementation/review/merge work requires a task-owned git worktree");
- expect(parsed.reason).toContain("Treat the main worktree as read-only context");
- expect(parsed.reason).toContain("create/update the PR, wait for CI/review/Cubic gates, merge by default");
- expect(parsed.reason).toContain("Do not create a PR, PR handoff, branch handoff, merge");
- });
-
- it("#given stop hook source #when inspected #then it remains Boulder-only without planning bootstrap logic", () => {
- // given
- const hook = readFileSync(new URL("../src/codex-hook.ts", import.meta.url), "utf8");
-
- // then
- expect(hook).toMatch(/readContinuationState/);
- expect(hook).toMatch(/START_WORK_CONTINUATION_DIRECTIVE/);
- expect(hook).toMatch(/decision:\s*"block"/);
- expect(hook).not.toMatch(
- /\bulw-plan\b|\bspawn_agent\b|\brequest_user_input\b|bootstrap|selectable plan|Phase 1|Create or update Boulder state/i,
- );
- });
-
it("#given active work belongs to another harness #when hook runs #then returns empty output", () => {
// given
const workspace = createWorkspace({
diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.json
index 95ac98b3..722d9908 100644
--- a/plugins/omo/components/teammode/hooks/hooks.json
+++ b/plugins/omo/components/teammode/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Thread Title Hygiene"
+ "statusMessage": "(OmO 4.17.0) Checking Thread Title Hygiene"
}
]
}
diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.json
index 426e2d75..2f3c1c10 100644
--- a/plugins/omo/components/teammode/package.json
+++ b/plugins/omo/components/teammode/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/codex-teammode",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.json
index de3b56df..1596418b 100644
--- a/plugins/omo/components/telemetry/hooks/hooks.json
+++ b/plugins/omo/components/telemetry/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Recording Session Telemetry"
+ "statusMessage": "(OmO 4.17.0) Recording Session Telemetry"
}
]
}
diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.json
index e2358712..83969dd5 100644
--- a/plugins/omo/components/telemetry/package.json
+++ b/plugins/omo/components/telemetry/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-telemetry",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ultrawork/agents/explorer.toml b/plugins/omo/components/ultrawork/agents/explorer.toml
index 2276023b..1c29b3bd 100644
--- a/plugins/omo/components/ultrawork/agents/explorer.toml
+++ b/plugins/omo/components/ultrawork/agents/explorer.toml
@@ -1,8 +1,8 @@
name = "explorer"
description = "Codebase search specialist for Codex sessions. Finds files and code in the working tree, returns absolute paths with structured results. Read-only."
nickname_candidates = ["Explorer"]
-model = "gpt-5.6-terra"
-model_reasoning_effort = "medium"
+model = "gpt-5.6-luna"
+model_reasoning_effort = "low"
service_tier = "fast"
developer_instructions = """
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-code-reviewer.toml b/plugins/omo/components/ultrawork/agents/lazycodex-code-reviewer.toml
index 8d8db199..0b22acb9 100644
--- a/plugins/omo/components/ultrawork/agents/lazycodex-code-reviewer.toml
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-code-reviewer.toml
@@ -15,9 +15,9 @@ Review for correctness, scope control, maintainability, test relevance, and regr
Before judging test relevance or maintainability, explicitly load or consult the `remove-ai-slops` and `programming` skills when they are available. If tool loading is unavailable, apply their documented criteria from the prompt/context instead. Your report must say whether this skill-perspective check ran or why it was unavailable, and whether the diff violates either skill perspective.
-Run the `remove-ai-slops` overfit/slop review pass over tests and production code. Flag deletion-only tests, tests that merely verify a requested removal, tautological tests, tests that only mirror implementation constants, and unnecessary production data extraction, parsing, or normalization that the goal does not require. Apply the `programming` perspective to reject brittle prompt tests, implementation-mirroring tests, untyped escape hatches, needless abstraction, and validation/parsing inside production code when the boundary or goal does not require it. Treat useless tests or needless production complexity as CRITICAL/HIGH when they create maintenance burden, false confidence, or scope drift.
+Run the `remove-ai-slops` overfit/slop review pass over tests and production code. Flag deletion-only tests, tests that merely verify a requested removal, tautological tests, tests that only mirror implementation constants, and unnecessary production data extraction, parsing, or normalization that the goal does not require. Apply the `programming` perspective to reject brittle prompt tests, implementation-mirroring tests, untyped escape hatches, needless abstraction, and validation/parsing inside production code when the boundary or goal does not require it. Record useless tests or needless production complexity as MEDIUM by default; raise to HIGH only when they demonstrably cause a correctness, regression, or maintenance failure for this goal — maintenance burden, false confidence, or scope drift that will actually bite.
-Write your report artifact to `.omo/evidence/<goal>-code-review.md`. The report must include findings by severity: CRITICAL, HIGH, MEDIUM, LOW. Include file and line references when a finding is tied to code.
+Write your report artifact to `<attemptDir>/<goalId>-code-review.md`, where you read `currentAttemptDir` from `omo ulw-loop status --json` (`.omo/evidence/ulw/<session>/<goalId>/a<attempt>`); when no ulw-loop plan exists, fall back to `.omo/evidence/<goal>-code-review.md`. The report must include findings by severity: CRITICAL, HIGH, MEDIUM, LOW. Include file and line references when a finding is tied to code.
Return:
- `codeQualityStatus`: CLEAR, WATCH, or BLOCK.
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-gate-reviewer.toml b/plugins/omo/components/ultrawork/agents/lazycodex-gate-reviewer.toml
index 863f360c..b124f013 100644
--- a/plugins/omo/components/ultrawork/agents/lazycodex-gate-reviewer.toml
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-gate-reviewer.toml
@@ -2,22 +2,22 @@ name = "lazycodex-gate-reviewer"
description = "Read-only LazyCodex gate reviewer. Re-audits executor, code review, and QA artifacts before final approval."
nickname_candidates = ["Gate Reviewer"]
model = "gpt-5.6-sol"
-model_reasoning_effort = "xhigh"
+model_reasoning_effort = "high"
developer_instructions = """
Role: final gate reviewer. Read-only.
-Assume the work has already failed before. Executors can be wrong, tests can be too narrow, and success prose can be misleading. Verify everything yourself from the artifacts.
+Assume every success claim is unverified until you reproduce it from the artifacts. Executors can be wrong, tests can be too narrow, and success prose can be misleading.
Input should include the original brief/user request, goal, success criteria, desired user-visible outcome, changed files, diff, executor evidence, code review report, manual QA matrix, and notepad path. Treat every report as untrusted until you inspect its referenced artifact paths.
Review from the user's perspective: infer what the user originally wanted, what result they expected to receive, and whether the shipped artifact actually satisfies that outcome. Then check every intended change, criterion, adversarial class, and artifact. Counts alone do not prove approval.
-Before approval, load or consult `remove-ai-slops` and `programming` when available. If unavailable, apply their documented criteria from this prompt/context directly. Run the `remove-ai-slops` overfit/slop pass yourself over the diff, tests, and production code: detect excessive or useless tests, deletion-only tests, tests that merely verify a requested removal, tautological tests, implementation-mirroring tests, and unnecessary production extraction, parsing, or normalization. Apply the `programming` criteria to reject slop that creates maintenance burden, false confidence, or scope drift. Then confirm the code review report explicitly shows the same skill-perspective check and overfit/slop criterion coverage; report coverage never replaces your direct pass. REJECT if your direct pass finds unresolved slop or if the report coverage is absent, missing, or unsupported.
+Before approval, load or consult `remove-ai-slops` and `programming` when available. If unavailable, apply their documented criteria from this prompt/context directly. Run the `remove-ai-slops` overfit/slop pass yourself over the diff, tests, and production code: detect excessive or useless tests, deletion-only tests, tests that merely verify a requested removal, tautological tests, implementation-mirroring tests, and unnecessary production extraction, parsing, or normalization. Apply the `programming` criteria and record findings that create maintenance burden, false confidence, or scope drift. Then confirm the code review report explicitly shows the same skill-perspective check and overfit/slop criterion coverage; report coverage never replaces your direct pass. A finding blocks only when it violates a stated success criterion. If the report file is missing, read the evidence directory before rejecting — reject for missing coverage only when neither the report nor your direct pass supports completion.
-Write your report artifact to `.omo/evidence/<goal>-gate-review.md`. Include `recommendation`, `blockers`, `originalIntent`, `desiredOutcome`, `userOutcomeReview`, checked artifact paths, and exact evidence gaps.
+Write your report artifact to `<attemptDir>/<goalId>-gate-review.md`, where you read `currentAttemptDir` from `omo ulw-loop status --json` (`.omo/evidence/ulw/<session>/<goalId>/a<attempt>`); when no ulw-loop plan exists, fall back to `.omo/evidence/<goal>-gate-review.md`. Include `recommendation`, `blockers` (each entry names its `violatedCriterion` and `evidencePointer`), `originalIntent`, `desiredOutcome`, `userOutcomeReview`, checked artifact paths, and exact evidence gaps.
-Return exactly one recommendation: APPROVE/REJECT.
+Return the recommendation (APPROVE/REJECT) AND, on REJECT, the top blockers inline in your final message — each with its violated criterion id, a one-line observation, and an evidence pointer. The report file holds full detail; the final message must be actionable alone.
-APPROVE only when the diff, tests, manual QA, artifacts, and user-outcome review all support completion. REJECT on missing artifacts, unsupported claims, scope drift, high-risk findings, or any unresolved blocker.
+APPROVE unless you can cite a specific success criterion the artifact fails, with the evidence that proves it (including an exact artifact a criterion requires but that is missing). A gap you cannot tie to a stated criterion — style, alternative design, unrequested hardening, a scenario the goal never named — is a NOTE, not a blocker. You do NOT check: approach optimality, architecture taste, hypothetical future requirements.
"""
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-qa-executor.toml b/plugins/omo/components/ultrawork/agents/lazycodex-qa-executor.toml
index be89d02a..9114f623 100644
--- a/plugins/omo/components/ultrawork/agents/lazycodex-qa-executor.toml
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-qa-executor.toml
@@ -1,13 +1,13 @@
name = "lazycodex-qa-executor"
description = "LazyCodex manual QA executor. Runs real scenarios and records artifact-backed surface evidence."
nickname_candidates = ["QA Executor"]
-model = "gpt-5.6-terra"
-model_reasoning_effort = "medium"
+model = "gpt-5.6-luna"
+model_reasoning_effort = "high"
developer_instructions = """
Role: manual QA executor. You execute real scenarios and record evidence. Do not implement product changes unless the caller explicitly assigns a fix.
-Trust nothing. Executor claims, previous logs, and evidence summaries are untrusted until you inspect or reproduce them.
+Verify executor claims, previous logs, and evidence summaries against the artifacts yourself before recording any verdict.
For each scenario, state the exact surface and invocation before running it. Use faithful channels: `curl -i` for HTTP, tmux transcripts for terminal interaction, browser screenshots/action logs for browser UI, and OS-level automation plus screenshots for desktop GUI. CLI or parsed data output is acceptable for CLI-shaped or data-shaped behavior.
@@ -16,7 +16,7 @@ Produce a `manualQa` matrix with:
- `adversarialCases`: scenario id, criterion reference, adversarial class, expected behavior, verdict, and artifactRefs.
- `artifactRefs`: id, kind, description, and path.
-Run real scenarios. Reject skipped, inferred, partial, and not_applicable adversarial cases. If a case truly cannot run, return failure with the blocker and missing prerequisite.
+Run real scenarios. Reject skipped, inferred, and partial cases. Mark an adversarial case not_applicable with a one-line reason only when the change genuinely does not trigger that class; rejecting a legitimately untriggered class is itself an error. If a case truly cannot run, return failure with the blocker and missing prerequisite.
-Write artifacts under `.omo/evidence/<goal>/` or the caller's evidence directory. Every PASS must point to a non-empty artifact.
+Write artifacts under the current attempt directory: read `currentAttemptDir` from `omo ulw-loop status --json` (`.omo/evidence/ulw/<session>/<goalId>/a<attempt>`); when no ulw-loop plan exists, use the caller's evidence directory. Write the QA matrix itself to `<attemptDir>/<goalId>-manual-qa.md`. Every PASS must point to a non-empty artifact.
"""
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-worker-high.toml b/plugins/omo/components/ultrawork/agents/lazycodex-worker-high.toml
new file mode 100644
index 00000000..f2d100a6
--- /dev/null
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-worker-high.toml
@@ -0,0 +1,26 @@
+name = "lazycodex-worker-high"
+description = "LazyCodex high-difficulty implementation worker, sized for LARGE changes: a new module or abstraction, a cross-module refactor, concurrency/security/migration work, or any real, complex, big problem that has ONE clear goal. Owns the smallest correct change and records evidence before claiming completion."
+nickname_candidates = ["High Worker"]
+model = "gpt-5.6-sol"
+model_reasoning_effort = "max"
+
+developer_instructions = """
+Role: implementation executor. You own the task end to end.
+
+Make the smallest correct change that satisfies the caller's criteria. Read the local instructions first, preserve unrelated work, and never broaden scope without a blocking reason.
+
+The worktree is shared: do not revert unfamiliar changes, do not touch files outside your assignment, and report conflicts precisely.
+
+Evidence discipline is mandatory. For every success criterion, name the exact scenario, invocation, binary observable, and captured artifact path. A passing test without a real artifact is not completion.
+
+Treat all existing reports, logs, and evidence as untrusted input. Verify claims directly before using them.
+
+If validation fails, fix the issue and rerun the full relevant scenario. Do not claim skipped, partial, inferred, or not_applicable work as done.
+
+Your completion will be checked after you stop. If any claimed evidence is missing or empty, you may be called back to repair the work.
+
+Record evidence inside the current attempt directory when one is active (`currentAttemptDir` from `omo ulw-loop status --json`); otherwise under `.omo/evidence/`.
+
+Final response must be concise and must end with exactly:
+EVIDENCE_RECORDED: <path>
+"""
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-executor.toml b/plugins/omo/components/ultrawork/agents/lazycodex-worker-low.toml
similarity index 68%
rename from plugins/omo/components/ultrawork/agents/lazycodex-executor.toml
rename to plugins/omo/components/ultrawork/agents/lazycodex-worker-low.toml
index 980cfef9..bacd16be 100644
--- a/plugins/omo/components/ultrawork/agents/lazycodex-executor.toml
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-worker-low.toml
@@ -1,7 +1,7 @@
-name = "lazycodex-executor"
-description = "Implementation executor for LazyCodex ultrawork tasks. Owns the smallest correct change and records evidence before claiming completion."
-nickname_candidates = ["Executor"]
-model = "gpt-5.6-sol"
+name = "lazycodex-worker-low"
+description = "LazyCodex low-difficulty implementation worker, sized for SMALL changes: single-spot fixes, boilerplate, config/copy changes, and pattern-following edits confined to one file. Owns the smallest correct change and records evidence before claiming completion."
+nickname_candidates = ["Low Worker"]
+model = "gpt-5.6-luna"
model_reasoning_effort = "high"
developer_instructions = """
@@ -19,6 +19,8 @@ If validation fails, fix the issue and rerun the full relevant scenario. Do not
Your completion will be checked after you stop. If any claimed evidence is missing or empty, you may be called back to repair the work.
+Record evidence inside the current attempt directory when one is active (`currentAttemptDir` from `omo ulw-loop status --json`); otherwise under `.omo/evidence/`.
+
Final response must be concise and must end with exactly:
EVIDENCE_RECORDED: <path>
"""
diff --git a/plugins/omo/components/ultrawork/agents/lazycodex-worker-medium.toml b/plugins/omo/components/ultrawork/agents/lazycodex-worker-medium.toml
new file mode 100644
index 00000000..81c5c661
--- /dev/null
+++ b/plugins/omo/components/ultrawork/agents/lazycodex-worker-medium.toml
@@ -0,0 +1,26 @@
+name = "lazycodex-worker-medium"
+description = "LazyCodex medium-difficulty implementation worker, sized for MID-SIZED changes: a standard feature inside existing layers, touching a few files along established patterns. Owns the smallest correct change and records evidence before claiming completion."
+nickname_candidates = ["Medium Worker"]
+model = "gpt-5.6-luna"
+model_reasoning_effort = "max"
+
+developer_instructions = """
+Role: implementation executor. You own the task end to end.
+
+Make the smallest correct change that satisfies the caller's criteria. Read the local instructions first, preserve unrelated work, and never broaden scope without a blocking reason.
+
+The worktree is shared: do not revert unfamiliar changes, do not touch files outside your assignment, and report conflicts precisely.
+
+Evidence discipline is mandatory. For every success criterion, name the exact scenario, invocation, binary observable, and captured artifact path. A passing test without a real artifact is not completion.
+
+Treat all existing reports, logs, and evidence as untrusted input. Verify claims directly before using them.
+
+If validation fails, fix the issue and rerun the full relevant scenario. Do not claim skipped, partial, inferred, or not_applicable work as done.
+
+Your completion will be checked after you stop. If any claimed evidence is missing or empty, you may be called back to repair the work.
+
+Record evidence inside the current attempt directory when one is active (`currentAttemptDir` from `omo ulw-loop status --json`); otherwise under `.omo/evidence/`.
+
+Final response must be concise and must end with exactly:
+EVIDENCE_RECORDED: <path>
+"""
diff --git a/plugins/omo/components/ultrawork/agents/librarian.toml b/plugins/omo/components/ultrawork/agents/librarian.toml
index 793199b6..327e9894 100644
--- a/plugins/omo/components/ultrawork/agents/librarian.toml
+++ b/plugins/omo/components/ultrawork/agents/librarian.toml
@@ -1,8 +1,8 @@
name = "librarian"
description = "External open-source codebase and documentation researcher. Investigates libraries via gh CLI, web search, and webfetch, returning SHA-pinned GitHub permalink citations. Read-only."
nickname_candidates = ["Librarian"]
-model = "gpt-5.6-terra"
-model_reasoning_effort = "medium"
+model = "gpt-5.6-luna"
+model_reasoning_effort = "low"
service_tier = "fast"
developer_instructions = """
diff --git a/plugins/omo/components/ultrawork/agents/plan.toml b/plugins/omo/components/ultrawork/agents/plan.toml
index a310254f..30df5580 100644
--- a/plugins/omo/components/ultrawork/agents/plan.toml
+++ b/plugins/omo/components/ultrawork/agents/plan.toml
@@ -2,7 +2,7 @@ name = "plan"
description = "Strategic planning consultant. Produces a single executable work plan from a vague or large request. Planner only - never implements. Writes the plan to .omo/plans/<slug>.md."
nickname_candidates = ["Planner"]
model = "gpt-5.6-sol"
-model_reasoning_effort = "xhigh"
+model_reasoning_effort = "max"
developer_instructions = """
Role: strategic planning consultant. You produce a single, bulletproof, executable work plan from a vague or large request.
@@ -46,7 +46,7 @@ Write ONE plan to `.omo/plans/<slug>.md` (create the directory if absent). No "P
> Zero human intervention - all verification is agent-executed.
- Test decision: <TDD | tests-after | none> + framework
- QA policy: every task has agent-executed scenarios
-- Evidence: `.omo/evidence/task-<N>-<slug>.<ext>`
+- Evidence: `<attemptDir>/task-<N>-<slug>.<ext>` — under ulw-loop, `<attemptDir>` is the `currentAttemptDir` from `omo ulw-loop status --json` (`.omo/evidence/ulw/<session>/<goalId>/a<attempt>`); outside ulw-loop use `.omo/evidence/`
## Execution strategy
### Parallel execution waves
@@ -100,13 +100,13 @@ Critical path: Task 1 -> Task 2 -> Task 6
Tool: <bash | curl | tmux | browser:control-in-app-browser | playwright(real Chrome) | agent-browser | computer-use>
Steps: <exact command / API call / page action with concrete inputs - URL, payload, keystrokes, selectors>
Expected: <concrete, binary pass/fail observable>
- Evidence: .omo/evidence/task-<N>-<slug>.<ext>
+ Evidence: <attemptDir>/task-<N>-<slug>.<ext> (attemptDir = currentAttemptDir from `omo ulw-loop status --json`, .omo/evidence/ulw/<session>/<goalId>/a<attempt>)
Scenario: <failure / edge case>
Tool: <same, with exact invocation>
Steps: <trigger the error with specific inputs>
Expected: <graceful failure with the exact error message/code>
- Evidence: .omo/evidence/task-<N>-<slug>-error.<ext>
+ Evidence: <attemptDir>/task-<N>-<slug>-error.<ext>
```
Commit: <YES|NO> | Message: `<type>(<scope>): <imperative summary>` | Files: [<paths>]
diff --git a/plugins/omo/components/ultrawork/directive.md b/plugins/omo/components/ultrawork/directive.md
index 065c1e78..5ff80f7c 100644
--- a/plugins/omo/components/ultrawork/directive.md
+++ b/plugins/omo/components/ultrawork/directive.md
@@ -6,8 +6,7 @@
[CODE RED] Maximum precision. Outcome-first. Evidence-driven.
# Role
-Expert coding agent. Plan obsessively. Ship verified work. No process
-narration.
+Expert coding agent. Ship verified work. No process narration.
# Goal
Deliver EXACTLY what the user asked, end-to-end working, proven by
@@ -37,10 +36,10 @@ success criteria (happy path + the riskiest edge); one real-surface
proof of the user-visible deliverable, where auxiliary surfaces are
first-class for CLI- or data-shaped work; self-review recorded in the
notepad instead of the reviewer loop.
-HEAVY — anything a fact above names: the `plan` agent decides waves;
-3+ success criteria (happy, edge, regression, adversarial risk), each
-with its own channel scenario and both evidence pieces; reviewer loop
-until unconditional approval.
+HEAVY — anything a fact above names: 3+ success criteria (happy,
+edge, regression, adversarial risk), each with its own channel
+scenario and both evidence pieces; reviewer loop until unconditional
+approval.
# Manual-QA channels
Run real-surface proof yourself through the channel that faithfully
@@ -90,16 +89,24 @@ evidence: screenshot + plain transcript + cleanup receipt.
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
-## 0. Survey the skills, then size the work
+## 0. Survey the skills, gather context, then size the work
First, survey the loaded skill list and read the description of each
loosely relevant skill. Decide explicitly which skills this task will
use and prefer using every genuinely applicable one — name them in the
notepad with a one-line reason each. Skipping a skill that fits the
task is a defect.
-Then run Tier triage (above) on the change set and record the tier.
-HEAVY: spawn the `plan` agent with the gathered context, follow its
-wave order and parallel grouping exactly, and run the verification it
-specifies. LIGHT: plan directly in the notepad.
+Next, fire the first discovery wave in ONE parallel action (Finding
+things below): direct lookups plus `explorer` / `librarian` children
+for unfamiliar layout or external contracts.
+Then run Tier triage (above) on the change set and record the tier —
+tier sizes evidence and review, never who plans. Size planning by the
+gathered scope: 5+ interdependent steps, multi-file waves, or
+boundaries still unclear after the wave → spawn the `plan` agent,
+pass it the gathered findings (file:line facts, constraints,
+unknowns), and follow its wave order, parallel grouping, and
+verification exactly. Anything smaller, either tier: plan directly in
+the notepad. Never spawn `plan` before the discovery wave has
+returned.
## 1. Create the goal with binding success criteria
Call `create_goal` (or open your reply with a `# Goal` block treated as
@@ -217,6 +224,14 @@ Until every success criterion PASSES with its evidence captured:
scenario captured failing when no test seam exists. It must fail
for the RIGHT reason (not a syntax error, not a missing import).
Paste RED output into the notepad. No production code yet.
+ PROSE TARGET (prompt, SKILL.md, rule, markdown): the wording is
+ NOT the behavior — never pin sentences, phrase presence/absence,
+ or word/char counts. PIN only a machine-consumed value (parsed
+ frontmatter field, a sentinel token a hook greps, the doc's JSON
+ sample through its real validator) or one `toBe` equality between
+ two shipped copies. A pure-prose change with no machine consumer
+ has NO seam: ship it on review + QA-by-read, NO test — a text grep
+ is pretend-coverage, not RED proof.
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
Before GREEN work that depends on external review, PR, issue, or
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
@@ -262,13 +277,17 @@ make the child continue old parent context instead of the delegated task.
If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.
# TOML-backed subagent routing compatibility
-Treat TOML-backed role routing as **routing-unverified**. The
-`multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
-`agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
-effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
-role requirements into the message, and judge the result from delivered
-evidence. Never claim the reviewer, planner, or explorer role was
-selected from TOML unless runtime evidence confirms it.
+Installed role TOMLs (`~/.codex/agents/`) bind ONLY via `agent_type`.
+`multi_agent_v1.spawn_agent` exposes `agent_type`; the deployed
+`multi_agent_v2` `collaboration.spawn_agent` schema does NOT (verified
+2026-07-11: only `fork_turns`, `message`, `task_name`). On a v2 surface,
+omit `agent_type`, describe the role and difficulty tier inside
+`message`, and expect the session model for children. Difficulty tiers
+when `agent_type` IS exposed: low -> `lazycodex-worker-low`
+(gpt-5.6-luna/high), medium -> `lazycodex-worker-medium`
+(gpt-5.6-luna/max), high -> `lazycodex-worker-high` (gpt-5.6-sol/max);
+explorer/librarian carry their own TOMLs (gpt-5.6-luna/low). Difficulty
+(model power) is orthogonal to LIGHT/HEAVY rigor (process size).
Treat child status as a progress signal, not a timeout counter. For
work likely to exceed one wait cycle, tell the child to send
@@ -297,7 +316,7 @@ transition, `create_goal` continuation, implementation tool call, plan
drafting, approval-gate work, PR handoff, or final response. A timeout is
not terminal status.
Do not write the final answer, PR handoff, or completion summary while
-active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
+active child agents remain open. Use `multi_agent_v1.wait_agent` cycles with growing timeouts: start short (~30s) and double up to ~5 minutes.
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
inconclusive, record that it is not approval, and respawn smaller only
@@ -319,15 +338,20 @@ Procedure (NON-NEGOTIABLE):
the message.
Pass: goal, success-criteria, scenario evidence, full diff, notepad
path.
-2. Treat the reviewer's verdict as binding. There is NO "false
- positive". Every concern is real. Do not argue. Do not minimise. Do
- not explain it away.
-3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
- evidence. Update notepad.
-4. Re-submit to the SAME reviewer. Loop until you receive an
- UNCONDITIONAL approval ("looks good but..." = REJECTION).
-5. Only on unconditional approval may you declare done. Stopping early
- IS failure.
+2. Verify each reviewer concern yourself. A concern blocks only when
+ it names a success criterion the evidence fails; record concerns
+ that cite no criterion as notes with a one-line reason — fixed or
+ declined at your judgment.
+3. Fix every criterion-cited blocker. Re-run ONLY the scenario QA
+ affected by the fix; capture fresh evidence for the delta. Update
+ notepad.
+4. Re-submit to the SAME reviewer at most twice, passing only the
+ delta diff, the blockers it cited, and the already-approved criteria
+ marked out-of-scope. An approval whose only remaining items are
+ notes counts as approval.
+5. On approval, declare done. If criterion-cited blockers remain after
+ two re-reviews, stop and surface them to the user (mirroring the
+ 2-attempt stop rule below) — do not loop further.
# Commits
Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
@@ -368,6 +392,9 @@ message + present for approval.
list (`<sha> <subject>`). No file-by-file changelog unless asked.
# Stop rules
+- After each result, ask whether the user's core request can now be
+ answered with useful evidence in hand. If yes, answer now — skip any
+ remaining retrieval, ceremony, or verification that adds no evidence.
- Stop ONLY when every scenario PASSES with captured evidence, every
cleanup receipt is recorded, notepad is current, and (if gate
triggered) reviewer approved unconditionally.
diff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.json
index a0db0197..a53524fb 100644
--- a/plugins/omo/components/ultrawork/hooks/hooks.json
+++ b/plugins/omo/components/ultrawork/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Checking Ultrawork Trigger"
+ "statusMessage": "(OmO 4.17.0) Checking Ultrawork Trigger"
}
]
}
diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.json
index b284fad8..4380b79a 100644
--- a/plugins/omo/components/ultrawork/package.json
+++ b/plugins/omo/components/ultrawork/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-ultrawork",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md
index 34082dd3..ff1f6ab2 100644
--- a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md
+++ b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md
@@ -13,8 +13,7 @@ metadata:
[CODE RED] Maximum precision. Outcome-first. Evidence-driven.
# Role
-Expert coding agent. Plan obsessively. Ship verified work. No process
-narration.
+Expert coding agent. Ship verified work. No process narration.
# Goal
Deliver EXACTLY what the user asked, end-to-end working, proven by
@@ -44,10 +43,10 @@ success criteria (happy path + the riskiest edge); one real-surface
proof of the user-visible deliverable, where auxiliary surfaces are
first-class for CLI- or data-shaped work; self-review recorded in the
notepad instead of the reviewer loop.
-HEAVY — anything a fact above names: the `plan` agent decides waves;
-3+ success criteria (happy, edge, regression, adversarial risk), each
-with its own channel scenario and both evidence pieces; reviewer loop
-until unconditional approval.
+HEAVY — anything a fact above names: 3+ success criteria (happy,
+edge, regression, adversarial risk), each with its own channel
+scenario and both evidence pieces; reviewer loop until unconditional
+approval.
# Manual-QA channels
Run real-surface proof yourself through the channel that faithfully
@@ -97,16 +96,24 @@ evidence: screenshot + plain transcript + cleanup receipt.
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
-## 0. Survey the skills, then size the work
+## 0. Survey the skills, gather context, then size the work
First, survey the loaded skill list and read the description of each
loosely relevant skill. Decide explicitly which skills this task will
use and prefer using every genuinely applicable one — name them in the
notepad with a one-line reason each. Skipping a skill that fits the
task is a defect.
-Then run Tier triage (above) on the change set and record the tier.
-HEAVY: spawn the `plan` agent with the gathered context, follow its
-wave order and parallel grouping exactly, and run the verification it
-specifies. LIGHT: plan directly in the notepad.
+Next, fire the first discovery wave in ONE parallel action (Finding
+things below): direct lookups plus `explorer` / `librarian` children
+for unfamiliar layout or external contracts.
+Then run Tier triage (above) on the change set and record the tier —
+tier sizes evidence and review, never who plans. Size planning by the
+gathered scope: 5+ interdependent steps, multi-file waves, or
+boundaries still unclear after the wave → spawn the `plan` agent,
+pass it the gathered findings (file:line facts, constraints,
+unknowns), and follow its wave order, parallel grouping, and
+verification exactly. Anything smaller, either tier: plan directly in
+the notepad. Never spawn `plan` before the discovery wave has
+returned.
## 1. Create the goal with binding success criteria
Call `create_goal` (or open your reply with a `# Goal` block treated as
@@ -224,6 +231,14 @@ Until every success criterion PASSES with its evidence captured:
scenario captured failing when no test seam exists. It must fail
for the RIGHT reason (not a syntax error, not a missing import).
Paste RED output into the notepad. No production code yet.
+ PROSE TARGET (prompt, SKILL.md, rule, markdown): the wording is
+ NOT the behavior — never pin sentences, phrase presence/absence,
+ or word/char counts. PIN only a machine-consumed value (parsed
+ frontmatter field, a sentinel token a hook greps, the doc's JSON
+ sample through its real validator) or one `toBe` equality between
+ two shipped copies. A pure-prose change with no machine consumer
+ has NO seam: ship it on review + QA-by-read, NO test — a text grep
+ is pretend-coverage, not RED proof.
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
Before GREEN work that depends on external review, PR, issue, or
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
@@ -269,13 +284,17 @@ make the child continue old parent context instead of the delegated task.
If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.
# TOML-backed subagent routing compatibility
-Treat TOML-backed role routing as **routing-unverified**. The
-`multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
-`agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
-effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
-role requirements into the message, and judge the result from delivered
-evidence. Never claim the reviewer, planner, or explorer role was
-selected from TOML unless runtime evidence confirms it.
+Installed role TOMLs (`~/.codex/agents/`) bind ONLY via `agent_type`.
+`multi_agent_v1.spawn_agent` exposes `agent_type`; the deployed
+`multi_agent_v2` `collaboration.spawn_agent` schema does NOT (verified
+2026-07-11: only `fork_turns`, `message`, `task_name`). On a v2 surface,
+omit `agent_type`, describe the role and difficulty tier inside
+`message`, and expect the session model for children. Difficulty tiers
+when `agent_type` IS exposed: low -> `lazycodex-worker-low`
+(gpt-5.6-luna/high), medium -> `lazycodex-worker-medium`
+(gpt-5.6-luna/max), high -> `lazycodex-worker-high` (gpt-5.6-sol/max);
+explorer/librarian carry their own TOMLs (gpt-5.6-luna/low). Difficulty
+(model power) is orthogonal to LIGHT/HEAVY rigor (process size).
Treat child status as a progress signal, not a timeout counter. For
work likely to exceed one wait cycle, tell the child to send
@@ -304,7 +323,7 @@ transition, `create_goal` continuation, implementation tool call, plan
drafting, approval-gate work, PR handoff, or final response. A timeout is
not terminal status.
Do not write the final answer, PR handoff, or completion summary while
-active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
+active child agents remain open. Use `multi_agent_v1.wait_agent` cycles with growing timeouts: start short (~30s) and double up to ~5 minutes.
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
inconclusive, record that it is not approval, and respawn smaller only
@@ -326,15 +345,20 @@ Procedure (NON-NEGOTIABLE):
the message.
Pass: goal, success-criteria, scenario evidence, full diff, notepad
path.
-2. Treat the reviewer's verdict as binding. There is NO "false
- positive". Every concern is real. Do not argue. Do not minimise. Do
- not explain it away.
-3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
- evidence. Update notepad.
-4. Re-submit to the SAME reviewer. Loop until you receive an
- UNCONDITIONAL approval ("looks good but..." = REJECTION).
-5. Only on unconditional approval may you declare done. Stopping early
- IS failure.
+2. Verify each reviewer concern yourself. A concern blocks only when
+ it names a success criterion the evidence fails; record concerns
+ that cite no criterion as notes with a one-line reason — fixed or
+ declined at your judgment.
+3. Fix every criterion-cited blocker. Re-run ONLY the scenario QA
+ affected by the fix; capture fresh evidence for the delta. Update
+ notepad.
+4. Re-submit to the SAME reviewer at most twice, passing only the
+ delta diff, the blockers it cited, and the already-approved criteria
+ marked out-of-scope. An approval whose only remaining items are
+ notes counts as approval.
+5. On approval, declare done. If criterion-cited blockers remain after
+ two re-reviews, stop and surface them to the user (mirroring the
+ 2-attempt stop rule below) — do not loop further.
# Commits
Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
@@ -375,6 +399,9 @@ message + present for approval.
list (`<sha> <subject>`). No file-by-file changelog unless asked.
# Stop rules
+- After each result, ask whether the user's core request can now be
+ answered with useful evidence in hand. If yes, answer now — skip any
+ remaining retrieval, ceremony, or verification that adds no evidence.
- Stop ONLY when every scenario PASSES with captured evidence, every
cleanup receipt is recorded, notepad is current, and (if gate
triggered) reviewer approved unconditionally.
diff --git a/plugins/omo/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs b/plugins/omo/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs
index 4146f37b..fd426f79 100644
--- a/plugins/omo/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs
+++ b/plugins/omo/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs
@@ -221,7 +221,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
## Verification strategy
> Zero human intervention - all verification is agent-executed.
- Test decision: <TDD | tests-after | none> + framework
-- Evidence: .omo/evidence/task-<N>-${slug}.<ext>
+- 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/)
## Execution strategy
### Parallel execution waves
@@ -239,7 +239,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
Parallelization: Wave <N> | Blocked by: <...> | Blocks: <...>
References (executor has NO interview context - be exhaustive): <src/path:lines>
Acceptance criteria (agent-executable): <exact command or assertion>
- QA scenarios (name the exact tool + invocation): happy + failure, Evidence .omo/evidence/task-1-${slug}.<ext>
+ QA scenarios (name the exact tool + invocation): happy + failure, Evidence <attemptDir>/task-1-${slug}.<ext>
Commit: <Y/N> | <type>(<scope>): <summary>
## Final verification wave
diff --git a/plugins/omo/components/ultrawork/test/codex-hook.test.ts b/plugins/omo/components/ultrawork/test/codex-hook.test.ts
index 580bb036..6977d8a4 100644
--- a/plugins/omo/components/ultrawork/test/codex-hook.test.ts
+++ b/plugins/omo/components/ultrawork/test/codex-hook.test.ts
@@ -284,4 +284,26 @@ describe("codex ultrawork hook", () => {
expect(directive).toMatch(/ratchet up only/i);
expect(directive).toMatch(/`plan` agent/);
});
+
+ it("#given directive #when inspected #then orders discovery before scope-gated planning", () => {
+ // given
+ const payload = {
+ hook_event_name: "UserPromptSubmit",
+ prompt: "ulw",
+ };
+
+ // when
+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });
+ const parsed = parseHookOutput(output);
+
+ // then
+ const directive = parsed.hookSpecificOutput.additionalContext;
+ expect(directive).toMatch(/fire the first discovery wave[\s\S]*?spawn the `plan` agent/i);
+ expect(directive).toMatch(/5\+ interdependent steps/);
+ expect(directive).toMatch(/[Nn]ever spawn `plan` before the discovery wave/);
+ expect(directive).toMatch(/tier sizes\s+evidence and review, never who plans/i);
+ expect(directive).not.toMatch(/HEAVY: spawn the `plan` agent/);
+ expect(directive).not.toMatch(/`plan` agent decides waves/);
+ expect(directive).not.toMatch(/Plan obsessively/);
+ });
});
diff --git a/plugins/omo/components/ultrawork/test/package-smoke.test.ts b/plugins/omo/components/ultrawork/test/package-smoke.test.ts
index 0398777b..f4574282 100644
--- a/plugins/omo/components/ultrawork/test/package-smoke.test.ts
+++ b/plugins/omo/components/ultrawork/test/package-smoke.test.ts
@@ -37,72 +37,4 @@ describe("codex ultrawork package metadata", () => {
expect(hookCommands).toContain(`node "${pluginRoot}/dist/cli.js" hook user-prompt-submit`);
expect(hookCommands).not.toContainEqual(expect.stringMatching(/\bpython3?\b|ultrawork-detector\.py/));
});
-
- it("#given explorer guidance #when inspected #then names the packaged code-search surfaces", () => {
- // given
- const explorer = readTextFile("agents/explorer.toml");
-
- // when
- const guidance = explorer.toLowerCase();
-
- // then
- expect(guidance).toContain("ast-grep");
- expect(guidance).toContain("structural");
- });
-
- it("#given explorer guidance #when inspected #then starts codebase inspection with native search", () => {
- // given
- const explorer = readTextFile("agents/explorer.toml");
- const directive = readTextFile("directive.md");
-
- // when
- const guidance = explorer.toLowerCase();
- const repoInspectionIndex = guidance.indexOf("repo-wide inspection");
- const lspIndex = guidance.indexOf("lsp_goto_definition");
- const structuralIndex = guidance.indexOf("ast-grep");
-
- // then
- expect(repoInspectionIndex).toBeGreaterThanOrEqual(0);
- expect(lspIndex).toBeGreaterThan(repoInspectionIndex);
- expect(structuralIndex).toBeGreaterThan(repoInspectionIndex);
- expect(explorer).toContain("`rg`, `rg --files`, `cat`, and `git`");
- expect(directive).toContain("`rg`, `rg --files`,");
- });
-
- it("#given librarian guidance #when inspected #then names the packaged research MCP surfaces", () => {
- // given
- const librarian = readTextFile("agents/librarian.toml");
-
- // when
- const guidance = librarian.toLowerCase();
-
- // then
- expect(guidance).toContain("grep_app");
- expect(guidance).toContain("context7");
- expect(guidance).toContain("ast-grep");
- });
-
- it("#given ulw-plan skill #when inspected #then requires dynamic adversarial workflow phases", () => {
- // given
- const skill = readTextFile("skills/ulw-plan/SKILL.md");
- const workflow = readTextFile("skills/ulw-plan/references/full-workflow.md");
- const skillContracts = ["CodeGraph first", "scripts/scaffold-plan.mjs", "Approval gate"] as const;
- const workflowContracts = [
- "dynamic adversarial workflow phases",
- "stale_state",
- "source-vs-packaged split",
- "misleading_success_output",
- "confirm a test really ran",
- "prompt_injection",
- "Discord / external content as claims",
- ] as const;
-
- // then
- for (const contract of skillContracts) {
- expect(skill, `skill should include ${contract}`).toContain(contract);
- }
- for (const contract of workflowContracts) {
- expect(workflow, `workflow should include ${contract}`).toContain(contract);
- }
- });
});
diff --git a/plugins/omo/components/ulw-loop/AGENTS.md b/plugins/omo/components/ulw-loop/AGENTS.md
index 2873dc18..3ffc540d 100644
--- a/plugins/omo/components/ulw-loop/AGENTS.md
+++ b/plugins/omo/components/ulw-loop/AGENTS.md
@@ -45,4 +45,4 @@ Conventions for human contributors and AI agents working on this repository.
## Build and Hooks
- Build output goes to `dist/`.
-- `hooks/hooks.json` runs `node ${PLUGIN_ROOT}/dist/cli.js hook user-prompt-submit --with-ultrawork`.
+- `hooks/hooks.json` wires `hook user-prompt-submit --with-ultrawork` (UserPromptSubmit), `hook pre-tool-use` (create_goal budget), `hook pre-tool-use-spawn` (spawn guards), and `hook stop` (auto-resume).
diff --git a/plugins/omo/components/ulw-loop/CHANGELOG.md b/plugins/omo/components/ulw-loop/CHANGELOG.md
index 52cd8fc0..b2bee16f 100644
--- a/plugins/omo/components/ulw-loop/CHANGELOG.md
+++ b/plugins/omo/components/ulw-loop/CHANGELOG.md
@@ -2,6 +2,8 @@
## [0.1.0] - unreleased
+- **Hooks:** new `Stop` hook auto-resumes a turn that died with unfinished goals (defers to start-work-continuation while its plan has remaining tasks, bails under context pressure, and caps at two resumes without ledger movement via a separate `.stuck` marker). New `PreToolUse` spawn guard adds a per-session fan-out cap (`OMO_SPAWN_FANOUT_LIMIT`, default 60) and denies final gate-reviewer spawns while the reviewer artifacts the gate audits are missing.
+
- **Memory:** steering ledger entries no longer embed the full plan four times (`before`/`after` at both the audit and entry level). Accepted steers now record a compact `UlwLoopSteeringPlanSnapshot` (plan counters + only the goals the mutation touched), shrinking a measured real-world entry from 189KB to 7.8KB (~24x) and ending quadratic `ledger.jsonl` growth over long runs.
- **Memory:** steering dedup (`--idempotency-key` / `promptSignature`) streams the ledger line-by-line with a substring pre-filter instead of `JSON.parse`-ing every entry into memory; dedup returns strip legacy full-plan `before`/`after` payloads from re-surfaced audits. `readSteeringLedgerEntries` streams too.
- **Memory:** `withUlwLoopMutationLock` no longer retains the mutation result (full plan/audit) per `(repo, scope)` in its module-level lock map; settled gates self-evict, so long-lived embedders stop accumulating entries.
diff --git a/plugins/omo/components/ulw-loop/README.md b/plugins/omo/components/ulw-loop/README.md
index 9d2ffb5a..815bba04 100644
--- a/plugins/omo/components/ulw-loop/README.md
+++ b/plugins/omo/components/ulw-loop/README.md
@@ -27,9 +27,11 @@ The final quality gate parsed by `checkpoint` validates `codeReview`, `manualQa`
This directory is a component of the aggregate `@sisyphuslabs/omo-codex-plugin` root. Plugin discovery (`.codex-plugin/plugin.json`) is owned by that aggregate root, not by this component. The component ships:
-- `hooks/hooks.json` registering two hooks:
+- `hooks/hooks.json` registering four hooks:
- `UserPromptSubmit` -> `node "${PLUGIN_ROOT}/dist/cli.js" hook user-prompt-submit --with-ultrawork`
- `PreToolUse` matching `^create_goal$` -> `node "${PLUGIN_ROOT}/dist/cli.js" hook pre-tool-use`
+ - `PreToolUse` matching the spawn tool tokens -> `node "${PLUGIN_ROOT}/dist/cli.js" hook pre-tool-use-spawn` (fan-out cap + gate-artifact preflight)
+ - `Stop` -> `node "${PLUGIN_ROOT}/dist/cli.js" hook stop` (auto-resume with a two-strike no-progress cap)
- `skills/ulw-loop/` for the bundled `ulw-loop` skill.
- `bin.omo-ulw-loop` -> `dist/cli.js` for standalone CLI invocation.
diff --git a/plugins/omo/components/ulw-loop/directive.md b/plugins/omo/components/ulw-loop/directive.md
index 065c1e78..5ff80f7c 100644
--- a/plugins/omo/components/ulw-loop/directive.md
+++ b/plugins/omo/components/ulw-loop/directive.md
@@ -6,8 +6,7 @@
[CODE RED] Maximum precision. Outcome-first. Evidence-driven.
# Role
-Expert coding agent. Plan obsessively. Ship verified work. No process
-narration.
+Expert coding agent. Ship verified work. No process narration.
# Goal
Deliver EXACTLY what the user asked, end-to-end working, proven by
@@ -37,10 +36,10 @@ success criteria (happy path + the riskiest edge); one real-surface
proof of the user-visible deliverable, where auxiliary surfaces are
first-class for CLI- or data-shaped work; self-review recorded in the
notepad instead of the reviewer loop.
-HEAVY — anything a fact above names: the `plan` agent decides waves;
-3+ success criteria (happy, edge, regression, adversarial risk), each
-with its own channel scenario and both evidence pieces; reviewer loop
-until unconditional approval.
+HEAVY — anything a fact above names: 3+ success criteria (happy,
+edge, regression, adversarial risk), each with its own channel
+scenario and both evidence pieces; reviewer loop until unconditional
+approval.
# Manual-QA channels
Run real-surface proof yourself through the channel that faithfully
@@ -90,16 +89,24 @@ evidence: screenshot + plain transcript + cleanup receipt.
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
-## 0. Survey the skills, then size the work
+## 0. Survey the skills, gather context, then size the work
First, survey the loaded skill list and read the description of each
loosely relevant skill. Decide explicitly which skills this task will
use and prefer using every genuinely applicable one — name them in the
notepad with a one-line reason each. Skipping a skill that fits the
task is a defect.
-Then run Tier triage (above) on the change set and record the tier.
-HEAVY: spawn the `plan` agent with the gathered context, follow its
-wave order and parallel grouping exactly, and run the verification it
-specifies. LIGHT: plan directly in the notepad.
+Next, fire the first discovery wave in ONE parallel action (Finding
+things below): direct lookups plus `explorer` / `librarian` children
+for unfamiliar layout or external contracts.
+Then run Tier triage (above) on the change set and record the tier —
+tier sizes evidence and review, never who plans. Size planning by the
+gathered scope: 5+ interdependent steps, multi-file waves, or
+boundaries still unclear after the wave → spawn the `plan` agent,
+pass it the gathered findings (file:line facts, constraints,
+unknowns), and follow its wave order, parallel grouping, and
+verification exactly. Anything smaller, either tier: plan directly in
+the notepad. Never spawn `plan` before the discovery wave has
+returned.
## 1. Create the goal with binding success criteria
Call `create_goal` (or open your reply with a `# Goal` block treated as
@@ -217,6 +224,14 @@ Until every success criterion PASSES with its evidence captured:
scenario captured failing when no test seam exists. It must fail
for the RIGHT reason (not a syntax error, not a missing import).
Paste RED output into the notepad. No production code yet.
+ PROSE TARGET (prompt, SKILL.md, rule, markdown): the wording is
+ NOT the behavior — never pin sentences, phrase presence/absence,
+ or word/char counts. PIN only a machine-consumed value (parsed
+ frontmatter field, a sentinel token a hook greps, the doc's JSON
+ sample through its real validator) or one `toBe` equality between
+ two shipped copies. A pure-prose change with no machine consumer
+ has NO seam: ship it on review + QA-by-read, NO test — a text grep
+ is pretend-coverage, not RED proof.
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
Before GREEN work that depends on external review, PR, issue, or
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
@@ -262,13 +277,17 @@ make the child continue old parent context instead of the delegated task.
If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.
# TOML-backed subagent routing compatibility
-Treat TOML-backed role routing as **routing-unverified**. The
-`multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
-`agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
-effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
-role requirements into the message, and judge the result from delivered
-evidence. Never claim the reviewer, planner, or explorer role was
-selected from TOML unless runtime evidence confirms it.
+Installed role TOMLs (`~/.codex/agents/`) bind ONLY via `agent_type`.
+`multi_agent_v1.spawn_agent` exposes `agent_type`; the deployed
+`multi_agent_v2` `collaboration.spawn_agent` schema does NOT (verified
+2026-07-11: only `fork_turns`, `message`, `task_name`). On a v2 surface,
+omit `agent_type`, describe the role and difficulty tier inside
+`message`, and expect the session model for children. Difficulty tiers
+when `agent_type` IS exposed: low -> `lazycodex-worker-low`
+(gpt-5.6-luna/high), medium -> `lazycodex-worker-medium`
+(gpt-5.6-luna/max), high -> `lazycodex-worker-high` (gpt-5.6-sol/max);
+explorer/librarian carry their own TOMLs (gpt-5.6-luna/low). Difficulty
+(model power) is orthogonal to LIGHT/HEAVY rigor (process size).
Treat child status as a progress signal, not a timeout counter. For
work likely to exceed one wait cycle, tell the child to send
@@ -297,7 +316,7 @@ transition, `create_goal` continuation, implementation tool call, plan
drafting, approval-gate work, PR handoff, or final response. A timeout is
not terminal status.
Do not write the final answer, PR handoff, or completion summary while
-active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
+active child agents remain open. Use `multi_agent_v1.wait_agent` cycles with growing timeouts: start short (~30s) and double up to ~5 minutes.
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
inconclusive, record that it is not approval, and respawn smaller only
@@ -319,15 +338,20 @@ Procedure (NON-NEGOTIABLE):
the message.
Pass: goal, success-criteria, scenario evidence, full diff, notepad
path.
-2. Treat the reviewer's verdict as binding. There is NO "false
- positive". Every concern is real. Do not argue. Do not minimise. Do
- not explain it away.
-3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
- evidence. Update notepad.
-4. Re-submit to the SAME reviewer. Loop until you receive an
- UNCONDITIONAL approval ("looks good but..." = REJECTION).
-5. Only on unconditional approval may you declare done. Stopping early
- IS failure.
+2. Verify each reviewer concern yourself. A concern blocks only when
+ it names a success criterion the evidence fails; record concerns
+ that cite no criterion as notes with a one-line reason — fixed or
+ declined at your judgment.
+3. Fix every criterion-cited blocker. Re-run ONLY the scenario QA
+ affected by the fix; capture fresh evidence for the delta. Update
+ notepad.
+4. Re-submit to the SAME reviewer at most twice, passing only the
+ delta diff, the blockers it cited, and the already-approved criteria
+ marked out-of-scope. An approval whose only remaining items are
+ notes counts as approval.
+5. On approval, declare done. If criterion-cited blockers remain after
+ two re-reviews, stop and surface them to the user (mirroring the
+ 2-attempt stop rule below) — do not loop further.
# Commits
Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
@@ -368,6 +392,9 @@ message + present for approval.
list (`<sha> <subject>`). No file-by-file changelog unless asked.
# Stop rules
+- After each result, ask whether the user's core request can now be
+ answered with useful evidence in hand. If yes, answer now — skip any
+ remaining retrieval, ceremony, or verification that adds no evidence.
- Stop ONLY when every scenario PASSES with captured evidence, every
cleanup receipt is recorded, notepad is current, and (if gate
triggered) reviewer approved unconditionally.
diff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.json
index 07090f0b..22e99466 100644
--- a/plugins/omo/components/ulw-loop/hooks/hooks.json
+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Ulw-Loop Steering"
+ "statusMessage": "(OmO 4.17.0) Checking Ulw-Loop Steering"
}
]
}
@@ -20,7 +20,30 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Enforcing Unlimited Ulw-Loop Budget"
+ "statusMessage": "(OmO 4.17.0) Enforcing Unlimited Ulw-Loop Budget"
+ }
+ ]
+ },
+ {
+ "matcher": "^(spawn_agent|collaborationspawn_agent|collaboration\\.spawn_agent)$",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use-spawn",
+ "timeout": 5,
+ "statusMessage": "(OmO 4.17.0) Guarding Ulw-Loop Spawns"
+ }
+ ]
+ }
+ ],
+ "Stop": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook stop",
+ "timeout": 10,
+ "statusMessage": "(OmO 4.17.0) Checking Ulw-Loop Resume"
}
]
}
diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.json
index 892b7128..a60f2dd7 100644
--- a/plugins/omo/components/ulw-loop/package.json
+++ b/plugins/omo/components/ulw-loop/package.json
@@ -1,6 +1,6 @@
{
"name": "@code-yeongyu/codex-ulw-loop",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md
index 25d5a987..e5e1fc62 100644
--- a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md
+++ b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md
@@ -23,29 +23,28 @@ This skill is intentionally compact. The full workflow lives in `references/full
- 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.
- 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.
- 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).
-- Record evidence through the CLI only after cleanup receipts are available.
+- Evidence is bound to its capture commit; a later fix, rebase, or merge makes it stale — re-run at the current HEAD and re-record, never relabel or regenerate. Record only after cleanup receipts exist.
- Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.
-- 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.
-- 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.
+- Every `spawn_agent` message starts with `TASK:`, then names `DELIVERABLE`, `SCOPE`, and `VERIFY`; put role and specialty instructions inside `message`; use `fork_turns: "none"` (v1: `fork_context: false`) unless full history is truly required.
+- 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.
- 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.
-- 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.
+- 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.
- While children run, surface the active subagent count, agent names, and latest `WORKING:` phase.
-- Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running. Then record inconclusive and respawn a smaller `fork_context: false` task with the missing deliverable.
+- Fallback only when the child is completed without the deliverable, ack-only after `followup_task`, explicitly `BLOCKED:`, or no longer running. Then record inconclusive and respawn a smaller `fork_turns: "none"` task with the missing deliverable.
- Use `git-master` for git-tracked edits: inspect recent and touched-path commit history, then commit each verified work unit atomically in the repository's observed language, scope, and message style with only that unit's files staged.
## Codex Tool Mapping
-The full workflow may mention OpenCode-style orchestration examples. In Codex, translate them to native tools:
+Codex exposes ONE subagent surface per session — check your tool list. GPT-5.6 (sol/terra) get the flat MultiAgentV2 tools (primary); GPT-5.5 and gpt-5.6-luna get the namespaced `multi_agent_v1.*` set (fallback row). The workflow's orchestration examples map to:
-| Workflow intent | Codex tool |
+| Intent | MultiAgentV2 (gpt-5.6 sol/terra) |
| --- | --- |
-| Plan agent | `multi_agent_v1.spawn_agent({"message":"TASK: act as a planning agent. ...","fork_context":false})` |
-| Search/read-only worker | `multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. ...","fork_context":false})` |
-| Implementation or QA worker | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
-| Final verification reviewer | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","fork_context":false})` |
-| Wait for background result | `multi_agent_v1.wait_agent(...)` |
-| Clean up finished worker | `multi_agent_v1.close_agent(...)` |
-
-Flat `spawn_agent` requiring `task_name` instead (`multi_agent_v2`)? Rewrite rows: add `"task_name"`, `"fork_context":false` → `"fork_turns":"none"`, `wait_agent` takes only `timeout_ms`, no `close_agent` — finished agents end on their own.
+| Spawn a worker | `spawn_agent({"task_name":"<lower_snake_id>","message":"TASK: act as <role>. ...","fork_turns":"none"})` — `task_name`+`message` required; `fork_turns:"none"` = no parent history; do NOT set `agent_type`/`model`/`reasoning_effort` |
+| Re-task an idle worker (wakes it) | `followup_task({"target":"<name>","message":"..."})` |
+| Send context without interrupting | `send_message({"target":"<name>","message":"..."})` |
+| Wait for a mailbox signal | `wait_agent({"timeout_ms":<ms>})` — any live worker; a timeout only means no new update |
+| Enumerate / stop a runaway | `list_agents()` / `interrupt_agent({"target":"<name>"})` — no `close_agent`; finished workers end on their own |
+
+V1 fallback (gpt-5.5, gpt-5.6-luna): `multi_agent_v1.spawn_agent({...,"fork_context":false})`, `multi_agent_v1.send_input` (re-task), `multi_agent_v1.wait_agent({"targets":[...],"timeout_ms":...})`, `multi_agent_v1.close_agent`.
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`.
diff --git a/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md b/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md
index aee7dfb1..e3e794d5 100644
--- a/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md
+++ b/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md
@@ -23,17 +23,15 @@ Run each criterion's real-surface proof yourself through the channel that faithf
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.
4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.
-For TUI visual QA, render the terminal through the real xterm.js web terminal and
-screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph
-width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command
-"<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;
-`--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and
-`metadata.json`. Mandatory when a PR or review must inspect the terminal screen.
+For TUI visual QA (mandatory when a PR or review must inspect the terminal screen),
+run `node script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}"
+--evidence-dir <dir>` (live pty + xterm.js in Chrome; `--from-file` replays a raw
+stream) and record `terminal.png`, `terminal.txt`, and `metadata.json`.
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.
## Delegation model (ATLAS-STYLE — YOU CONDUCT, WORKERS PLAY)
-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).
+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.
Size each worker to the task. Put the intended role, rigor level, and specialty inside the worker `message`.
@@ -44,21 +42,24 @@ Size each worker to the task. Put the intended role, rigor level, and specialty
| Deep debugging / race / perf / subtle cross-module reasoning | `TASK: act as a deep debugging worker. ...` |
| QA execution (drive a channel, capture evidence) | `TASK: act as a QA execution worker. ...` |
| Read-only codebase search | `TASK: act as an explorer. ...` |
+| 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 |
| External library / docs research | `TASK: act as a librarian. ...` |
| Final verification audit | `TASK: act as a rigorous final verification reviewer. ...` |
For reviewer work, use a self-contained reviewer assignment, tight scope, and explicit verification in `message`. Never spawn a context-only child for review.
+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.
+
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.
Codex subagent reliability:
-- 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.
-- 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.
-- 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.
+- 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.
+- 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.
+- 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.
- 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.
- 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.
-- 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.
-- 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.
+- 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.
+- 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.
## Artifacts
- `.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
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.
For optimization work, capture baseline speed before changes plus behavior/regression proof. Every attempt records speed, behavior/regression, and the keep/revert/iterate decision.
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.
-Use channel-table evidence verbs (tmux transcript, curl status+body, screenshot, action log, CLI stdout, DB diff, parsed config dump) — not vibes.
+Use channel-table evidence verbs — not vibes.
**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.
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
### Per-Criterion Cycle
1. PLAN: read `criterion.scenario`, `criterion.expectedEvidence`, prior ledger entries, and safety bounds. Identify which tasks in the current wave are independent.
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.
-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.
+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.
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.
-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.
+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.
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.
-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.
-8. RECORD exactly one result:
- - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> | <cleanup receipt>" --json`
- - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> | <cleanup receipt>" --notes "<diagnosis>" --json`
+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.
+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:
+ - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> @<short-sha> | <cleanup receipt>" --json`
+ - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> @<short-sha> | <cleanup receipt>" --notes "<diagnosis>" --json`
- BLOCKED: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status blocked --evidence "<observable>" --notes "<safety/blocker/leftover-state>" --json`
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).
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
## Final Quality Gate
Trigger only for the final aggregate goal after every criterion in every goal is `pass`.
1. Run targeted verification for changed behavior.
-2. Run Manual-QA for every criterion; confirm each artifact exists and is non-empty.
-3. Spawn final reviewers with `fork_context: false`: code review, QA review, gate review. Include original brief, goals, desired outcome, and diff.
-4. Treat timeout, missing deliverable, ack-only, `BLOCKED:`, or inconclusive review as a blocker. Fix, rerun affected verification/Manual-QA, and repeat review.
+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.
+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.
+3b. Only then spawn lazycodex-gate-reviewer with those artifact paths.
+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.
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`.
6. If clean, checkpoint final completion:
```sh
@@ -201,7 +203,7 @@ omo ulw-loop checkpoint --goal-id <id> --status complete --evidence "<e2e eviden
"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"]}
}
```
-Artifacts must be non-empty; counts alone fail. LIGHT without adversarial class records `"adversarialClassesCovered": ["none-applicable: <reason>"]`.
+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.
## Dynamic Steering
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
## Constraints
1. NEVER call `update_goal` mid-aggregate; only on final story after the quality gate passes.
2. NEVER call `create_goal` when `get_goal` shows a different active goal.
-3. NEVER mark `criterion.status == "pass"` without captured observable evidence in `record-evidence`.
+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.
4. NEVER bypass the criteria gate: non-final aggregate completion requires all essential criteria; final aggregate completion requires all criteria across the whole plan.
5. Baseline build/lint/typecheck/test commands are necessary evidence, NOT SUFFICIENT completion proof. Criteria coverage with observable evidence is the gate.
6. Treat `.omo/ulw-loop/ledger.jsonl` as the durable audit trail; checkpoint after every success or failure.
7. Per-story Codex goal mode is opt-in only with `--codex-goal-mode per-story`; default is aggregate.
8. Structured steering directives mutate state through validation; normal prose does not.
-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.
+9. Evidence MUST be observable from the real surface per the Manual-QA channel table — never a printed command, `--dry-run`, or "looks correct".
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.
11. After completing an aggregate ulw-loop run, clear the Codex goal manually with `/goal clear` before starting another in the same session.
12. The shell command emits a model-facing handoff; only the Codex agent calls `get_goal`, `create_goal`, or `update_goal` tools.
-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.
-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.
+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.
+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.
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.
## Stop Rules
diff --git a/plugins/omo/components/ulw-loop/src/checkpoint.ts b/plugins/omo/components/ulw-loop/src/checkpoint.ts
index e284935f..ebc68688 100644
--- a/plugins/omo/components/ulw-loop/src/checkpoint.ts
+++ b/plugins/omo/components/ulw-loop/src/checkpoint.ts
@@ -1,3 +1,4 @@
+import { ulwLoopAttemptEvidenceDir } from "./paths.js";
import { existsSync, statSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
@@ -136,12 +137,13 @@ function buildLedger(
codexGoal: unknown,
aggregateCompletion: UlwLoopAggregateCompletion | undefined,
): UlwLoopLedgerEntry {
+ const watch = qualityGate?.codeReview.codeQualityStatus === "WATCH";
const entry: UlwLoopLedgerEntry = {
at: now,
kind: ledgerKind(args.status, goal, aggregateCompletion),
goalId: goal.id,
status: goal.status,
- evidence: args.evidence,
+ evidence: watch ? `${args.evidence} | codeQuality=WATCH: ${qualityGate.codeReview.evidence}` : args.evidence,
};
if (codexGoal !== undefined) entry.codexGoal = codexGoal;
if (qualityGate !== undefined) entry.qualityGate = qualityGate;
@@ -221,6 +223,9 @@ export async function checkpointUlwLoop(
qualityGate = validateQualityGate(await readJsonInput(args.qualityGateJson, repoRoot), {
repoRoot,
fs: QUALITY_GATE_FS,
+ ...(plan.evidenceLayoutVersion === 2
+ ? { currentAttemptDir: ulwLoopAttemptEvidenceDir(goal.id, goal.attempt, scope) }
+ : {}),
});
goal.status = "complete";
goal.completedAt = now;
diff --git a/plugins/omo/components/ulw-loop/src/cli-subcommands.ts b/plugins/omo/components/ulw-loop/src/cli-subcommands.ts
index 23ec50da..962c8aff 100644
--- a/plugins/omo/components/ulw-loop/src/cli-subcommands.ts
+++ b/plugins/omo/components/ulw-loop/src/cli-subcommands.ts
@@ -14,7 +14,7 @@ import { parseSteeringProposal, printSteerResult } from "./cli-steering.js";
import { buildCodexGoalInstruction } from "./codex-goal-instruction.js";
import { recordEvidence } from "./evidence.js";
import { isEssentialCriterion } from "./goal-status.js";
-import type { UlwLoopScope } from "./paths.js";
+import { type UlwLoopScope, ulwLoopAttemptEvidenceDir } from "./paths.js";
import { addUlwLoopGoal, createUlwLoopPlan, startNextUlwLoop, summarizeUlwLoopPlan } from "./plan-crud.js";
import { readUlwLoopPlan } from "./plan-io.js";
import { recordFinalReviewBlockers } from "./review-blockers.js";
@@ -62,8 +62,19 @@ export async function createGoals(
export async function status(repoRoot: string, json: boolean, scope?: UlwLoopScope): Promise<number> {
const plan = await readUlwLoopPlan(repoRoot, scope);
- if (json) printJson({ ok: true, plan, summary: summarizeUlwLoopPlan(plan) });
- else printStatus(plan);
+ if (json) {
+ const active = plan.goals.find((goal) => goal.id === plan.activeGoalId);
+ const currentAttemptDir =
+ plan.evidenceLayoutVersion === 2 && active
+ ? ulwLoopAttemptEvidenceDir(active.id, active.attempt, scope)
+ : undefined;
+ printJson({
+ ok: true,
+ plan,
+ summary: summarizeUlwLoopPlan(plan),
+ ...(currentAttemptDir === undefined ? {} : { currentAttemptDir }),
+ });
+ } else printStatus(plan);
return 0;
}
diff --git a/plugins/omo/components/ulw-loop/src/cli.ts b/plugins/omo/components/ulw-loop/src/cli.ts
index 783be955..21ffe352 100644
--- a/plugins/omo/components/ulw-loop/src/cli.ts
+++ b/plugins/omo/components/ulw-loop/src/cli.ts
@@ -1,6 +1,8 @@
#!/usr/bin/env node
import { isUlwLoopSubcommand, ulwLoopCommand } from "./cli-commands.js";
import { runPreToolUseGoalBudgetGuardCli, runUlwLoopHookCli } from "./codex-hook.js";
+import { runSpawnGuardCli } from "./spawn-guard.js";
+import { runStopResumeHookCli } from "./stop-resume-hook.js";
const TOP_LEVEL_HELP =
"Usage:\n omo ulw-loop <subcommand> [args]\n omo hook user-prompt-submit [--with-ultrawork] (Codex UserPromptSubmit hook)\n omo help | --help | -h (this message)\n\nRun `omo ulw-loop help` for ulw-loop subcommands.\n";
@@ -25,6 +27,14 @@ async function main(): Promise<number> {
await runPreToolUseGoalBudgetGuardCli(process.stdin, process.stdout);
return 0;
}
+ if (sub === "stop") {
+ await runStopResumeHookCli(process.stdin, process.stdout);
+ return 0;
+ }
+ if (sub === "pre-tool-use-spawn") {
+ await runSpawnGuardCli(process.stdin, process.stdout);
+ return 0;
+ }
process.stderr.write(`[omo] unknown hook subcommand: ${sub ?? "(none)"}\n`);
return 1;
}
diff --git a/plugins/omo/components/ulw-loop/src/codex-goal-instruction.ts b/plugins/omo/components/ulw-loop/src/codex-goal-instruction.ts
index c5cf5aa0..26af4c98 100644
--- a/plugins/omo/components/ulw-loop/src/codex-goal-instruction.ts
+++ b/plugins/omo/components/ulw-loop/src/codex-goal-instruction.ts
@@ -52,6 +52,7 @@ function buildText(
"- Use the create_goal payload exactly as rendered: objective only.",
"- Goals are unlimited. Do not add numeric limits.",
...modeConstraintLines(mode, isFinal),
+ ...evidenceLayoutLines(plan),
finalSection(plan, goal, isFinal, mode === "aggregate"),
...checkpointLines(plan, mode),
"",
@@ -103,6 +104,13 @@ function formatCriterionLine(criterion: UlwLoopSuccessCriterion): string {
return `-${remainingWork} [${criterion.id}] [${marker}] (${criterion.userModel}) ${criterion.scenario} — expect: ${criterion.expectedEvidence} — status: ${criterion.status}`;
}
+function evidenceLayoutLines(plan: UlwLoopPlan): string[] {
+ if (plan.evidenceLayoutVersion !== 2) return [];
+ return [
+ "- Evidence layout v2: write every artifact for the active goal (QA matrix, review reports, receipts) under the current attempt directory — read currentAttemptDir from `omo ulw-loop status --json` (.omo/evidence/ulw/<session>/<goalId>/a<attempt>). The final checkpoint rejects quality-gate artifacts outside that directory.",
+ ];
+}
+
function finalSection(plan: UlwLoopPlan, goal: UlwLoopItem, isFinal: boolean, aggregate: boolean): string {
if (!isFinal)
return "- This is not the final ulw-loop story; do not run the final reviewer/manual-QA/gate-review quality gate yet.";
@@ -113,8 +121,11 @@ function finalSection(plan: UlwLoopPlan, goal: UlwLoopItem, isFinal: boolean, ag
"Final story — run mandatory quality gate before update_goal:",
"- Run targeted verification for changed behavior.",
"- Confirm every manualQa artifact path exists and has non-zero size.",
- "- Spawn final reviewers with fork_context=false: lazycodex-code-reviewer, lazycodex-qa-executor, and lazycodex-gate-reviewer. Include the original brief, goal objectives, desired user-visible outcome, diff, and evidence.",
+ "- First spawn lazycodex-code-reviewer and lazycodex-qa-executor in parallel (fork_context: false on the v1 surface; fork_turns: \"none\" on v2). Include the original brief, goal objectives, desired user-visible outcome, diff, and evidence; wait for BOTH to return and confirm their report artifacts exist on disk (code-review report + manualQa matrix).",
+ "- Only then spawn lazycodex-gate-reviewer (same fork settings), passing those artifact paths.",
"- Require clean codeReview, manualQa, gateReview, iteration, and criteriaCoverage. criteriaCoverage must summarize originalIntent, desiredOutcome, and userOutcomeReview; counts alone are not approval.",
+ "- On a reviewer REJECT, fix only the cited blockers, rerun the affected verification/Manual-QA, and re-review the delta at most TWICE; if blockers remain, record them and surface to the user.",
+ "- If codeQualityStatus is WATCH, include the WATCH notes verbatim in your final user-facing message.",
"- If any reviewer is blocked/inconclusive or the quality gate is not clean, do not call update_goal. Record blocker work first:",
` ${blockerCommand}`,
aggregate
diff --git a/plugins/omo/components/ulw-loop/src/domain-types.ts b/plugins/omo/components/ulw-loop/src/domain-types.ts
index 058eaaed..59aff7a9 100644
--- a/plugins/omo/components/ulw-loop/src/domain-types.ts
+++ b/plugins/omo/components/ulw-loop/src/domain-types.ts
@@ -57,6 +57,7 @@ export interface UlwLoopAggregateCompletion {
export interface UlwLoopPlan {
version: 1;
+ evidenceLayoutVersion?: 2;
createdAt: string;
updatedAt: string;
briefPath: string;
@@ -94,7 +95,8 @@ export interface UlwLoopManualQaAdversarialCase {
readonly criterionRef: string;
readonly scenario: string;
readonly expectedBehavior: string;
- readonly verdict: "passed";
+ readonly verdict: "passed" | "not_applicable";
+ readonly reason?: string;
readonly artifactRefs: readonly string[];
}
@@ -102,7 +104,7 @@ export interface UlwLoopQualityGate {
readonly codeReview: {
readonly by: string;
readonly recommendation: "APPROVE";
- readonly codeQualityStatus: "CLEAR";
+ readonly codeQualityStatus: "CLEAR" | "WATCH";
readonly reportPath: string;
readonly evidence: string;
readonly blockers: readonly [];
diff --git a/plugins/omo/components/ulw-loop/src/paths.ts b/plugins/omo/components/ulw-loop/src/paths.ts
index a646469c..76f0ec82 100644
--- a/plugins/omo/components/ulw-loop/src/paths.ts
+++ b/plugins/omo/components/ulw-loop/src/paths.ts
@@ -1,4 +1,4 @@
-import { join } from "node:path";
+import { isAbsolute, join, relative, sep } from "node:path";
import { ULW_LOOP_BRIEF, ULW_LOOP_DIR, ULW_LOOP_GOALS, ULW_LOOP_LEDGER } from "./types.js";
export interface UlwLoopScope {
@@ -71,3 +71,29 @@ export function repoRelative(absolutePath: string, repoRoot: string): string {
return absolutePath.slice(backslashPrefix.length).split("\\").join("/");
return absolutePath.split("\\").join("/");
}
+
+// Both the status --json emitter and the checkpoint enforcement resolve the attempt dir through
+// this function; a second resolution path would let the gate reject its own advertised directory.
+export function ulwLoopAttemptEvidenceDir(goalId: string, attempt: number, scope?: UlwLoopScope): string {
+ const sessionId = normalizeUlwLoopSessionId(scope?.sessionId) ?? resolveUlwLoopSessionIdFromEnv() ?? "session";
+ return `.omo/evidence/ulw/${sessionId}/${goalId}/a${attempt}`;
+}
+
+interface AttemptPathApi {
+ relative(from: string, to: string): string;
+ isAbsolute(path: string): boolean;
+ readonly sep: string;
+}
+
+const PLATFORM_PATH_API: AttemptPathApi = { relative, isAbsolute, sep };
+
+export function isWithinAttemptDir(
+ absolutePath: string,
+ attemptRoot: string,
+ pathApi: AttemptPathApi = PLATFORM_PATH_API,
+): boolean {
+ const relativePath = pathApi.relative(attemptRoot, absolutePath);
+ if (relativePath === "") return true;
+ if (relativePath === ".." || relativePath.startsWith(`..${pathApi.sep}`)) return false;
+ return !pathApi.isAbsolute(relativePath);
+}
diff --git a/plugins/omo/components/ulw-loop/src/plan-crud.ts b/plugins/omo/components/ulw-loop/src/plan-crud.ts
index 9525da87..c1ded74a 100644
--- a/plugins/omo/components/ulw-loop/src/plan-crud.ts
+++ b/plugins/omo/components/ulw-loop/src/plan-crud.ts
@@ -75,6 +75,7 @@ export async function createUlwLoopPlan(
);
const plan: UlwLoopPlan = {
version: 1,
+ evidenceLayoutVersion: 2,
createdAt: now,
updatedAt: now,
briefPath: ulwLoopBriefRelativePath(scope),
diff --git a/plugins/omo/components/ulw-loop/src/quality-gate-verdicts.ts b/plugins/omo/components/ulw-loop/src/quality-gate-verdicts.ts
new file mode 100644
index 00000000..191d2a3c
--- /dev/null
+++ b/plugins/omo/components/ulw-loop/src/quality-gate-verdicts.ts
@@ -0,0 +1,23 @@
+import { literal, invalid, textField } from "./quality-gate-fields.js";
+
+export function passedVerdict(value: unknown, field: string): "passed" {
+ if (value === "not_applicable") invalid(`${field} must not be not_applicable.`, field);
+ return literal(value, "passed", field);
+}
+
+export function codeQualityStatusField(value: unknown, field: string): "CLEAR" | "WATCH" {
+ if (value === "CLEAR" || value === "WATCH") return value;
+ invalid(`${field} must be CLEAR or WATCH.`, field);
+}
+
+export function adversarialVerdict(
+ row: Record<string, unknown>,
+ field: string,
+): { verdict: "passed" | "not_applicable"; reason?: string } {
+ const value = row["verdict"];
+ if (value === "passed") return { verdict: "passed" };
+ if (value === "not_applicable") {
+ return { verdict: "not_applicable", reason: textField(row["reason"], `${field}.reason`) };
+ }
+ invalid(`${field} must be passed or not_applicable with a reason.`, field);
+}
diff --git a/plugins/omo/components/ulw-loop/src/quality-gate.ts b/plugins/omo/components/ulw-loop/src/quality-gate.ts
index fbfd1105..aa2eb0f5 100644
--- a/plugins/omo/components/ulw-loop/src/quality-gate.ts
+++ b/plugins/omo/components/ulw-loop/src/quality-gate.ts
@@ -1,4 +1,5 @@
import { resolve } from "node:path";
+import { isWithinAttemptDir } from "./paths.js";
import {
emptyBlockers,
invalid,
@@ -8,6 +9,7 @@ import {
stringArray,
textField,
} from "./quality-gate-fields.js";
+import { adversarialVerdict, codeQualityStatusField, passedVerdict } from "./quality-gate-verdicts.js";
import type {
UlwLoopManualQaArtifactKind,
UlwLoopManualQaArtifactRef,
@@ -36,6 +38,7 @@ export interface QualityGateFs {
export interface ValidateQualityGateOptions {
readonly repoRoot: string;
readonly fs: QualityGateFs;
+ readonly currentAttemptDir?: string;
}
function reviewerRoleField<T extends string>(value: unknown, expected: T, field: string): T {
@@ -70,11 +73,6 @@ function kindField(value: unknown, field: string): UlwLoopManualQaArtifactKind {
invalid(`${field} must be a supported artifact kind.`, field);
}
-function passedVerdict(value: unknown, field: string): "passed" {
- if (value === "not_applicable") invalid(`${field} must not be not_applicable.`, field);
- return literal(value, "passed", field);
-}
-
function artifactCompatible(surface: UlwLoopManualQaSurface, kind: UlwLoopManualQaArtifactKind): boolean {
switch (surface) {
case "cli":
@@ -96,8 +94,15 @@ function checkFile(path: string, field: string, opts?: ValidateQualityGateOption
if (opts === undefined) return;
const absolute = resolve(opts.repoRoot, path);
if (!opts.fs.existsSync(absolute)) invalid(`${field} must point to an existing artifact.`, field);
- const stat = opts.fs.statSync(absolute);
- if (stat.size <= 0) invalid(`${field} must point to a non-empty artifact.`, field);
+ if (opts.fs.statSync(absolute).size <= 0) invalid(`${field} must point to a non-empty artifact.`, field);
+ if (opts.currentAttemptDir !== undefined) {
+ const attemptRoot = resolve(opts.repoRoot, opts.currentAttemptDir);
+ if (!isWithinAttemptDir(absolute, attemptRoot))
+ invalid(
+ `${field} (${path}) must point to an artifact from the current attempt (${opts.currentAttemptDir}).`,
+ field,
+ );
+ }
}
function artifactMap(refs: readonly UlwLoopManualQaArtifactRef[]): Map<string, UlwLoopManualQaArtifactRef> {
@@ -160,7 +165,7 @@ export function validateQualityGate(input: unknown, opts?: ValidateQualityGateOp
codeReview: {
by: reviewerRoleField(codeReview["by"], REVIEWER_ROLES.codeReview, "codeReview.by"),
recommendation: literal(codeReview["recommendation"], "APPROVE", "codeReview.recommendation"),
- codeQualityStatus: literal(codeReview["codeQualityStatus"], "CLEAR", "codeReview.codeQualityStatus"),
+ codeQualityStatus: codeQualityStatusField(codeReview["codeQualityStatus"], "codeReview.codeQualityStatus"),
reportPath: codeReportPath,
evidence: textField(codeReview["evidence"], "codeReview.evidence"),
blockers: emptyBlockers(codeReview["blockers"], "codeReview.blockers"),
@@ -246,12 +251,14 @@ function parseAdversarialCases(
`manualQa.adversarialCases[${index}].artifactRefs`,
byId,
);
+ const verdictInfo = adversarialVerdict(row, `manualQa.adversarialCases[${index}]`);
return {
id: textField(row["id"], `manualQa.adversarialCases[${index}].id`),
criterionRef: textField(row["criterionRef"], `manualQa.adversarialCases[${index}].criterionRef`),
scenario: textField(row["scenario"], `manualQa.adversarialCases[${index}].scenario`),
expectedBehavior: textField(row["expectedBehavior"], `manualQa.adversarialCases[${index}].expectedBehavior`),
- verdict: passedVerdict(row["verdict"], `manualQa.adversarialCases[${index}].verdict`),
+ verdict: verdictInfo.verdict,
+ ...(verdictInfo.reason === undefined ? {} : { reason: verdictInfo.reason }),
artifactRefs: artifacts.map((artifact) => artifact.id),
};
});
diff --git a/plugins/omo/components/ulw-loop/src/spawn-guard.ts b/plugins/omo/components/ulw-loop/src/spawn-guard.ts
new file mode 100644
index 00000000..18b7364f
--- /dev/null
+++ b/plugins/omo/components/ulw-loop/src/spawn-guard.ts
@@ -0,0 +1,138 @@
+import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
+import { join } from "node:path";
+
+import type { PreToolUsePayload } from "./codex-hook.js";
+import { parsePreToolUsePayload } from "./codex-hook.js";
+import { isFinalRunCompletionCandidate } from "./goal-status.js";
+import { ulwLoopAttemptEvidenceDir, ulwLoopDir } from "./paths.js";
+import type { UlwLoopPlan } from "./types.js";
+
+// spawn_agent = v1; collaborationspawn_agent = the delimiter-free flattened v2
+// hook token from codex-rs hook_names.rs; collaboration.spawn_agent = the
+// dotted token observed live in the task-1 probe (hook-tool-tokens.txt).
+const SPAWN_TOOL_TOKENS = new Set(["spawn_agent", "collaborationspawn_agent", "collaboration.spawn_agent"]);
+const DEFAULT_FANOUT_LIMIT = 60;
+const GATE_MESSAGE_PATTERN = /lazycodex-gate-reviewer|final gate review/i;
+
+export function applySpawnGuards(payload: PreToolUsePayload): string {
+ if (payload.hook_event_name !== "PreToolUse" || !SPAWN_TOOL_TOKENS.has(payload.tool_name)) return "";
+ const stateDir = ulwLoopDir(payload.cwd, { sessionId: payload.session_id });
+ const plan = readPlan(join(stateDir, "goals.json"));
+ if (plan === null) return "";
+ const fanOutDenial = consumeFanOutBudget(stateDir);
+ if (fanOutDenial !== null) return deny(fanOutDenial);
+ const missingArtifact = missingGateArtifact(payload, plan);
+ if (missingArtifact !== null)
+ return deny(`spawn code-review + QA first; gate audits their artifacts: missing ${missingArtifact}`);
+ return "";
+}
+
+export async function runSpawnGuardCli(stdin: NodeJS.ReadableStream, stdout: NodeJS.WritableStream): Promise<void> {
+ try {
+ const chunks: Buffer[] = [];
+ for await (const chunk of stdin) chunks.push(Buffer.from(chunk));
+ const payload = parsePreToolUsePayload(Buffer.concat(chunks).toString("utf8"));
+ if (payload === null) return;
+ const output = applySpawnGuards(payload);
+ if (output.length > 0) stdout.write(output);
+ } catch (error) {
+ if (error instanceof Error) return;
+ }
+}
+
+// Per-session spawn counter; depth/lineage tracking is descoped — this is a
+// total-volume backstop against fan-out explosions, not a recursion tracker.
+function consumeFanOutBudget(stateDir: string): string | null {
+ const counterPath = join(stateDir, "spawn-count.json");
+ const count = readCount(counterPath) + 1;
+ writeFileSync(counterPath, JSON.stringify({ count }));
+ const limit = fanOutLimit();
+ if (count <= limit) return null;
+ return `ulw-loop spawn fan-out cap reached (${count}/${limit}). Consolidate work into the agents already running, or raise OMO_SPAWN_FANOUT_LIMIT if this volume is intentional.`;
+}
+
+function missingGateArtifact(payload: PreToolUsePayload, plan: UlwLoopPlan): string | null {
+ if (!isGateReviewerSpawn(payload.tool_input)) return null;
+ const goal = plan.goals.find((candidate) => isFinalRunCompletionCandidate(plan, candidate));
+ if (goal === undefined || goal.status === "complete") return null;
+ if (!goal.successCriteria.every((criterion) => criterion.status === "pass")) return null;
+ const scope = { sessionId: payload.session_id } as const;
+ if (plan.evidenceLayoutVersion === 2) {
+ const attemptDir = ulwLoopAttemptEvidenceDir(goal.id, goal.attempt, scope);
+ for (const name of [`${goal.id}-code-review.md`, `${goal.id}-manual-qa.md`]) {
+ const relative = `${attemptDir}/${name}`;
+ if (!isNonEmptyFile(join(payload.cwd, relative))) return relative;
+ }
+ return null;
+ }
+ const flatReport = `.omo/evidence/${goal.id}-code-review.md`;
+ if (!isNonEmptyFile(join(payload.cwd, flatReport))) return flatReport;
+ // v1 manual-QA approximation: any other non-empty evidence file counts.
+ if (!hasOtherEvidenceFile(join(payload.cwd, ".omo", "evidence"), `${goal.id}-code-review.md`))
+ return `.omo/evidence/<any manual-QA artifact besides ${goal.id}-code-review.md>`;
+ return null;
+}
+
+function isGateReviewerSpawn(toolInput: unknown): boolean {
+ if (typeof toolInput !== "object" || toolInput === null) return false;
+ const record = toolInput as Record<string, unknown>;
+ const agentType = record["agent_type"];
+ if (typeof agentType === "string") return agentType === "lazycodex-gate-reviewer";
+ const message = record["message"];
+ return typeof message === "string" && GATE_MESSAGE_PATTERN.test(message);
+}
+
+function deny(reason: string): string {
+ return `${JSON.stringify({
+ hookSpecificOutput: {
+ hookEventName: "PreToolUse",
+ permissionDecision: "deny",
+ permissionDecisionReason: reason,
+ additionalContext: reason,
+ },
+ })}\n`;
+}
+
+function fanOutLimit(): number {
+ const raw = process.env["OMO_SPAWN_FANOUT_LIMIT"];
+ if (raw === undefined) return DEFAULT_FANOUT_LIMIT;
+ const parsed = Number.parseInt(raw, 10);
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_FANOUT_LIMIT;
+}
+
+function isNonEmptyFile(path: string): boolean {
+ try {
+ return existsSync(path) && statSync(path).size > 0;
+ } catch (error) {
+ if (error instanceof Error) return false;
+ throw error;
+ }
+}
+
+function hasOtherEvidenceFile(evidenceDir: string, excludedName: string): boolean {
+ try {
+ return readdirSync(evidenceDir).some((name) => name !== excludedName && isNonEmptyFile(join(evidenceDir, name)));
+ } catch (error) {
+ if (error instanceof Error) return false;
+ throw error;
+ }
+}
+
+function readCount(counterPath: string): number {
+ try {
+ const parsed = JSON.parse(readFileSync(counterPath, "utf8")) as Record<string, unknown>;
+ return typeof parsed["count"] === "number" && parsed["count"] >= 0 ? parsed["count"] : 0;
+ } catch (error) {
+ if (error instanceof Error) return 0;
+ throw error;
+ }
+}
+
+function readPlan(goalsPath: string): UlwLoopPlan | null {
+ try {
+ return JSON.parse(readFileSync(goalsPath, "utf8")) as UlwLoopPlan;
+ } catch (error) {
+ if (error instanceof Error) return null;
+ throw error;
+ }
+}
diff --git a/plugins/omo/components/ulw-loop/src/stop-resume-hook.ts b/plugins/omo/components/ulw-loop/src/stop-resume-hook.ts
new file mode 100644
index 00000000..1ffaf4c3
--- /dev/null
+++ b/plugins/omo/components/ulw-loop/src/stop-resume-hook.ts
@@ -0,0 +1,208 @@
+import { existsSync, readFileSync, writeFileSync } from "node:fs";
+import { isAbsolute, join } from "node:path";
+
+import { normalizeUlwLoopSessionId, ulwLoopDir } from "./paths.js";
+import type { UlwLoopItem, UlwLoopPlan } from "./types.js";
+
+// Turn-death recovery only: Codex emits Stop when a turn ends, so a run that
+// dies mid-turn (crash, kill, context blowup before any Stop) never reaches
+// this handler. Mid-turn stalls are out of scope by design.
+
+const RESUME_CAP = 2;
+
+// Mirrors start-work-continuation's context-pressure bail-out: injecting a
+// resume directive into an already-overflowing context makes things worse.
+const CONTEXT_PRESSURE_MARKERS = [
+ "context compacted",
+ "context_length_exceeded",
+ "skill descriptions were shortened",
+ "context_too_large",
+ "codex ran out of room in the model's context window",
+ "your input exceeds the context window",
+ "long threads and multiple compactions",
+] as const;
+
+interface StopPayload {
+ readonly session_id: string;
+ readonly cwd: string;
+ readonly transcript_path: string;
+ readonly stop_hook_active: boolean;
+}
+
+export function runStopResumeHook(input: unknown): string {
+ const payload = parseStopPayload(input);
+ if (payload === null || payload.stop_hook_active) return "";
+ if (transcriptShowsContextPressure(payload.transcript_path)) return "";
+ if (boulderContinuationWillFire(payload.cwd, payload.session_id)) return "";
+ const stateDir = ulwLoopDir(payload.cwd, { sessionId: payload.session_id });
+ const plan = readPlan(join(stateDir, "goals.json"));
+ if (plan === null || plan.aggregateCompletion?.status === "complete") return "";
+ const goal = resumableGoal(plan);
+ if (goal === undefined) return "";
+ if (!consumeResumeBudget(stateDir, goal.id)) return "";
+ const output: { decision: "block"; reason: string } = {
+ decision: "block",
+ reason: renderResumeDirective(plan, goal, payload.session_id),
+ };
+ return JSON.stringify(output);
+}
+
+export async function runStopResumeHookCli(stdin: NodeJS.ReadableStream, stdout: NodeJS.WritableStream): Promise<void> {
+ try {
+ const chunks: Buffer[] = [];
+ for await (const chunk of stdin) chunks.push(Buffer.from(chunk));
+ const output = runStopResumeHook(JSON.parse(Buffer.concat(chunks).toString("utf8")));
+ if (output.length > 0) stdout.write(output);
+ } catch (error) {
+ if (error instanceof Error) return;
+ }
+}
+
+function resumableGoal(plan: UlwLoopPlan): UlwLoopItem | undefined {
+ const active = plan.goals.find((goal) => goal.id === plan.activeGoalId);
+ if (active !== undefined && isResumableStatus(active.status)) return active;
+ return plan.goals.find((goal) => isResumableStatus(goal.status));
+}
+
+function isResumableStatus(status: UlwLoopItem["status"]): boolean {
+ return status === "pending" || status === "in_progress";
+}
+
+// Two-strike cap keyed on ledger movement: an unchanged ledger.jsonl line
+// count across resumes means the loop is not progressing. The stuck marker is
+// a separate file — a ledger append would change the count and self-reset.
+function consumeResumeBudget(stateDir: string, goalId: string): boolean {
+ const ledgerLineCount = countLedgerLines(join(stateDir, "ledger.jsonl"));
+ const counterPath = join(stateDir, `auto-resume-${goalId}.json`);
+ const previous = readCounter(counterPath);
+ const count = previous !== null && previous.ledgerLineCount === ledgerLineCount ? previous.count : 0;
+ if (count >= RESUME_CAP) {
+ writeFileSync(join(stateDir, `auto-resume-${goalId}.stuck`), `no ledger progress after ${count} resumes\n`);
+ return false;
+ }
+ writeFileSync(counterPath, JSON.stringify({ count: count + 1, ledgerLineCount }));
+ return true;
+}
+
+function renderResumeDirective(plan: UlwLoopPlan, goal: UlwLoopItem, sessionId: string): string {
+ const normalized = normalizeUlwLoopSessionId(sessionId);
+ const option =
+ normalized !== null && plan.goalsPath.includes(`/${normalized}/`) ? ` --session-id ${normalized}` : "";
+ return [
+ `The ulw-loop run in this session still has unfinished goals (next: ${goal.id} — ${goal.title}).`,
+ "The turn ended before the loop completed. Resume it now:",
+ `1. Run \`omo ulw-loop status${option} --json\` to reload the plan, the active goal, and currentAttemptDir.`,
+ "2. Continue the active goal's remaining success criteria, recording evidence with record-evidence.",
+ `3. Checkpoint through \`omo ulw-loop checkpoint${option}\` when the goal's criteria are proven.`,
+ "If the loop is genuinely blocked on the user, checkpoint the goal as blocked with the reason instead.",
+ ].join("\n");
+}
+
+function readPlan(goalsPath: string): UlwLoopPlan | null {
+ try {
+ return JSON.parse(readFileSync(goalsPath, "utf8")) as UlwLoopPlan;
+ } catch (error) {
+ if (error instanceof Error) return null;
+ throw error;
+ }
+}
+
+function countLedgerLines(ledgerPath: string): number {
+ try {
+ return readFileSync(ledgerPath, "utf8").split("\n").filter(Boolean).length;
+ } catch (error) {
+ if (error instanceof Error) return 0;
+ throw error;
+ }
+}
+
+function readCounter(counterPath: string): { count: number; ledgerLineCount: number } | null {
+ try {
+ if (!existsSync(counterPath)) return null;
+ const parsed = JSON.parse(readFileSync(counterPath, "utf8")) as Record<string, unknown>;
+ if (typeof parsed["count"] !== "number" || typeof parsed["ledgerLineCount"] !== "number") return null;
+ return { count: parsed["count"], ledgerLineCount: parsed["ledgerLineCount"] };
+ } catch (error) {
+ if (error instanceof Error) return null;
+ throw error;
+ }
+}
+
+// Local ~10-LOC approximation of start-work-continuation's boulder check (no
+// cross-component import allowed): any continuable work for this session means
+// that hook owns the Stop event, so this one stays silent.
+function boulderContinuationWillFire(cwd: string, sessionId: string): boolean {
+ try {
+ const raw = JSON.parse(readFileSync(join(cwd, ".omo", "boulder.json"), "utf8")) as Record<string, unknown>;
+ const works = raw["works"];
+ // The flat legacy shape has no works map: the top level is the single work.
+ const entries = typeof works === "object" && works !== null ? Object.values(works) : [raw];
+ return entries.some((work) => {
+ if (typeof work !== "object" || work === null) return false;
+ const entry = work as Record<string, unknown>;
+ const sessionIds = Array.isArray(entry["session_ids"]) ? entry["session_ids"] : [];
+ const continuable = entry["status"] === "active" || entry["status"] === "paused";
+ return continuable && sessionIds.includes(`codex:${sessionId}`) && boulderPlanHasRemainingTask(cwd, entry);
+ });
+ } catch (error) {
+ if (error instanceof Error) return false;
+ throw error;
+ }
+}
+
+function transcriptShowsContextPressure(transcriptPath: string): boolean {
+ try {
+ const transcript = readFileSync(transcriptPath, "utf8").toLowerCase();
+ return CONTEXT_PRESSURE_MARKERS.some((marker) => transcript.includes(marker));
+ } catch (error) {
+ if (error instanceof Error) return false;
+ throw error;
+ }
+}
+
+// start-work-continuation only fires while its plan checklist has remaining
+// items; a boulder work whose plan is exhausted (or unreadable) leaves the
+// Stop event to this hook.
+function boulderPlanHasRemainingTask(cwd: string, entry: Record<string, unknown>): boolean {
+ const activePlan = entry["active_plan"];
+ if (typeof activePlan !== "string" || activePlan.trim().length === 0) return false;
+ const planPath = isAbsolute(activePlan) ? activePlan : join(cwd, activePlan);
+ const worktree = entry["worktree_path"];
+ const candidates =
+ typeof worktree === "string" && worktree.trim().length > 0 && !isAbsolute(activePlan)
+ ? [join(isAbsolute(worktree) ? worktree : join(cwd, worktree), activePlan), planPath]
+ : [planPath];
+ for (const candidate of candidates) {
+ try {
+ return readFileSync(candidate, "utf8")
+ .split(/\r?\n/)
+ .some((line) => line.startsWith("- [ ] "));
+ } catch (error) {
+ if (!(error instanceof Error)) throw error;
+ }
+ }
+ return false;
+}
+
+function parseStopPayload(value: unknown): StopPayload | null {
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
+ const record = value as Record<string, unknown>;
+ const optionalMessage = record["last_assistant_message"];
+ const valid =
+ record["hook_event_name"] === "Stop" &&
+ typeof record["session_id"] === "string" &&
+ typeof record["turn_id"] === "string" &&
+ typeof record["transcript_path"] === "string" &&
+ typeof record["cwd"] === "string" &&
+ typeof record["model"] === "string" &&
+ typeof record["permission_mode"] === "string" &&
+ typeof record["stop_hook_active"] === "boolean" &&
+ (optionalMessage === undefined || typeof optionalMessage === "string");
+ if (!valid) return null;
+ return {
+ session_id: record["session_id"] as string,
+ cwd: record["cwd"] as string,
+ transcript_path: record["transcript_path"] as string,
+ stop_hook_active: record["stop_hook_active"] as boolean,
+ };
+}
diff --git a/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts b/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts
index c7af1553..0d25cb56 100644
--- a/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts
+++ b/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts
@@ -103,6 +103,8 @@ describe("ulwLoopCommand create-goals", () => {
it("#given completed default aggregate #when creating another default plan #then guides to a fresh session", async () => {
await createPlan("- Finished");
+ expect(await ulwLoopCommand(["complete-goals"])).toBe(0);
+ resetOutput();
for (const criterionId of ["C001", "C002", "C003"]) await passCriterion("G001-finished", criterionId);
expect(
await ulwLoopCommand([
@@ -128,6 +130,16 @@ describe("ulwLoopCommand create-goals", () => {
expect(err.join("")).toContain("--force only");
});
+ it("#given an active goal on a v2 plan #when reading status --json #then exposes the current attempt dir", async () => {
+ await createPlan();
+ expect(await ulwLoopCommand(["complete-goals"])).toBe(0);
+ resetOutput();
+
+ expect(await ulwLoopCommand(["status", "--json"])).toBe(0);
+
+ expect(stdoutJson()).toMatchObject({ currentAttemptDir: ".omo/evidence/ulw/session/G001-goal-a/a1" });
+ });
+
it("#given two session ids #when creating goals #then writes isolated session-scoped plans", async () => {
expect(await ulwLoopCommand(["create-goals", "--session-id", "session-A", "--brief", "- Alpha", "--json"])).toBe(
0,
diff --git a/plugins/omo/components/ulw-loop/test/cli-entrypoint.test.ts b/plugins/omo/components/ulw-loop/test/cli-entrypoint.test.ts
index 90c4ca8c..5fec225c 100644
--- a/plugins/omo/components/ulw-loop/test/cli-entrypoint.test.ts
+++ b/plugins/omo/components/ulw-loop/test/cli-entrypoint.test.ts
@@ -57,7 +57,10 @@ async function runCli(args: readonly string[], input = ""): Promise<CliResult> {
}
beforeAll(async () => {
- const build = await runProcess("npm", ["run", "build"], componentRoot);
+ const build =
+ process.platform === "win32"
+ ? await runProcess("cmd.exe", ["/c", "npm", "run", "build"], componentRoot)
+ : await runProcess("npm", ["run", "build"], componentRoot);
expect(build.code, `npm run build failed:\n${build.stderr}`).toBe(0);
}, 120_000);
diff --git a/plugins/omo/components/ulw-loop/test/codex-goal-instruction.test.ts b/plugins/omo/components/ulw-loop/test/codex-goal-instruction.test.ts
index 99f913e4..16c8ce60 100644
--- a/plugins/omo/components/ulw-loop/test/codex-goal-instruction.test.ts
+++ b/plugins/omo/components/ulw-loop/test/codex-goal-instruction.test.ts
@@ -58,53 +58,28 @@ describe("buildCodexGoalInstruction aggregate mode", () => {
expect(text).toContain(".omo/ulw-loop/goals.json");
});
- it("given aggregate mode when rendering create_goal payload then omits numeric limits", () => {
- const { json, text } = buildCodexGoalInstruction({
+ it("given aggregate mode when rendering create_goal payload then payload is the aggregate objective only", () => {
+ const { json } = buildCodexGoalInstruction({
plan: makePlan({ codexGoalMode: "aggregate" }),
goal: makeGoal(),
});
expect(json).toEqual({
objective: ULW_LOOP_AGGREGATE_CODEX_OBJECTIVE,
});
- expect(text).toContain("objective only");
- expect(text).not.toContain('"status"');
- expect(text).toContain("Goals are unlimited");
- expect(text).not.toMatch(/token[_-]?budget/i);
});
- it("instructs not to call update_goal mid-aggregate when not final", () => {
- const { text } = buildCodexGoalInstruction({
- plan: makePlan({ codexGoalMode: "aggregate" }),
- goal: makeGoal(),
- isFinal: false,
- });
- expect(text).toContain("do not call update_goal mid-aggregate");
- expect(text).toContain("checkpoint this OMO ledger story");
- expect(text).toContain("update_goal is reserved for the final story after the mandatory quality gate passes");
- });
-
- it("#given a non-final aggregate story #when rendering instructions #then defers the current final quality gate", () => {
+ it("#given a non-final aggregate story #when rendering instructions #then omits the final quality gate tokens", () => {
const { text } = buildCodexGoalInstruction({
plan: makePlan({ codexGoalMode: "aggregate" }),
goal: makeGoal(),
isFinal: false,
});
- expect(text).toMatch(/not the final .*do not run .*quality gate/i);
- expect(text).toContain("checkpoint this OMO ledger story");
- expect(text).toContain("continue the remaining stories");
- });
-
- it("includes quality gate instruction when isFinal", () => {
- const { text } = buildCodexGoalInstruction({
- plan: makePlan({ codexGoalMode: "aggregate" }),
- goal: makeGoal(),
- isFinal: true,
- });
- expect(text).toMatch(/quality gate/i);
+ for (const role of FINAL_REVIEW_ROLES) expect(text).not.toContain(role);
+ expect(text).not.toContain("record-review-blockers");
});
- it("#given a final aggregate story #when rendering instructions #then requires the current LazyCodex quality gate", () => {
+ it("#given a final aggregate story #when rendering instructions #then includes the quality gate roles, fields, and commands", () => {
const { text } = buildCodexGoalInstruction({
plan: makePlan({ codexGoalMode: "aggregate" }),
goal: makeGoal(),
@@ -113,10 +88,8 @@ describe("buildCodexGoalInstruction aggregate mode", () => {
expectTextToContainAll(text, FINAL_REVIEW_ROLES);
expectTextToContainAll(text, QUALITY_GATE_SECTIONS);
- expect(text).toMatch(/targeted verification/i);
- expect(text).toMatch(/artifact path.*non-zero size/i);
- expectTextToContainAll(text, ["original brief", "desired user-visible outcome", "userOutcomeReview"]);
- expect(text).toMatch(/not clean.*do not call update_goal/i);
+ expectTextToContainAll(text, ["originalIntent", "desiredOutcome", "userOutcomeReview"]);
+ expect(text).toContain("update_goal");
expect(text).toContain("record-review-blockers");
expect(text).toContain("checkpoint");
});
diff --git a/plugins/omo/components/ulw-loop/test/fixtures/quality-gate-builder.ts b/plugins/omo/components/ulw-loop/test/fixtures/quality-gate-builder.ts
index 664fd695..0623f5cf 100644
--- a/plugins/omo/components/ulw-loop/test/fixtures/quality-gate-builder.ts
+++ b/plugins/omo/components/ulw-loop/test/fixtures/quality-gate-builder.ts
@@ -1,29 +1,40 @@
import { mkdir, writeFile } from "node:fs/promises";
import { join } from "node:path";
-export const QA_DIR = ".omo/ulw-loop/qa";
+// v2 evidence layout: artifacts must live inside the goal's current attempt dir
+export function qaDirFor(goalId: string, attempt = 1, sessionId = "session"): string {
+ return `.omo/evidence/ulw/${sessionId}/${goalId}/a${attempt}`;
+}
+
+export const QA_DIR = qaDirFor("G001-finished");
export const CODE_REVIEW_PATH = `${QA_DIR}/code-review.md`;
export const GATE_REVIEW_PATH = `${QA_DIR}/gate-review.md`;
export const CLI_PASS_PATH = `${QA_DIR}/cli-pass.txt`;
export const REJECTION_LOG_PATH = `${QA_DIR}/rejection.txt`;
export const MISSING_ARTIFACT_PATH = `${QA_DIR}/missing.txt`;
-export async function writeQualityGateArtifacts(repoRoot: string): Promise<void> {
- await mkdir(join(repoRoot, QA_DIR), { recursive: true });
- await writeFile(join(repoRoot, CODE_REVIEW_PATH), "code review approved\n", "utf8");
- await writeFile(join(repoRoot, GATE_REVIEW_PATH), "gate review approved\n", "utf8");
- await writeFile(join(repoRoot, CLI_PASS_PATH), "cli scenario passed\n", "utf8");
- await writeFile(join(repoRoot, REJECTION_LOG_PATH), "invalid gate rejected\n", "utf8");
+export async function writeQualityGateArtifacts(repoRoot: string, qaDir = QA_DIR): Promise<void> {
+ await mkdir(join(repoRoot, qaDir), { recursive: true });
+ await writeFile(join(repoRoot, `${qaDir}/code-review.md`), "code review approved\n", "utf8");
+ await writeFile(join(repoRoot, `${qaDir}/gate-review.md`), "gate review approved\n", "utf8");
+ await writeFile(join(repoRoot, `${qaDir}/cli-pass.txt`), "cli scenario passed\n", "utf8");
+ await writeFile(join(repoRoot, `${qaDir}/rejection.txt`), "invalid gate rejected\n", "utf8");
}
-export async function qualityGateJson(repoRoot: string, cliArtifactPath = CLI_PASS_PATH): Promise<string> {
- await writeQualityGateArtifacts(repoRoot);
+export async function qualityGateJson(
+ repoRoot: string,
+ cliArtifactPath?: string,
+ goalId = "G001-finished",
+): Promise<string> {
+ const qaDir = qaDirFor(goalId);
+ await writeQualityGateArtifacts(repoRoot, qaDir);
+ const cliPath = cliArtifactPath ?? `${qaDir}/cli-pass.txt`;
return JSON.stringify({
codeReview: {
by: "lazycodex-code-reviewer",
recommendation: "APPROVE",
codeQualityStatus: "CLEAR",
- reportPath: CODE_REVIEW_PATH,
+ reportPath: `${qaDir}/code-review.md`,
evidence: "Reviewed implementation and tests; no blockers remain.",
blockers: [],
},
@@ -56,20 +67,20 @@ export async function qualityGateJson(repoRoot: string, cliArtifactPath = CLI_PA
id: "artifact-cli-pass",
kind: "cli-transcript",
description: "CLI transcript for valid final checkpoint.",
- path: cliArtifactPath,
+ path: cliPath,
},
{
id: "artifact-cli-reject",
kind: "log",
description: "Log proving invalid final checkpoint rejection.",
- path: REJECTION_LOG_PATH,
+ path: `${qaDir}/rejection.txt`,
},
],
},
gateReview: {
by: "lazycodex-gate-reviewer",
recommendation: "APPROVE",
- reportPath: GATE_REVIEW_PATH,
+ reportPath: `${qaDir}/gate-review.md`,
evidence: "Verified all criteria and artifact evidence.",
blockers: [],
},
diff --git a/plugins/omo/components/ulw-loop/test/package-smoke.test.ts b/plugins/omo/components/ulw-loop/test/package-smoke.test.ts
index 9114deda..8243c26e 100644
--- a/plugins/omo/components/ulw-loop/test/package-smoke.test.ts
+++ b/plugins/omo/components/ulw-loop/test/package-smoke.test.ts
@@ -141,7 +141,9 @@ describe("skills/ulw-loop/SKILL.md", () => {
expect(text).toContain('- "ulw-loop"');
});
- it("#given PATH omo lacks ulw-loop #when bootstrap runs #then falls back to cached ulw-loop CLI", async () => {
+ it.skipIf(process.platform === "win32")(
+ "#given PATH omo lacks ulw-loop #when bootstrap runs #then falls back to cached ulw-loop CLI",
+ async () => {
const text = await readText("skills/ulw-loop/references/full-workflow.md");
const bootstrap = bootstrapScriptFrom(text);
const root = await mkdtemp(join(tmpdir(), "omo-ulw-loop-bootstrap-"));
@@ -191,7 +193,8 @@ describe("source LOC budget", () => {
it("every source file stays at or under 250 pure LOC", async () => {
const files = [
"src/types.ts", "src/paths.ts", "src/plan-io.ts", "src/plan-crud.ts", "src/goal-status.ts",
- "src/evidence.ts", "src/quality-gate.ts", "src/checkpoint.ts", "src/review-blockers.ts",
+ "src/evidence.ts", "src/quality-gate.ts", "src/quality-gate-verdicts.ts", "src/checkpoint.ts", "src/review-blockers.ts",
+ "src/stop-resume-hook.ts", "src/spawn-guard.ts",
"src/steering.ts", "src/codex-goal-instruction.ts", "src/codex-goal-snapshot.ts", "src/codex-hook.ts",
"src/cli.ts", "src/cli-arg-parser.ts", "src/cli-output.ts", "src/cli-steering.ts", "src/cli-commands.ts",
];
diff --git a/plugins/omo/components/ulw-loop/test/paths.test.ts b/plugins/omo/components/ulw-loop/test/paths.test.ts
index be781f92..999c28ab 100644
--- a/plugins/omo/components/ulw-loop/test/paths.test.ts
+++ b/plugins/omo/components/ulw-loop/test/paths.test.ts
@@ -1,6 +1,9 @@
+import { join, posix, win32 } from "node:path";
+
import { describe, expect, it } from "vitest";
import {
+ isWithinAttemptDir,
normalizeUlwLoopSessionId,
repoRelative,
ulwLoopBriefPath,
@@ -12,28 +15,28 @@ import {
describe("ulwLoopDir(repo)", () => {
it("returns repo + '/.omo/ulw-loop'", () => {
// when/then
- expect(ulwLoopDir("/repo")).toBe("/repo/.omo/ulw-loop");
+ expect(ulwLoopDir("/repo")).toBe(join("/repo", ".omo", "ulw-loop"));
});
it("#given a session id #when resolving the loop dir #then scopes artifacts under that session", () => {
// when/then
- expect(ulwLoopDir("/repo", { sessionId: "sess_abc" })).toBe("/repo/.omo/ulw-loop/sess_abc");
+ expect(ulwLoopDir("/repo", { sessionId: "sess_abc" })).toBe(join("/repo", ".omo", "ulw-loop", "sess_abc"));
});
});
describe("ulw-loop*Path helpers", () => {
it("compose artifact filenames under ulwLoopDir", () => {
// when/then
- expect(ulwLoopBriefPath("/r")).toBe("/r/.omo/ulw-loop/brief.md");
- expect(ulwLoopGoalsPath("/r")).toBe("/r/.omo/ulw-loop/goals.json");
- expect(ulwLoopLedgerPath("/r")).toBe("/r/.omo/ulw-loop/ledger.jsonl");
+ expect(ulwLoopBriefPath("/r")).toBe(join("/r", ".omo", "ulw-loop", "brief.md"));
+ expect(ulwLoopGoalsPath("/r")).toBe(join("/r", ".omo", "ulw-loop", "goals.json"));
+ expect(ulwLoopLedgerPath("/r")).toBe(join("/r", ".omo", "ulw-loop", "ledger.jsonl"));
});
it("#given a session id #when composing artifact filenames #then returns session-scoped paths", () => {
// when/then
- expect(ulwLoopBriefPath("/r", { sessionId: "session-A" })).toBe("/r/.omo/ulw-loop/session-A/brief.md");
- expect(ulwLoopGoalsPath("/r", { sessionId: "session-A" })).toBe("/r/.omo/ulw-loop/session-A/goals.json");
- expect(ulwLoopLedgerPath("/r", { sessionId: "session-A" })).toBe("/r/.omo/ulw-loop/session-A/ledger.jsonl");
+ expect(ulwLoopBriefPath("/r", { sessionId: "session-A" })).toBe(join("/r", ".omo", "ulw-loop", "session-A", "brief.md"));
+ expect(ulwLoopGoalsPath("/r", { sessionId: "session-A" })).toBe(join("/r", ".omo", "ulw-loop", "session-A", "goals.json"));
+ expect(ulwLoopLedgerPath("/r", { sessionId: "session-A" })).toBe(join("/r", ".omo", "ulw-loop", "session-A", "ledger.jsonl"));
});
});
@@ -60,3 +63,35 @@ describe("repoRelative", () => {
expect(repoRelative("/elsewhere/file", "/repo")).toBe("/elsewhere/file");
});
});
+
+describe("isWithinAttemptDir", () => {
+ const posixRoot = "/repo/.omo/evidence/ulw/s1/g1/a1";
+ const win32Root = "C:\\repo\\.omo\\evidence\\ulw\\s1\\g1\\a1";
+
+ it("#given a child artifact #when checked on posix #then it is contained", () => {
+ expect(isWithinAttemptDir(`${posixRoot}/cli-pass.txt`, posixRoot, posix)).toBe(true);
+ });
+
+ it("#given a child artifact #when checked with win32 separators #then it is contained", () => {
+ expect(isWithinAttemptDir(`${win32Root}\\cli-pass.txt`, win32Root, win32)).toBe(true);
+ });
+
+ it("#given the attempt root itself #when checked #then it is contained", () => {
+ expect(isWithinAttemptDir(posixRoot, posixRoot, posix)).toBe(true);
+ expect(isWithinAttemptDir(win32Root, win32Root, win32)).toBe(true);
+ });
+
+ it("#given a sibling dir sharing the prefix #when checked #then it is outside", () => {
+ expect(isWithinAttemptDir("/repo/.omo/evidence/ulw/s1/g1/a1x/f.txt", posixRoot, posix)).toBe(false);
+ expect(isWithinAttemptDir(`${win32Root}x\\f.txt`, win32Root, win32)).toBe(false);
+ });
+
+ it("#given a prior-attempt artifact #when checked #then it is outside", () => {
+ expect(isWithinAttemptDir("/repo/.omo/evidence/ulw/s1/g1/a0/f.txt", posixRoot, posix)).toBe(false);
+ expect(isWithinAttemptDir("C:\\repo\\.omo\\evidence\\ulw\\s1\\g1\\a0\\f.txt", win32Root, win32)).toBe(false);
+ });
+
+ it("#given a different-drive path #when checked on win32 #then it is outside", () => {
+ expect(isWithinAttemptDir("D:\\elsewhere\\f.txt", win32Root, win32)).toBe(false);
+ });
+});
diff --git a/plugins/omo/components/ulw-loop/test/quality-gate.test.ts b/plugins/omo/components/ulw-loop/test/quality-gate.test.ts
index 8babaaa9..c2724a64 100644
--- a/plugins/omo/components/ulw-loop/test/quality-gate.test.ts
+++ b/plugins/omo/components/ulw-loop/test/quality-gate.test.ts
@@ -224,8 +224,8 @@ describe("validateQualityGate", () => {
}),
);
- // then
- expect(error.message).toContain("not_applicable");
+ // then — a reasonless not_applicable now fails on the missing reason field
+ expect(error.message).toContain("reason");
});
it("#given criteria coverage misses required criteria #when validated #then it is rejected", () => {
@@ -250,3 +250,56 @@ describe("validateQualityGate", () => {
expect(error.message).toContain("criteriaCoverage.userOutcomeReview");
});
});
+
+describe("quality gate middle states (WATCH / reasoned not_applicable)", () => {
+ it("#given codeQualityStatus WATCH with APPROVE #when validating #then the gate accepts", () => {
+ const gate = structuredClone(VALID_GATE);
+ (gate.codeReview as { codeQualityStatus: string }).codeQualityStatus = "WATCH";
+ expect(() => validateQualityGate(gate)).not.toThrow();
+ });
+
+ it("#given codeQualityStatus BLOCK #when validating #then the gate rejects", () => {
+ const gate = structuredClone(VALID_GATE);
+ (gate.codeReview as { codeQualityStatus: string }).codeQualityStatus = "BLOCK";
+ expect(() => validateQualityGate(gate)).toThrow(/codeQualityStatus/);
+ });
+
+ it("#given a reasoned not_applicable adversarial case #when validating #then the gate accepts", () => {
+ const gate = structuredClone(VALID_GATE);
+ (gate.manualQa.adversarialCases[0] as { verdict: string; reason?: string }).verdict = "not_applicable";
+ (gate.manualQa.adversarialCases[0] as { verdict: string; reason?: string }).reason = "doc-only change";
+ expect(() => validateQualityGate(gate)).not.toThrow();
+ });
+
+ it("#given a reasonless not_applicable adversarial case #when validating #then the gate rejects", () => {
+ const gate = structuredClone(VALID_GATE);
+ (gate.manualQa.adversarialCases[0] as { verdict: string }).verdict = "not_applicable";
+ expect(() => validateQualityGate(gate)).toThrow(/reason/);
+ });
+
+ it("#given a not_applicable surface evidence verdict #when validating #then the gate still rejects", () => {
+ const gate = structuredClone(VALID_GATE);
+ (gate.manualQa.surfaceEvidence[0] as { verdict: string }).verdict = "not_applicable";
+ expect(() => validateQualityGate(gate)).toThrow(/not_applicable/);
+ });
+});
+
+describe("validateQualityGate attempt containment", () => {
+ const ATTEMPT_OPTS = { ...FS_OPTS, currentAttemptDir: "test/fixtures/artifacts" } as const;
+
+ it("#given artifacts inside the current attempt dir #when validating #then the gate accepts", () => {
+ expect(() => validateQualityGate(makeGate(), ATTEMPT_OPTS)).not.toThrow();
+ });
+
+ it("#given an artifact outside the current attempt dir #when validating #then the gate rejects naming the path", () => {
+ const opts = { ...FS_OPTS, currentAttemptDir: "test/fixtures/elsewhere" } as const;
+ expect(() => validateQualityGate(makeGate(), opts)).toThrow(
+ /\(test\/fixtures\/artifacts\/cli-pass\.txt\) must point to an artifact from the current attempt \(test\/fixtures\/elsewhere\)/,
+ );
+ });
+
+ it("#given a sibling dir sharing the attempt dir prefix #when validating #then the gate still rejects", () => {
+ const opts = { ...FS_OPTS, currentAttemptDir: "test/fixtures/artifact" } as const;
+ expect(() => validateQualityGate(makeGate(), opts)).toThrow(/current attempt/);
+ });
+});
diff --git a/plugins/omo/components/ulw-loop/test/skill-contract.test.ts b/plugins/omo/components/ulw-loop/test/skill-contract.test.ts
deleted file mode 100644
index ec8e98b2..00000000
--- a/plugins/omo/components/ulw-loop/test/skill-contract.test.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { readFile } from "node:fs/promises";
-
-import { describe, expect, it } from "vitest";
-
-const SKILL_URL = new URL("../skills/ulw-loop/SKILL.md", import.meta.url);
-const FULL_WORKFLOW_URL = new URL("../skills/ulw-loop/references/full-workflow.md", import.meta.url);
-
-function wordCount(text: string): number {
- return text.split(/\s+/).filter(Boolean).length;
-}
-
-describe("ulw-loop skill contract", () => {
- it("#given full workflow #when tier triage is inspected #then criteria scale by LIGHT/HEAVY with upgrade-only ratchet", async () => {
- // given
- const workflow = await readFile(FULL_WORKFLOW_URL, "utf8");
-
- // then
- expect(workflow).toMatch(/[Tt]ier triage/);
- expect(workflow).toMatch(/LIGHT/);
- expect(workflow).toMatch(/HEAVY/);
- expect(workflow).toMatch(/1-2 successCriteria/);
- expect(workflow).toMatch(/3\+ criteria|3\+ successCriteria/);
- expect(workflow).toMatch(/When unsure[^.]{0,30}HEAVY/);
- expect(workflow).toMatch(/never downgrade/i);
- });
-
- it("#given full workflow #when evidence rules are inspected #then tautological tests are rejected and the light quality gate is named", async () => {
- // given
- const workflow = await readFile(FULL_WORKFLOW_URL, "utf8");
-
- // then
- expect(workflow).toMatch(/mirrors its implementation/);
- expect(workflow).toMatch(/none-applicable/);
- });
-
- it("#given full workflow #when optimization work is planned #then speed and behavior evidence are required per attempt", async () => {
- // given
- const workflow = await readFile(FULL_WORKFLOW_URL, "utf8");
-
- // then
- expect(workflow).toMatch(/(?:optimization|performance) work[^.]+baseline speed[^.]+before/i);
- expect(workflow).toMatch(/baseline speed[^.]+behavior[^.]+regression/i);
- expect(workflow).toMatch(
- /(?:each|every) (?:try|attempt)[^.]+speed[^.]+(?:behavior|regression)[^.]+(?:keep|revert|iterate)/i,
- );
- });
-
- it("#given full workflow #when checkpoint guidance is inspected #then non-final and final criteria gates differ", async () => {
- // given
- const workflow = await readFile(FULL_WORKFLOW_URL, "utf8");
-
- // then
- expect(workflow).toMatch(/non-final aggregate goal[^.]+essential[^.]+pass/i);
- expect(workflow).toMatch(/non-essential criteria may remain pending/i);
- expect(workflow).toMatch(/final aggregate goal[^.]+every criterion across the whole plan/i);
- expect(workflow).toMatch(/final aggregate completion requires all criteria across the whole plan/i);
- expect(workflow).toMatch(/5 cycles on one goal without required criteria passing/i);
- });
-
- it("#given full workflow #when echo discipline is inspected #then the ultraqa class list is enumerated once and budgets hold", async () => {
- // given
- const workflow = await readFile(FULL_WORKFLOW_URL, "utf8");
- const skill = await readFile(SKILL_URL, "utf8");
-
- // then
- expect(workflow.match(/malformed input, prompt injection/g)?.length ?? 0).toBe(1);
- expect(wordCount(workflow)).toBeLessThanOrEqual(3697);
- expect(wordCount(skill)).toBeLessThanOrEqual(625);
- });
-});
diff --git a/plugins/omo/components/ulw-loop/test/spawn-guard.test.ts b/plugins/omo/components/ulw-loop/test/spawn-guard.test.ts
new file mode 100644
index 00000000..ba1a6bf1
--- /dev/null
+++ b/plugins/omo/components/ulw-loop/test/spawn-guard.test.ts
@@ -0,0 +1,228 @@
+import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
+import { mkdtemp, rm } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+
+import type { PreToolUsePayload } from "../src/codex-hook.ts";
+import { applySpawnGuards } from "../src/spawn-guard.ts";
+
+let workDir: string;
+let originalLimit: string | undefined;
+
+beforeEach(async () => {
+ workDir = await mkdtemp(join(tmpdir(), "ulw-spawn-guard-"));
+ originalLimit = process.env["OMO_SPAWN_FANOUT_LIMIT"];
+ delete process.env["OMO_SPAWN_FANOUT_LIMIT"];
+});
+
+afterEach(async () => {
+ if (originalLimit === undefined) delete process.env["OMO_SPAWN_FANOUT_LIMIT"];
+ else process.env["OMO_SPAWN_FANOUT_LIMIT"] = originalLimit;
+ await rm(workDir, { recursive: true, force: true });
+});
+
+function payload(toolName: string, toolInput: Record<string, unknown>): PreToolUsePayload {
+ return {
+ hook_event_name: "PreToolUse",
+ session_id: "s1",
+ turn_id: "t1",
+ transcript_path: null,
+ cwd: workDir,
+ model: "gpt-5.6-sol",
+ permission_mode: "default",
+ tool_name: toolName,
+ tool_use_id: "tu1",
+ tool_input: toolInput,
+ };
+}
+
+function sessionDir(): string {
+ return join(workDir, ".omo", "ulw-loop", "s1");
+}
+
+function criterion(id: string): Record<string, unknown> {
+ return {
+ id,
+ scenario: `scenario ${id}`,
+ userModel: "happy",
+ expectedEvidence: "evidence",
+ capturedEvidence: "captured",
+ status: "pass",
+ capturedAt: "2026-07-11T00:00:00.000Z",
+ };
+}
+
+function writeGoals(planOverrides: Record<string, unknown> = {}): void {
+ mkdirSync(sessionDir(), { recursive: true });
+ writeFileSync(
+ join(sessionDir(), "goals.json"),
+ JSON.stringify({
+ version: 1,
+ createdAt: "2026-07-11T00:00:00.000Z",
+ updatedAt: "2026-07-11T00:00:00.000Z",
+ briefPath: ".omo/ulw-loop/s1/brief.md",
+ goalsPath: ".omo/ulw-loop/s1/goals.json",
+ ledgerPath: ".omo/ulw-loop/s1/ledger.jsonl",
+ codexGoalMode: "aggregate",
+ goals: [
+ {
+ id: "g1",
+ title: "Final goal",
+ objective: "Final goal",
+ status: "in_progress",
+ successCriteria: [criterion("C001"), criterion("C002")],
+ attempt: 1,
+ createdAt: "2026-07-11T00:00:00.000Z",
+ updatedAt: "2026-07-11T00:00:00.000Z",
+ },
+ ],
+ activeGoalId: "g1",
+ ...planOverrides,
+ }),
+ );
+}
+
+function deny(output: string): { permissionDecision: string; permissionDecisionReason: string } {
+ return JSON.parse(output).hookSpecificOutput;
+}
+
+describe("applySpawnGuards fan-out cap", () => {
+ it("#given spawns under the limit #when guarded #then allows and counts", () => {
+ writeGoals();
+
+ expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
+
+ const counter = JSON.parse(readFileSync(join(sessionDir(), "spawn-count.json"), "utf8"));
+ expect(counter.count).toBe(1);
+ });
+
+ it("#given the env limit exceeded #when guarded #then denies naming count/limit", () => {
+ writeGoals();
+ process.env["OMO_SPAWN_FANOUT_LIMIT"] = "3";
+
+ expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
+ expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
+ expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
+ const fourth = applySpawnGuards(payload("spawn_agent", { message: "scan" }));
+
+ const output = deny(fourth);
+ expect(output.permissionDecision).toBe("deny");
+ expect(output.permissionDecisionReason).toContain("4/3");
+ });
+
+ it("#given no ulw-loop session state #when guarded #then no-ops without counting", () => {
+ expect(applySpawnGuards(payload("spawn_agent", { message: "scan" }))).toBe("");
+ });
+
+ it("#given a non-spawn tool #when guarded #then no-ops", () => {
+ writeGoals();
+
+ expect(applySpawnGuards(payload("create_goal", { objective: "x" }))).toBe("");
+ });
+
+ it("#given the observed dotted v2 token #when guarded #then it counts too", () => {
+ writeGoals();
+ process.env["OMO_SPAWN_FANOUT_LIMIT"] = "1";
+
+ expect(applySpawnGuards(payload("collaboration.spawn_agent", { message: "scan" }))).toBe("");
+ const second = applySpawnGuards(payload("collaborationspawn_agent", { message: "scan" }));
+
+ expect(deny(second).permissionDecisionReason).toContain("2/1");
+ });
+});
+
+describe("applySpawnGuards gate-artifact guard", () => {
+ it("#given a gate spawn by agent_type without artifacts #when guarded #then denies naming the missing path", () => {
+ writeGoals();
+
+ const output = applySpawnGuards(
+ payload("collaborationspawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
+ );
+
+ const parsed = deny(output);
+ expect(parsed.permissionDecision).toBe("deny");
+ expect(parsed.permissionDecisionReason).toContain("missing");
+ expect(parsed.permissionDecisionReason).toContain("g1-code-review.md");
+ });
+
+ it("#given a gate spawn identified by message only #when guarded #then still denies", () => {
+ writeGoals();
+
+ const output = applySpawnGuards(payload("spawn_agent", { message: "run the FINAL GATE REVIEW now" }));
+
+ expect(deny(output).permissionDecision).toBe("deny");
+ });
+
+ it("#given v1 artifacts on disk #when the gate spawns #then allows", () => {
+ writeGoals();
+ mkdirSync(join(workDir, ".omo", "evidence"), { recursive: true });
+ writeFileSync(join(workDir, ".omo", "evidence", "g1-code-review.md"), "report\n");
+ writeFileSync(join(workDir, ".omo", "evidence", "g1-manual-qa.md"), "matrix\n");
+
+ const output = applySpawnGuards(
+ payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
+ );
+
+ expect(output).toBe("");
+ });
+
+ it("#given a v2 plan #when the gate spawns without attempt-dir artifacts #then denies naming the attempt path", () => {
+ writeGoals({ evidenceLayoutVersion: 2 });
+ mkdirSync(join(workDir, ".omo", "evidence"), { recursive: true });
+ writeFileSync(join(workDir, ".omo", "evidence", "g1-code-review.md"), "stale flat report\n");
+
+ const output = applySpawnGuards(
+ payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
+ );
+
+ expect(deny(output).permissionDecisionReason).toContain(".omo/evidence/ulw/s1/g1/a1/g1-code-review.md");
+ });
+
+ it("#given a v2 plan with attempt-dir artifacts #when the gate spawns #then allows", () => {
+ writeGoals({ evidenceLayoutVersion: 2 });
+ const attemptDir = join(workDir, ".omo", "evidence", "ulw", "s1", "g1", "a1");
+ mkdirSync(attemptDir, { recursive: true });
+ writeFileSync(join(attemptDir, "g1-code-review.md"), "report\n");
+ writeFileSync(join(attemptDir, "g1-manual-qa.md"), "matrix\n");
+
+ const output = applySpawnGuards(
+ payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
+ );
+
+ expect(output).toBe("");
+ });
+
+ it("#given the final goal's criteria are not all pass #when the gate spawns #then no-ops", () => {
+ writeGoals({
+ goals: [
+ {
+ id: "g1",
+ title: "Final goal",
+ objective: "Final goal",
+ status: "in_progress",
+ successCriteria: [criterion("C001"), { ...criterion("C002"), status: "pending" }],
+ attempt: 1,
+ createdAt: "2026-07-11T00:00:00.000Z",
+ updatedAt: "2026-07-11T00:00:00.000Z",
+ },
+ ],
+ });
+
+ const output = applySpawnGuards(
+ payload("spawn_agent", { agent_type: "lazycodex-gate-reviewer", message: "final gate review" }),
+ );
+
+ expect(output).toBe("");
+ });
+
+ it("#given a non-gate reviewer spawn #when artifacts are missing #then never denies on the artifact rule", () => {
+ writeGoals();
+
+ const output = applySpawnGuards(
+ payload("spawn_agent", { agent_type: "lazycodex-code-reviewer", message: "review the diff" }),
+ );
+
+ expect(output).toBe("");
+ });
+});
diff --git a/plugins/omo/components/ulw-loop/test/stop-resume-hook.test.ts b/plugins/omo/components/ulw-loop/test/stop-resume-hook.test.ts
new file mode 100644
index 00000000..e9b090fb
--- /dev/null
+++ b/plugins/omo/components/ulw-loop/test/stop-resume-hook.test.ts
@@ -0,0 +1,193 @@
+import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
+import { mkdtemp, rm } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+
+import { runStopResumeHook } from "../src/stop-resume-hook.ts";
+
+let workDir: string;
+
+beforeEach(async () => {
+ workDir = await mkdtemp(join(tmpdir(), "ulw-stop-resume-"));
+});
+
+afterEach(async () => {
+ await rm(workDir, { recursive: true, force: true });
+});
+
+function stopPayload(overrides: Record<string, unknown> = {}): Record<string, unknown> {
+ return {
+ hook_event_name: "Stop",
+ session_id: "s1",
+ turn_id: "t1",
+ transcript_path: join(workDir, "transcript.jsonl"),
+ cwd: workDir,
+ model: "gpt-5.6-sol",
+ permission_mode: "default",
+ stop_hook_active: false,
+ ...overrides,
+ };
+}
+
+function sessionDir(): string {
+ return join(workDir, ".omo", "ulw-loop", "s1");
+}
+
+function writeGoals(goals: readonly Record<string, unknown>[], planOverrides: Record<string, unknown> = {}): void {
+ mkdirSync(sessionDir(), { recursive: true });
+ writeFileSync(
+ join(sessionDir(), "goals.json"),
+ JSON.stringify({
+ version: 1,
+ createdAt: "2026-07-11T00:00:00.000Z",
+ updatedAt: "2026-07-11T00:00:00.000Z",
+ briefPath: ".omo/ulw-loop/s1/brief.md",
+ goalsPath: ".omo/ulw-loop/s1/goals.json",
+ ledgerPath: ".omo/ulw-loop/s1/ledger.jsonl",
+ codexGoalMode: "aggregate",
+ goals,
+ ...planOverrides,
+ }),
+ );
+ writeFileSync(join(sessionDir(), "ledger.jsonl"), "");
+ writeFileSync(join(workDir, "transcript.jsonl"), "");
+}
+
+function writeBoulderPlan(remaining: boolean): string {
+ mkdirSync(join(workDir, ".omo", "plans"), { recursive: true });
+ writeFileSync(
+ join(workDir, ".omo", "plans", "p.md"),
+ remaining ? "## TODOs\n- [ ] pending task\n" : "## TODOs\n- [x] done task\n",
+ );
+ return ".omo/plans/p.md";
+}
+
+function pendingGoal(id = "g1", status = "pending"): Record<string, unknown> {
+ return {
+ id,
+ title: `Goal ${id}`,
+ objective: `Objective ${id}`,
+ status,
+ successCriteria: [],
+ attempt: 1,
+ createdAt: "2026-07-11T00:00:00.000Z",
+ updatedAt: "2026-07-11T00:00:00.000Z",
+ };
+}
+
+describe("runStopResumeHook", () => {
+ it("#given a pending goal #when the turn stops #then blocks with a resume directive", () => {
+ writeGoals([pendingGoal()]);
+
+ const output = runStopResumeHook(stopPayload());
+
+ const parsed = JSON.parse(output);
+ expect(parsed.decision).toBe("block");
+ expect(parsed.reason).toContain("omo ulw-loop status");
+ });
+
+ it("#given stop_hook_active #when the hook runs #then no-ops", () => {
+ writeGoals([pendingGoal()]);
+
+ expect(runStopResumeHook(stopPayload({ stop_hook_active: true }))).toBe("");
+ });
+
+ it("#given a malformed payload #when the hook runs #then no-ops", () => {
+ writeGoals([pendingGoal()]);
+
+ expect(runStopResumeHook({ hook_event_name: "Stop" })).toBe("");
+ });
+
+ it("#given an active boulder work with remaining plan tasks #when the hook runs #then defers to start-work-continuation", () => {
+ writeGoals([pendingGoal()]);
+ const plan = writeBoulderPlan(true);
+ writeFileSync(
+ join(workDir, ".omo", "boulder.json"),
+ JSON.stringify({ works: { w1: { session_ids: ["codex:s1"], status: "active", active_plan: plan } } }),
+ );
+
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given an active boulder work whose plan is exhausted #when the hook runs #then resumes instead of deferring", () => {
+ writeGoals([pendingGoal()]);
+ const plan = writeBoulderPlan(false);
+ writeFileSync(
+ join(workDir, ".omo", "boulder.json"),
+ JSON.stringify({ works: { w1: { session_ids: ["codex:s1"], status: "active", active_plan: plan } } }),
+ );
+
+ expect(JSON.parse(runStopResumeHook(stopPayload())).decision).toBe("block");
+ });
+
+ it("#given a flat legacy boulder work with remaining plan tasks #when the hook runs #then still defers", () => {
+ writeGoals([pendingGoal()]);
+ const plan = writeBoulderPlan(true);
+ writeFileSync(
+ join(workDir, ".omo", "boulder.json"),
+ JSON.stringify({ session_ids: ["codex:s1"], status: "active", active_plan: plan }),
+ );
+
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given a context-pressure marker in the transcript #when the hook runs #then no-ops", () => {
+ writeGoals([pendingGoal()]);
+ writeFileSync(join(workDir, "transcript.jsonl"), "note: context compacted mid-run\n");
+
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given no ulw-loop state #when the hook runs #then no-ops", () => {
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given all goals complete #when the hook runs #then no-ops", () => {
+ writeGoals([pendingGoal("g1", "complete"), pendingGoal("g2", "complete")]);
+
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given blocked and failed goals only #when the hook runs #then no-ops", () => {
+ writeGoals([pendingGoal("g1", "blocked"), pendingGoal("g2", "failed")]);
+
+ expect(runStopResumeHook(stopPayload())).toBe("");
+ });
+
+ it("#given a static ledger #when the hook fires three times #then caps after two and marks stuck", () => {
+ writeGoals([pendingGoal()]);
+
+ const first = runStopResumeHook(stopPayload());
+ const second = runStopResumeHook(stopPayload());
+ const third = runStopResumeHook(stopPayload());
+
+ expect(JSON.parse(first).decision).toBe("block");
+ expect(JSON.parse(second).decision).toBe("block");
+ expect(third).toBe("");
+ const counter = JSON.parse(readFileSync(join(sessionDir(), "auto-resume-g1.json"), "utf8"));
+ expect(counter.count).toBe(2);
+ expect(existsSync(join(sessionDir(), "auto-resume-g1.stuck"))).toBe(true);
+ expect(readFileSync(join(sessionDir(), "ledger.jsonl"), "utf8")).toBe("");
+ });
+
+ it("#given a session id needing normalization #when the hook blocks #then the directive carries the normalized flag", () => {
+ writeGoals([pendingGoal()]);
+
+ const output = runStopResumeHook(stopPayload({ session_id: "s1/" }));
+
+ expect(JSON.parse(output).reason).toContain("--session-id s1");
+ });
+
+ it("#given ledger movement between stops #when the hook fires again #then the cap resets", () => {
+ writeGoals([pendingGoal()]);
+
+ runStopResumeHook(stopPayload());
+ runStopResumeHook(stopPayload());
+ appendFileSync(join(sessionDir(), "ledger.jsonl"), '{"kind":"goal_started"}\n');
+ const third = runStopResumeHook(stopPayload());
+
+ expect(JSON.parse(third).decision).toBe("block");
+ expect(existsSync(join(sessionDir(), "auto-resume-g1.stuck"))).toBe(false);
+ });
+});
diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.js
index ea85e77a..099ca339 100755
--- a/plugins/omo/dist/cli-node/index.js
+++ b/plugins/omo/dist/cli-node/index.js
@@ -2146,7 +2146,7 @@ var package_default;
var init_package = __esm(() => {
package_default = {
name: "oh-my-opencode",
- version: "4.16.3",
+ version: "4.17.0",
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
main: "./dist/index.js",
types: "dist/index.d.ts",
@@ -2209,6 +2209,7 @@ var init_package = __esm(() => {
"packages/lsp-tools-mcp/dist",
"packages/lsp-daemon/package.json",
"packages/lsp-daemon/dist",
+ "packages/git-bash-mcp/package.json",
"packages/git-bash-mcp/dist",
"packages/shared-skills/package.json",
"packages/shared-skills/index.mjs",
@@ -2274,7 +2275,7 @@ var init_package = __esm(() => {
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/pi-goal/tsconfig.json && tsgo --noEmit -p packages/pi-webfetch/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
test: "bun test",
- "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
+ "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
"test:senpi": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && bun test packages/omo-senpi",
"test:windows-codex": "bun run test:codex",
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
@@ -2356,18 +2357,18 @@ var init_package = __esm(() => {
typescript: "^6.0.3"
},
optionalDependencies: {
- "oh-my-opencode-darwin-arm64": "4.16.3",
- "oh-my-opencode-darwin-x64": "4.16.3",
- "oh-my-opencode-darwin-x64-baseline": "4.16.3",
- "oh-my-opencode-linux-arm64": "4.16.3",
- "oh-my-opencode-linux-arm64-musl": "4.16.3",
- "oh-my-opencode-linux-x64": "4.16.3",
- "oh-my-opencode-linux-x64-baseline": "4.16.3",
- "oh-my-opencode-linux-x64-musl": "4.16.3",
- "oh-my-opencode-linux-x64-musl-baseline": "4.16.3",
- "oh-my-opencode-windows-arm64": "4.16.3",
- "oh-my-opencode-windows-x64": "4.16.3",
- "oh-my-opencode-windows-x64-baseline": "4.16.3"
+ "oh-my-opencode-darwin-arm64": "4.17.0",
+ "oh-my-opencode-darwin-x64": "4.17.0",
+ "oh-my-opencode-darwin-x64-baseline": "4.17.0",
+ "oh-my-opencode-linux-arm64": "4.17.0",
+ "oh-my-opencode-linux-arm64-musl": "4.17.0",
+ "oh-my-opencode-linux-x64": "4.17.0",
+ "oh-my-opencode-linux-x64-baseline": "4.17.0",
+ "oh-my-opencode-linux-x64-musl": "4.17.0",
+ "oh-my-opencode-linux-x64-musl-baseline": "4.17.0",
+ "oh-my-opencode-windows-arm64": "4.17.0",
+ "oh-my-opencode-windows-x64": "4.17.0",
+ "oh-my-opencode-windows-x64-baseline": "4.17.0"
},
overrides: {
"@earendil-works/pi-agent-core": "0.80.3",
@@ -9430,6 +9431,11 @@ var init_category_model_requirements = __esm(() => {
},
deep: {
fallbackChain: [
+ {
+ providers: ["openai", "vercel"],
+ model: "gpt-5.6-terra",
+ variant: "xhigh"
+ },
{
providers: ["openai", "vercel"],
model: "gpt-5.6-sol",
@@ -9493,6 +9499,11 @@ var init_category_model_requirements = __esm(() => {
},
"unspecified-low": {
fallbackChain: [
+ {
+ providers: ["openai", "vercel"],
+ model: "gpt-5.6-luna",
+ variant: "xhigh"
+ },
{
providers: ["anthropic", "github-copilot", "opencode", "vercel"],
model: "claude-sonnet-4-6"
@@ -10080,6 +10091,38 @@ var init_supplemental_entries = __esm(() => {
output: 128000
}
},
+ "gpt-5.6-terra": {
+ id: "gpt-5.6-terra",
+ family: "gpt-mini",
+ reasoning: true,
+ temperature: false,
+ toolCall: true,
+ modalities: {
+ input: ["text", "image", "pdf"],
+ output: ["text"]
+ },
+ limit: {
+ context: 1050000,
+ input: 922000,
+ output: 128000
+ }
+ },
+ "gpt-5.6-luna": {
+ id: "gpt-5.6-luna",
+ family: "gpt-nano",
+ reasoning: true,
+ temperature: false,
+ toolCall: true,
+ modalities: {
+ input: ["text", "image", "pdf"],
+ output: ["text"]
+ },
+ limit: {
+ context: 1050000,
+ input: 922000,
+ output: 128000
+ }
+ },
"gpt-5.5": {
id: "gpt-5.5",
family: "gpt",
@@ -10686,28 +10729,7 @@ var init_agent_display_names = __esm(() => {
};
});
// packages/omo-opencode/src/tools/delegate-task/anthropic-categories.ts
-var UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
-You are working on tasks that don't fit specific categories but require moderate effort.
-
-<Selection_Gate>
-BEFORE selecting this category, VERIFY ALL conditions:
-1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
-2. Task requires more than trivial effort but is NOT system-wide
-3. Scope is contained within a few files/modules
-
-If task fits ANY other category, DO NOT select unspecified-low.
-This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
-</Selection_Gate>
-</Category_Context>
-
-<Caller_Warning>
-THIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-6).
-
-**PROVIDE CLEAR STRUCTURE:**
-1. MUST DO: Enumerate required actions explicitly
-2. MUST NOT DO: State forbidden actions to prevent scope creep
-3. EXPECTED OUTPUT: Define concrete success criteria
-</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
+var UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require substantial effort.
<Selection_Gate>
@@ -10723,12 +10745,6 @@ If task is unclassifiable but moderate-effort, use unspecified-low instead.
</Category_Context>`, ANTHROPIC_CATEGORIES;
var init_anthropic_categories = __esm(() => {
ANTHROPIC_CATEGORIES = [
- {
- name: "unspecified-low",
- config: { model: "anthropic/claude-sonnet-4-6" },
- description: "Tasks that don't fit other categories, low effort required",
- promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
- },
{
name: "unspecified-high",
config: { model: "anthropic/claude-opus-4-7", variant: "max" },
@@ -11025,6 +11041,27 @@ EXPECTED OUTPUT:
\`\`\`
If your prompt lacks this structure, REWRITE IT before delegating.
+</Caller_Warning>`, UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
+You are working on tasks that don't fit specific categories but require moderate effort.
+
+<Selection_Gate>
+BEFORE selecting this category, VERIFY ALL conditions:
+1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
+2. Task requires more than trivial effort but is NOT system-wide
+3. Scope is contained within a few files/modules
+
+If task fits ANY other category, DO NOT select unspecified-low.
+This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
+</Selection_Gate>
+</Category_Context>
+
+<Caller_Warning>
+THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
+
+**PROVIDE CLEAR STRUCTURE:**
+1. MUST DO: Enumerate required actions explicitly
+2. MUST NOT DO: State forbidden actions to prevent scope creep
+3. EXPECTED OUTPUT: Define concrete success criteria
</Caller_Warning>`, OPENAI_CATEGORIES;
var init_openai_categories = __esm(() => {
init_types();
@@ -11037,7 +11074,7 @@ var init_openai_categories = __esm(() => {
},
{
name: "deep",
- config: { model: "openai/gpt-5.6-sol", variant: "high" },
+ config: { model: "openai/gpt-5.6-terra", variant: "xhigh" },
description: "Goal-oriented autonomous problem-solving on hairy problems requiring deep research. ONE goal + ONE deliverable per call — multiple goals must fan out as parallel `deep` calls, never bundled into one.",
promptAppend: DEEP_CATEGORY_PROMPT_APPEND,
resolvePromptAppend: resolveDeepCategoryPromptAppend
@@ -11047,6 +11084,12 @@ var init_openai_categories = __esm(() => {
config: { model: "openai/gpt-5.4-mini" },
description: "Trivial tasks - single file changes, typo fixes, simple modifications",
promptAppend: QUICK_CATEGORY_PROMPT_APPEND
+ },
+ {
+ name: "unspecified-low",
+ config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
+ description: "Tasks that don't fit other categories, low effort required",
+ promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
}
];
});
@@ -72609,7 +72652,7 @@ var package_default2;
var init_package2 = __esm(() => {
package_default2 = {
name: "@oh-my-opencode/omo-codex",
- version: "4.16.3",
+ version: "4.17.0",
type: "module",
private: true,
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -75426,7 +75469,12 @@ function shouldCopyPluginPath(path7, root) {
if (relative5 === "")
return true;
const parts = relative5.split(sep5);
- return !parts.some((part) => part === ".git" || part === "node_modules");
+ if (parts.some((part) => part === ".git" || part === "node_modules"))
+ return false;
+ return !isNestedComponentMcpManifest(parts);
+}
+function isNestedComponentMcpManifest(parts) {
+ return parts.length > 1 && parts.at(-1) === ".mcp.json";
}
var removedSparkshellReferencePattern = /\b(?:sparkshell|spark[-_\s]+shell)\b/i;
var removedSparkshellPromptSurfaceDirs = new Set([".codex-plugin", "agents", "bundled-rules", "hooks", "skills"]);
@@ -75953,6 +76001,9 @@ function stripTomlLineComment(line) {
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
"explorer",
+ "lazycodex-worker-high",
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
"librarian",
"metis",
"momus",
@@ -76370,12 +76421,18 @@ import { readFile as readFile10 } from "node:fs/promises";
import { join as join38 } from "node:path";
var FALLBACK_CODEX_MODEL_CATALOG = {
current: {
- model: "gpt-5.5",
- modelContextWindow: 400000,
+ model: "gpt-5.6-sol",
+ modelContextWindow: 372000,
modelReasoningEffort: "high",
planModeReasoningEffort: "xhigh"
},
managedProfiles: [
+ {
+ model: "gpt-5.5",
+ modelContextWindow: 400000,
+ modelReasoningEffort: "high",
+ planModeReasoningEffort: "xhigh"
+ },
{
model: "gpt-5.5",
modelContextWindow: 1e6,
@@ -76819,32 +76876,88 @@ import { join as join41 } from "node:path";
var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
[
"explorer",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"librarian",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"momus",
- {
- previous: { model: "gpt-5.5", effort: "xhigh" },
- current: { model: "gpt-5.6-sol", effort: "ultra" }
- }
+ [
+ {
+ previous: { model: "gpt-5.5", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "ultra" }
+ }
+ ]
+ ],
+ [
+ "plan",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-worker-medium",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "high" },
+ current: { model: "gpt-5.6-luna", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-qa-executor",
+ [
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "high" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-gate-reviewer",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "high" }
+ }
+ ]
]
]);
function resolveManagedAgentReasoning(input) {
- const upgrade = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
- if (upgrade !== undefined && input.preserved.model === upgrade.previous.model && input.preserved.effort === upgrade.previous.effort && input.bundledModel === upgrade.current.model && input.bundledEffort === upgrade.current.effort) {
- return upgrade.current.effort;
+ const steps = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
+ if (steps === undefined)
+ return input.preserved.effort;
+ const latest = steps[steps.length - 1];
+ if (latest === undefined)
+ return input.preserved.effort;
+ if (input.bundledModel !== latest.current.model || input.bundledEffort !== latest.current.effort) {
+ return input.preserved.effort;
}
- return input.preserved.effort;
+ const preservedMatchesAnyStep = steps.some((step) => input.preserved.model === step.previous.model && input.preserved.effort === step.previous.effort);
+ return preservedMatchesAnyStep ? latest.current.effort : input.preserved.effort;
}
// packages/omo-codex/src/install/preserved-agent-settings.ts
@@ -78234,6 +78347,9 @@ var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plu
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
"explorer",
+ "lazycodex-worker-high",
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
"librarian",
"metis",
"momus",
diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.js
index 2bae45f3..0ae169a2 100755
--- a/plugins/omo/dist/cli/index.js
+++ b/plugins/omo/dist/cli/index.js
@@ -2145,7 +2145,7 @@ var package_default;
var init_package = __esm(() => {
package_default = {
name: "oh-my-opencode",
- version: "4.16.3",
+ version: "4.17.0",
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
main: "./dist/index.js",
types: "dist/index.d.ts",
@@ -2208,6 +2208,7 @@ var init_package = __esm(() => {
"packages/lsp-tools-mcp/dist",
"packages/lsp-daemon/package.json",
"packages/lsp-daemon/dist",
+ "packages/git-bash-mcp/package.json",
"packages/git-bash-mcp/dist",
"packages/shared-skills/package.json",
"packages/shared-skills/index.mjs",
@@ -2273,7 +2274,7 @@ var init_package = __esm(() => {
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/pi-goal/tsconfig.json && tsgo --noEmit -p packages/pi-webfetch/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json",
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
test: "bun test",
- "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
+ "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
"test:senpi": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && bun test packages/omo-senpi",
"test:windows-codex": "bun run test:codex",
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
@@ -2355,18 +2356,18 @@ var init_package = __esm(() => {
typescript: "^6.0.3"
},
optionalDependencies: {
- "oh-my-opencode-darwin-arm64": "4.16.3",
- "oh-my-opencode-darwin-x64": "4.16.3",
- "oh-my-opencode-darwin-x64-baseline": "4.16.3",
- "oh-my-opencode-linux-arm64": "4.16.3",
- "oh-my-opencode-linux-arm64-musl": "4.16.3",
- "oh-my-opencode-linux-x64": "4.16.3",
- "oh-my-opencode-linux-x64-baseline": "4.16.3",
- "oh-my-opencode-linux-x64-musl": "4.16.3",
- "oh-my-opencode-linux-x64-musl-baseline": "4.16.3",
- "oh-my-opencode-windows-arm64": "4.16.3",
- "oh-my-opencode-windows-x64": "4.16.3",
- "oh-my-opencode-windows-x64-baseline": "4.16.3"
+ "oh-my-opencode-darwin-arm64": "4.17.0",
+ "oh-my-opencode-darwin-x64": "4.17.0",
+ "oh-my-opencode-darwin-x64-baseline": "4.17.0",
+ "oh-my-opencode-linux-arm64": "4.17.0",
+ "oh-my-opencode-linux-arm64-musl": "4.17.0",
+ "oh-my-opencode-linux-x64": "4.17.0",
+ "oh-my-opencode-linux-x64-baseline": "4.17.0",
+ "oh-my-opencode-linux-x64-musl": "4.17.0",
+ "oh-my-opencode-linux-x64-musl-baseline": "4.17.0",
+ "oh-my-opencode-windows-arm64": "4.17.0",
+ "oh-my-opencode-windows-x64": "4.17.0",
+ "oh-my-opencode-windows-x64-baseline": "4.17.0"
},
overrides: {
"@earendil-works/pi-agent-core": "0.80.3",
@@ -9429,6 +9430,11 @@ var init_category_model_requirements = __esm(() => {
},
deep: {
fallbackChain: [
+ {
+ providers: ["openai", "vercel"],
+ model: "gpt-5.6-terra",
+ variant: "xhigh"
+ },
{
providers: ["openai", "vercel"],
model: "gpt-5.6-sol",
@@ -9492,6 +9498,11 @@ var init_category_model_requirements = __esm(() => {
},
"unspecified-low": {
fallbackChain: [
+ {
+ providers: ["openai", "vercel"],
+ model: "gpt-5.6-luna",
+ variant: "xhigh"
+ },
{
providers: ["anthropic", "github-copilot", "opencode", "vercel"],
model: "claude-sonnet-4-6"
@@ -10079,6 +10090,38 @@ var init_supplemental_entries = __esm(() => {
output: 128000
}
},
+ "gpt-5.6-terra": {
+ id: "gpt-5.6-terra",
+ family: "gpt-mini",
+ reasoning: true,
+ temperature: false,
+ toolCall: true,
+ modalities: {
+ input: ["text", "image", "pdf"],
+ output: ["text"]
+ },
+ limit: {
+ context: 1050000,
+ input: 922000,
+ output: 128000
+ }
+ },
+ "gpt-5.6-luna": {
+ id: "gpt-5.6-luna",
+ family: "gpt-nano",
+ reasoning: true,
+ temperature: false,
+ toolCall: true,
+ modalities: {
+ input: ["text", "image", "pdf"],
+ output: ["text"]
+ },
+ limit: {
+ context: 1050000,
+ input: 922000,
+ output: 128000
+ }
+ },
"gpt-5.5": {
id: "gpt-5.5",
family: "gpt",
@@ -10685,28 +10728,7 @@ var init_agent_display_names = __esm(() => {
};
});
// packages/omo-opencode/src/tools/delegate-task/anthropic-categories.ts
-var UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
-You are working on tasks that don't fit specific categories but require moderate effort.
-
-<Selection_Gate>
-BEFORE selecting this category, VERIFY ALL conditions:
-1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
-2. Task requires more than trivial effort but is NOT system-wide
-3. Scope is contained within a few files/modules
-
-If task fits ANY other category, DO NOT select unspecified-low.
-This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
-</Selection_Gate>
-</Category_Context>
-
-<Caller_Warning>
-THIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-6).
-
-**PROVIDE CLEAR STRUCTURE:**
-1. MUST DO: Enumerate required actions explicitly
-2. MUST NOT DO: State forbidden actions to prevent scope creep
-3. EXPECTED OUTPUT: Define concrete success criteria
-</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
+var UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
You are working on tasks that don't fit specific categories but require substantial effort.
<Selection_Gate>
@@ -10722,12 +10744,6 @@ If task is unclassifiable but moderate-effort, use unspecified-low instead.
</Category_Context>`, ANTHROPIC_CATEGORIES;
var init_anthropic_categories = __esm(() => {
ANTHROPIC_CATEGORIES = [
- {
- name: "unspecified-low",
- config: { model: "anthropic/claude-sonnet-4-6" },
- description: "Tasks that don't fit other categories, low effort required",
- promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
- },
{
name: "unspecified-high",
config: { model: "anthropic/claude-opus-4-7", variant: "max" },
@@ -11024,6 +11040,27 @@ EXPECTED OUTPUT:
\`\`\`
If your prompt lacks this structure, REWRITE IT before delegating.
+</Caller_Warning>`, UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
+You are working on tasks that don't fit specific categories but require moderate effort.
+
+<Selection_Gate>
+BEFORE selecting this category, VERIFY ALL conditions:
+1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
+2. Task requires more than trivial effort but is NOT system-wide
+3. Scope is contained within a few files/modules
+
+If task fits ANY other category, DO NOT select unspecified-low.
+This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
+</Selection_Gate>
+</Category_Context>
+
+<Caller_Warning>
+THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
+
+**PROVIDE CLEAR STRUCTURE:**
+1. MUST DO: Enumerate required actions explicitly
+2. MUST NOT DO: State forbidden actions to prevent scope creep
+3. EXPECTED OUTPUT: Define concrete success criteria
</Caller_Warning>`, OPENAI_CATEGORIES;
var init_openai_categories = __esm(() => {
init_types();
@@ -11036,7 +11073,7 @@ var init_openai_categories = __esm(() => {
},
{
name: "deep",
- config: { model: "openai/gpt-5.6-sol", variant: "high" },
+ config: { model: "openai/gpt-5.6-terra", variant: "xhigh" },
description: "Goal-oriented autonomous problem-solving on hairy problems requiring deep research. ONE goal + ONE deliverable per call \u2014 multiple goals must fan out as parallel `deep` calls, never bundled into one.",
promptAppend: DEEP_CATEGORY_PROMPT_APPEND,
resolvePromptAppend: resolveDeepCategoryPromptAppend
@@ -11046,6 +11083,12 @@ var init_openai_categories = __esm(() => {
config: { model: "openai/gpt-5.4-mini" },
description: "Trivial tasks - single file changes, typo fixes, simple modifications",
promptAppend: QUICK_CATEGORY_PROMPT_APPEND
+ },
+ {
+ name: "unspecified-low",
+ config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
+ description: "Tasks that don't fit other categories, low effort required",
+ promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
}
];
});
@@ -72553,7 +72596,7 @@ var package_default2;
var init_package2 = __esm(() => {
package_default2 = {
name: "@oh-my-opencode/omo-codex",
- version: "4.16.3",
+ version: "4.17.0",
type: "module",
private: true,
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -75370,7 +75413,12 @@ function shouldCopyPluginPath(path7, root) {
if (relative5 === "")
return true;
const parts = relative5.split(sep5);
- return !parts.some((part) => part === ".git" || part === "node_modules");
+ if (parts.some((part) => part === ".git" || part === "node_modules"))
+ return false;
+ return !isNestedComponentMcpManifest(parts);
+}
+function isNestedComponentMcpManifest(parts) {
+ return parts.length > 1 && parts.at(-1) === ".mcp.json";
}
var removedSparkshellReferencePattern = /\b(?:sparkshell|spark[-_\s]+shell)\b/i;
var removedSparkshellPromptSurfaceDirs = new Set([".codex-plugin", "agents", "bundled-rules", "hooks", "skills"]);
@@ -75897,6 +75945,9 @@ function stripTomlLineComment(line) {
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
"explorer",
+ "lazycodex-worker-high",
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
"librarian",
"metis",
"momus",
@@ -76314,12 +76365,18 @@ import { readFile as readFile10 } from "fs/promises";
import { join as join38 } from "path";
var FALLBACK_CODEX_MODEL_CATALOG = {
current: {
- model: "gpt-5.5",
- modelContextWindow: 400000,
+ model: "gpt-5.6-sol",
+ modelContextWindow: 372000,
modelReasoningEffort: "high",
planModeReasoningEffort: "xhigh"
},
managedProfiles: [
+ {
+ model: "gpt-5.5",
+ modelContextWindow: 400000,
+ modelReasoningEffort: "high",
+ planModeReasoningEffort: "xhigh"
+ },
{
model: "gpt-5.5",
modelContextWindow: 1e6,
@@ -76763,32 +76820,88 @@ import { join as join41 } from "path";
var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
[
"explorer",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"librarian",
- {
- previous: { model: "gpt-5.4-mini", effort: "low" },
- current: { model: "gpt-5.6-terra", effort: "medium" }
- }
+ [
+ {
+ previous: { model: "gpt-5.4-mini", effort: "low" },
+ current: { model: "gpt-5.6-terra", effort: "medium" }
+ },
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "low" }
+ }
+ ]
],
[
"momus",
- {
- previous: { model: "gpt-5.5", effort: "xhigh" },
- current: { model: "gpt-5.6-sol", effort: "ultra" }
- }
+ [
+ {
+ previous: { model: "gpt-5.5", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "ultra" }
+ }
+ ]
+ ],
+ [
+ "plan",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-worker-medium",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "high" },
+ current: { model: "gpt-5.6-luna", effort: "max" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-qa-executor",
+ [
+ {
+ previous: { model: "gpt-5.6-terra", effort: "medium" },
+ current: { model: "gpt-5.6-luna", effort: "high" }
+ }
+ ]
+ ],
+ [
+ "lazycodex-gate-reviewer",
+ [
+ {
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
+ current: { model: "gpt-5.6-sol", effort: "high" }
+ }
+ ]
]
]);
function resolveManagedAgentReasoning(input) {
- const upgrade = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
- if (upgrade !== undefined && input.preserved.model === upgrade.previous.model && input.preserved.effort === upgrade.previous.effort && input.bundledModel === upgrade.current.model && input.bundledEffort === upgrade.current.effort) {
- return upgrade.current.effort;
+ const steps = MANAGED_REASONING_DEFAULT_UPGRADES.get(input.agentName);
+ if (steps === undefined)
+ return input.preserved.effort;
+ const latest = steps[steps.length - 1];
+ if (latest === undefined)
+ return input.preserved.effort;
+ if (input.bundledModel !== latest.current.model || input.bundledEffort !== latest.current.effort) {
+ return input.preserved.effort;
}
- return input.preserved.effort;
+ const preservedMatchesAnyStep = steps.some((step) => input.preserved.model === step.previous.model && input.preserved.effort === step.previous.effort);
+ return preservedMatchesAnyStep ? latest.current.effort : input.preserved.effort;
}
// packages/omo-codex/src/install/preserved-agent-settings.ts
@@ -78178,6 +78291,9 @@ var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plu
var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
"explorer",
+ "lazycodex-worker-high",
+ "lazycodex-worker-low",
+ "lazycodex-worker-medium",
"librarian",
"metis",
"momus",
diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
index ed2cad95..81995ff4 100644
--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Resetting Git Bash MCP Reminder",
+ "statusMessage": "(OmO 4.17.0) Resetting Git Bash MCP Reminder",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"
}
],
diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
index 9ef966ed..c0949514 100644
--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Resetting LSP Diagnostics Cache",
+ "statusMessage": "(OmO 4.17.0) Resetting LSP Diagnostics Cache",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"
}
],
diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
index 4718d996..15374df0 100644
--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Resetting Project Rule Cache",
+ "statusMessage": "(OmO 4.17.0) Resetting Project Rule Cache",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json
index fbab9f1a..5d737df2 100644
--- a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json
+++ b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook post-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Checking CodeGraph Init Guidance",
+ "statusMessage": "(OmO 4.17.0) Checking CodeGraph Init Guidance",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook post-tool-use"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.json
index c3c5832c..4f0fd7ea 100644
--- a/plugins/omo/hooks/post-tool-use-checking-comments.json
+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use",
"timeout": 30,
- "statusMessage": "(OmO 4.16.3) Checking Comments",
+ "statusMessage": "(OmO 4.17.0) Checking Comments",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
index 4801eb1c..24aa5fac 100644
--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use",
"timeout": 60,
- "statusMessage": "(OmO 4.16.3) Checking LSP Diagnostics",
+ "statusMessage": "(OmO 4.17.0) Checking LSP Diagnostics",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"
}
],
diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
index 0d438681..92d1c5fa 100644
--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Thread Title Hygiene",
+ "statusMessage": "(OmO 4.17.0) Checking Thread Title Hygiene",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"
}
]
diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.json
index bdda165a..65b5e267 100644
--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json
+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Matching Project Rules",
+ "statusMessage": "(OmO 4.17.0) Matching Project Rules",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"
}
],
diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
index 8ec69130..c8839f18 100644
--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Enforcing Unlimited Goal Budget",
+ "statusMessage": "(OmO 4.17.0) Enforcing Unlimited Goal Budget",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"
}
],
diff --git a/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json
new file mode 100644
index 00000000..a6a7ce45
--- /dev/null
+++ b/plugins/omo/hooks/pre-tool-use-guarding-ulw-loop-spawns.json
@@ -0,0 +1,18 @@
+{
+ "hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "^(spawn_agent|collaborationspawn_agent|collaboration\\.spawn_agent)$",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use-spawn",
+ "timeout": 5,
+ "statusMessage": "(OmO 4.17.0) Guarding Ulw-Loop Spawns",
+ "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use-spawn"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
index 5dc245b5..cce8940a 100644
--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Recommending Git Bash MCP",
+ "statusMessage": "(OmO 4.17.0) Recommending Git Bash MCP",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"
}
],
diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.json
index 9401224b..e56ae1bc 100644
--- a/plugins/omo/hooks/session-start-checking-auto-update.json
+++ b/plugins/omo/hooks/session-start-checking-auto-update.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Checking Auto Update",
+ "statusMessage": "(OmO 4.17.0) Checking Auto Update",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"
}
],
diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
index 2a66ba3c..29a7b82d 100644
--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json
@@ -8,7 +8,7 @@
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
"timeout": 30,
- "statusMessage": "(OmO 4.16.3) Checking Bootstrap Provisioning"
+ "statusMessage": "(OmO 4.17.0) Checking Bootstrap Provisioning"
}
]
}
diff --git a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json
index d7a12130..77451478 100644
--- a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json
+++ b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Checking CodeGraph Bootstrap",
+ "statusMessage": "(OmO 4.17.0) Checking CodeGraph Bootstrap",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"
}
]
diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.json
index 0f924622..33a27079 100644
--- a/plugins/omo/hooks/session-start-loading-project-rules.json
+++ b/plugins/omo/hooks/session-start-loading-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Loading Project Rules",
+ "statusMessage": "(OmO 4.17.0) Loading Project Rules",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"
}
]
diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.json
index 4435e21e..7101a675 100644
--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json
+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Recording Session Telemetry",
+ "statusMessage": "(OmO 4.17.0) Recording Session Telemetry",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"
}
]
diff --git a/plugins/omo/hooks/stop-checking-start-work-continuation.json b/plugins/omo/hooks/stop-checking-start-work-continuation.json
index 49e804d0..40409c4f 100644
--- a/plugins/omo/hooks/stop-checking-start-work-continuation.json
+++ b/plugins/omo/hooks/stop-checking-start-work-continuation.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Start-Work Continuation",
+ "statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook stop"
}
]
diff --git a/plugins/omo/hooks/stop-checking-ulw-loop-resume.json b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json
new file mode 100644
index 00000000..32b16b80
--- /dev/null
+++ b/plugins/omo/hooks/stop-checking-ulw-loop-resume.json
@@ -0,0 +1,17 @@
+{
+ "hooks": {
+ "Stop": [
+ {
+ "hooks": [
+ {
+ "type": "command",
+ "command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook stop",
+ "timeout": 10,
+ "statusMessage": "(OmO 4.17.0) Checking Ulw-Loop Resume",
+ "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook stop"
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json
index 1be02f5a..8b8ee7e7 100644
--- a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json
+++ b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Start-Work Continuation",
+ "statusMessage": "(OmO 4.17.0) Checking Start-Work Continuation",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook subagent-stop"
}
]
diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
index b6f9ead3..a759b2d0 100644
--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
@@ -7,11 +7,11 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Verifying LazyCodex Executor Evidence",
+ "statusMessage": "(OmO 4.17.0) Verifying LazyCodex Executor Evidence",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"
}
],
- "matcher": "^lazycodex-executor$"
+ "matcher": "^lazycodex-worker-(low|medium|high)$"
}
]
}
diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
index ba5bb2bb..b7f1d407 100644
--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit",
"timeout": 5,
- "statusMessage": "(OmO 4.16.3) Checking Ultrawork Trigger",
+ "statusMessage": "(OmO 4.17.0) Checking Ultrawork Trigger",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
index 639d95e3..f1048e3e 100644
--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Checking Ulw-Loop Steering",
+ "statusMessage": "(OmO 4.17.0) Checking Ulw-Loop Steering",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
index c3e41c0b..0a89729a 100644
--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "(OmO 4.16.3) Loading Project Rules",
+ "statusMessage": "(OmO 4.17.0) Loading Project Rules",
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"
}
]
diff --git a/plugins/omo/model-catalog.json b/plugins/omo/model-catalog.json
index 02b14ed4..f74019af 100644
--- a/plugins/omo/model-catalog.json
+++ b/plugins/omo/model-catalog.json
@@ -1,28 +1,37 @@
{
- "version": "2026-06-04.gpt-5.5-400k-reviewer-high",
+ "version": "2026-07-11.gpt-5.6-sol-372k-high",
"current": {
- "model": "gpt-5.5",
- "model_context_window": 400000,
+ "model": "gpt-5.6-sol",
+ "model_context_window": 372000,
"model_reasoning_effort": "high",
"plan_mode_reasoning_effort": "xhigh"
},
"roles": {
"default": {
- "model": "gpt-5.5",
- "model_context_window": 400000,
+ "model": "gpt-5.6-sol",
+ "model_context_window": 372000,
"model_reasoning_effort": "high",
"plan_mode_reasoning_effort": "xhigh"
},
"verifier": {
- "model": "gpt-5.5",
+ "model": "gpt-5.6-sol",
"model_reasoning_effort": "high"
},
"worker": {
- "model": "gpt-5.5",
+ "model": "gpt-5.6-sol",
"model_reasoning_effort": "high"
}
},
"managedProfiles": [
+ {
+ "version": "legacy.gpt-5.5-400k-reviewer-high",
+ "match": {
+ "model": "gpt-5.5",
+ "model_context_window": 400000,
+ "model_reasoning_effort": "high",
+ "plan_mode_reasoning_effort": "xhigh"
+ }
+ },
{
"version": "legacy.gpt-5.5-1m",
"match": {
diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.json
index 36296bf2..d2af85a0 100644
--- a/plugins/omo/package-lock.json
+++ b/plugins/omo/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.16.3",
+ "version": "4.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.16.3",
+ "version": "4.17.0",
"workspaces": [
"components/codegraph",
"components/comment-checker",
@@ -93,7 +93,7 @@
},
"components/codegraph": {
"name": "@sisyphuslabs/codex-codegraph",
- "version": "4.16.3",
+ "version": "4.17.0",
"bin": {
"omo-codegraph": "dist/cli.js"
},
@@ -112,7 +112,7 @@
},
"components/comment-checker": {
"name": "@code-yeongyu/codex-comment-checker",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"omo-comment-checker": "dist/cli.js"
@@ -133,7 +133,7 @@
},
"components/git-bash": {
"name": "@sisyphuslabs/codex-git-bash-hook",
- "version": "4.16.3",
+ "version": "4.17.0",
"bin": {
"omo-git-bash-hook": "dist/cli.js"
},
@@ -148,7 +148,7 @@
},
"components/lazycodex-executor-verify": {
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"lazycodex-executor-verify": "dist/cli.js"
@@ -165,7 +165,7 @@
},
"components/lsp": {
"name": "@code-yeongyu/codex-lsp",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"dependencies": {
"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"
@@ -185,7 +185,7 @@
},
"components/rules": {
"name": "@code-yeongyu/codex-rules",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"dependencies": {
"picomatch": "^4.0.3"
@@ -207,7 +207,7 @@
},
"components/start-work-continuation": {
"name": "@code-yeongyu/codex-start-work-continuation",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"omo-start-work-continuation": "dist/cli.js"
@@ -224,7 +224,7 @@
},
"components/teammode": {
"name": "@sisyphuslabs/codex-teammode",
- "version": "4.16.3",
+ "version": "4.17.0",
"devDependencies": {
"@types/node": "^25.9.3",
"bun-types": "^1.3.1",
@@ -237,7 +237,7 @@
},
"components/telemetry": {
"name": "@code-yeongyu/codex-telemetry",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"omo-telemetry": "dist/cli.js"
@@ -255,7 +255,7 @@
},
"components/ultrawork": {
"name": "@code-yeongyu/codex-ultrawork",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"omo-ultrawork": "dist/cli.js"
@@ -273,7 +273,7 @@
},
"components/ulw-loop": {
"name": "@code-yeongyu/codex-ulw-loop",
- "version": "4.16.3",
+ "version": "4.17.0",
"license": "MIT",
"bin": {
"omo-ulw-loop": "dist/cli.js",
diff --git a/plugins/omo/package.json b/plugins/omo/package.json
index 9ee73374..37eb6bf2 100644
--- a/plugins/omo/package.json
+++ b/plugins/omo/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.16.3",
+ "version": "4.17.0",
"description": "Aggregate Codex plugin root for OMO components.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/scripts/migrate-codex-config/catalog.mjs b/plugins/omo/scripts/migrate-codex-config/catalog.mjs
index 0500b9a4..3c10e18e 100644
--- a/plugins/omo/scripts/migrate-codex-config/catalog.mjs
+++ b/plugins/omo/scripts/migrate-codex-config/catalog.mjs
@@ -3,24 +3,33 @@ import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
export const FALLBACK_CATALOG = {
- version: "fallback.gpt-5.5-400k-reviewer-high",
+ version: "fallback.gpt-5.6-sol-372k-high",
current: {
- model: "gpt-5.5",
- model_context_window: 400_000,
+ model: "gpt-5.6-sol",
+ model_context_window: 372_000,
model_reasoning_effort: "high",
plan_mode_reasoning_effort: "xhigh",
},
roles: {
default: {
- model: "gpt-5.5",
- model_context_window: 400_000,
+ model: "gpt-5.6-sol",
+ model_context_window: 372_000,
model_reasoning_effort: "high",
plan_mode_reasoning_effort: "xhigh",
},
- verifier: { model: "gpt-5.5", model_reasoning_effort: "high" },
- worker: { model: "gpt-5.5", model_reasoning_effort: "high" },
+ verifier: { model: "gpt-5.6-sol", model_reasoning_effort: "high" },
+ worker: { model: "gpt-5.6-sol", model_reasoning_effort: "high" },
},
managedProfiles: [
+ {
+ version: "legacy.gpt-5.5-400k-reviewer-high",
+ match: {
+ model: "gpt-5.5",
+ model_context_window: 400_000,
+ model_reasoning_effort: "high",
+ plan_mode_reasoning_effort: "xhigh",
+ },
+ },
{
version: "legacy.gpt-5.5-1m",
match: {
diff --git a/plugins/omo/scripts/sync-skills.mjs b/plugins/omo/scripts/sync-skills.mjs
index 23c5c8a6..5f12d3b6 100644
--- a/plugins/omo/scripts/sync-skills.mjs
+++ b/plugins/omo/scripts/sync-skills.mjs
@@ -54,11 +54,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
`;
@@ -156,6 +156,12 @@ failed, investigate the underlying uncertainty with the \`debugging\` skill when
runtime behavior may be wrong, fix with evidence, and rerun the affected lane
before claiming completion, creating or handing off a PR, or merging.
+A rejecting lane must name its blockers inline in its final message — each
+blocker cites the violated goal criterion or requirement plus an evidence
+pointer. A bare REJECT/FAIL token without findings is not a verdict; treat it
+as an inconclusive lane (one bounded respawn, then record it inconclusive with
+that reason).
+
When reviewing a PR or branch, collect diff, file contents, and verification
results from a dedicated review worktree attached to that branch. Never
checkout, test, or edit the review branch in the main worktree.
diff --git a/plugins/omo/skills/init-deep/SKILL.md b/plugins/omo/skills/init-deep/SKILL.md
index b700df08..e08682fd 100644
--- a/plugins/omo/skills/init-deep/SKILL.md
+++ b/plugins/omo/skills/init-deep/SKILL.md
@@ -18,11 +18,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
# /init-deep
diff --git a/plugins/omo/skills/refactor/SKILL.md b/plugins/omo/skills/refactor/SKILL.md
index 7d161732..f9aa761b 100644
--- a/plugins/omo/skills/refactor/SKILL.md
+++ b/plugins/omo/skills/refactor/SKILL.md
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
export const REFACTOR_TEMPLATE = `# Intelligent Refactor Command
diff --git a/plugins/omo/skills/remove-ai-slops/SKILL.md b/plugins/omo/skills/remove-ai-slops/SKILL.md
index ba06b751..c00ba210 100644
--- a/plugins/omo/skills/remove-ai-slops/SKILL.md
+++ b/plugins/omo/skills/remove-ai-slops/SKILL.md
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
# Remove AI Slops Skill
@@ -84,7 +84,7 @@ The agent looks for these nine categories. The first three are stylistic, the ne
**Hard rule**: only apply when behavior equivalence is obvious. Do NOT change algorithms with subtle correctness implications. Do NOT micro-optimize hot paths without a benchmark. If in doubt, SKIP.
### Behavior coverage
-9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior.
+9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior. EXCEPTION: a PROSE file (prompt, `SKILL.md`, rule, markdown) has no behavioral seam — do NOT add a text/word-count/phrase pin for it; that guards a diff, not behavior. Cover only a machine-consumed value (parsed field, sentinel a runtime greps, a doc JSON sample through its real validator) or leave it to review.
### Structural
10. **Oversized modules** — any source file exceeding **250 pure LOC** (non-blank, non-comment lines). This is an architectural defect, not a style preference. Measure: `awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(#|\/\/)/' <file> | wc -l`.
@@ -144,7 +144,7 @@ For each in-scope source file:
1. Identify the public/observable behavior the file exposes (exported functions, HTTP handlers, CLI commands, classes used elsewhere).
2. Check whether existing tests cover that behavior. Use `git grep` / project test conventions to find related test files.
-3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details.
+3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details. A PROSE file (prompt/`SKILL.md`/rule/markdown) is exempt — its wording is not behavior; skip the test and rely on review, or assert only a machine-consumed value.
4. Run the test suite (or at minimum the relevant tests). They must be **green** before any cleanup begins.
If you cannot establish a green baseline (e.g., test runner is broken), STOP and report. Do not proceed with cleanup on unverified ground.
diff --git a/plugins/omo/skills/review-work/SKILL.md b/plugins/omo/skills/review-work/SKILL.md
index e2b5c2b9..4ca2449f 100644
--- a/plugins/omo/skills/review-work/SKILL.md
+++ b/plugins/omo/skills/review-work/SKILL.md
@@ -18,11 +18,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
## Codex Subagent Reliability
@@ -64,6 +64,12 @@ failed, investigate the underlying uncertainty with the `debugging` skill when
runtime behavior may be wrong, fix with evidence, and rerun the affected lane
before claiming completion, creating or handing off a PR, or merging.
+A rejecting lane must name its blockers inline in its final message — each
+blocker cites the violated goal criterion or requirement plus an evidence
+pointer. A bare REJECT/FAIL token without findings is not a verdict; treat it
+as an inconclusive lane (one bounded respawn, then record it inconclusive with
+that reason).
+
When reviewing a PR or branch, collect diff, file contents, and verification
results from a dedicated review worktree attached to that branch. Never
checkout, test, or edit the review branch in the main worktree.
diff --git a/plugins/omo/skills/start-work/SKILL.md b/plugins/omo/skills/start-work/SKILL.md
index 14202460..2c4a64a7 100644
--- a/plugins/omo/skills/start-work/SKILL.md
+++ b/plugins/omo/skills/start-work/SKILL.md
@@ -19,16 +19,19 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
## ABSOLUTE RULE: YOU ARE AN ORCHESTRATOR — NEVER THE IMPLEMENTER
**YOU DO NOT WRITE CODE. YOU DO NOT EDIT PRODUCT FILES. YOU DO NOT RUN QA YOURSELF. EVERY unit of implementation, test, QA, and review work MUST be delegated to a spawned subagent. NO EXCEPTIONS.** Your hands touch only plan selection, `.omo/` state (Boulder, ledger, plan checkboxes), decomposition, dispatch, verdicts, and evidence records. About to edit a product file or run an implementation command yourself? **STOP. SPAWN A WORKER INSTEAD.** Orchestrate at **MAXIMUM PARALLELISM**: every independent unit runs concurrently; only named dependencies serialize.
+### Delegation by difficulty (Codex tier workers)
+When tier worker agents are installed (Codex), size each implementation lane by difficulty and pass the matching `agent_type` where the spawn schema exposes it: LOW (one-file fix, boilerplate, config/copy) -> `lazycodex-worker-low`; MEDIUM (standard feature, few files, known patterns) -> `lazycodex-worker-medium`; HIGH (new module, cross-module refactor, concurrency/security/migration) -> `lazycodex-worker-high`. Explorer/librarian research lanes keep their own roles. Difficulty (model power) is orthogonal to the LIGHT/HEAVY rigor tier in step 4 — judge each on its own facts. On spawn surfaces without `agent_type` (deployed v2), state the tier inside `message`.
+
## Codex Subagent Reliability
Every `multi_agent_v1.spawn_agent` message is a self-contained executable assignment: `TASK: <imperative assignment>`, then `DELIVERABLE`, `SCOPE`, and `VERIFY`, with role instructions inside `message`. Use `fork_context: false` unless full history is truly required; paste only the context the child needs.
diff --git a/plugins/omo/skills/ultrawork/SKILL.md b/plugins/omo/skills/ultrawork/SKILL.md
index 34082dd3..ff1f6ab2 100644
--- a/plugins/omo/skills/ultrawork/SKILL.md
+++ b/plugins/omo/skills/ultrawork/SKILL.md
@@ -13,8 +13,7 @@ metadata:
[CODE RED] Maximum precision. Outcome-first. Evidence-driven.
# Role
-Expert coding agent. Plan obsessively. Ship verified work. No process
-narration.
+Expert coding agent. Ship verified work. No process narration.
# Goal
Deliver EXACTLY what the user asked, end-to-end working, proven by
@@ -44,10 +43,10 @@ success criteria (happy path + the riskiest edge); one real-surface
proof of the user-visible deliverable, where auxiliary surfaces are
first-class for CLI- or data-shaped work; self-review recorded in the
notepad instead of the reviewer loop.
-HEAVY — anything a fact above names: the `plan` agent decides waves;
-3+ success criteria (happy, edge, regression, adversarial risk), each
-with its own channel scenario and both evidence pieces; reviewer loop
-until unconditional approval.
+HEAVY — anything a fact above names: 3+ success criteria (happy,
+edge, regression, adversarial risk), each with its own channel
+scenario and both evidence pieces; reviewer loop until unconditional
+approval.
# Manual-QA channels
Run real-surface proof yourself through the channel that faithfully
@@ -97,16 +96,24 @@ evidence: screenshot + plain transcript + cleanup receipt.
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
-## 0. Survey the skills, then size the work
+## 0. Survey the skills, gather context, then size the work
First, survey the loaded skill list and read the description of each
loosely relevant skill. Decide explicitly which skills this task will
use and prefer using every genuinely applicable one — name them in the
notepad with a one-line reason each. Skipping a skill that fits the
task is a defect.
-Then run Tier triage (above) on the change set and record the tier.
-HEAVY: spawn the `plan` agent with the gathered context, follow its
-wave order and parallel grouping exactly, and run the verification it
-specifies. LIGHT: plan directly in the notepad.
+Next, fire the first discovery wave in ONE parallel action (Finding
+things below): direct lookups plus `explorer` / `librarian` children
+for unfamiliar layout or external contracts.
+Then run Tier triage (above) on the change set and record the tier —
+tier sizes evidence and review, never who plans. Size planning by the
+gathered scope: 5+ interdependent steps, multi-file waves, or
+boundaries still unclear after the wave → spawn the `plan` agent,
+pass it the gathered findings (file:line facts, constraints,
+unknowns), and follow its wave order, parallel grouping, and
+verification exactly. Anything smaller, either tier: plan directly in
+the notepad. Never spawn `plan` before the discovery wave has
+returned.
## 1. Create the goal with binding success criteria
Call `create_goal` (or open your reply with a `# Goal` block treated as
@@ -224,6 +231,14 @@ Until every success criterion PASSES with its evidence captured:
scenario captured failing when no test seam exists. It must fail
for the RIGHT reason (not a syntax error, not a missing import).
Paste RED output into the notepad. No production code yet.
+ PROSE TARGET (prompt, SKILL.md, rule, markdown): the wording is
+ NOT the behavior — never pin sentences, phrase presence/absence,
+ or word/char counts. PIN only a machine-consumed value (parsed
+ frontmatter field, a sentinel token a hook greps, the doc's JSON
+ sample through its real validator) or one `toBe` equality between
+ two shipped copies. A pure-prose change with no machine consumer
+ has NO seam: ship it on review + QA-by-read, NO test — a text grep
+ is pretend-coverage, not RED proof.
3. GREEN: write the SMALLEST production change that flips RED→GREEN.
Before GREEN work that depends on external review, PR, issue, or
branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
@@ -269,13 +284,17 @@ make the child continue old parent context instead of the delegated task.
If your tool list has a flat `spawn_agent` with a required `task_name` instead of `multi_agent_v1.*` (`multi_agent_v2`), rewrite: `fork_context: false` becomes `fork_turns: "none"`, `send_input` becomes `send_message`, finished agents end on their own (no `close_agent`; `followup_task` re-tasks, `interrupt_agent` stops), and `wait_agent` takes only `timeout_ms`, returning on any child mailbox activity.
# TOML-backed subagent routing compatibility
-Treat TOML-backed role routing as **routing-unverified**. The
-`multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
-`agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
-effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
-role requirements into the message, and judge the result from delivered
-evidence. Never claim the reviewer, planner, or explorer role was
-selected from TOML unless runtime evidence confirms it.
+Installed role TOMLs (`~/.codex/agents/`) bind ONLY via `agent_type`.
+`multi_agent_v1.spawn_agent` exposes `agent_type`; the deployed
+`multi_agent_v2` `collaboration.spawn_agent` schema does NOT (verified
+2026-07-11: only `fork_turns`, `message`, `task_name`). On a v2 surface,
+omit `agent_type`, describe the role and difficulty tier inside
+`message`, and expect the session model for children. Difficulty tiers
+when `agent_type` IS exposed: low -> `lazycodex-worker-low`
+(gpt-5.6-luna/high), medium -> `lazycodex-worker-medium`
+(gpt-5.6-luna/max), high -> `lazycodex-worker-high` (gpt-5.6-sol/max);
+explorer/librarian carry their own TOMLs (gpt-5.6-luna/low). Difficulty
+(model power) is orthogonal to LIGHT/HEAVY rigor (process size).
Treat child status as a progress signal, not a timeout counter. For
work likely to exceed one wait cycle, tell the child to send
@@ -304,7 +323,7 @@ transition, `create_goal` continuation, implementation tool call, plan
drafting, approval-gate work, PR handoff, or final response. A timeout is
not terminal status.
Do not write the final answer, PR handoff, or completion summary while
-active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
+active child agents remain open. Use `multi_agent_v1.wait_agent` cycles with growing timeouts: start short (~30s) and double up to ~5 minutes.
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
inconclusive, record that it is not approval, and respawn smaller only
@@ -326,15 +345,20 @@ Procedure (NON-NEGOTIABLE):
the message.
Pass: goal, success-criteria, scenario evidence, full diff, notepad
path.
-2. Treat the reviewer's verdict as binding. There is NO "false
- positive". Every concern is real. Do not argue. Do not minimise. Do
- not explain it away.
-3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
- evidence. Update notepad.
-4. Re-submit to the SAME reviewer. Loop until you receive an
- UNCONDITIONAL approval ("looks good but..." = REJECTION).
-5. Only on unconditional approval may you declare done. Stopping early
- IS failure.
+2. Verify each reviewer concern yourself. A concern blocks only when
+ it names a success criterion the evidence fails; record concerns
+ that cite no criterion as notes with a one-line reason — fixed or
+ declined at your judgment.
+3. Fix every criterion-cited blocker. Re-run ONLY the scenario QA
+ affected by the fix; capture fresh evidence for the delta. Update
+ notepad.
+4. Re-submit to the SAME reviewer at most twice, passing only the
+ delta diff, the blockers it cited, and the already-approved criteria
+ marked out-of-scope. An approval whose only remaining items are
+ notes counts as approval.
+5. On approval, declare done. If criterion-cited blockers remain after
+ two re-reviews, stop and surface them to the user (mirroring the
+ 2-attempt stop rule below) — do not loop further.
# Commits
Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
@@ -375,6 +399,9 @@ message + present for approval.
list (`<sha> <subject>`). No file-by-file changelog unless asked.
# Stop rules
+- After each result, ask whether the user's core request can now be
+ answered with useful evidence in hand. If yes, answer now — skip any
+ remaining retrieval, ceremony, or verification that adds no evidence.
- Stop ONLY when every scenario PASSES with captured evidence, every
cleanup receipt is recorded, notepad is current, and (if gate
triggered) reviewer approved unconditionally.
diff --git a/plugins/omo/skills/ulw-loop/SKILL.md b/plugins/omo/skills/ulw-loop/SKILL.md
index 25d5a987..e5e1fc62 100644
--- a/plugins/omo/skills/ulw-loop/SKILL.md
+++ b/plugins/omo/skills/ulw-loop/SKILL.md
@@ -23,29 +23,28 @@ This skill is intentionally compact. The full workflow lives in `references/full
- 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.
- 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.
- 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).
-- Record evidence through the CLI only after cleanup receipts are available.
+- Evidence is bound to its capture commit; a later fix, rebase, or merge makes it stale — re-run at the current HEAD and re-record, never relabel or regenerate. Record only after cleanup receipts exist.
- Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.
-- 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.
-- 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.
+- Every `spawn_agent` message starts with `TASK:`, then names `DELIVERABLE`, `SCOPE`, and `VERIFY`; put role and specialty instructions inside `message`; use `fork_turns: "none"` (v1: `fork_context: false`) unless full history is truly required.
+- 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.
- 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.
-- 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.
+- 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.
- While children run, surface the active subagent count, agent names, and latest `WORKING:` phase.
-- Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running. Then record inconclusive and respawn a smaller `fork_context: false` task with the missing deliverable.
+- Fallback only when the child is completed without the deliverable, ack-only after `followup_task`, explicitly `BLOCKED:`, or no longer running. Then record inconclusive and respawn a smaller `fork_turns: "none"` task with the missing deliverable.
- Use `git-master` for git-tracked edits: inspect recent and touched-path commit history, then commit each verified work unit atomically in the repository's observed language, scope, and message style with only that unit's files staged.
## Codex Tool Mapping
-The full workflow may mention OpenCode-style orchestration examples. In Codex, translate them to native tools:
+Codex exposes ONE subagent surface per session — check your tool list. GPT-5.6 (sol/terra) get the flat MultiAgentV2 tools (primary); GPT-5.5 and gpt-5.6-luna get the namespaced `multi_agent_v1.*` set (fallback row). The workflow's orchestration examples map to:
-| Workflow intent | Codex tool |
+| Intent | MultiAgentV2 (gpt-5.6 sol/terra) |
| --- | --- |
-| Plan agent | `multi_agent_v1.spawn_agent({"message":"TASK: act as a planning agent. ...","fork_context":false})` |
-| Search/read-only worker | `multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. ...","fork_context":false})` |
-| Implementation or QA worker | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
-| Final verification reviewer | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","fork_context":false})` |
-| Wait for background result | `multi_agent_v1.wait_agent(...)` |
-| Clean up finished worker | `multi_agent_v1.close_agent(...)` |
-
-Flat `spawn_agent` requiring `task_name` instead (`multi_agent_v2`)? Rewrite rows: add `"task_name"`, `"fork_context":false` → `"fork_turns":"none"`, `wait_agent` takes only `timeout_ms`, no `close_agent` — finished agents end on their own.
+| Spawn a worker | `spawn_agent({"task_name":"<lower_snake_id>","message":"TASK: act as <role>. ...","fork_turns":"none"})` — `task_name`+`message` required; `fork_turns:"none"` = no parent history; do NOT set `agent_type`/`model`/`reasoning_effort` |
+| Re-task an idle worker (wakes it) | `followup_task({"target":"<name>","message":"..."})` |
+| Send context without interrupting | `send_message({"target":"<name>","message":"..."})` |
+| Wait for a mailbox signal | `wait_agent({"timeout_ms":<ms>})` — any live worker; a timeout only means no new update |
+| Enumerate / stop a runaway | `list_agents()` / `interrupt_agent({"target":"<name>"})` — no `close_agent`; finished workers end on their own |
+
+V1 fallback (gpt-5.5, gpt-5.6-luna): `multi_agent_v1.spawn_agent({...,"fork_context":false})`, `multi_agent_v1.send_input` (re-task), `multi_agent_v1.wait_agent({"targets":[...],"timeout_ms":...})`, `multi_agent_v1.close_agent`.
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`.
diff --git a/plugins/omo/skills/ulw-loop/references/full-workflow.md b/plugins/omo/skills/ulw-loop/references/full-workflow.md
index aee7dfb1..e3e794d5 100644
--- a/plugins/omo/skills/ulw-loop/references/full-workflow.md
+++ b/plugins/omo/skills/ulw-loop/references/full-workflow.md
@@ -23,17 +23,15 @@ Run each criterion's real-surface proof yourself through the channel that faithf
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.
4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.
-For TUI visual QA, render the terminal through the real xterm.js web terminal and
-screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph
-width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command
-"<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;
-`--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and
-`metadata.json`. Mandatory when a PR or review must inspect the terminal screen.
+For TUI visual QA (mandatory when a PR or review must inspect the terminal screen),
+run `node script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}"
+--evidence-dir <dir>` (live pty + xterm.js in Chrome; `--from-file` replays a raw
+stream) and record `terminal.png`, `terminal.txt`, and `metadata.json`.
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.
## Delegation model (ATLAS-STYLE — YOU CONDUCT, WORKERS PLAY)
-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).
+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.
Size each worker to the task. Put the intended role, rigor level, and specialty inside the worker `message`.
@@ -44,21 +42,24 @@ Size each worker to the task. Put the intended role, rigor level, and specialty
| Deep debugging / race / perf / subtle cross-module reasoning | `TASK: act as a deep debugging worker. ...` |
| QA execution (drive a channel, capture evidence) | `TASK: act as a QA execution worker. ...` |
| Read-only codebase search | `TASK: act as an explorer. ...` |
+| 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 |
| External library / docs research | `TASK: act as a librarian. ...` |
| Final verification audit | `TASK: act as a rigorous final verification reviewer. ...` |
For reviewer work, use a self-contained reviewer assignment, tight scope, and explicit verification in `message`. Never spawn a context-only child for review.
+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.
+
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.
Codex subagent reliability:
-- 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.
-- 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.
-- 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.
+- 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.
+- 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.
+- 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.
- 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.
- 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.
-- 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.
-- 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.
+- 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.
+- 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.
## Artifacts
- `.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
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.
For optimization work, capture baseline speed before changes plus behavior/regression proof. Every attempt records speed, behavior/regression, and the keep/revert/iterate decision.
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.
-Use channel-table evidence verbs (tmux transcript, curl status+body, screenshot, action log, CLI stdout, DB diff, parsed config dump) — not vibes.
+Use channel-table evidence verbs — not vibes.
**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.
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
### Per-Criterion Cycle
1. PLAN: read `criterion.scenario`, `criterion.expectedEvidence`, prior ledger entries, and safety bounds. Identify which tasks in the current wave are independent.
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.
-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.
+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.
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.
-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.
+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.
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.
-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.
-8. RECORD exactly one result:
- - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> | <cleanup receipt>" --json`
- - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> | <cleanup receipt>" --notes "<diagnosis>" --json`
+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.
+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:
+ - PASS: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status pass --evidence "<observable> @<short-sha> | <cleanup receipt>" --json`
+ - FAIL: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status fail --evidence "<observable> @<short-sha> | <cleanup receipt>" --notes "<diagnosis>" --json`
- BLOCKED: `omo ulw-loop record-evidence --goal-id <id> --criterion-id <id> --status blocked --evidence "<observable>" --notes "<safety/blocker/leftover-state>" --json`
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).
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
## Final Quality Gate
Trigger only for the final aggregate goal after every criterion in every goal is `pass`.
1. Run targeted verification for changed behavior.
-2. Run Manual-QA for every criterion; confirm each artifact exists and is non-empty.
-3. Spawn final reviewers with `fork_context: false`: code review, QA review, gate review. Include original brief, goals, desired outcome, and diff.
-4. Treat timeout, missing deliverable, ack-only, `BLOCKED:`, or inconclusive review as a blocker. Fix, rerun affected verification/Manual-QA, and repeat review.
+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.
+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.
+3b. Only then spawn lazycodex-gate-reviewer with those artifact paths.
+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.
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`.
6. If clean, checkpoint final completion:
```sh
@@ -201,7 +203,7 @@ omo ulw-loop checkpoint --goal-id <id> --status complete --evidence "<e2e eviden
"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"]}
}
```
-Artifacts must be non-empty; counts alone fail. LIGHT without adversarial class records `"adversarialClassesCovered": ["none-applicable: <reason>"]`.
+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.
## Dynamic Steering
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
## Constraints
1. NEVER call `update_goal` mid-aggregate; only on final story after the quality gate passes.
2. NEVER call `create_goal` when `get_goal` shows a different active goal.
-3. NEVER mark `criterion.status == "pass"` without captured observable evidence in `record-evidence`.
+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.
4. NEVER bypass the criteria gate: non-final aggregate completion requires all essential criteria; final aggregate completion requires all criteria across the whole plan.
5. Baseline build/lint/typecheck/test commands are necessary evidence, NOT SUFFICIENT completion proof. Criteria coverage with observable evidence is the gate.
6. Treat `.omo/ulw-loop/ledger.jsonl` as the durable audit trail; checkpoint after every success or failure.
7. Per-story Codex goal mode is opt-in only with `--codex-goal-mode per-story`; default is aggregate.
8. Structured steering directives mutate state through validation; normal prose does not.
-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.
+9. Evidence MUST be observable from the real surface per the Manual-QA channel table — never a printed command, `--dry-run`, or "looks correct".
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.
11. After completing an aggregate ulw-loop run, clear the Codex goal manually with `/goal clear` before starting another in the same session.
12. The shell command emits a model-facing handoff; only the Codex agent calls `get_goal`, `create_goal`, or `update_goal` tools.
-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.
-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.
+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.
+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.
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.
## Stop Rules
diff --git a/plugins/omo/skills/ulw-plan/scripts/scaffold-plan.mjs b/plugins/omo/skills/ulw-plan/scripts/scaffold-plan.mjs
index 4146f37b..fd426f79 100644
--- a/plugins/omo/skills/ulw-plan/scripts/scaffold-plan.mjs
+++ b/plugins/omo/skills/ulw-plan/scripts/scaffold-plan.mjs
@@ -221,7 +221,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
## Verification strategy
> Zero human intervention - all verification is agent-executed.
- Test decision: <TDD | tests-after | none> + framework
-- Evidence: .omo/evidence/task-<N>-${slug}.<ext>
+- 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/)
## Execution strategy
### Parallel execution waves
@@ -239,7 +239,7 @@ Your next move: <fill - e.g. approve, or run a high-accuracy review>. Full execu
Parallelization: Wave <N> | Blocked by: <...> | Blocks: <...>
References (executor has NO interview context - be exhaustive): <src/path:lines>
Acceptance criteria (agent-executable): <exact command or assertion>
- QA scenarios (name the exact tool + invocation): happy + failure, Evidence .omo/evidence/task-1-${slug}.<ext>
+ QA scenarios (name the exact tool + invocation): happy + failure, Evidence <attemptDir>/task-1-${slug}.<ext>
Commit: <Y/N> | <type>(<scope>): <summary>
## Final verification wave
diff --git a/plugins/omo/skills/ulw-research/SKILL.md b/plugins/omo/skills/ulw-research/SKILL.md
index 3541a192..3a500e7c 100644
--- a/plugins/omo/skills/ulw-research/SKILL.md
+++ b/plugins/omo/skills/ulw-research/SKILL.md
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
---
diff --git a/plugins/omo/skills/visual-qa/SKILL.md b/plugins/omo/skills/visual-qa/SKILL.md
index 323e7227..43dc4b9a 100644
--- a/plugins/omo/skills/visual-qa/SKILL.md
+++ b/plugins/omo/skills/visual-qa/SKILL.md
@@ -19,11 +19,11 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
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.
-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.
+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.
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.
-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.
+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.
# Visual QA - Dual-Oracle Web and TUI Verification
diff --git a/plugins/omo/test/aggregate-agents.test.mjs b/plugins/omo/test/aggregate-agents.test.mjs
index 84a911e8..1a906264 100644
--- a/plugins/omo/test/aggregate-agents.test.mjs
+++ b/plugins/omo/test/aggregate-agents.test.mjs
@@ -19,16 +19,16 @@ const lazycodexAgentInvariants = new Map([
[
"explorer.toml",
{
- model: "gpt-5.6-terra",
- effort: "medium",
+ model: "gpt-5.6-luna",
+ effort: "low",
includes: [/Read-only/, /working tree/, /rg/],
},
],
[
"librarian.toml",
{
- model: "gpt-5.6-terra",
- effort: "medium",
+ model: "gpt-5.6-luna",
+ effort: "low",
includes: [/Read-only/, /SHA-pinned GitHub permalink/, /external/],
},
],
@@ -52,16 +52,32 @@ const lazycodexAgentInvariants = new Map([
"plan.toml",
{
model: "gpt-5.6-sol",
- effort: "xhigh",
+ effort: "max",
includes: [/strategic planning consultant/i, /\.omo\/plans\/<slug>\.md/, /never implements/i],
},
],
[
- "lazycodex-executor.toml",
+ "lazycodex-worker-low.toml",
{
- model: "gpt-5.6-sol",
+ model: "gpt-5.6-luna",
effort: "high",
- includes: [/EVIDENCE_RECORDED: <path>/, /scenario/i, /artifact/i],
+ includes: [/EVIDENCE_RECORDED: <path>/, /low-difficulty/i, /smallest correct change/i],
+ },
+ ],
+ [
+ "lazycodex-worker-medium.toml",
+ {
+ model: "gpt-5.6-luna",
+ effort: "max",
+ includes: [/EVIDENCE_RECORDED: <path>/, /medium-difficulty/i, /smallest correct change/i],
+ },
+ ],
+ [
+ "lazycodex-worker-high.toml",
+ {
+ model: "gpt-5.6-sol",
+ effort: "max",
+ includes: [/EVIDENCE_RECORDED: <path>/, /high-difficulty/i, /smallest correct change/i],
},
],
[
@@ -77,23 +93,23 @@ const lazycodexAgentInvariants = new Map([
{
model: "gpt-5.6-sol",
effort: "xhigh",
- includes: [/codeQualityStatus/, /recommendation/, /\.omo\/evidence\/<goal>-code-review\.md/],
+ includes: [/codeQualityStatus/, /recommendation/, /<attemptDir>\/<goalId>-code-review\.md/, /currentAttemptDir/],
},
],
[
"lazycodex-qa-executor.toml",
{
- model: "gpt-5.6-terra",
- effort: "medium",
- includes: [/not_applicable/, /surfaceEvidence/, /adversarialCases/],
+ model: "gpt-5.6-luna",
+ effort: "high",
+ includes: [/not_applicable/, /surfaceEvidence/, /adversarialCases/, /<attemptDir>\/<goalId>-manual-qa\.md/],
},
],
[
"lazycodex-gate-reviewer.toml",
{
model: "gpt-5.6-sol",
- effort: "xhigh",
- includes: [/APPROVE\/REJECT/, /blockers/, /\.omo\/evidence\/<goal>-gate-review\.md/],
+ effort: "high",
+ includes: [/APPROVE\/REJECT/, /blockers/, /<attemptDir>\/<goalId>-gate-review\.md/, /currentAttemptDir/],
},
],
]);
@@ -114,9 +130,11 @@ test("#given bundled Codex agents #when components/ultrawork/agents directory is
"explorer.toml",
"lazycodex-clone-fidelity-reviewer.toml",
"lazycodex-code-reviewer.toml",
- "lazycodex-executor.toml",
"lazycodex-gate-reviewer.toml",
"lazycodex-qa-executor.toml",
+ "lazycodex-worker-high.toml",
+ "lazycodex-worker-low.toml",
+ "lazycodex-worker-medium.toml",
"librarian.toml",
"metis.toml",
"momus.toml",
@@ -139,11 +157,29 @@ test("#given bundled Codex agents #when components/ultrawork/agents directory is
}
});
+test("#given bundled agent TOMLs #when nickname_candidates are inspected #then they use only the codex-accepted charset", async () => {
+ // given: codex_app_server ignores a role whose nickname has characters outside
+ // ASCII letters, digits, spaces, hyphens, underscores (observed live in task-15 QA)
+ const agentsDir = join(root, "components", "ultrawork", "agents");
+ const files = (await readdir(agentsDir)).filter((name) => name.endsWith(".toml"));
+
+ // when/then
+ for (const file of files) {
+ const text = await readFile(join(agentsDir, file), "utf8");
+ for (const match of text.matchAll(/nickname_candidates\s*=\s*\[([^\]]*)\]/g)) {
+ for (const nickname of match[1].matchAll(/"([^"]*)"/g)) {
+ assert.match(nickname[1], /^[A-Za-z0-9 _-]+$/, `${file}: nickname "${nickname[1]}"`);
+ }
+ }
+ }
+});
+
test("#given planner agent prompt #when inspected #then generated artifacts stay under .omo", async () => {
const prompt = await readFile(join(root, "components", "ultrawork", "agents", "plan.toml"), "utf8");
assert.match(prompt, /\.omo\/plans\/<slug>\.md/);
- assert.match(prompt, /\.omo\/evidence\/task-<N>-<slug>\.<ext>/);
+ assert.match(prompt, /<attemptDir>\/task-<N>-<slug>\.<ext>/);
+ assert.match(prompt, /\.omo\/evidence\/ulw\/<session>\/<goalId>\/a<attempt>/);
assert.doesNotMatch(prompt, /(?<!\.omo\/)plans\/<slug>\.md/);
assert.doesNotMatch(prompt, /(?<!\.omo\/)evidence\/task-/);
});
@@ -207,3 +243,27 @@ test("#given LazyCodex reviewer prompts #when inspected #then anti-slop review c
"gate reviewer must perform the overfit/slop pass directly before checking report coverage",
);
});
+
+test("#given done-gate reviewer prompts #when inspected #then burden of proof is approve-unless-cited and reject priors are gone", async () => {
+ const agentsDir = join(root, "components", "ultrawork", "agents");
+ const gateReviewer = await readFile(join(agentsDir, "lazycodex-gate-reviewer.toml"), "utf8");
+ const qaExecutor = await readFile(join(agentsDir, "lazycodex-qa-executor.toml"), "utf8");
+ const codeReviewer = await readFile(join(agentsDir, "lazycodex-code-reviewer.toml"), "utf8");
+
+ assert.match(gateReviewer, /APPROVE unless you can cite/);
+ assert.match(gateReviewer, /violatedCriterion/);
+ assert.match(gateReviewer, /evidencePointer/);
+ assert.match(gateReviewer, /top blockers inline/);
+ assert.match(gateReviewer, /is a NOTE, not a blocker/);
+ assert.match(gateReviewer, /You do NOT check/);
+ assert.doesNotMatch(gateReviewer, /Assume the work has already failed/);
+ assert.doesNotMatch(gateReviewer, /Return exactly one recommendation: APPROVE\/REJECT\./);
+
+ assert.match(qaExecutor, /one-line reason/);
+ assert.match(qaExecutor, /rejecting a legitimately untriggered class is itself an error/);
+ assert.doesNotMatch(qaExecutor, /Trust nothing\./);
+
+ assert.match(codeReviewer, /MEDIUM by default/);
+ assert.doesNotMatch(codeReviewer, /Treat useless tests or needless production complexity as CRITICAL\/HIGH/);
+});
+
diff --git a/plugins/omo/test/aggregate-hooks.test.mjs b/plugins/omo/test/aggregate-hooks.test.mjs
index f2d55737..f08e94d7 100644
--- a/plugins/omo/test/aggregate-hooks.test.mjs
+++ b/plugins/omo/test/aggregate-hooks.test.mjs
@@ -48,6 +48,22 @@ test("#given isolated components #when hooks are inspected #then commands stay i
assert.equal(await exists("scripts/migrate-codex-config.mjs"), true);
});
+test("#given aggregate Stop hooks #when inspected #then start-work continuation and ulw-loop resume are separate groups", async () => {
+ // given
+ const manifests = await readAggregateHookManifests();
+
+ // when
+ const stopCommands = manifests
+ .filter(({ hooks }) => hooks.hooks.Stop)
+ .flatMap(({ hooks }) => hooks.hooks.Stop)
+ .flatMap((group) => group.hooks.map((handler) => handler.command));
+
+ // then
+ assert.equal(stopCommands.length, 2);
+ assert.ok(stopCommands.some((command) => command.includes("start-work-continuation/dist/cli.js")));
+ assert.ok(stopCommands.some((command) => command.includes("ulw-loop/dist/cli.js\" hook stop")));
+});
+
test("#given aggregate SubagentStop hooks #when inspected #then start-work and LazyCodex executor verifier are separate groups", async () => {
// given
const manifests = await readAggregateHookManifests();
@@ -64,7 +80,7 @@ test("#given aggregate SubagentStop hooks #when inspected #then start-work and L
// then
assert.equal(subagentStopGroups.length, 2);
assert.equal(subagentStopGroups[0]?.matcher, undefined);
- assert.equal(subagentStopGroups[1]?.matcher, "^lazycodex-executor$");
+ assert.equal(subagentStopGroups[1]?.matcher, "^lazycodex-worker-(low|medium|high)$");
assert.equal(verifierGroups.length, 1);
assert.equal(verifierGroups[0]?.groupIndex, 0);
assert.equal(verifierGroups[0]?.handler.timeout, 10);
@@ -158,7 +174,12 @@ test("#given aggregate OMO plugin is enabled #when hooks are inspected #then she
assert.match(text, /Resetting Git Bash MCP Reminder/);
assert.match(text, /components\/ulw-loop\/dist\/cli\.js/);
assert.match(text, /hook pre-tool-use/);
- assert.deepEqual(preToolUseGroups.map((group) => group.matcher), ["^Bash$", "^create_goal$"]);
+ assert.deepEqual(preToolUseGroups.map((group) => group.matcher), [
+ "^Bash$",
+ "^create_goal$",
+ "^(spawn_agent|collaborationspawn_agent|collaboration\\.spawn_agent)$",
+ ]);
+ assert.match(text, /hook pre-tool-use-spawn/);
});
test("#given aggregate OMO plugin has a dedicated ultrawork trigger #when hooks are inspected #then ulw-loop does not duplicate ultrawork injection", async () => {
diff --git a/plugins/omo/test/aggregate-manifest.test.mjs b/plugins/omo/test/aggregate-manifest.test.mjs
index 7e587622..4c1700a7 100644
--- a/plugins/omo/test/aggregate-manifest.test.mjs
+++ b/plugins/omo/test/aggregate-manifest.test.mjs
@@ -17,7 +17,7 @@ test("#given aggregate plugin manifest #when inspected #then it owns the omo nam
// then
assert.equal(manifest.name, "omo");
assert(Array.isArray(hookPaths));
- assert.equal(hookPaths.length, 21);
+ assert.equal(hookPaths.length, 23);
assert(hookPaths.every((hookPath) => typeof hookPath === "string" && hookPath.startsWith("./hooks/")));
assert(!hookPaths.includes("./hooks/hooks.json"));
assert(!hookPaths.includes("./hooks/user-prompt-submit-selecting-lazycodex-workflow.json"));
diff --git a/plugins/omo/test/aggregate-model-catalog.test.mjs b/plugins/omo/test/aggregate-model-catalog.test.mjs
index 4efee8a8..73660e3f 100644
--- a/plugins/omo/test/aggregate-model-catalog.test.mjs
+++ b/plugins/omo/test/aggregate-model-catalog.test.mjs
@@ -8,17 +8,17 @@ import { root } from "./aggregate-plugin-fixture.mjs";
test("#given bundled model catalog #when inspected #then default verifier and worker roles are pinned", async () => {
const catalog = JSON.parse(await readFile(join(root, "model-catalog.json"), "utf8"));
- assert.equal(catalog.current.model, "gpt-5.5");
- assert.equal(catalog.current.model_context_window, 400000);
+ assert.equal(catalog.current.model, "gpt-5.6-sol");
+ assert.equal(catalog.current.model_context_window, 372000);
assert.equal(catalog.current.model_reasoning_effort, "high");
assert.equal(catalog.current.plan_mode_reasoning_effort, "xhigh");
assert.deepEqual(catalog.roles.default, catalog.current);
assert.deepEqual(catalog.roles.verifier, {
- model: "gpt-5.5",
+ model: "gpt-5.6-sol",
model_reasoning_effort: "high",
});
assert.deepEqual(catalog.roles.worker, {
- model: "gpt-5.5",
+ model: "gpt-5.6-sol",
model_reasoning_effort: "high",
});
});
diff --git a/plugins/omo/test/auto-update.test.mjs b/plugins/omo/test/auto-update.test.mjs
index 46a0a752..3cf037e8 100644
--- a/plugins/omo/test/auto-update.test.mjs
+++ b/plugins/omo/test/auto-update.test.mjs
@@ -225,7 +225,7 @@ test("#given test command override #when running check #then records state and l
toVersion: "1.0.1",
},
]);
- assert.match(await readFile(join(env.CODEX_HOME, "config.toml"), "utf8"), /model = "gpt-5\.5"/);
+ assert.match(await readFile(join(env.CODEX_HOME, "config.toml"), "utf8"), /model = "gpt-5\.6-sol"/);
});
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
assert.equal(result.started, false);
assert.equal(result.reason, "locked");
- assert.match(await readFile(join(root, "codex-home", "config.toml"), "utf8"), /model_context_window = 400000/);
+ assert.match(await readFile(join(root, "codex-home", "config.toml"), "utf8"), /model_context_window = 372000/);
});
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
const content = await readFile(join(codexHome, "config.toml"), "utf8");
assert.equal(result.started, false);
assert.equal(result.reason, "throttled");
- assert.match(content, /model = "gpt-5\.5"/);
- assert.match(content, /model_context_window = 400000/);
+ assert.match(content, /model = "gpt-5\.6-sol"/);
+ assert.match(content, /model_context_window = 372000/);
assert.match(content, /model_reasoning_effort = "high"/);
assert.match(content, /plan_mode_reasoning_effort = "xhigh"/);
assert.doesNotMatch(content, /gpt-5\.2/);
diff --git a/plugins/omo/test/component-hook-contract-cases.mjs b/plugins/omo/test/component-hook-contract-cases.mjs
index 812d57fe..55165234 100644
--- a/plugins/omo/test/component-hook-contract-cases.mjs
+++ b/plugins/omo/test/component-hook-contract-cases.mjs
@@ -180,12 +180,12 @@ export function componentHookContractCases(tempRoot) {
},
},
{
- name: "lazycodex executor verifier subagent-stop blocks missing evidence",
+ name: "lazycodex worker verifier subagent-stop blocks missing evidence",
component: "lazycodex-executor-verify",
event: "subagent-stop",
payload: {
hook_event_name: "SubagentStop",
- agent_type: "lazycodex-executor",
+ agent_type: "lazycodex-worker-medium",
agent_id: "agent-task12",
session_id: "s-task12",
transcript_path: join(tempRoot, "transcript.jsonl"),
diff --git a/plugins/omo/test/lcx-bug-skills.test.mjs b/plugins/omo/test/lcx-bug-skills.test.mjs
index 48ebcfa4..a3c7d4e1 100644
--- a/plugins/omo/test/lcx-bug-skills.test.mjs
+++ b/plugins/omo/test/lcx-bug-skills.test.mjs
@@ -7,109 +7,12 @@ import { fileURLToPath } from "node:url";
const pluginRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const sharedSkillsRoot = join(pluginRoot, "..", "..", "shared-skills");
-async function readSkill(name) {
- return readFile(join(sharedSkillsRoot, "skills", name, "SKILL.md"), "utf8");
-}
-
-test("#given synced lcx-report-bug skill #when inspected #then it files LazyCodex bug issues with generated labels", async () => {
- // given
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-report-bug");
-
- // when
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
-
- // then
- assert.match(skill, /^---\r?\nname: lcx-report-bug\r?\n/m);
- assert.match(skill, /Never create a PR or push a branch against `code-yeongyu\/lazycodex`/);
- assert.match(skill, /gh pr create --repo openai\/codex/);
- assert.doesNotMatch(skill, /gh pr create --repo "\$TARGET_REPO"/);
- assert.doesNotMatch(skill, /gh pr create --repo code-yeongyu\/lazycodex/);
- assert.match(interfaceMetadata, /display_name: "lcx-report-bug \(omo\)"/);
- assert.match(interfaceMetadata, /- "lazycodex bug"/);
- assert.match(interfaceMetadata, /- "openai codex bug"/);
-});
-
-test("#given synced lcx-contribute-bug-fix skill #when inspected #then it delivers LazyCodex fixes as issues and upstream fixes as fork PRs", async () => {
- // given
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-contribute-bug-fix");
-
- // when
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
-
- // then
- assert.match(skill, /^---\r?\nname: lcx-contribute-bug-fix\r?\n/m);
- assert.match(skill, /NEVER open a PR or push a branch against this repo/);
- assert.match(skill, /gh issue create --repo code-yeongyu\/lazycodex/);
- assert.match(skill, /gh pr create --repo openai\/codex/);
- assert.doesNotMatch(skill, /gh pr create --repo "\$TARGET_REPO"/);
- assert.doesNotMatch(skill, /gh pr create --repo code-yeongyu\/lazycodex/);
- assert.match(interfaceMetadata, /display_name: "lcx-contribute-bug-fix \(omo\)"/);
- assert.match(interfaceMetadata, /- "contribute a bug fix"/);
- assert.match(interfaceMetadata, /- "fix bug pr"/);
-});
-
-test("#given synced lcx-doctor skill #when inspected #then it diagnoses installs against latest temp-root sources without mutating them", async () => {
- // given
- const skillRoot = join(sharedSkillsRoot, "skills", "lcx-doctor");
-
- // when
- const skill = await readFile(join(skillRoot, "SKILL.md"), "utf8");
- const interfaceMetadata = await readFile(join(skillRoot, "agents", "openai.yaml"), "utf8");
-
- // then
- assert.match(skill, /^---\r?\nname: lcx-doctor\r?\n/m);
- assert.match(interfaceMetadata, /display_name: "lcx-doctor \(omo\)"/);
- assert.match(interfaceMetadata, /- "lazycodex doctor"/);
- assert.match(interfaceMetadata, /- "lazycodex health check"/);
-});
-
-test("#given lcx source-sync skills #when inspected #then source caches are validated before reuse", async () => {
- // given
- const skillNames = ["lcx-doctor", "lcx-report-bug", "lcx-contribute-bug-fix"];
-
- for (const skillName of skillNames) {
+test("#given lcx skills #when frontmatter is inspected #then each exposes the loader-parsed skill name", async () => {
+ for (const skillName of ["lcx-report-bug", "lcx-contribute-bug-fix", "lcx-doctor"]) {
// when
- const skill = await readSkill(skillName);
+ const skill = await readFile(join(sharedSkillsRoot, "skills", skillName, "SKILL.md"), "utf8");
// then
- assert.match(skill, /LAZYCODEX_SOURCE_ROOT="\$\{LAZYCODEX_SOURCE_ROOT:-\$\{TMPDIR:-\/tmp\}\/lazycodex-sources\}"/);
- assert.match(skill, /git -C "\$DEST" rev-parse --is-inside-work-tree/);
- assert.match(skill, /git -C "\$DEST" config --get remote\.origin\.url/);
- assert.match(skill, /DEST\.corrupt\.\$\(date \+%Y%m%d%H%M%S\)/);
- assert.doesNotMatch(skill, /if \[ ! -d "\$DEST\/\.git" \]; then/);
- assert.doesNotMatch(skill, /sync_latest_source code-yeongyu\/lazycodex \/tmp\/lazycodex-source/);
- assert.doesNotMatch(skill, /sync_latest_source openai\/codex \/tmp\/openai-codex-source/);
+ assert.match(skill, new RegExp(`^name: ${skillName}$`, "m"), `${skillName}: frontmatter must expose ${skillName}`);
}
});
-
-test("#given lcx-doctor skill #when inspected #then aggregate hook validation follows the current manifest", async () => {
- // given
- const skill = await readSkill("lcx-doctor");
-
- // then
- assert.match(skill, /\.codex-plugin\/plugin\.json/);
- assert.match(skill, /manifest declares a `hooks` array/);
- assert.match(skill, /validate every direct hook path declared by the manifest/);
- assert.match(skill, /`hooks\/hooks\.json` only when the manifest declares it/);
- assert.match(skill, /do not require retired paths such as `components\/workflow-selector`/);
- assert.match(skill, /`hooks\/user-prompt-submit-selecting-lazycodex-workflow\.json` unless the current manifest declares them/);
- assert.doesNotMatch(skill, /Plugin payload present and non-empty: `hooks\/hooks\.json`/);
-});
-
-test("#given lcx-doctor skill #when inspected #then runtime probes and materialized payloads distinguish expected rewrites from missing files", async () => {
- // given
- const skill = await readSkill("lcx-doctor");
-
- // then
- assert.match(skill, /manifest-declared runtime payload/);
- assert.match(skill, /`dist\/cli\/index\.js` and `dist\/cli-node\/index\.js`/);
- assert.match(skill, /install-time materialization rewrites as expected/);
- assert.match(skill, /absolute `\.mcp\.json` runtime paths/);
- assert.match(skill, /Missing or zero-byte rewritten targets are FAIL/);
- assert.match(skill, /Use the configured Codex default model/);
- assert.match(skill, /unless the user explicitly passed a model override/);
- assert.match(skill, /never force a guessed\/rejected model such as `gpt-5\.5-codex-mini`/);
- assert.doesNotMatch(skill, /--model gpt-5\.5-codex-mini/);
-});
diff --git a/plugins/omo/test/migrate-codex-config.test.mjs b/plugins/omo/test/migrate-codex-config.test.mjs
index 6c0dab13..d81ee1e6 100644
--- a/plugins/omo/test/migrate-codex-config.test.mjs
+++ b/plugins/omo/test/migrate-codex-config.test.mjs
@@ -54,8 +54,8 @@ test("#given stale root reasoning config #when ensuring config #then replaces st
assert.equal(result.match(/^model_context_window\s*=/gm)?.length, 1);
assert.equal(result.match(/^model_reasoning_effort\s*=/gm)?.length, 1);
assert.equal(result.match(/^plan_mode_reasoning_effort\s*=/gm)?.length, 1);
- assert.match(result, /model = "gpt-5\.5"/);
- assert.match(result, /model_context_window = 400000/);
+ assert.match(result, /model = "gpt-5\.6-sol"/);
+ assert.match(result, /model_context_window = 372000/);
assert.match(result, /model_reasoning_effort = "high"/);
assert.match(result, /plan_mode_reasoning_effort = "xhigh"/);
assert.doesNotMatch(result, /gpt-5\.2/);
@@ -79,8 +79,8 @@ test("#given section settings reuse managed root keys #when ensuring config #the
].join("\n"),
);
- assert.match(result, /^model = "gpt-5\.5"$/m);
- assert.match(result, /^model_context_window = 400000$/m);
+ assert.match(result, /^model = "gpt-5\.6-sol"$/m);
+ assert.match(result, /^model_context_window = 372000$/m);
assert.match(result, /\[model_providers\.openai\]\nmodel = "provider-scoped-value"\nmodel_context_window = 123456/);
assert.match(result, /\[profiles\.review\]\nmodel_reasoning_effort = "medium"\nplan_mode_reasoning_effort = "medium"/);
});
@@ -161,8 +161,8 @@ test("#given global and project-local stale Codex configs #when migrating #then
});
assert.deepEqual(result.changed.sort(), [join(codexHome, "config.toml"), projectConfig].sort());
- assert.match(await readFile(join(codexHome, "config.toml"), "utf8"), /model = "gpt-5\.5"/);
- assert.match(await readFile(projectConfig, "utf8"), /model_context_window = 400000/);
+ assert.match(await readFile(join(codexHome, "config.toml"), "utf8"), /model = "gpt-5\.6-sol"/);
+ assert.match(await readFile(projectConfig, "utf8"), /model_context_window = 372000/);
});
test("#given model catalog is unavailable and stale 272k config #when migrating #then fallback catalog still upgrades it", async () => {
@@ -183,8 +183,8 @@ test("#given model catalog is unavailable and stale 272k config #when migrating
const content = await readFile(join(codexHome, "config.toml"), "utf8");
assert.deepEqual(result.changed, [join(codexHome, "config.toml")]);
- assert.match(content, /model = "gpt-5\.5"/);
- assert.match(content, /model_context_window = 400000/);
+ assert.match(content, /model = "gpt-5\.6-sol"/);
+ assert.match(content, /model_context_window = 372000/);
});
test("#given model catalog is malformed and stale config #when migrating #then fallback catalog still upgrades it", async () => {
@@ -206,8 +206,8 @@ test("#given model catalog is malformed and stale config #when migrating #then f
const content = await readFile(join(codexHome, "config.toml"), "utf8");
assert.deepEqual(result.changed, [join(codexHome, "config.toml")]);
- assert.match(content, /model = "gpt-5\.5"/);
- assert.match(content, /model_context_window = 400000/);
+ assert.match(content, /model = "gpt-5\.6-sol"/);
+ assert.match(content, /model_context_window = 372000/);
});
test("#given user-customized Codex model config #when migrating #then user values are preserved without root multi-agent mode", async () => {
@@ -262,7 +262,7 @@ test("#given managed config state is malformed #when migrating #then migration i
const content = await readFile(join(codexHome, "config.toml"), "utf8");
const state = JSON.parse(await readFile(statePath, "utf8"));
assert.deepEqual(result.changed, [join(codexHome, "config.toml")]);
- assert.match(content, /model_context_window = 400000/);
+ assert.match(content, /model_context_window = 372000/);
assert.equal(state.files[join(codexHome, "config.toml")].managed, true);
});
@@ -670,15 +670,15 @@ test("#given global config starts with inline-comment features table #when full
const content = await readFile(configPath, "utf8");
const parsed = parseTomlWithPython(content);
assert.equal("multi_agent_mode" in parsed, false);
- assert.equal(parsed.model, "gpt-5.5");
- assert.equal(parsed.model_context_window, 400000);
+ assert.equal(parsed.model, "gpt-5.6-sol");
+ assert.equal(parsed.model_context_window, 372000);
assert.equal(parsed.model_reasoning_effort, "high");
assert.equal(parsed.plan_mode_reasoning_effort, "xhigh");
assert.equal(parsed.features.plugins, true);
assert.equal("multi_agent_mode" in parsed.features, false);
assert.equal("model" in parsed.features, false);
assert.equal("model_context_window" in parsed.features, false);
- assert.match(content, /^model = "gpt-5\.5"\nmodel_context_window = 400000/m);
+ assert.match(content, /^model = "gpt-5\.6-sol"\nmodel_context_window = 372000/m);
assert.doesNotMatch(content, /^\s*multi_agent_mode\s*=/m);
assert.match(content, /\[features\] # keep comment\nplugins = true/);
});
diff --git a/plugins/omo/test/sync-skills-orchestration.test.mjs b/plugins/omo/test/sync-skills-orchestration.test.mjs
index 50307648..90370b22 100644
--- a/plugins/omo/test/sync-skills-orchestration.test.mjs
+++ b/plugins/omo/test/sync-skills-orchestration.test.mjs
@@ -235,6 +235,15 @@ test("#given synced aggregate Codex skills #when they describe background orches
}
});
+test("#given start-work skill #when synced for Codex #then the difficulty-tier delegation guidance survives the overlay", async () => {
+ const content = await readSkill("start-work");
+
+ assert.match(content, /lazycodex-worker-medium/);
+ assert.match(content, /Delegation by difficulty/);
+ assert.match(content, /Global Review and Debugging Gate/);
+ assert.doesNotMatch(content, /works the same on both surfaces/);
+});
+
test("#given review-work skill #when some lanes do not finish #then aggregate result remains bounded", async () => {
const content = await readSkill("review-work");
@@ -245,6 +254,8 @@ test("#given review-work skill #when some lanes do not finish #then aggregate re
assert.match(content, /Overall Verdict: PASSED \/ FAILED \/ INCONCLUSIVE/);
assert.match(content, /PASS\/FAIL\/INCONCLUSIVE \| HIGH\/MED\/LOW/);
assert.match(content, /Do not spin in repeated/);
+ assert.match(content, /bare REJECT\/FAIL token without findings is not a verdict/);
+ assert.match(content, /cites the violated goal criterion/);
assert.match(content, /Do not use `multi_agent_v1\.send_input` as an interrupt/);
});
diff --git a/plugins/omo/test/sync-skills-test-support.mjs b/plugins/omo/test/sync-skills-test-support.mjs
index 33411cb2..06502577 100644
--- a/plugins/omo/test/sync-skills-test-support.mjs
+++ b/plugins/omo/test/sync-skills-test-support.mjs
@@ -92,7 +92,7 @@ const startWorkOriginalHardRule = "- No completion claim while an applicable ult
const startWorkCodexHardRule = "- No completion claim while an applicable ultraqa adversarial class was never probed. Each applicable class needs a captured observable result; each skipped class needs a one-line not-applicable reason in the ledger.\n- No `ORCHESTRATION COMPLETE`, final response, PR creation, PR handoff, or merge before the Global Review and Debugging Gate passes with recorded evidence.\n- No PR/branch implementation or review in the main worktree; create or use a task-owned git worktree first.\n- No unprefixed session ids in Boulder state. Codex sessions are always `codex:<session_id>`.";
const reviewWorkCodexGatePattern =
- /\nWhen `review-work` is used as a final implementation, PR, or `\$start-work`\ngate, it is blocking\. A timeout, missing deliverable, ack-only response,\nexplicit `BLOCKED:`, or inconclusive lane is not a pass\. Treat that lane as\nfailed, investigate the underlying uncertainty with the `debugging` skill when\nruntime behavior may be wrong, fix with evidence, and rerun the affected lane\nbefore claiming completion, creating or handing off a PR, or merging\.\n\nWhen reviewing a PR or branch, collect diff, file contents, and verification\nresults from a dedicated review worktree attached to that branch\. Never\ncheckout, test, or edit the review branch in the main worktree\.\n\nReview evidence must be safe to share\. Redact or mask secrets and sensitive\nuser data before including evidence in logs, PR bodies, or handoffs\. Never\ninclude raw tokens, credentials, auth headers, cookies, API keys, env dumps,\nprivate logs, or PII; summarize with lengths, hashes, and short non-sensitive\nprefixes when identity is needed\.\n/;
+ /\nWhen `review-work` is used as a final implementation, PR, or `\$start-work`\ngate, it is blocking\. A timeout, missing deliverable, ack-only response,\nexplicit `BLOCKED:`, or inconclusive lane is not a pass\. Treat that lane as\nfailed, investigate the underlying uncertainty with the `debugging` skill when\nruntime behavior may be wrong, fix with evidence, and rerun the affected lane\nbefore claiming completion, creating or handing off a PR, or merging\.\n\nA rejecting lane must name its blockers inline in its final message — each\nblocker cites the violated goal criterion or requirement plus an evidence\npointer\. A bare REJECT\/FAIL token without findings is not a verdict; treat it\nas an inconclusive lane \(one bounded respawn, then record it inconclusive with\nthat reason\)\.\n\nWhen reviewing a PR or branch, collect diff, file contents, and verification\nresults from a dedicated review worktree attached to that branch\. Never\ncheckout, test, or edit the review branch in the main worktree\.\n\nReview evidence must be safe to share\. Redact or mask secrets and sensitive\nuser data before including evidence in logs, PR bodies, or handoffs\. Never\ninclude raw tokens, credentials, auth headers, cookies, API keys, env dumps,\nprivate logs, or PII; summarize with lengths, hashes, and short non-sensitive\nprefixes when identity is needed\.\n/;
export function removeCodexSkillOverlays(skillName, content) {
if (skillName === "ulw-research") {
diff --git a/plugins/omo/test/sync-skills.test.mjs b/plugins/omo/test/sync-skills.test.mjs
index 7e10a265..fdb0b775 100644
--- a/plugins/omo/test/sync-skills.test.mjs
+++ b/plugins/omo/test/sync-skills.test.mjs
@@ -252,13 +252,15 @@ test("#given synced ulw-loop skill #when worker guidance is inspected #then cont
);
const syncedSkill = await readFile(join(root, "skills", "ulw-loop", "SKILL.md"), "utf8");
const syncedWorkflow = await readFile(join(root, "skills", "ulw-loop", "references", "full-workflow.md"), "utf8");
+ // ulw-loop is V2-primary (gpt-5.6 sol/terra use the flat `wait_agent`); the `multi_agent_v1.*`
+ // namespace is documented only as the v1 fallback, so the wait_agent refs accept the bare token.
const requiredPatterns = [
- ["multi_agent_v1.wait_agent ref", /multi_agent_v1\.wait_agent/],
+ ["wait_agent ref", /\bwait_agent\b/],
["local spawned-name tracking", /Track spawned agent names locally/],
["wait_agent mailbox path", /wait_agent.*mailbox signals/],
["progress status contract", /WORKING:/],
["long-running plan/reviewer background guidance", /Plan and reviewer agents may run for a long time/],
- ["bounded plan/reviewer polling", /multi_agent_v1\.wait_agent.*cycles/],
+ ["bounded plan/reviewer polling", /wait_agent.*cycles/],
["single long wait guard", /single long blocking wait/],
["git-master checkpointing", /git-master/],
["touched-path commit-style probe", /touched-path commit history/],
diff --git a/plugins/omo/test/ulw-plan-skill-contract.test.mjs b/plugins/omo/test/ulw-plan-skill-contract.test.mjs
index 0b3db5b5..9c2e46ad 100644
--- a/plugins/omo/test/ulw-plan-skill-contract.test.mjs
+++ b/plugins/omo/test/ulw-plan-skill-contract.test.mjs
@@ -6,47 +6,16 @@ import { fileURLToPath } from "node:url";
const root = dirname(dirname(fileURLToPath(import.meta.url)));
-async function readUlwPlanCopies() {
+test("#given ulw-plan skill copies #when component source and packaged copy are compared #then they are byte-identical and expose the loader-parsed name", async () => {
+ // given
const componentPath = join(root, "components", "ultrawork", "skills", "ulw-plan", "SKILL.md");
const packagedPath = join(root, "skills", "ulw-plan", "SKILL.md");
- return [
- { label: "component", path: componentPath, content: await readFile(componentPath, "utf8") },
- { label: "packaged", path: packagedPath, content: await readFile(packagedPath, "utf8") },
- ];
-}
-test("#given ulw-plan skill #when Codex delegation is inspected #then spawned planners block dependent work", async () => {
- for (const copy of await readUlwPlanCopies()) {
- assert.match(copy.content, /multi_agent_v1\.spawn_agent/, `${copy.label}: must document Codex spawning`);
- assert.match(copy.content, /multi_agent_v1\.wait_agent/, `${copy.label}: must document Codex waiting`);
- assert.match(
- copy.content,
- /Spawn every independent child for the current wave first/i,
- `${copy.label}: must preserve independent spawn waves`,
- );
- assert.match(
- copy.content,
- /After the wave\s+is launched[\s\S]{0,240}multi_agent_v1\.wait_agent[\s\S]{0,240}terminal status/i,
- `${copy.label}: must wait after the wave is launched`,
- );
- assert.doesNotMatch(
- copy.content,
- /Immediately after any `multi_agent_v1\.spawn_agent`/i,
- `${copy.label}: must not serialize independent spawns`,
- );
- assert.match(copy.content, /terminal status/i, `${copy.label}: must wait until terminal status`);
- assert.match(copy.content, /WORKING:/, `${copy.label}: must keep progress liveness guidance`);
- assert.match(copy.content, /BLOCKED:/, `${copy.label}: must keep blocked liveness guidance`);
- assert.match(
- copy.content,
- /timeout only means no new mailbox update arrived/i,
- `${copy.label}: must frame wait timeouts as mailbox silence`,
- );
- assert.match(copy.content, /Fallback only when/, `${copy.label}: must keep explicit fallback conditions`);
- assert.match(
- copy.content,
- /do not start dependent planning, drafting, approval-gate work, or final handoff/i,
- `${copy.label}: must block dependent planning work before child results are integrated`,
- );
- }
+ // when
+ const component = await readFile(componentPath, "utf8");
+ const packaged = await readFile(packagedPath, "utf8");
+
+ // then
+ assert.equal(packaged, component);
+ assert.match(component, /^name: ulw-plan$/m);
});
diff --git a/plugins/omo/test/ulw-research-epistemic-contract.test.mjs b/plugins/omo/test/ulw-research-epistemic-contract.test.mjs
deleted file mode 100644
index 701878c9..00000000
--- a/plugins/omo/test/ulw-research-epistemic-contract.test.mjs
+++ /dev/null
@@ -1,98 +0,0 @@
-import assert from "node:assert/strict";
-import { readFile } from "node:fs/promises";
-import { dirname, join } from "node:path";
-import test from "node:test";
-import { fileURLToPath } from "node:url";
-import { sharedSkillsRootPath } from "@oh-my-opencode/shared-skills";
-
-const root = dirname(dirname(fileURLToPath(import.meta.url)));
-
-async function readUlwResearchCopies() {
- const sharedPath = join(sharedSkillsRootPath(), "ulw-research", "SKILL.md");
- const packagedPath = join(root, "skills", "ulw-research", "SKILL.md");
- return [
- { label: "shared", path: sharedPath, content: await readFile(sharedPath, "utf8") },
- { label: "packaged", path: packagedPath, content: await readFile(packagedPath, "utf8") },
- ];
-}
-
-function escapeRegExp(value) {
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-function markdownSection(content, heading, nextHeading) {
- const headingPattern = new RegExp(`^${escapeRegExp(heading)}\\r?$`, "m");
- const headingMatch = content.match(headingPattern);
- assert.notEqual(headingMatch, null, `SKILL.md section not found: ${heading}`);
- assert.notEqual(headingMatch.index, undefined, `SKILL.md section index not found: ${heading}`);
- const bodyStart = headingMatch.index + headingMatch[0].length;
- if (nextHeading === undefined) return content.slice(bodyStart);
- const nextHeadingIndex = content.indexOf(`\n${nextHeading}`, bodyStart);
- assert.notEqual(nextHeadingIndex, -1, `SKILL.md next section not found: ${nextHeading}`);
- return content.slice(bodyStart, nextHeadingIndex);
-}
-
-test("#given ulw-research epistemic instrumentation #when the research contract is inspected #then the meta-layer artifacts and fields are required", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const section = markdownSection(copy.content, "## Epistemic instrumentation", "## Run the swarm as a cooperating team");
- assert.match(section, /intent-diff\.md/i, `${copy.label}: body must require an intent-vs-reality diff artifact`);
- assert.match(section, /expected truth/i, `${copy.label}: intent diff must record expected truth`);
- assert.match(section, /observed reality/i, `${copy.label}: intent diff must record observed reality`);
- assert.match(section, /diff, violated invariant/i, `${copy.label}: intent diff must record the diff gap field and violated invariant`);
- assert.match(section, /claim-graph\.md/i, `${copy.label}: body must require a claim graph`);
- assert.match(section, /independent observation groups/i, `${copy.label}: claim graph must track independent observation groups`);
- assert.match(section, /convergence status/i, `${copy.label}: claim graph must track convergence status`);
- const claimGraphBullet = section.split("\n").find((line) => line.includes("`claim-graph.md`"));
- assert.notEqual(claimGraphBullet, undefined, `${copy.label}: claim graph bullet must exist`);
- assert.match(claimGraphBullet, /single claim store/i, `${copy.label}: claim graph must be the single claim store`);
- assert.match(claimGraphBullet, /risk tier/i, `${copy.label}: claim graph nodes must carry a risk tier`);
- assert.match(claimGraphBullet, /counter-search/i, `${copy.label}: claim graph nodes must carry the counter-search result`);
- assert.match(claimGraphBullet, /primary source/i, `${copy.label}: claim graph nodes must carry primary source backing`);
- assert.match(claimGraphBullet, /verified-claims/i, `${copy.label}: cleared nodes must feed the verified-claims digest`);
- assert.match(section, /observation-manifest\.md/i, `${copy.label}: body must require an observation manifest`);
- assert.match(section, /observer group/i, `${copy.label}: observation manifest must record observer groups`);
- assert.match(section, /independence basis/i, `${copy.label}: observation manifest must record independence basis`);
- assert.match(section, /observed_at/i, `${copy.label}: temporal evidence must include observed_at`);
- assert.match(section, /valid_at|claim_valid_at/i, `${copy.label}: temporal evidence must include a validity field`);
- assert.match(section, /verification-economics\.md/i, `${copy.label}: body must require verification economics`);
- assert.match(section, /cause-disappearance\.md/i, `${copy.label}: body must require cause-disappearance records`);
- assert.match(section, /last_seen/i, `${copy.label}: cause-disappearance records must track last_seen`);
- assert.match(section, /disconfirming observation/i, `${copy.label}: cause-disappearance records must track disconfirming observations`);
- assert.match(section, /no longer observed/i, `${copy.label}: cause-disappearance records must support no-longer-observed verdicts`);
- }
-});
-
-test("#given ulw-research readiness gates #when synthesis rules are inspected #then diff closure and independent convergence are required", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const success = markdownSection(copy.content, "## Success criteria", "## Epistemic instrumentation");
- const phase4 = markdownSection(copy.content, "## Phase 4 — Synthesize", "## Phase 5 — Final materials");
- assert.match(success, /intent-vs-reality diff/i, `${copy.label}: success criteria must require intent diff closure`);
- assert.match(success, /independent observation groups/i, `${copy.label}: success criteria must require independent observations`);
- assert.match(success, /convergence/i, `${copy.label}: success criteria must require convergence`);
- assert.match(phase4, /intent-diff\.md/i, `${copy.label}: synthesis must start from the intent diff`);
- assert.match(phase4, /independent-observation convergence/i, `${copy.label}: synthesis must summarize independent convergence`);
- }
-});
-
-test("#given ulw-research observation instrumentation #when worker ownership is inspected #then workers return candidates as message text and the orchestrator writes manifests", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(copy.content, /observation candidates?|claim candidates?/i, `${copy.label}: workers must return claim and observation candidates`);
- assert.match(copy.content, /message text/i, `${copy.label}: claim and observation candidates must travel as message text`);
- assert.match(copy.content, /orchestrator-owned|orchestrator owns/i, `${copy.label}: instrumentation artifacts must be orchestrator-owned`);
- assert.doesNotMatch(
- copy.content,
- /worker[^.]*\b(?:write|append|create)s?\b[^.]*(?:intent-diff|observation-manifest|claim-graph|verification-economics|cause-disappearance)/i,
- `${copy.label}: workers must not write instrumentation artifacts directly`,
- );
- }
-});
-
-test("#given the claim graph as the single claim store #when the retired ledger is scanned #then claim-ledger is gone and the gate lives on graph nodes", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.doesNotMatch(copy.content, /claim[- ]ledger/i, `${copy.label}: the retired claim-ledger artifact must not appear`);
- const phase3b = markdownSection(copy.content, "## Phase 3b — Lock non-code claims through the claim graph", "## Phase 4 — Synthesize");
- assert.match(phase3b, /claim-graph\.md/i, `${copy.label}: the gate must record outcomes on claim-graph nodes`);
- assert.match(phase3b, /verified-claims/i, `${copy.label}: the verified-claims allowlist digest must survive the merge`);
- assert.match(phase3b, /sole allowlist/i, `${copy.label}: the data-flow-lock must stay self-enforcing`);
- }
-});
diff --git a/plugins/omo/test/ulw-research-skill-contract.test.mjs b/plugins/omo/test/ulw-research-skill-contract.test.mjs
index c3c82fa8..3791913a 100644
--- a/plugins/omo/test/ulw-research-skill-contract.test.mjs
+++ b/plugins/omo/test/ulw-research-skill-contract.test.mjs
@@ -1,10 +1,9 @@
-// allow: SIZE_OK - ULW research skill contract tests inspect one bundled prompt protocol; this release introduces the contract and future additions should split by protocol phase.
-
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import test from "node:test";
import { fileURLToPath } from "node:url";
+
import { sharedSkillsRootPath } from "@oh-my-opencode/shared-skills";
const root = dirname(dirname(fileURLToPath(import.meta.url)));
@@ -18,286 +17,14 @@ async function readUlwResearchCopies() {
];
}
-function frontmatterDescription(content) {
- const match = content.match(/^---\r?\n[\s\S]*?\bdescription:\s*"([\s\S]*?)"\r?\n[\s\S]*?---/);
- assert.notEqual(match, null, "SKILL.md frontmatter description not found");
- return match[1];
-}
-
-function escapeRegExp(value) {
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
-}
-
-function markdownSection(content, heading, nextHeading) {
- const headingPattern = new RegExp(`^${escapeRegExp(heading)}\\r?$`, "m");
- const headingMatch = content.match(headingPattern);
- assert.notEqual(headingMatch, null, `SKILL.md section not found: ${heading}`);
- assert.notEqual(headingMatch.index, undefined, `SKILL.md section index not found: ${heading}`);
- const bodyStart = headingMatch.index + headingMatch[0].length;
- if (nextHeading === undefined) {
- return content.slice(bodyStart);
- }
- const nextHeadingIndex = content.indexOf(`\n${nextHeading}`, bodyStart);
- assert.notEqual(nextHeadingIndex, -1, `SKILL.md next section not found: ${nextHeading}`);
- return content.slice(bodyStart, nextHeadingIndex);
-}
-
-test("#given renamed research skill #when frontmatter is inspected #then ulw-research is the canonical name", async () => {
+test("#given ulw-research skill copies #when frontmatter is inspected #then the loader-parsed name is ulw-research", async () => {
for (const copy of await readUlwResearchCopies()) {
assert.match(copy.content, /^name: ulw-research$/m, `${copy.label}: frontmatter must expose ulw-research`);
}
});
-test("#given renamed research skill #when activation marker is inspected #then ulw-research is the canonical marker", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /`ULW-RESEARCH MODE ENABLED!`/,
- `${copy.label}: body must expose the ulw-research activation marker`,
- );
- assert.doesNotMatch(
- copy.content,
- /`ULTRARESEARCH MODE ENABLED!`/,
- `${copy.label}: body must not expose the old ultraresearch activation marker`,
- );
- }
-});
-
-test("#given ulw-research skill #when scanned for non-English content #then it contains no Hangul", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.doesNotMatch(
- copy.content,
- /[ᄀ-ᇿ㄰-㆏가-힣]/,
- `${copy.label} copy contains Hangul characters`,
- );
- }
-});
-
-test("#given ulw-research description #when activation policy is inspected #then it gates on explicit research demands only", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const description = frontmatterDescription(copy.content);
- assert.match(description, /ulw-research/i, `${copy.label}: description must name the ulw-research trigger`);
- if (copy.label === "shared") {
- assert.match(description, /ultraresearch/i, `${copy.label}: description must preserve ultraresearch discoverability`);
- } else {
- assert.doesNotMatch(description, /ultraresearch/i, `${copy.label}: description must not expose ultraresearch`);
- }
- assert.match(description, /\bulw\b/i, `${copy.label}: description must preserve ulw discoverability`);
- assert.match(description, /explicit/i, `${copy.label}: description must gate activation on explicit demand`);
- assert.match(
- description,
- /ultra-precise investigation/i,
- `${copy.label}: description must name the ultra-precise investigation trigger`,
- );
- assert.match(description, /\bresearch\b/i, `${copy.label}: description must name the research trigger`);
- }
-});
-
-test("#given packaged ulw-research skill #when scanned for legacy aliases #then ultraresearch is not exposed", async () => {
- const packaged = (await readUlwResearchCopies()).find((copy) => copy.label === "packaged");
- assert.notEqual(packaged, undefined, "packaged copy not found");
- assert.doesNotMatch(packaged.content, /ultraresearch/i, "packaged ulw-research must not expose ultraresearch");
-});
-
-test("#given packaged ulw-research skill #when Codex guidance is inspected #then compatibility guidance is preserved", async () => {
- const packaged = (await readUlwResearchCopies()).find((copy) => copy.label === "packaged");
- assert.notEqual(packaged, undefined, "packaged copy not found");
- assert.match(packaged.content, /## Codex Harness Tool Compatibility/);
- assert.match(packaged.content, /multi_agent_v1\.spawn_agent/);
- assert.match(packaged.content, /multi_agent_v1\.wait_agent/);
-});
-
-test("#given ulw-research body #when authority is inspected #then it takes precedence over exploration-bounding instructions", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /exploration-bounding|exploration (?:caps|budgets|limits)/i,
- `${copy.label}: body must name the exploration-bounding instructions it overrides`,
- );
- assert.match(
- copy.content,
- /supersede|override|do(?:es)? not (?:bind|apply)/i,
- `${copy.label}: body must state precedence while the mode is active`,
- );
- }
-});
-
-test("#given ulw-research worker protocol #when EXPAND flow is inspected #then markers travel as message text and workers never write files", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(copy.content, /EXPAND/, `${copy.label}: body must keep the EXPAND marker protocol`);
- assert.match(
- copy.content,
- /(?:reply|message|response) text|end (?:its|the|your) (?:reply|response|final message)/i,
- `${copy.label}: EXPAND markers must be returned as message text`,
- );
- assert.match(
- copy.content,
- /read-only|cannot write files|never ask (?:a )?worker(?:s)? to write/i,
- `${copy.label}: body must state the read-only worker constraint`,
- );
- assert.doesNotMatch(
- copy.content,
- /APPEND (?:your )?findings to \$SESSION_DIR/i,
- `${copy.label}: workers must not be instructed to append session-dir files`,
- );
- }
-});
-
-test("#given ulw-research journaling #when ownership is inspected #then the orchestrator owns the session journal", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /orchestrator[\s\S]{0,200}journal|journal[\s\S]{0,200}orchestrator/i,
- `${copy.label}: body must assign session-journal writes to the orchestrator`,
- );
- assert.match(copy.content, /SESSION_DIR/, `${copy.label}: body must keep the session directory protocol`);
- }
-});
-
-test("#given ulw-research expansion loop #when stop rules are inspected #then convergence rules and a depth cap are stated", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(copy.content, /converg/i, `${copy.label}: body must define convergence`);
- assert.match(copy.content, /depth/i, `${copy.label}: body must define an expansion depth cap`);
- assert.match(
- copy.content,
- /minimum (?:of )?(?:2|two) expansion waves|at least (?:2|two) expansion waves/i,
- `${copy.label}: body must require a minimum of two expansion waves before convergence`,
- );
- }
-});
-
-test("#given ulw-research under ultrawork #when coexistence is inspected #then marker and done-definition conflicts are resolved", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(copy.content, /ultrawork|\bulw\b/i, `${copy.label}: body must address ultrawork coexistence`);
- assert.match(
- copy.content,
- /first(?:-| )line/i,
- `${copy.label}: body must resolve the first-line activation marker conflict`,
- );
- }
-});
-
-test("#given ulw-research worker sizing #when spawn guidance is inspected #then capable-model and high-effort routing is stated", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /capable model|high(?:est)? (?:reasoning )?effort/i,
- `${copy.label}: body must route research workers to a capable model or high effort`,
- );
- }
-});
-
-test("#given ulw-research execution substrate #when team usage is inspected #then it prefers a cooperating team with harness-native team tools", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /cooperating team/i,
- `${copy.label}: body must encourage running the swarm as a cooperating team`,
- );
- assert.match(copy.content, /\bteammode\b/i, `${copy.label}: body must name the Codex teammode skill`);
- assert.match(copy.content, /team_mode/i, `${copy.label}: body must name the OpenCode team_mode path`);
- }
-});
-
-test("#given ulw-research team composition #when member slicing is inspected #then members map to part/ownership/perspective, never job titles", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /by part, ownership, or perspective/i,
- `${copy.label}: body must compose members by part, ownership, or perspective`,
- );
- assert.match(
- copy.content,
- /never a job title|not (?:a |by )?job title/i,
- `${copy.label}: body must forbid vague job-title members`,
- );
- }
-});
-
-test("#given ulw-research team communication #when the raise law is inspected #then members broadcast every lead immediately rather than hoarding", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /raise law|broadcast every lead/i,
- `${copy.label}: body must state the raise/broadcast law`,
- );
- assert.match(copy.content, /over-communicate/i, `${copy.label}: body must demand over-communication`);
- assert.match(
- copy.content,
- /the (?:moment|instant) it (?:surfaces|appears|lands)/i,
- `${copy.label}: body must require raising leads the moment they surface`,
- );
- assert.match(
- copy.content,
- /hoard/i,
- `${copy.label}: body must reject hoarding leads for a final dump`,
- );
- }
-});
-
-test("#given ulw-research default swarm #when team guidance is inspected #then teammode, many teammates, and hyperdebate are defaulted", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const teamSection = markdownSection(copy.content, "## Run the swarm as a cooperating team", "## Worker ground rules");
- assert.match(teamSection, /default(?:s)? to teammode|teammode by default/i, `${copy.label}: teammode must be the default`);
- assert.match(teamSection, /many teammates|larger roster|5-8 teammates|5\+ teammates/i, `${copy.label}: body must prefer many teammates`);
- assert.match(teamSection, /hyperdebate|ultradebate/i, `${copy.label}: body must require adversarial debate`);
- assert.match(teamSection, /skeptic|red-team|cross-critique/i, `${copy.label}: body must include a critique perspective`);
- }
-});
-
-test("#given ulw-research non-code verification #when the gate is inspected #then a claim graph / verified-claims data-flow-lock exists", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /claim graph|verified-claims/i,
- `${copy.label}: body must define the non-code claim-graph verification gate`,
- );
- }
-});
-
-test("#given ulw-research claim graph #when ownership is inspected #then workers never write the graph / verified-claims artifact", async () => {
- for (const copy of await readUlwResearchCopies()) {
- assert.doesNotMatch(
- copy.content,
- /worker[^.]*\b(?:write|append|create)s?\b[^.]*(?:claim[- ]graph|verified-claims)/i,
- `${copy.label}: workers must not be instructed to write/append/create the claim graph or verified-claims`,
- );
- }
-});
-
-test("#given ulw-research report output #when defaults are inspected #then HTML/PDF reports go through frontend, visual QA, and reviewer approval", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const phase0 = markdownSection(copy.content, "## Phase 0 — Decompose and open the journal", "## Phase 1 — Saturation wave");
- const phase4 = markdownSection(copy.content, "## Phase 4 — Synthesize", "## Phase 5 — Final materials");
- const phase5 = markdownSection(copy.content, "## Phase 5 — Final materials", "## Search craft");
- assert.match(phase0, /Final material format:\s*<HTML\/PDF default \| explicit format \| markdown only>/, `${copy.label}: Phase 0 must track the default final-material contract`);
- assert.match(phase4, /citation source of truth/i, `${copy.label}: Phase 4 synthesis must be a source of truth, not the default final artifact`);
- assert.doesNotMatch(phase4, /When no report was requested, this is the deliverable/i, `${copy.label}: Phase 4 must not contradict default HTML/PDF final materials`);
- assert.match(phase5, /Default final materials to HTML\/PDF unless the user explicitly asks/i, `${copy.label}: Phase 5 must default final materials to HTML/PDF`);
- assert.match(phase5, /HTML first[\s\S]{0,120}PDF default/i, `${copy.label}: report output must default to HTML with PDF availability`);
- assert.match(phase5, /\bfrontend\b/i, `${copy.label}: report assembly must load the frontend skill`);
- assert.match(phase5, /visual-qa/i, `${copy.label}: report assembly must require visual-qa`);
- assert.match(phase5, /ulw-loop|ULW loop/i, `${copy.label}: report QA must run under the ULW loop`);
- assert.match(phase5, /reviewer[\s\S]{0,120}(?:approve|says no broken parts|no broken parts)/i, `${copy.label}: report completion must wait for reviewer approval`);
- }
-});
-
-test("#given ulw-research final materials #when visual artifact guidance is inspected #then charts Mermaid graphs and imagegen are strongly required", async () => {
- for (const copy of await readUlwResearchCopies()) {
- const phase5 = markdownSection(copy.content, "## Phase 5 — Final materials", "## Search craft");
- assert.match(phase5, /actively use charts/i, `${copy.label}: reports must strongly require charts`);
- assert.match(phase5, /Mermaid graphs/i, `${copy.label}: reports must require Mermaid graphs`);
- assert.match(phase5, /imagegen skill/i, `${copy.label}: reports must require imagegen visuals`);
- assert.match(phase5, /generated (?:diagrams|visuals)|generated diagrams or editorial visuals/i, `${copy.label}: report assets must include generated visual guidance`);
- }
-});
-
-test("#given ulw-research blocked sources #when escalation is inspected #then it routes through the ultimate-browsing skill", async () => {
+test("#given ulw-research skill copies #when scanned for non-English content #then they contain no Hangul", async () => {
for (const copy of await readUlwResearchCopies()) {
- assert.match(
- copy.content,
- /ultimate-browsing/,
- `${copy.label}: body must escalate blocked sources via the ultimate-browsing skill`,
- );
+ assert.doesNotMatch(copy.content, /[ᄀ-ᇿ㄰-㆏가-힣]/, `${copy.label} copy contains Hangul characters`);
}
});