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.11.1

YeonGyu-Kim8805feb879f2
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.json
index e58281c7..5183a356 100644
--- a/plugins/omo/.codex-plugin/plugin.json
+++ b/plugins/omo/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "omo",
- "version": "4.11.0",
+ "version": "4.11.1",
"description": "One Codex plugin namespace for Yeongyu's local Codex components.",
"author": {
"name": "Yeongyu Kim",
diff --git a/plugins/omo/components/bootstrap/dist/cli.js b/plugins/omo/components/bootstrap/dist/cli.js
index e6824d5f..6cb9582d 100755
--- a/plugins/omo/components/bootstrap/dist/cli.js
+++ b/plugins/omo/components/bootstrap/dist/cli.js
@@ -2144,30 +2144,44 @@ async function exists3(path) {
import { readFile as readFile10, writeFile as writeFile6 } from "node:fs/promises";
import { join as join15 } from "node:path";
var GIT_BASH_ENV_KEY = "OMO_CODEX_GIT_BASH_PATH";
+var CODEGRAPH_RELATIVE_ARGS = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
async function stampGitBashMcpEnv(input) {
- if (input.platform !== "win32")
- return false;
- const rawOverride = input.env?.[GIT_BASH_ENV_KEY];
- const override = typeof rawOverride === "string" ? rawOverride.trim() : "";
- if (override === "")
- return false;
const manifestPath = join15(input.pluginRoot, ".mcp.json");
if (!await fileExistsStrict(manifestPath))
return false;
const parsed = JSON.parse(await readFile10(manifestPath, "utf8"));
if (!isPlainRecord(parsed) || !isPlainRecord(parsed["mcpServers"]))
return false;
- const gitBashServer = parsed["mcpServers"]["git_bash"];
- if (!isPlainRecord(gitBashServer))
- return false;
- const serverEnv = isPlainRecord(gitBashServer["env"]) ? gitBashServer["env"] : {};
- if (serverEnv[GIT_BASH_ENV_KEY] === override)
+ let changed = stampCodegraphMcpPath(parsed["mcpServers"], input.pluginRoot);
+ if (input.platform === "win32") {
+ const rawOverride = input.env?.[GIT_BASH_ENV_KEY];
+ const override = typeof rawOverride === "string" ? rawOverride.trim() : "";
+ const gitBashServer = parsed["mcpServers"]["git_bash"];
+ if (override !== "" && isPlainRecord(gitBashServer)) {
+ const serverEnv = isPlainRecord(gitBashServer["env"]) ? gitBashServer["env"] : {};
+ if (serverEnv[GIT_BASH_ENV_KEY] !== override) {
+ gitBashServer["env"] = { ...serverEnv, [GIT_BASH_ENV_KEY]: override };
+ changed = true;
+ }
+ }
+ }
+ if (!changed)
return false;
- gitBashServer["env"] = { ...serverEnv, [GIT_BASH_ENV_KEY]: override };
await writeFile6(manifestPath, `${JSON.stringify(parsed, null, "\t")}
`);
return true;
}
+function stampCodegraphMcpPath(mcpServers, pluginRoot) {
+ const codegraphServer = mcpServers["codegraph"];
+ if (!isPlainRecord(codegraphServer) || !Array.isArray(codegraphServer["args"]))
+ return false;
+ const args = codegraphServer["args"];
+ const entrypoint = args[0];
+ if (typeof entrypoint !== "string" || !CODEGRAPH_RELATIVE_ARGS.has(entrypoint))
+ return false;
+ codegraphServer["args"] = [join15(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
+ return true;
+}
// ../src/install/codex-hook-trust.ts
import { createHash as createHash3 } from "node:crypto";
diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.json
index 55de2156..dc98d74b 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": "LazyCodex(4.11.0): Checking Bootstrap Provisioning"
+ "statusMessage": "LazyCodex(4.11.1): Checking Bootstrap Provisioning"
}
]
}
diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.json
index fcfd2869..6ca2089b 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.11.0",
+ "version": "4.11.1",
"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/dist/cli.js b/plugins/omo/components/codegraph/dist/cli.js
index 8c40c787..f94baecc 100755
--- a/plugins/omo/components/codegraph/dist/cli.js
+++ b/plugins/omo/components/codegraph/dist/cli.js
@@ -1990,7 +1990,6 @@ async function executeCodegraphSessionStartHook(options = {}) {
const homeDir = resolveHomeDir2(env);
const config = options.config ?? getCodexOmoConfig({ cwd: projectRoot, env, homeDir });
if (config.codegraph?.enabled === false) {
- writeHookJson(options.stdout ?? processStdout, "skipped-disabled");
return { action: "skipped-disabled", exitCode: 0 };
}
(options.spawnWorker ?? spawnDetachedWorker)({
@@ -1998,11 +1997,16 @@ async function executeCodegraphSessionStartHook(options = {}) {
command: process.execPath,
env: { ...env, [SESSION_START_CWD_ENV]: projectRoot }
});
- writeHookJson(options.stdout ?? processStdout, "spawned");
+ writeHookJson(options.stdout ?? processStdout);
return { action: "spawned", exitCode: 0 };
}
-function writeHookJson(stdout, action) {
- const output = action === "spawned" ? { hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: CODEGRAPH_SESSION_START_NOTICE }, codegraph: { action } } : { hookSpecificOutput: { hookEventName: "SessionStart" }, codegraph: { action } };
+function writeHookJson(stdout) {
+ const output = {
+ hookSpecificOutput: {
+ hookEventName: "SessionStart",
+ additionalContext: CODEGRAPH_SESSION_START_NOTICE
+ }
+ };
stdout.write(`${JSON.stringify(output)}
`);
}
diff --git a/plugins/omo/components/codegraph/package.json b/plugins/omo/components/codegraph/package.json
index 6a20f7bb..0772a67a 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.11.0",
+ "version": "4.11.1",
"description": "Codex plugin MCP wrapper for CodeGraph.",
"type": "module",
"private": true,
diff --git a/plugins/omo/components/codegraph/src/hook.ts b/plugins/omo/components/codegraph/src/hook.ts
index 1c62395a..9ff77f86 100644
--- a/plugins/omo/components/codegraph/src/hook.ts
+++ b/plugins/omo/components/codegraph/src/hook.ts
@@ -8,7 +8,6 @@ import { getCodexOmoConfig } from "../../../shared/src/config-loader.ts";
import { SESSION_START_CWD_ENV } from "./session-start-worker.js";
import type {
HookStdout,
- SessionStartAction,
SessionStartHookOptions,
SessionStartHookResult,
WorkerSpawnInvocation,
@@ -47,7 +46,6 @@ export async function executeCodegraphSessionStartHook(options: SessionStartHook
const config = options.config ?? getCodexOmoConfig({ cwd: projectRoot, env, homeDir });
if (config.codegraph?.enabled === false) {
- writeHookJson(options.stdout ?? processStdout, "skipped-disabled");
return { action: "skipped-disabled", exitCode: 0 };
}
@@ -56,14 +54,17 @@ export async function executeCodegraphSessionStartHook(options: SessionStartHook
command: process.execPath,
env: { ...env, [SESSION_START_CWD_ENV]: projectRoot },
});
- writeHookJson(options.stdout ?? processStdout, "spawned");
+ writeHookJson(options.stdout ?? processStdout);
return { action: "spawned", exitCode: 0 };
}
-function writeHookJson(stdout: HookStdout, action: SessionStartAction): void {
- const output = action === "spawned"
- ? { hookSpecificOutput: { hookEventName: "SessionStart", additionalContext: CODEGRAPH_SESSION_START_NOTICE }, codegraph: { action } }
- : { hookSpecificOutput: { hookEventName: "SessionStart" }, codegraph: { action } };
+function writeHookJson(stdout: HookStdout): void {
+ const output = {
+ hookSpecificOutput: {
+ hookEventName: "SessionStart",
+ additionalContext: CODEGRAPH_SESSION_START_NOTICE,
+ },
+ };
stdout.write(`${JSON.stringify(output)}\n`);
}
diff --git a/plugins/omo/components/codegraph/test/hook.test.ts b/plugins/omo/components/codegraph/test/hook.test.ts
index 02dfa44f..78ee7eae 100644
--- a/plugins/omo/components/codegraph/test/hook.test.ts
+++ b/plugins/omo/components/codegraph/test/hook.test.ts
@@ -42,7 +42,6 @@ describe("CodeGraph SessionStart hook", () => {
hookEventName: "SessionStart",
additionalContext: "LazyCodex CodeGraph bootstrap scheduled in background",
},
- codegraph: { action: "spawned" },
});
} finally {
rmSync(homeDir, { recursive: true, force: true });
@@ -66,10 +65,7 @@ describe("CodeGraph SessionStart hook", () => {
// then
expect(result).toEqual({ action: "skipped-disabled", exitCode: 0 });
expect(spawned).toEqual([]);
- expect(JSON.parse(stdout.join(""))).toEqual({
- hookSpecificOutput: { hookEventName: "SessionStart" },
- codegraph: { action: "skipped-disabled" },
- });
+ expect(stdout.join("")).toBe("");
});
it("#given HOME OMO config disables Codex CodeGraph #when SessionStart fires #then it skips without spawning", async () => {
@@ -97,7 +93,7 @@ describe("CodeGraph SessionStart hook", () => {
// then
expect(result).toEqual({ action: "skipped-disabled", exitCode: 0 });
expect(spawned).toEqual([]);
- expect(JSON.parse(stdout.join("")).codegraph).toEqual({ action: "skipped-disabled" });
+ expect(stdout.join("")).toBe("");
} finally {
rmSync(homeDir, { recursive: true, force: true });
rmSync(workspace, { recursive: true, force: true });
@@ -128,7 +124,7 @@ describe("CodeGraph SessionStart hook", () => {
// then
expect(result).toEqual({ action: "skipped-disabled", exitCode: 0 });
expect(spawned).toEqual([]);
- expect(JSON.parse(stdout.join("")).codegraph).toEqual({ action: "skipped-disabled" });
+ expect(stdout.join("")).toBe("");
} finally {
rmSync(homeDir, { recursive: true, force: true });
rmSync(workspace, { recursive: true, force: true });
@@ -191,7 +187,12 @@ describe("CodeGraph SessionStart hook", () => {
},
},
]);
- expect(JSON.parse(stdout.join("")).codegraph).toEqual({ action: "spawned" });
+ expect(JSON.parse(stdout.join(""))).toEqual({
+ hookSpecificOutput: {
+ additionalContext: "LazyCodex CodeGraph bootstrap scheduled in background",
+ hookEventName: "SessionStart",
+ },
+ });
} finally {
rmSync(workspace, { recursive: true, force: true });
}
@@ -514,7 +515,7 @@ describe("CodeGraph SessionStart hook", () => {
}
});
- it("#given malformed hook input #when SessionStart fires #then it still emits JSON and exits zero", async () => {
+ it("#given malformed hook input with CodeGraph disabled #when SessionStart fires #then it stays silent and exits zero", async () => {
// given
const stdout: string[] = [];
const spawned: WorkerSpawnInvocation[] = [];
@@ -531,7 +532,7 @@ describe("CodeGraph SessionStart hook", () => {
// then
expect(result.exitCode).toBe(0);
expect(spawned).toEqual([]);
- expect(JSON.parse(stdout.join("")).codegraph).toEqual({ action: "skipped-disabled" });
+ expect(stdout.join("")).toBe("");
});
it("#given plugin hook config #when inspected #then CodeGraph is registered after bootstrap SessionStart", () => {
diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.json
index e0c70273..abbbbe71 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": "LazyCodex(4.11.0): Checking Comments"
+ "statusMessage": "LazyCodex(4.11.1): Checking Comments"
}
]
}
diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.json
index 049143af..5add8ab0 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.11.0",
+ "version": "4.11.1",
"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 8893323d..a40033fd 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": "LazyCodex(4.11.0): Recommending Git Bash MCP"
+ "statusMessage": "LazyCodex(4.11.1): Recommending Git Bash MCP"
}
]
}
@@ -20,7 +20,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Resetting Git Bash MCP Reminder"
+ "statusMessage": "LazyCodex(4.11.1): Resetting Git Bash MCP Reminder"
}
]
}
diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.json
index 408cb7db..edd92dff 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.11.0",
+ "version": "4.11.1",
"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/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
index 12a05468..f2d1673b 100644
--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json
@@ -8,7 +8,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Verifying LazyCodex Executor Evidence"
+ "statusMessage": "LazyCodex(4.11.1): 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 9e134930..b5391495 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.11.0",
+ "version": "4.11.1",
"description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.json
index a2a1fb02..350e26aa 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": "LazyCodex(4.11.0): Checking LSP Diagnostics"
+ "statusMessage": "LazyCodex(4.11.1): Checking LSP Diagnostics"
}
]
}
@@ -21,7 +21,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Resetting LSP Diagnostics Cache"
+ "statusMessage": "LazyCodex(4.11.1): Resetting LSP Diagnostics Cache"
}
]
}
diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.json
index 439de841..f6c68355 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.11.0",
+ "version": "4.11.1",
"description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/rules/dist/cli.js b/plugins/omo/components/rules/dist/cli.js
index 50034527..2a4c31a4 100755
--- a/plugins/omo/components/rules/dist/cli.js
+++ b/plugins/omo/components/rules/dist/cli.js
@@ -4036,9 +4036,9 @@ function getSparkShellRuntimeAwareness(env = process.env, deps = {}) {
`- Use \`${command} sparkshell --shell '<command>'\` only when shell metacharacters are required.`,
`- Use \`${command} sparkshell --tmux-pane <pane-id> --tail-lines 400\` to inspect an existing tmux pane. Tail lines must stay between 100 and 1000.`,
"- When no native sidecar or appserver is available, Sparkshell silently falls back to raw command execution. `OMO_SPARKSHELL_BIN` selects a native sidecar path.",
- "- When `CODEX_THREAD_ID` identifies a Codex session, Sparkshell appends recent session context (first/latest user request + last 5 conversation messages) after the shell result so output consumers stay aligned with the session goals. `OMO_SPARKSHELL_SESSION_CONTEXT=0` disables it.",
+ "- When `CODEX_THREAD_ID` identifies a Codex session, Sparkshell feeds recent session context (first/latest user request + last 5 conversation messages) into oversized-output condensation for relevance ranking, but never appends that context to command output. `OMO_SPARKSHELL_SESSION_CONTEXT=0` disables the lookup.",
`- Route potentially huge output (full log files, big diffs, \`cat\`/\`grep\` over large artifacts) through \`${command} sparkshell\` instead of reading it raw: oversized output is condensed to a budget while preserving error signatures, repeated patterns, session-goal-relevant lines, and head/tail. Tune with \`--budget <chars>\`; disable with \`OMO_SPARKSHELL_CONDENSE=0\`.`,
- "- Oversized output is first summarized by the spark model (`codex exec`, default `gpt-5.3-codex-spark`) fed with the session context: the summary reproduces the output as-is (no masking) and ends with a `[sparkshell caption]` line describing what ran and which lines were omitted. `OMO_SPARKSHELL_SPARK=0` skips the model and uses deterministic condensation directly."
+ "- Oversized output is first summarized by the spark model (`codex exec`, default `gpt-5.3-codex-spark`) fed with the shell output plus session context: the summary keeps selected output as-is (no masking) and ends with a `[sparkshell caption]` line describing what ran, what the full output contained, and which lines were omitted. `OMO_SPARKSHELL_SPARK=0` skips the model and uses deterministic condensation directly."
].join(`
`);
}
diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.json
index fffbc561..6c1a536a 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": "LazyCodex(4.11.0): Loading Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Loading Project Rules"
}
]
}
@@ -19,7 +19,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Loading Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Loading Project Rules"
}
]
}
@@ -32,7 +32,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Matching Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Matching Project Rules"
}
]
}
@@ -45,7 +45,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Resetting Project Rule Cache"
+ "statusMessage": "LazyCodex(4.11.1): Resetting Project Rule Cache"
}
]
}
diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.json
index 6877b0e4..d607d8c3 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.11.0",
+ "version": "4.11.1",
"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/rules/src/sparkshell-awareness.ts b/plugins/omo/components/rules/src/sparkshell-awareness.ts
index 2d9e5c96..ef9acbfe 100644
--- a/plugins/omo/components/rules/src/sparkshell-awareness.ts
+++ b/plugins/omo/components/rules/src/sparkshell-awareness.ts
@@ -85,9 +85,9 @@ export function getSparkShellRuntimeAwareness(env: RuntimeEnv = process.env, dep
`- Use \`${command} sparkshell --shell '<command>'\` only when shell metacharacters are required.`,
`- Use \`${command} sparkshell --tmux-pane <pane-id> --tail-lines 400\` to inspect an existing tmux pane. Tail lines must stay between 100 and 1000.`,
"- When no native sidecar or appserver is available, Sparkshell silently falls back to raw command execution. `OMO_SPARKSHELL_BIN` selects a native sidecar path.",
- "- When `CODEX_THREAD_ID` identifies a Codex session, Sparkshell appends recent session context (first/latest user request + last 5 conversation messages) after the shell result so output consumers stay aligned with the session goals. `OMO_SPARKSHELL_SESSION_CONTEXT=0` disables it.",
+ "- When `CODEX_THREAD_ID` identifies a Codex session, Sparkshell feeds recent session context (first/latest user request + last 5 conversation messages) into oversized-output condensation for relevance ranking, but never appends that context to command output. `OMO_SPARKSHELL_SESSION_CONTEXT=0` disables the lookup.",
`- Route potentially huge output (full log files, big diffs, \`cat\`/\`grep\` over large artifacts) through \`${command} sparkshell\` instead of reading it raw: oversized output is condensed to a budget while preserving error signatures, repeated patterns, session-goal-relevant lines, and head/tail. Tune with \`--budget <chars>\`; disable with \`OMO_SPARKSHELL_CONDENSE=0\`.`,
- "- Oversized output is first summarized by the spark model (`codex exec`, default `gpt-5.3-codex-spark`) fed with the session context: the summary reproduces the output as-is (no masking) and ends with a `[sparkshell caption]` line describing what ran and which lines were omitted. `OMO_SPARKSHELL_SPARK=0` skips the model and uses deterministic condensation directly.",
+ "- Oversized output is first summarized by the spark model (`codex exec`, default `gpt-5.3-codex-spark`) fed with the shell output plus session context: the summary keeps selected output as-is (no masking) and ends with a `[sparkshell caption]` line describing what ran, what the full output contained, and which lines were omitted. `OMO_SPARKSHELL_SPARK=0` skips the model and uses deterministic condensation directly.",
].join("\n");
}
diff --git a/plugins/omo/components/rules/test/sparkshell-awareness.test.ts b/plugins/omo/components/rules/test/sparkshell-awareness.test.ts
index 4939f25c..8f9fb223 100644
--- a/plugins/omo/components/rules/test/sparkshell-awareness.test.ts
+++ b/plugins/omo/components/rules/test/sparkshell-awareness.test.ts
@@ -90,7 +90,10 @@ describe("Codex Sparkshell awareness", () => {
expect(parseAdditionalContext(output)).toContain("OMO_SPARKSHELL_CONDENSE");
expect(parseAdditionalContext(output)).toContain("OMO_SPARKSHELL_SPARK");
expect(parseAdditionalContext(output)).toContain("[sparkshell caption]");
+ expect(parseAdditionalContext(output)).toContain("never appends that context to command output");
+ expect(parseAdditionalContext(output)).toContain("what the full output contained");
expect(parseAdditionalContext(output)).not.toContain("[REDACTED]");
+ expect(parseAdditionalContext(output)).not.toContain("appends recent session context");
});
it("#given inactive env #when SessionStart runs #then emits no Sparkshell guidance", async () => {
diff --git a/plugins/omo/components/start-work-continuation/hooks/hooks.json b/plugins/omo/components/start-work-continuation/hooks/hooks.json
index fa6fad43..12cd5fcb 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": "LazyCodex(4.11.0): Checking Start-Work Continuation"
+ "statusMessage": "LazyCodex(4.11.1): 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": "LazyCodex(4.11.0): Checking Start-Work Continuation"
+ "statusMessage": "LazyCodex(4.11.1): 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 f57001f5..68774bb3 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.11.0",
+ "version": "4.11.1",
"description": "Codex Stop hook continuation injector for omo-codex start-work plans.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.json
index f6c383f5..7e564ffd 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": "LazyCodex(4.11.0): Recording Session Telemetry"
+ "statusMessage": "LazyCodex(4.11.1): Recording Session Telemetry"
}
]
}
diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.json
index e5f7192b..4b7ee34d 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.11.0",
+ "version": "4.11.1",
"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/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.json
index b3f7483b..1dcdb9a1 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": "LazyCodex(4.11.0): Checking Ultrawork Trigger"
+ "statusMessage": "LazyCodex(4.11.1): Checking Ultrawork Trigger"
}
]
}
diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.json
index 94c2e0fa..823ced7a 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.11.0",
+ "version": "4.11.1",
"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/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.json
index b67ffcda..c53b310a 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",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Checking Ulw-Loop Steering"
+ "statusMessage": "LazyCodex(4.11.1): Checking Ulw-Loop Steering"
}
]
}
@@ -20,7 +20,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Enforcing Unlimited Ulw-Loop Budget"
+ "statusMessage": "LazyCodex(4.11.1): Enforcing Unlimited Ulw-Loop Budget"
}
]
}
diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.json
index b67e1a7e..4be25816 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.11.0",
+ "version": "4.11.1",
"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/hooks/hooks.json b/plugins/omo/hooks/hooks.json
index 9ef77d25..81ed16b3 100644
--- a/plugins/omo/hooks/hooks.json
+++ b/plugins/omo/hooks/hooks.json
@@ -7,7 +7,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Loading Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Loading Project Rules"
}
]
},
@@ -17,7 +17,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Recording Session Telemetry"
+ "statusMessage": "LazyCodex(4.11.1): Recording Session Telemetry"
}
]
},
@@ -28,7 +28,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Checking Auto Update"
+ "statusMessage": "LazyCodex(4.11.1): Checking Auto Update"
}
]
},
@@ -39,7 +39,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": "LazyCodex(4.11.0): Checking Bootstrap Provisioning"
+ "statusMessage": "LazyCodex(4.11.1): Checking Bootstrap Provisioning"
}
]
},
@@ -49,7 +49,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Checking Codegraph Bootstrap"
+ "statusMessage": "LazyCodex(4.11.1): Checking Codegraph Bootstrap"
}
]
}
@@ -61,7 +61,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Loading Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Loading Project Rules"
}
]
},
@@ -71,7 +71,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Checking Ultrawork Trigger"
+ "statusMessage": "LazyCodex(4.11.1): Checking Ultrawork Trigger"
}
]
},
@@ -81,7 +81,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Checking Ulw-Loop Steering"
+ "statusMessage": "LazyCodex(4.11.1): Checking Ulw-Loop Steering"
}
]
}
@@ -94,7 +94,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Recommending Git Bash MCP"
+ "statusMessage": "LazyCodex(4.11.1): Recommending Git Bash MCP"
}
]
},
@@ -105,7 +105,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Enforcing Unlimited Goal Budget"
+ "statusMessage": "LazyCodex(4.11.1): Enforcing Unlimited Goal Budget"
}
]
}
@@ -118,13 +118,13 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use",
"timeout": 30,
- "statusMessage": "LazyCodex(4.11.0): Checking Comments"
+ "statusMessage": "LazyCodex(4.11.1): Checking Comments"
},
{
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use",
"timeout": 60,
- "statusMessage": "LazyCodex(4.11.0): Checking LSP Diagnostics"
+ "statusMessage": "LazyCodex(4.11.1): Checking LSP Diagnostics"
}
]
},
@@ -135,7 +135,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Matching Project Rules"
+ "statusMessage": "LazyCodex(4.11.1): Matching Project Rules"
}
]
}
@@ -148,7 +148,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Resetting Git Bash MCP Reminder"
+ "statusMessage": "LazyCodex(4.11.1): Resetting Git Bash MCP Reminder"
}
]
},
@@ -159,7 +159,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Resetting Project Rule Cache"
+ "statusMessage": "LazyCodex(4.11.1): Resetting Project Rule Cache"
}
]
},
@@ -170,7 +170,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact",
"timeout": 5,
- "statusMessage": "LazyCodex(4.11.0): Resetting LSP Diagnostics Cache"
+ "statusMessage": "LazyCodex(4.11.1): Resetting LSP Diagnostics Cache"
}
]
}
@@ -182,7 +182,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Checking Start-Work Continuation"
+ "statusMessage": "LazyCodex(4.11.1): Checking Start-Work Continuation"
}
]
}
@@ -194,7 +194,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Checking Start-Work Continuation"
+ "statusMessage": "LazyCodex(4.11.1): Checking Start-Work Continuation"
}
]
},
@@ -205,7 +205,7 @@
"type": "command",
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
"timeout": 10,
- "statusMessage": "LazyCodex(4.11.0): Verifying LazyCodex Executor Evidence"
+ "statusMessage": "LazyCodex(4.11.1): Verifying LazyCodex Executor Evidence"
}
]
}
diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.json
index fdff194f..e769c601 100644
--- a/plugins/omo/package-lock.json
+++ b/plugins/omo/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.10.0",
+ "version": "4.11.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.10.0",
+ "version": "4.11.0",
"workspaces": [
"components/codegraph",
"components/comment-checker",
@@ -97,7 +97,7 @@
},
"components/codegraph": {
"name": "@sisyphuslabs/codex-codegraph",
- "version": "4.10.0",
+ "version": "4.11.0",
"bin": {
"omo-codegraph": "dist/cli.js"
},
@@ -113,7 +113,7 @@
},
"components/comment-checker": {
"name": "@code-yeongyu/codex-comment-checker",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"omo-comment-checker": "dist/cli.js"
@@ -134,7 +134,7 @@
},
"components/git-bash": {
"name": "@sisyphuslabs/codex-git-bash-hook",
- "version": "4.10.0",
+ "version": "4.11.0",
"bin": {
"omo-git-bash-hook": "dist/cli.js"
},
@@ -149,7 +149,7 @@
},
"components/lazycodex-executor-verify": {
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"lazycodex-executor-verify": "dist/cli.js"
@@ -166,7 +166,7 @@
},
"components/lsp": {
"name": "@code-yeongyu/codex-lsp",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"dependencies": {
"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"
@@ -186,7 +186,7 @@
},
"components/rules": {
"name": "@code-yeongyu/codex-rules",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"dependencies": {
"picomatch": "^4.0.3"
@@ -208,7 +208,7 @@
},
"components/start-work-continuation": {
"name": "@code-yeongyu/codex-start-work-continuation",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"omo-start-work-continuation": "dist/cli.js"
@@ -226,7 +226,7 @@
},
"components/telemetry": {
"name": "@code-yeongyu/codex-telemetry",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"omo-telemetry": "dist/cli.js"
@@ -244,7 +244,7 @@
},
"components/ultrawork": {
"name": "@code-yeongyu/codex-ultrawork",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"omo-ultrawork": "dist/cli.js"
@@ -262,7 +262,7 @@
},
"components/ulw-loop": {
"name": "@code-yeongyu/codex-ulw-loop",
- "version": "4.10.0",
+ "version": "4.11.0",
"license": "MIT",
"bin": {
"omo-ulw-loop": "dist/cli.js"
diff --git a/plugins/omo/package.json b/plugins/omo/package.json
index 8a75dc95..a91db47b 100644
--- a/plugins/omo/package.json
+++ b/plugins/omo/package.json
@@ -1,6 +1,6 @@
{
"name": "@sisyphuslabs/omo-codex-plugin",
- "version": "4.11.0",
+ "version": "4.11.1",
"description": "Aggregate Codex plugin root for OMO components.",
"type": "module",
"packageManager": "[email protected]",
diff --git a/plugins/omo/scripts/auto-update.mjs b/plugins/omo/scripts/auto-update.mjs
index 7866e307..b0cce29f 100644
--- a/plugins/omo/scripts/auto-update.mjs
+++ b/plugins/omo/scripts/auto-update.mjs
@@ -23,7 +23,7 @@ const DEFAULT_RETRY_INTERVAL_MS = 30 * 60 * 1_000;
const DEFAULT_UPDATE_COMMAND = "npx";
const DEFAULT_UPDATE_ARGS = ["--yes", "lazycodex-ai@latest", "install", "--no-tui", "--codex-autonomous"];
const MARKETPLACE_FLOW_NOTICE =
- "[LazyCodex] Auto-update skipped: this LazyCodex install is managed by the Codex plugin marketplace, so the npx self-update was not started. Tell the user to upgrade with `codex plugin marketplace upgrade sisyphuslabs`, and that Codex will ask them to re-approve hooks after the upgrade.";
+ "[LazyCodex] Auto-update skipped: this LazyCodex install is managed by the Codex plugin marketplace, so the npx self-update was not started. Tell the user to upgrade with `codex plugin marketplace upgrade sisyphuslabs`, and that Codex will require hook re-approval after the upgrade.";
export function resolveAutoUpdatePlan({ env = process.env, now = Date.now(), lastCheckedAt, lastAttemptedAt, lastStatus, installFlow } = {}) {
if (env.LAZYCODEX_AUTO_UPDATE_DISABLED === "1" || env.OMO_CODEX_AUTO_UPDATE_DISABLED === "1") {
diff --git a/plugins/omo/skills/init-deep/SKILL.md b/plugins/omo/skills/init-deep/SKILL.md
index 9f2cb526..88e39ce2 100644
--- a/plugins/omo/skills/init-deep/SKILL.md
+++ b/plugins/omo/skills/init-deep/SKILL.md
@@ -38,7 +38,7 @@ Generate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.
1. **Discovery + Analysis** (concurrent)
- Fire background explore agents immediately
- - Main session: bash structure + LSP codemap + read existing AGENTS.md
+ - Main session: bash structure + LSP/codegraph code map + read existing AGENTS.md
2. **Score & Decide** - Determine AGENTS.md locations from merged findings
3. **Generate** - Root first, then subdirs in parallel
4. **Review** - Deduplicate, trim, validate
@@ -47,7 +47,7 @@ Generate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.
**TodoWrite ALL phases. Mark in_progress → completed in real-time.**
```
TodoWrite([
- { id: "discovery", content: "Fire explore agents + LSP codemap + read existing", status: "pending", priority: "high" },
+ { id: "discovery", content: "Fire explore agents + LSP/codegraph map + read existing", status: "pending", priority: "high" },
{ id: "scoring", content: "Score directories, determine locations", status: "pending", priority: "high" },
{ id: "generate", content: "Generate AGENTS.md files (root + subdirs)", status: "pending", priority: "high" },
{ id: "review", content: "Deduplicate, validate, trim", status: "pending", priority: "medium" }
@@ -63,16 +63,16 @@ TodoWrite([
### Fire Background Explore Agents IMMEDIATELY
-Don't wait-these run async while main session works.
+Don't wait-these run async while main session works. **Equip every agent with the code graph**: any task touching structure, entry points, dependencies, or hotspots MUST query `codegraph_*` (explore/search/callers/callees/impact) and `lsp_symbols` when present, and ground its claims in that data instead of guessing from conventions. Richer real-graph context per agent = a more accurate project map.
```
// Fire all at once, collect results later
-task(subagent_type="explore", load_skills=[], description="Explore project structure", run_in_background=true, prompt="Project structure: PREDICT standard patterns for detected language → REPORT deviations only")
-task(subagent_type="explore", load_skills=[], description="Find entry points", run_in_background=true, prompt="Entry points: FIND main files → REPORT non-standard organization")
+task(subagent_type="explore", load_skills=[], description="Explore project structure", run_in_background=true, prompt="Project structure: map real layout via codegraph_explore/codegraph_files → REPORT deviations from standard patterns")
+task(subagent_type="explore", load_skills=[], description="Find entry points", run_in_background=true, prompt="Entry points: FIND main files, trace reach via codegraph_callees + lsp_symbols → REPORT non-standard organization")
task(subagent_type="explore", load_skills=[], description="Find conventions", run_in_background=true, prompt="Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) → REPORT project-specific rules")
task(subagent_type="explore", load_skills=[], description="Find anti-patterns", run_in_background=true, prompt="Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments → LIST forbidden patterns")
task(subagent_type="explore", load_skills=[], description="Explore build/CI", run_in_background=true, prompt="Build/CI: FIND .github/workflows, Makefile → REPORT non-standard patterns")
-task(subagent_type="explore", load_skills=[], description="Find test patterns", run_in_background=true, prompt="Test patterns: FIND test configs, test structure → REPORT unique conventions")
+task(subagent_type="explore", load_skills=[], description="Find test patterns", run_in_background=true, prompt="Test patterns: FIND test configs/structure; codegraph_callers on core modules to see what is covered → REPORT unique conventions")
```
<dynamic-agents>
@@ -134,24 +134,19 @@ For each existing file found:
If `--create-new`: Read all existing first (preserve context) → then delete all → regenerate.
-#### 3. LSP Codemap (if available)
-```
-LspServers() # Check availability
+#### 3. Code Map - drive LSP AND codegraph (do NOT skip)
-# Entry points (parallel)
-LspDocumentSymbols(filePath="src/index.ts")
-LspDocumentSymbols(filePath="main.py")
+Highest-signal source for the CODE MAP and the Symbol/Export/Reference scoring rows. Complementary, not alternatives - run BOTH when present, alongside the explore agents.
-# Key symbols (parallel)
-LspWorkspaceSymbols(filePath=".", query="class")
-LspWorkspaceSymbols(filePath=".", query="interface")
-LspWorkspaceSymbols(filePath=".", query="function")
+**LSP** - check `lsp_status`; model-facing names are `lsp_status`/`lsp_symbols`/`lsp_find_references`/`lsp_goto_definition` (some harnesses drop the `lsp_` prefix):
+- `lsp_symbols` scope="document" on each entry point -> file outline.
+- `lsp_symbols` scope="workspace", query by kind (class/interface/function) -> symbol inventory.
+- `lsp_find_references` on top exports (line/character from the symbols result) -> reference centrality.
-# Centrality for top exports
-LspFindReferences(filePath="...", line=X, character=Y)
-```
+**codegraph** - when `codegraph_*` tools exist (check `codegraph_status`); a first-class peer to LSP, NOT a last resort:
+- `codegraph_explore` -> overview; `codegraph_callers`/`codegraph_callees`/`codegraph_impact` -> centrality + blast radius for the scoring matrix; `codegraph_search`/`codegraph_files` -> symbol/file inventory.
-**LSP Fallback**: If unavailable, use `codegraph_explore` first when codegraph_* tools exist; otherwise rely on explore agents + the ast-grep skill (`sg` CLI).
+Only if NEITHER exists: explore agents + the ast-grep skill (`sg`), and mark centrality unmeasured in the CODE MAP.
### Collect Background Results
@@ -160,7 +155,7 @@ LspFindReferences(filePath="...", line=X, character=Y)
for each background task ID (`bg_...`): background_output(task_id="bg_...")
```
-**Merge: bash + LSP + existing + explore findings. Mark "discovery" as completed.**
+**Merge: bash + LSP/codegraph + existing + explore findings. Mark "discovery" as completed.**
---
@@ -177,9 +172,9 @@ for each background task ID (`bg_...`): background_output(task_id="bg_...")
| Code ratio | 2x | >70% | bash |
| Unique patterns | 1x | Has own config | explore |
| Module boundary | 2x | Has index.ts/__init__.py | bash |
-| Symbol density | 2x | >30 symbols | LSP |
-| Export count | 2x | >10 exports | LSP |
-| Reference centrality | 3x | >20 refs | LSP |
+| Symbol density | 2x | >30 symbols | LSP/cg |
+| Export count | 2x | >10 exports | LSP/cg |
+| Reference centrality | 3x | >20 refs | LSP/cg |
### Decision Rules
@@ -236,7 +231,7 @@ NEVER use Write to overwrite an existing file. ALWAYS check existence first via
|------|----------|-------|
## CODE MAP
-{From LSP - skip if unavailable or project <10 files}
+{From LSP/codegraph - skip only if neither exists or project <10 files}
| Symbol | Type | Location | Refs | Role |
|--------|------|----------|------|------|
@@ -319,7 +314,7 @@ Hierarchy:
## Anti-Patterns
- **Static agent count**: MUST vary agents based on project size/depth
-- **Sequential execution**: MUST parallel (explore + LSP concurrent)
+- **Sequential execution**: MUST parallel (explore + LSP + codegraph concurrent)
- **Ignoring existing**: ALWAYS read existing first, even with --create-new
- **Over-documenting**: Not every dir needs AGENTS.md
- **Redundancy**: Child never repeats parent
diff --git a/plugins/omo/skills/programming/SKILL.md b/plugins/omo/skills/programming/SKILL.md
index 1bb0f79d..75f42c18 100644
--- a/plugins/omo/skills/programming/SKILL.md
+++ b/plugins/omo/skills/programming/SKILL.md
@@ -182,134 +182,35 @@ A `tsconfig.json` with `"strict": true` alone is **not** strict. The reference e
---
-## THE 250 PURE LOC CEILING (NON-NEGOTIABLE)
+## CODE SMELLS — AUTOMATIC REVIEW TRIGGERS
-**A source file whose pure LOC (non-blank, non-comment lines) exceeds 250 is architecturally broken.** Not a style preference. Not a soft suggestion. **A defect.**
+Most smells below are design review triggers: STOP, re-examine the code, and either fix the smell or justify carrying it with a SPECIFIC reason. **The 250 pure LOC ceiling is stricter: >250 is a DEFECT. Refactor before adding lines except for rare SIZE_OK or pure-data-table exceptions.**
-A file past this line is telling you, loudly:
+Full rationale, measurement methods, workaround detection, and split examples: **[`references/code-smells.md`](references/code-smells.md)**.
-- The module is doing more than one thing.
-- Multiple cohesive units got merged "to save a file".
-- Re-exports, barrels, and orchestrators got fused into pure-logic units.
-- Every future reader pays a tax to find what they need.
+### Smell 1 — File exceeds 250 pure LOC
-### Why 250 and not 500 or 1000
+A source file past 250 non-blank, non-comment lines has outgrown a single reviewer's working memory. The module is almost certainly doing more than one thing. Measure: `awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(\/\/|#|--)/' <file> | wc -l`.
-At 250 pure LOC a file still fits in one screen on a 32-inch monitor with a 14pt font. A reviewer can hold the whole thing in working memory and spot a cross-cutting bug. At 500 LOC they cannot. At 1000 LOC they stop trying. The number is **the cognitive ceiling of a single human reviewer who has not memorized the file.**
+**When detected:** Name what the file owns in one short noun phrase. If the answer needs "and", the file needs splitting. Load `/refactor` and split by responsibility. If the file genuinely cannot be split (generated parser, indivisible state machine), mark with `// allow: SIZE_OK — <reason>`.
-### Measuring pure LOC
+### Smell 2 — Function with more than 3 parameters
-```bash
-# Quick (line-comment + blank exclusion - good enough for Python, Rust, TypeScript):
-awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(\/\/|#|--)/' <file> | wc -l
-
-# Authoritative (handles block comments correctly):
-cloc --by-file <file> # the "code" column is the number that matters
-```
-
-### Required behavior
-
-**Creating a file that will exceed 250 pure LOC.** STOP. Split it **before the first commit**. Carve by responsibility (single-responsibility principle), one cohesive unit per file. Use a barrel (`__init__.py`, `mod.rs`, `index.ts`) for re-exports ONLY. **Never** for logic.
-
-**Editing a file that already exceeds 250 pure LOC and your edit adds lines.** STOP. Refactor the unit you are touching into its own file BEFORE adding the new lines. The split is part of THIS task, not a follow-up someone will never do.
-
-**Reading a file that exceeds 250 pure LOC while implementing a feature.** Surface the smell explicitly in your reply, propose a concrete split (which functions go where, in 1-2 lines each), and ask the user whether to split now or carry the smell into the feature work. Do not silently keep going.
-
-### Forbidden escapes
-
-- Counting comments and blank lines toward the budget. **Pure LOC means code lines.** Period.
-- Splitting by token count (`foo_1.py`, `module_part_A.rs`, `service-2.ts`). **REJECT.** Split by what each file DOES. Name each file after the concept it owns.
-- Catch-all dump files: `utils.py`, `helpers.ts`, `lib.rs` (as a logic dump), `common.py`, `shared.ts`. **REJECT.** These just relocate the smell.
-- "It's generated, so it's fine." Only true if the file lives in `dist/`, `target/`, `__generated__/`, or wherever the build authoritatively rewrites. Hand-edited "I will regenerate it later" files do NOT qualify.
-- "It's a test file with many cases." Split by SUT or by behavior cluster. One file per cohesive `describe` group.
-- "230 pure LOC, close enough." A 230-LOC file about to grow is already over the line. Split now. **Do not race to the ceiling.**
-
-### Acceptable exceptions (rare, require justification)
-
-A file may legitimately exceed 250 pure LOC if **and only if** it is:
-
-- A **truly indivisible single-responsibility unit** (e.g., a generated parser table, a state machine whose states share a single closure, a `derive` macro implementation). Mark the first 5 lines with a comment such as `# noqa: SIZE_OK - generated parser table, 612 states share branch tables` (Python) / `// allow: SIZE_OK - state machine, removing any state breaks the transition matrix` (Rust/TS), and explain WHY no split is possible.
-- A **pure data table** (translation strings, error code lookup, brand color palette). Tables of data are not logic.
-
-**`# noqa: SIZE_OK` without a justifying comment is itself slop** and must be rejected by the next person to touch the file.
-
-### Concrete split examples
+More than 3 arguments signals the function is doing too much, or that related parameters belong in a typed struct. **Workarounds count as the same smell** — passing `dict`/`Record<string, unknown>`/`map[string]any`/`**kwargs`/`...args` to smuggle parameters through one argument, or a throwaway "config" object with 6+ fields that exists solely to wrap what would otherwise be positional args (genuine reusable domain types like `HttpClientConfig` are fine).
-#### Python - BEFORE (`user_service.py`, 412 pure LOC, broken)
+**When detected:** Group related parameters into a typed value object with a domain name. If 4+ independent inputs are genuinely required, the justification must be SPECIFIC. See [`references/code-smells.md` Smell 2](references/code-smells.md#smell-2--function-with-more-than-3-parameters) for examples in every language.
-```python
-# user_service.py - DOES TOO MUCH
-class UserRepository: ... # 90 LOC of SQLAlchemy
-class UserValidator: ... # 60 LOC of Pydantic + business rules
-class PasswordHasher: ... # 40 LOC of bcrypt wrapper
-class EmailSender: ... # 50 LOC of httpx2 client
-class UserService: ... # 130 LOC orchestrating the four above
-def _build_query(...): ... # 25 LOC helper
-def _format_email(...): ... # 17 LOC helper
-```
-
-#### Python - AFTER (split by responsibility)
-
-```
-src/myapp/users/
-├── __init__.py # barrel: re-exports UserService only (5 LOC)
-├── repository.py # UserRepository (~95 LOC)
-├── validator.py # UserValidator (~65 LOC)
-├── password.py # PasswordHasher (~45 LOC)
-├── notifier.py # EmailSender (renamed - the role, not the verb)
-├── service.py # UserService (orchestrator) (~135 LOC)
-└── _queries.py # _build_query (private) (~30 LOC)
-```
+### Smell 3 — Redundant verification after a destructive action
-Every file is < 250 pure LOC. Each owns one concept. The barrel exposes the only public name. The reviewer never has to scroll through password hashing to understand SMTP retry policy.
+Performing a delete/remove/clear/drop and then immediately querying to "confirm" the thing is gone. **The operation's contract IS the verification.** Re-checking is AI-generated defensive bloat that wastes cycles and teaches the reader the operation is unreliable — which it is not. Same smell: calling a setter then getting to "confirm", writing a file then reading it back, inserting a row then SELECT-ing it, pushing to an array then checking `.length`.
-#### Rust - BEFORE (`auth.rs`, 380 pure LOC)
+**When detected:** Delete the verification code. Trust the operation's contract. If the operation can genuinely fail silently, fix the operation — do not paper over it with a post-check. See [`references/code-smells.md` Smell 3](references/code-smells.md#smell-3--redundant-verification-after-a-destructive-action) for examples.
-```rust
-// auth.rs - DOES TOO MUCH
-pub struct Session { ... } // 40 LOC
-impl Session { ... } // 90 LOC of methods
-pub struct TokenIssuer { ... } // 30 LOC
-impl TokenIssuer { ... } // 70 LOC
-pub struct RateLimiter { ... } // 50 LOC
-impl RateLimiter { ... } // 70 LOC
-fn parse_authorization_header(...) { ... } // 30 LOC
-```
+### Smell 4 — Negative-form names and conditions
-#### Rust - AFTER
+Naming variables, functions, or flags by the **absence** of a quality (`isNotValid`, `noErrors`, `cannotProceed`, `DisableLogging`) instead of its **presence** (`isValid`, `isClean`, `canProceed`, `LoggingEnabled`). Every negation forces the reader to invert mentally; two negations (`if !isNotReady`) become a logic puzzle nobody reviews confidently.
-```
-src/auth/
-├── mod.rs # re-exports Session, TokenIssuer, RateLimiter (8 LOC)
-├── session.rs # Session + impl (~130 LOC)
-├── token.rs # TokenIssuer + impl (~100 LOC)
-├── rate_limit.rs # RateLimiter + impl (~120 LOC)
-└── header.rs # parse_authorization_header (~35 LOC)
-```
-
-#### TypeScript - BEFORE (`api/orders.ts`, 510 pure LOC)
-
-```typescript
-// api/orders.ts - DOES TOO MUCH
-export const OrderSchema = z.object({ ... }) // 30 LOC
-type Order = z.infer<typeof OrderSchema>
-export class OrderRepository { ... } // 110 LOC
-export class PricingEngine { ... } // 130 LOC
-export class TaxCalculator { ... } // 90 LOC
-export class OrderService { ... } // 150 LOC
-```
-
-#### TypeScript - AFTER
-
-```
-src/orders/
-├── index.ts # barrel (6 LOC)
-├── schema.ts # OrderSchema + Order type (~35 LOC)
-├── repository.ts # OrderRepository (~115 LOC)
-├── pricing.ts # PricingEngine (~135 LOC)
-├── tax.ts # TaxCalculator (~95 LOC)
-└── service.ts # OrderService (orchestrator) (~155 LOC)
-```
+**When detected:** Rename to the positive form and invert the branch logic. Negation IS appropriate in guard clauses (`if !authorized { return }`) and filters (`items.filter(|x| !x.is_expired())`) — the negative form is the intent there. See [`references/code-smells.md` Smell 4](references/code-smells.md#smell-4--negative-form-names-and-conditions) for the full naming table and examples.
---
@@ -341,8 +242,8 @@ bun run scripts/typescript/check-no-excuse-rules.ts <changed paths>
| Pure LOC | Verdict | Required action |
|---|---|---|
| ≤ 200 | Healthy | continue |
-| 200 - 250 | **Warning band** - the file is approaching the ceiling. State that fact explicitly in the next message and propose a split if the next planned edit will add lines. |
-| > 250 | **DEFECT** - the architecture is wrong. Do NOT commit. Refactor into smaller cohesive units **now**, in this same task. |
+| 200 - 250 | **Warning band** | State that fact and propose a split if the next edit will add lines. |
+| > 250 | **DEFECT** | Do NOT commit new lines to this file. Refactor now: split the touched unit before adding lines, except for rare SIZE_OK or pure-data-table exceptions. |
### Step 3 — architectural self-review (always, even at 80 LOC)
@@ -355,15 +256,18 @@ After every code-writing session, answer these out loud (in your reply) before d
5. **Defensive layer?** Any null check, try/except, or `isinstance` guarding a value the type system already proves? If yes, delete.
6. **Helpers for one-off?** Any function, class, or trait introduced for a single caller that will never get a second caller? If yes, inline.
7. **Tests?** Is the behavior I just introduced locked by a test that would fail if I revert this commit?
+8. **Parameter bloat?** Any function I wrote or modified that takes more than 3 parameters — or smuggles them through a dict/kwargs/`...args`/throwaway options object? If yes, group related params into a typed value object. See [Smell 2](references/code-smells.md#smell-2--function-with-more-than-3-parameters).
+9. **Redundant verification?** Did I perform a destructive action (delete, remove, clear) and then immediately re-query to "confirm" it worked? Did I call a setter then a getter to "verify"? If yes, delete the verification — the operation's contract IS the proof. See [Smell 3](references/code-smells.md#smell-3--redundant-verification-after-a-destructive-action).
+10. **Negative naming?** Any variable, function, or flag named by the absence of a quality (`isNotValid`, `noErrors`, `DisableX`) when a positive name (`isValid`, `isClean`, `EnableX`) would work? If yes, rename to positive form and invert the branch. See [Smell 4](references/code-smells.md#smell-4--negative-form-names-and-conditions).
**If any answer fails, fix it before declaring done.** This loop is the difference between "the code compiles" and "the code is correct."
### Step 4 — if you need to refactor right now, invoke the right skill
-- The file you just wrote (or an adjacent one) is over 250 pure LOC, or step 3 surfaced more than two issues: **load the `refactor` skill** and execute its safe-refactor protocol (codemap, plan, LSP-driven edits, test after each step). Do not improvise a refactor under time pressure - the refactor skill exists precisely so you do not corrupt behavior while reshaping structure.
-- You inherited a branch with AI-generated patterns (broad `except`, redundant null checks, vague TODOs, oversized modules, dead helpers): **load the `remove-ai-slops` skill** to do a categorized branch-scope cleanup with regression tests pinned first.
+- Any code smell from the [CODE SMELLS section](#code-smells--automatic-review-triggers) fired (250+ LOC, >3 params, redundant verification, negative naming), or step 3 surfaced more than two issues: **load the `refactor` skill** and execute its safe-refactor protocol (codemap, plan, LSP-driven edits, test after each step). Do not improvise a refactor under time pressure — the refactor skill exists precisely so you do not corrupt behavior while reshaping structure.
+- You inherited a branch with AI-generated patterns (broad `except`, redundant null checks, vague TODOs, oversized modules, dead helpers, redundant post-action verification): **load the `remove-ai-slops` skill** to do a categorized branch-scope cleanup with regression tests pinned first.
-These two skills are not optional cosmetics. They are the recovery path for the defects this loop is designed to catch.
+These two skills are not optional cosmetics. They are the recovery path for the smells this loop is designed to catch.
---
@@ -371,8 +275,8 @@ These two skills are not optional cosmetics. They are the recovery path for the
| Trigger | Skill to load | Why |
|---|---|---|
-| File exceeds 250 pure LOC, OR the post-write loop surfaces 2+ issues, OR the user says "reshape this", "extract this", "clean this up" | `refactor` | Safe codemap-driven multi-step refactor with LSP + tests after each step. Never improvise a structural change. |
-| Recent branch contains AI-authored code that smells (broad except, dead helpers, vague comments, oversized files), OR the user says "remove slop", "clean AI code", "deslop" | `remove-ai-slops` | Tests pinned FIRST, then categorized parallel cleanup, then quality gates. Behavior-preserving. |
+| Any [code smell](#code-smells--automatic-review-triggers) fires (250+ LOC, >3 params, redundant verification), OR the post-write loop surfaces 2+ issues, OR the user says "reshape this", "extract this", "clean this up" | `refactor` | Safe codemap-driven multi-step refactor with LSP + tests after each step. Never improvise a structural change. |
+| Recent branch contains AI-authored patterns (broad except, dead helpers, vague comments, oversized files, redundant post-action verification), OR the user says "remove slop", "clean AI code", "deslop" | `remove-ai-slops` | Tests pinned FIRST, then categorized parallel cleanup, then quality gates. Behavior-preserving. |
| Rust code touches `unsafe`, `*mut`, `*const`, `MaybeUninit`, FFI, `unsafe impl Send/Sync`, or a custom lock-free primitive | `references/rust-ub/` | Full UB taxonomy + Miri strictness escalation. Every `unsafe` block must survive Miri Level 3 (strict provenance + symbolic alignment + preemption) before it ships. |
---
diff --git a/plugins/omo/skills/programming/references/code-smells.md b/plugins/omo/skills/programming/references/code-smells.md
new file mode 100644
index 00000000..98dfba8f
--- /dev/null
+++ b/plugins/omo/skills/programming/references/code-smells.md
@@ -0,0 +1,390 @@
+# Code Smells — Full Reference
+
+When any of these smells is detected, **STOP and re-examine your design.** A code smell is not a syntax error — it is a signal that the current structure deserves a second look. The correct response is to assess whether `/refactor` is warranted, fix the smell, or document a SPECIFIC justification for carrying it. "It's fine" is not a justification.
+
+---
+
+## Smell 1 — File exceeds 250 pure LOC
+
+### Why 250
+
+At 250 pure LOC a file still fits in one screen on a 32-inch monitor with a 14pt font. A reviewer can hold the whole thing in working memory and spot a cross-cutting bug. At 500 LOC they cannot. At 1000 LOC they stop trying. The number is the cognitive ceiling of a single human reviewer who has not memorized the file.
+
+A file past this line is telling you:
+
+- The module is doing more than one thing.
+- Multiple cohesive units got merged "to save a file."
+- Re-exports, barrels, and orchestrators got fused into pure-logic units.
+- Every future reader pays a tax to find what they need.
+
+### Measuring pure LOC
+
+```bash
+# Quick (line-comment + blank exclusion):
+awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(\/\/|#|--)/' <file> | wc -l
+
+# Authoritative (handles block comments correctly):
+cloc --by-file <file> # the "code" column is the number
+```
+
+### Required behavior when detected
+
+**Creating a file that will exceed 250 pure LOC.** Split it before the first commit. Carve by responsibility, one cohesive unit per file. Use a barrel (`__init__.py`, `mod.rs`, `index.ts`) for re-exports ONLY — never for logic.
+
+**Editing a file that already exceeds 250 pure LOC and your edit adds lines.** Refactor the unit you are touching into its own file BEFORE adding the new lines. The split is part of THIS task, not a follow-up someone will never do.
+
+**Reading a file that exceeds 250 pure LOC while implementing a feature.** Surface the smell in your reply, propose a concrete split, and ask the user whether to split now or carry the smell.
+
+### Forbidden escapes
+
+- Counting comments and blank lines toward the budget. **Pure LOC means code lines.**
+- Splitting by token count (`foo_1.py`, `module_part_A.rs`, `service-2.ts`). Split by what each file DOES.
+- Catch-all dump files: `utils.py`, `helpers.ts`, `lib.rs` (as a logic dump), `common.py`, `shared.ts`.
+- "It's generated, so it's fine." Only true if the file lives in `dist/`, `target/`, `__generated__/`.
+- "It's a test file with many cases." Split by SUT or by behavior cluster.
+- "230 pure LOC, close enough." A 230-LOC file about to grow is already at the limit. Split now.
+
+### Acceptable exceptions (rare, require justification)
+
+A file may legitimately exceed 250 pure LOC if **and only if** it is:
+
+- A truly indivisible single-responsibility unit (e.g., a generated parser table, a state machine whose states share a single closure). Mark with `// allow: SIZE_OK — <reason>`.
+- A pure data table (translation strings, error code lookup, brand color palette).
+
+`// allow: SIZE_OK` without a justifying comment is itself slop.
+
+### Concrete split examples
+
+#### Python — BEFORE (`user_service.py`, 412 pure LOC)
+
+```python
+# user_service.py — DOES TOO MUCH
+class UserRepository: ... # 90 LOC of SQLAlchemy
+class UserValidator: ... # 60 LOC of Pydantic + business rules
+class PasswordHasher: ... # 40 LOC of bcrypt wrapper
+class EmailSender: ... # 50 LOC of httpx2 client
+class UserService: ... # 130 LOC orchestrating the four above
+def _build_query(...): ... # 25 LOC helper
+def _format_email(...): ... # 17 LOC helper
+```
+
+#### Python — AFTER (split by responsibility)
+
+```
+src/myapp/users/
+├── __init__.py # barrel: re-exports UserService only (5 LOC)
+├── repository.py # UserRepository (~95 LOC)
+├── validator.py # UserValidator (~65 LOC)
+├── password.py # PasswordHasher (~45 LOC)
+├── notifier.py # EmailSender (renamed — the role, not the verb)
+├── service.py # UserService (orchestrator) (~135 LOC)
+└── _queries.py # _build_query (private) (~30 LOC)
+```
+
+#### Rust — BEFORE (`auth.rs`, 380 pure LOC)
+
+```rust
+// auth.rs — DOES TOO MUCH
+pub struct Session { ... } // 40 LOC
+impl Session { ... } // 90 LOC of methods
+pub struct TokenIssuer { ... } // 30 LOC
+impl TokenIssuer { ... } // 70 LOC
+pub struct RateLimiter { ... } // 50 LOC
+impl RateLimiter { ... } // 70 LOC
+fn parse_authorization_header(...) { ... } // 30 LOC
+```
+
+#### Rust — AFTER
+
+```
+src/auth/
+├── mod.rs # re-exports Session, TokenIssuer, RateLimiter (8 LOC)
+├── session.rs # Session + impl (~130 LOC)
+├── token.rs # TokenIssuer + impl (~100 LOC)
+├── rate_limit.rs # RateLimiter + impl (~120 LOC)
+└── header.rs # parse_authorization_header (~35 LOC)
+```
+
+#### TypeScript — BEFORE (`api/orders.ts`, 510 pure LOC)
+
+```typescript
+// api/orders.ts — DOES TOO MUCH
+export const OrderSchema = z.object({ ... }) // 30 LOC
+type Order = z.infer<typeof OrderSchema>
+export class OrderRepository { ... } // 110 LOC
+export class PricingEngine { ... } // 130 LOC
+export class TaxCalculator { ... } // 90 LOC
+export class OrderService { ... } // 150 LOC
+```
+
+#### TypeScript — AFTER
+
+```
+src/orders/
+├── index.ts # barrel (6 LOC)
+├── schema.ts # OrderSchema + Order type (~35 LOC)
+├── repository.ts # OrderRepository (~115 LOC)
+├── pricing.ts # PricingEngine (~135 LOC)
+├── tax.ts # TaxCalculator (~95 LOC)
+└── service.ts # OrderService (orchestrator) (~155 LOC)
+```
+
+---
+
+## Smell 2 — Function with more than 3 parameters
+
+### Why 3
+
+A function's parameters are its contract with every caller. More than 3 independent inputs overwhelm the caller's working memory and signal one of two design problems:
+
+1. **The function does too much.** It should be two functions.
+2. **Related parameters belong together.** They should be a typed struct/object — a domain concept, not a parameter bag.
+
+### Workaround detection — THESE COUNT AS THE SAME SMELL
+
+Disguising parameter count does not fix the design. The following patterns are the same smell wearing a different hat:
+
+**Dict/map smuggling:**
+```python
+# SMELL — hiding 6 args in a dict
+def create_order(params: dict[str, Any]) -> Order: ...
+```
+```typescript
+// SMELL — untyped options bag
+function createOrder(opts: Record<string, unknown>): Order { ... }
+```
+```go
+// SMELL — map instead of typed params
+func CreateOrder(params map[string]any) (*Order, error) { ... }
+```
+
+**Variadic/kwargs catch-all:**
+```python
+# SMELL — hiding real params behind kwargs
+def send_notification(recipient: str, **kwargs) -> None: ...
+```
+```typescript
+// SMELL — rest params to avoid naming args
+function sendNotification(recipient: string, ...args: unknown[]): void { ... }
+```
+
+**Config object that wraps positional args:**
+```python
+# SMELL — "options" object that exists only to bundle what would be positional args
+@dataclass
+class CreateUserOptions:
+ name: str
+ email: str
+ password: str
+ role: str
+ department: str
+ manager_id: int
+ # 6 fields, used by exactly one function, no defaults
+
+def create_user(opts: CreateUserOptions) -> User: ...
+```
+
+**When the options object is NOT a smell:** when it represents a genuine domain concept reused across multiple call sites with sensible defaults for most fields (e.g., `HttpClientConfig`, `DatabaseConnectionOptions`, `RetryPolicy`).
+
+### The fix
+
+Group related parameters into typed value objects with domain names:
+
+```python
+# CLEAN — grouped by domain concept
+@dataclass(frozen=True)
+class UserIdentity:
+ name: str
+ email: str
+
+@dataclass(frozen=True)
+class OrgPlacement:
+ role: str
+ department: str
+ manager_id: int
+
+def create_user(identity: UserIdentity, placement: OrgPlacement, password: str) -> User: ...
+# 3 params, each a meaningful concept
+```
+
+```typescript
+// CLEAN — typed grouping
+interface ShippingDetails {
+ readonly address: string;
+ readonly city: string;
+ readonly zip: string;
+ readonly country: string;
+}
+
+function createOrder(customer: CustomerId, items: readonly LineItem[], shipping: ShippingDetails): Order { ... }
+// 3 params, shipping is a reusable domain type
+```
+
+```go
+// CLEAN — struct with domain meaning
+type Placement struct {
+ Role string
+ Department string
+ ManagerID UserID
+}
+
+func CreateUser(identity UserIdentity, placement Placement, password string) (*User, error) { ... }
+```
+
+If 4+ truly independent inputs are required, justify it — the justification must name WHY these inputs cannot be grouped, not just "the function needs them all."
+
+---
+
+## Smell 3 — Redundant verification after a destructive action
+
+### Why this is slop
+
+The contract of a destructive operation (delete, remove, clear, drop) IS the verification. If the operation returns without error, the thing is gone. Re-querying to "confirm" is:
+
+1. **Dead code.** The check can never fail unless the operation itself is broken — in which case fix the operation, not the caller.
+2. **Misleading.** It teaches the next reader (human or AI) that the operation is unreliable.
+3. **Performance waste.** An unnecessary round-trip to the database, filesystem, or data structure.
+
+This pattern is the hallmark of AI-generated defensive bloat. LLMs produce it because they optimize for "looking thorough" over "being correct." **Recognize it. Delete it.**
+
+### Examples
+
+```python
+# SLOP — delete then verify deletion
+db.delete(user)
+db.commit()
+remaining = db.query(User).filter_by(id=user.id).first()
+assert remaining is None # the ORM already guaranteed this
+
+# CLEAN
+db.delete(user)
+db.commit()
+```
+
+```typescript
+// SLOP — remove from array then check it's gone
+items = items.filter(i => i.id !== targetId);
+if (items.find(i => i.id === targetId)) {
+ throw new Error("removal failed"); // impossible by construction
+}
+
+// CLEAN
+items = items.filter(i => i.id !== targetId);
+```
+
+```go
+// SLOP — delete row then SELECT to confirm
+_, err := db.ExecContext(ctx, "DELETE FROM users WHERE id = $1", id)
+if err != nil { return err }
+row := db.QueryRowContext(ctx, "SELECT id FROM users WHERE id = $1", id)
+if err := row.Scan(&check); err != sql.ErrNoRows {
+ return fmt.Errorf("delete verification failed")
+}
+
+// CLEAN
+_, err := db.ExecContext(ctx, "DELETE FROM users WHERE id = $1", id)
+if err != nil { return err }
+```
+
+```rust
+// SLOP — remove from HashMap then check absence
+map.remove(&key);
+if map.contains_key(&key) {
+ panic!("removal failed"); // HashMap::remove is not broken
+}
+
+// CLEAN
+map.remove(&key);
+```
+
+### Broader pattern — same smell, different disguise
+
+Any of these are the same defect:
+
+- Calling a **setter** then immediately calling the **getter** to "confirm" the value changed.
+- **Writing** a file then **reading** it back to "verify" the write.
+- **Inserting** a row then **SELECT-ing** it to "confirm" the insert.
+- **Pushing** to an array then checking `.length` increased by 1.
+- **Assigning** a variable then asserting the variable equals the assigned value.
+
+**The contract of the operation IS the verification.** If you cannot trust the operation's return, the defect is in the operation — fix it there, not at the call site.
+
+---
+
+## Smell 4 — Negative-form names and conditions
+
+### Why positive form wins
+
+Every negation forces the reader to mentally invert. One negation is tolerable. Two (`if !isNotReady`) is a logic puzzle. Codebases that default to negative naming accumulate double and triple negations that nobody can review confidently.
+
+Positive form reads in the direction of intent: "is this ready?" rather than "is this not-not-ready?"
+
+### Naming
+
+| Negative (SMELL) | Positive (CLEAN) |
+|---|---|
+| `isNotValid` | `isValid` (invert branch) |
+| `isDisabled` | `isEnabled` |
+| `noErrors` | `isClean` / `errorsResolved` |
+| `notFound` | `found` (invert branch) |
+| `isNotEmpty` | `hasItems` / `isPopulated` |
+| `missingAuth` | `hasAuth` / `isAuthenticated` |
+| `cannotProceed` | `canProceed` (invert branch) |
+
+Name the **presence** of the quality you care about, not the absence of its opposite.
+
+### Conditions
+
+```python
+# SMELL — double negative
+if not is_invalid(token):
+ proceed()
+
+# CLEAN — single positive check
+if is_valid(token):
+ proceed()
+```
+
+```typescript
+// SMELL — negated boolean in branch
+if (!user.isNotVerified) {
+ grantAccess();
+}
+
+// CLEAN — positive name, direct check
+if (user.isVerified) {
+ grantAccess();
+}
+```
+
+```go
+// SMELL — inverted negative
+if !config.DisableLogging {
+ log.Info("starting")
+}
+
+// CLEAN — positive flag
+if config.LoggingEnabled {
+ log.Info("starting")
+}
+```
+
+```rust
+// SMELL — negated negative
+if !skip_validation {
+ validate(&input)?;
+}
+
+// CLEAN — positive gate
+if should_validate {
+ validate(&input)?;
+}
+```
+
+### When negation IS appropriate
+
+- **Early returns / guard clauses:** `if !authorized { return Err(...) }` — the negative form IS the intent (reject the bad case).
+- **Filtering out:** `items.filter(|x| !x.is_expired())` — the negation describes the keep/discard decision directly.
+- **Error state names:** `Error`, `Failed`, `Timeout` are negative concepts by nature — do not force them into positive wrappers like `isSuccessAbsent`.
+
+The rule is not "never use negation." The rule is: **when you have a choice between naming the presence and naming the absence, name the presence.** The branch logic follows from the name, not the other way around.
diff --git a/plugins/omo/test/auto-update.test.mjs b/plugins/omo/test/auto-update.test.mjs
index ccaecf71..e5dd5991 100644
--- a/plugins/omo/test/auto-update.test.mjs
+++ b/plugins/omo/test/auto-update.test.mjs
@@ -313,7 +313,7 @@ test("#given marketplace plugin root without install snapshot #when running chec
assert.equal(result.reason, "marketplace-flow");
assert.equal(result.notices.length, 1);
assert.match(result.notices[0], /codex plugin marketplace upgrade sisyphuslabs/);
- assert.match(result.notices[0], /re-approve/);
+ assert.match(result.notices[0], /hook re-approval/);
await assert.rejects(readFile(spawnLogPath, "utf8"), { code: "ENOENT" });
const state = JSON.parse(await readFile(env.LAZYCODEX_AUTO_UPDATE_STATE_PATH, "utf8"));
assert.equal(state.lastCheckedAt, 123_456);
diff --git a/plugins/omo/test/bootstrap-setup.test.mjs b/plugins/omo/test/bootstrap-setup.test.mjs
index e30fbf61..6d77cec3 100644
--- a/plugins/omo/test/bootstrap-setup.test.mjs
+++ b/plugins/omo/test/bootstrap-setup.test.mjs
@@ -127,6 +127,37 @@ test("#given a completed first run #when the worker setup runs again #then confi
});
});
+test("#given a package-relative CodeGraph MCP path #when worker setup runs #then the path is stamped absolute", async () => {
+ await withSetupFixture(async (fixture) => {
+ await writeFile(
+ join(fixture.pluginRoot, ".mcp.json"),
+ `${JSON.stringify(
+ {
+ mcpServers: {
+ codegraph: {
+ args: ["components/codegraph/dist/serve.js"],
+ command: "node",
+ cwd: ".",
+ required: false,
+ },
+ git_bash: { args: ["serve"], command: "node", env: {} },
+ },
+ },
+ null,
+ "\t",
+ )}\n`,
+ );
+
+ await runWorkerSetup(setupOptions(fixture));
+
+ const manifest = JSON.parse(await readFile(join(fixture.pluginRoot, ".mcp.json"), "utf8"));
+ assert.deepEqual(manifest.mcpServers.codegraph.args, [
+ join(fixture.pluginRoot, "components", "codegraph", "dist", "serve.js"),
+ ]);
+ assert.equal(manifest.mcpServers.codegraph.cwd, ".");
+ });
+});
+
test("#given bootstrap-managed staging #when agents are linked #then nothing is persisted under PLUGIN_ROOT", async () => {
await withSetupFixture(async (fixture) => {
await runWorkerSetup(setupOptions(fixture));