oh-my-opencode 4.11.1 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/.agents/skills/codex-qa/scripts/lib/app-server-client.mjs +132 -82
  2. package/.agents/skills/codex-qa/scripts/lib/app-server-client.test.js +48 -0
  3. package/.agents/skills/opencode-qa/scripts/serve-wake-split-probe.sh +361 -84
  4. package/.agents/skills/work-with-pr/SKILL.md +19 -5
  5. package/.opencode/skills/work-with-pr/SKILL.md +19 -5
  6. package/dist/agents/types.d.ts +7 -6
  7. package/dist/cli/index.js +438 -306
  8. package/dist/cli-node/index.js +438 -306
  9. package/dist/features/background-agent/parent-wake-flush-runner.d.ts +1 -0
  10. package/dist/features/background-agent/parent-wake-history-state.d.ts +1 -0
  11. package/dist/features/background-agent/parent-wake-session-history.d.ts +1 -47
  12. package/dist/features/background-agent/parent-wake-session-message.d.ts +47 -0
  13. package/dist/index.js +245 -69
  14. package/dist/plugin/tool-execute-before.d.ts +2 -0
  15. package/dist/plugin-handlers/plugin-components-loader.d.ts +1 -0
  16. package/dist/skills/ulw-plan/SKILL.md +2 -1
  17. package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
  18. package/dist/skills/ulw-plan/references/intent-clear.md +2 -2
  19. package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -2
  20. package/dist/tools/delegate-task/sync-session-turns.d.ts +3 -0
  21. package/dist/tui.js +16 -7
  22. package/package.json +13 -13
  23. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +22 -2
  24. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +25 -9
  25. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +10 -3
  28. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +9 -2
  29. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +7 -2
  31. package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +2 -1
  32. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +9 -9
  33. package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +94 -0
  34. package/packages/omo-codex/plugin/components/codegraph/test/serve-node-support.test.ts +33 -0
  35. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  36. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  37. package/packages/omo-codex/plugin/components/comment-checker/test/package-smoke.test.ts +2 -71
  38. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  39. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  41. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  43. package/packages/omo-codex/plugin/components/lsp/package.json +2 -2
  44. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +26 -104
  45. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  46. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  47. package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +12 -92
  48. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +157 -234
  49. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  50. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -2
  51. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +227 -15
  52. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +62 -2
  53. package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +34 -3
  54. package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +139 -0
  55. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +111 -0
  56. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +250 -0
  57. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +220 -0
  58. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  59. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  60. package/packages/omo-codex/plugin/components/test-support/package-smoke-fixture.ts +158 -0
  61. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  62. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -1
  64. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/agents/openai.yaml +1 -1
  65. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
  66. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -2
  67. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +76 -49
  68. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
  69. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  70. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/agents/openai.yaml +1 -1
  71. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +1 -1
  72. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +17 -0
  73. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +17 -0
  74. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +17 -0
  75. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +17 -0
  76. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +17 -0
  77. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +17 -0
  78. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +17 -0
  79. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +17 -0
  80. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +17 -0
  81. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +17 -0
  82. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +16 -0
  83. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +16 -0
  84. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +16 -0
  85. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +16 -0
  86. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +16 -0
  87. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +17 -0
  88. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +16 -0
  89. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +16 -0
  90. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +16 -0
  91. package/packages/omo-codex/plugin/package-lock.json +12 -22
  92. package/packages/omo-codex/plugin/package.json +1 -1
  93. package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +14 -11
  94. package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +15 -4
  95. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +37 -0
  96. package/packages/omo-codex/plugin/skills/ast-grep/agents/openai.yaml +2 -0
  97. package/packages/omo-codex/plugin/skills/comment-checker/agents/openai.yaml +2 -0
  98. package/packages/omo-codex/plugin/skills/debugging/agents/openai.yaml +2 -0
  99. package/packages/omo-codex/plugin/skills/frontend/agents/openai.yaml +2 -0
  100. package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +1 -1
  101. package/packages/omo-codex/plugin/skills/init-deep/agents/openai.yaml +2 -0
  102. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/agents/openai.yaml +1 -1
  103. package/packages/omo-codex/plugin/skills/lcx-doctor/agents/openai.yaml +1 -1
  104. package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +1 -1
  105. package/packages/omo-codex/plugin/skills/lsp/agents/openai.yaml +2 -0
  106. package/packages/omo-codex/plugin/skills/lsp-setup/agents/openai.yaml +2 -0
  107. package/packages/omo-codex/plugin/skills/programming/agents/openai.yaml +2 -0
  108. package/packages/omo-codex/plugin/skills/refactor/agents/openai.yaml +2 -0
  109. package/packages/omo-codex/plugin/skills/remove-ai-slops/agents/openai.yaml +2 -0
  110. package/packages/omo-codex/plugin/skills/review-work/agents/openai.yaml +2 -0
  111. package/packages/omo-codex/plugin/skills/rules/agents/openai.yaml +2 -0
  112. package/packages/omo-codex/plugin/skills/start-work/agents/openai.yaml +2 -0
  113. package/packages/omo-codex/plugin/skills/teammode/SKILL.md +139 -0
  114. package/packages/omo-codex/plugin/skills/teammode/agents/openai.yaml +2 -0
  115. package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +111 -0
  116. package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +250 -0
  117. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +220 -0
  118. package/packages/omo-codex/plugin/skills/ultraresearch/agents/openai.yaml +2 -0
  119. package/packages/omo-codex/plugin/skills/ulw-loop/agents/openai.yaml +1 -1
  120. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -1
  121. package/packages/omo-codex/plugin/skills/ulw-plan/agents/openai.yaml +1 -1
  122. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
  123. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -2
  124. package/packages/omo-codex/plugin/skills/visual-qa/agents/openai.yaml +2 -0
  125. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +34 -33
  126. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +5 -2
  127. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +13 -0
  128. package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +1 -1
  129. package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +14 -6
  130. package/packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs +7 -3
  131. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +3 -3
  132. package/packages/omo-codex/plugin/test/display-metadata.test.mjs +83 -0
  133. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +30 -19
  134. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +3 -3
  135. package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +6 -6
  136. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
  137. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +9 -4
  138. package/packages/omo-codex/plugin/test/teammode-safety-fixture.mjs +88 -0
  139. package/packages/omo-codex/plugin/test/teammode-safety.test.mjs +240 -0
  140. package/packages/omo-codex/scripts/install-dist/install-local.mjs +385 -206
  141. package/packages/omo-codex/scripts/install-hook-targets.test.mjs +93 -0
  142. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +2 -2
  143. package/packages/omo-codex/scripts/install-local-bun-global-update.test.mjs +63 -0
  144. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +109 -1
  145. package/packages/omo-codex/scripts/install-local.mjs +1 -0
  146. package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -1
  147. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
  148. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -2
  149. package/packages/omo-codex/plugin/hooks/hooks.json +0 -214
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/omo-codex-plugin",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sisyphuslabs/omo-codex-plugin",
9
- "version": "4.11.0",
9
+ "version": "4.11.1",
10
10
  "workspaces": [
11
11
  "components/codegraph",
12
12
  "components/comment-checker",
@@ -23,11 +23,6 @@
23
23
  "@oh-my-opencode/shared-skills": "file:../../shared-skills"
24
24
  }
25
25
  },
26
- "../../boulder-state": {
27
- "name": "@oh-my-opencode/boulder-state",
28
- "version": "0.1.0",
29
- "dev": true
30
- },
31
26
  "../../comment-checker-core": {
32
27
  "name": "@oh-my-opencode/comment-checker-core",
33
28
  "version": "0.1.0",
@@ -97,7 +92,7 @@
97
92
  },
98
93
  "components/codegraph": {
99
94
  "name": "@sisyphuslabs/codex-codegraph",
100
- "version": "4.11.0",
95
+ "version": "4.11.1",
101
96
  "bin": {
102
97
  "omo-codegraph": "dist/cli.js"
103
98
  },
@@ -113,7 +108,7 @@
113
108
  },
114
109
  "components/comment-checker": {
115
110
  "name": "@code-yeongyu/codex-comment-checker",
116
- "version": "4.11.0",
111
+ "version": "4.11.1",
117
112
  "license": "MIT",
118
113
  "bin": {
119
114
  "omo-comment-checker": "dist/cli.js"
@@ -134,7 +129,7 @@
134
129
  },
135
130
  "components/git-bash": {
136
131
  "name": "@sisyphuslabs/codex-git-bash-hook",
137
- "version": "4.11.0",
132
+ "version": "4.11.1",
138
133
  "bin": {
139
134
  "omo-git-bash-hook": "dist/cli.js"
140
135
  },
@@ -149,7 +144,7 @@
149
144
  },
150
145
  "components/lazycodex-executor-verify": {
151
146
  "name": "@code-yeongyu/codex-lazycodex-executor-verify",
152
- "version": "4.11.0",
147
+ "version": "4.11.1",
153
148
  "license": "MIT",
154
149
  "bin": {
155
150
  "lazycodex-executor-verify": "dist/cli.js"
@@ -166,7 +161,7 @@
166
161
  },
167
162
  "components/lsp": {
168
163
  "name": "@code-yeongyu/codex-lsp",
169
- "version": "4.11.0",
164
+ "version": "4.11.1",
170
165
  "license": "MIT",
171
166
  "dependencies": {
172
167
  "@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"
@@ -186,7 +181,7 @@
186
181
  },
187
182
  "components/rules": {
188
183
  "name": "@code-yeongyu/codex-rules",
189
- "version": "4.11.0",
184
+ "version": "4.11.1",
190
185
  "license": "MIT",
191
186
  "dependencies": {
192
187
  "picomatch": "^4.0.3"
@@ -208,14 +203,13 @@
208
203
  },
209
204
  "components/start-work-continuation": {
210
205
  "name": "@code-yeongyu/codex-start-work-continuation",
211
- "version": "4.11.0",
206
+ "version": "4.11.1",
212
207
  "license": "MIT",
213
208
  "bin": {
214
209
  "omo-start-work-continuation": "dist/cli.js"
215
210
  },
216
211
  "devDependencies": {
217
212
  "@biomejs/biome": "2.4.16",
218
- "@oh-my-opencode/boulder-state": "file:../../../../boulder-state",
219
213
  "@types/node": "^25.9.3",
220
214
  "typescript": "^6.0.3",
221
215
  "vitest": "^4.1.8"
@@ -226,7 +220,7 @@
226
220
  },
227
221
  "components/telemetry": {
228
222
  "name": "@code-yeongyu/codex-telemetry",
229
- "version": "4.11.0",
223
+ "version": "4.11.1",
230
224
  "license": "MIT",
231
225
  "bin": {
232
226
  "omo-telemetry": "dist/cli.js"
@@ -244,7 +238,7 @@
244
238
  },
245
239
  "components/ultrawork": {
246
240
  "name": "@code-yeongyu/codex-ultrawork",
247
- "version": "4.11.0",
241
+ "version": "4.11.1",
248
242
  "license": "MIT",
249
243
  "bin": {
250
244
  "omo-ultrawork": "dist/cli.js"
@@ -262,7 +256,7 @@
262
256
  },
263
257
  "components/ulw-loop": {
264
258
  "name": "@code-yeongyu/codex-ulw-loop",
265
- "version": "4.11.0",
259
+ "version": "4.11.1",
266
260
  "license": "MIT",
267
261
  "bin": {
268
262
  "omo-ulw-loop": "dist/cli.js"
@@ -562,10 +556,6 @@
562
556
  "@emnapi/runtime": "^1.7.1"
563
557
  }
564
558
  },
565
- "node_modules/@oh-my-opencode/boulder-state": {
566
- "resolved": "../../boulder-state",
567
- "link": true
568
- },
569
559
  "node_modules/@oh-my-opencode/comment-checker-core": {
570
560
  "resolved": "../../comment-checker-core",
571
561
  "link": true
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/omo-codex-plugin",
3
- "version": "4.11.1",
3
+ "version": "4.12.0",
4
4
  "description": "Aggregate Codex plugin root for OMO components.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -1,4 +1,4 @@
1
- const PRODUCT_NAME = "LazyCodex";
1
+ const PRODUCT_PREFIX = "(OmO)";
2
2
 
3
3
  const WORD_OVERRIDES = new Map([
4
4
  ["lazycodex", "LazyCodex"],
@@ -8,13 +8,18 @@ const WORD_OVERRIDES = new Map([
8
8
  ]);
9
9
 
10
10
  export function formatLazyCodexHookStatusMessage(version, label) {
11
- return `${PRODUCT_NAME}(${normalizeVersion(version)}): ${normalizeLazyCodexHookStatusLabel(label)}`;
11
+ void version;
12
+ return `${PRODUCT_PREFIX} ${normalizeLazyCodexHookStatusLabel(label)}`;
12
13
  }
13
14
 
14
15
  export function normalizeLazyCodexHookStatusLabel(label) {
15
16
  const parsed = parseLazyCodexHookStatusMessage(label);
16
17
  const rawLabel = parsed === null ? label : parsed.label;
17
- const normalized = rawLabel.replace(/\bOMO\b/gi, " ").replace(/\s+/g, " ").trim();
18
+ const normalized = rawLabel
19
+ .replace(/^\(OmO\)\s*/i, " ")
20
+ .replace(/\bOMO\b/gi, " ")
21
+ .replace(/\s+/g, " ")
22
+ .trim();
18
23
  if (normalized.length === 0) return "";
19
24
  return normalized
20
25
  .split(" ")
@@ -23,17 +28,15 @@ export function normalizeLazyCodexHookStatusLabel(label) {
23
28
  }
24
29
 
25
30
  export function parseLazyCodexHookStatusMessage(message) {
26
- const match = /^LazyCodex\(([^)]+)\):\s+(.+)$/.exec(message.trim());
27
- if (match === null) return null;
28
- const [, version, label] = match;
31
+ const trimmed = message.trim();
32
+ const current = /^\(OmO\)\s+(.+)$/.exec(trimmed);
33
+ if (current !== null) return { version: undefined, label: current[1] };
34
+ const legacy = /^LazyCodex\(([^)]+)\):\s+(.+)$/.exec(trimmed);
35
+ if (legacy === null) return null;
36
+ const [, version, label] = legacy;
29
37
  return { version, label };
30
38
  }
31
39
 
32
- function normalizeVersion(version) {
33
- const normalized = version.trim();
34
- return normalized.length === 0 ? "local" : normalized;
35
- }
36
-
37
40
  function formatWord(word) {
38
41
  const lower = word.toLowerCase();
39
42
  const override = WORD_OVERRIDES.get(lower);
@@ -31,6 +31,15 @@ async function readPackageVersion(path) {
31
31
  return packageJson.version;
32
32
  }
33
33
 
34
+ async function readAggregateHookPaths(root) {
35
+ const manifest = await readJson(join(root, ".codex-plugin", "plugin.json"));
36
+ if (typeof manifest.hooks === "string") return [manifest.hooks];
37
+ if (Array.isArray(manifest.hooks)) {
38
+ return manifest.hooks.filter((hookPath) => typeof hookPath === "string");
39
+ }
40
+ return ["./hooks/hooks.json"];
41
+ }
42
+
34
43
  async function readComponentNames(root) {
35
44
  const componentsRoot = join(root, "components");
36
45
  const entries = await readdir(componentsRoot, { withFileTypes: true });
@@ -79,10 +88,12 @@ export async function syncHookStatusMessages(root = defaultRoot, options = {}) {
79
88
  const releaseVersion = readReleaseVersion(options);
80
89
  const aggregateVersion = releaseVersion ?? (await readPackageVersion(join(root, ".codex-plugin", "plugin.json")));
81
90
  const componentNames = await readComponentNames(root);
82
- const aggregateHooksPath = join(root, "hooks", "hooks.json");
83
- const aggregateHooks = await readJson(aggregateHooksPath);
84
- syncHooksJson(aggregateHooks, () => aggregateVersion);
85
- await writeJson(aggregateHooksPath, aggregateHooks);
91
+ for (const hookPath of await readAggregateHookPaths(root)) {
92
+ const aggregateHooksPath = join(root, hookPath.replace(/^\.\//, ""));
93
+ const aggregateHooks = await readJson(aggregateHooksPath);
94
+ syncHooksJson(aggregateHooks, () => aggregateVersion);
95
+ await writeJson(aggregateHooksPath, aggregateHooks);
96
+ }
86
97
 
87
98
  for (const componentName of componentNames) {
88
99
  const componentVersion =
@@ -12,10 +12,12 @@ const skillSources = [
12
12
  ["comment-checker", "components/comment-checker/skills/comment-checker"],
13
13
  ["lsp", "components/lsp/skills/lsp"],
14
14
  ["rules", "components/rules/skills/rules"],
15
+ ["teammode", "components/teammode/skills/teammode"],
15
16
  ["ulw-loop", "components/ulw-loop/skills/ulw-loop"],
16
17
  ["ulw-plan", "components/ultrawork/skills/ulw-plan"],
17
18
  ];
18
19
  const componentSkillNames = new Set(skillSources.map(([name]) => name));
20
+ const skillDisplayPrefix = "(OmO) ";
19
21
 
20
22
  const opencodeOnlyOrchestrationPattern = /\b(?:call_omo_agent|background_output|team_[a-z_]+|task)\s*\(/;
21
23
 
@@ -151,6 +153,40 @@ function applyCodexSkillOverlays(skillName, content) {
151
153
  return content;
152
154
  }
153
155
 
156
+ function readSkillFrontmatterName(content, fallbackName) {
157
+ const frontmatter = content.match(/^---\n(?<body>[\s\S]*?)\n---\n+/);
158
+ const rawName = frontmatter?.groups?.body.match(/^name:\s*"?([^"\n]+)"?\s*$/m)?.[1]?.trim();
159
+ return rawName && rawName.length > 0 ? rawName : fallbackName;
160
+ }
161
+
162
+ function upsertDisplayName(metadata, displayName) {
163
+ const content = metadata.endsWith("\n") ? metadata : `${metadata}\n`;
164
+ if (/^\s*display_name:/m.test(metadata)) {
165
+ return content.replace(/^(\s*display_name:\s*).+$/m, `$1"${displayName}"`);
166
+ }
167
+ if (/^interface:\s*$/m.test(metadata)) {
168
+ return content.replace(/^interface:\s*$/m, `interface:\n display_name: "${displayName}"`);
169
+ }
170
+ return `interface:\n display_name: "${displayName}"\n${content}`;
171
+ }
172
+
173
+ async function writeCodexSkillDisplayMetadata(skillName) {
174
+ const skillRoot = join(skillsRoot, skillName);
175
+ const skillPath = join(skillRoot, "SKILL.md");
176
+ const content = await readFile(skillPath, "utf8");
177
+ const frontmatterName = readSkillFrontmatterName(content, skillName);
178
+ const metadataDir = join(skillRoot, "agents");
179
+ const metadataPath = join(metadataDir, "openai.yaml");
180
+ await mkdir(metadataDir, { recursive: true });
181
+ let metadata = "interface:\n";
182
+ try {
183
+ metadata = await readFile(metadataPath, "utf8");
184
+ } catch (error) {
185
+ if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) throw error;
186
+ }
187
+ await writeFile(metadataPath, upsertDisplayName(metadata, `${skillDisplayPrefix}${frontmatterName}`), "utf8");
188
+ }
189
+
154
190
  async function adaptSkillForCodex(skillName) {
155
191
  const skillPath = join(skillsRoot, skillName, "SKILL.md");
156
192
  const content = await readFile(skillPath, "utf8");
@@ -158,6 +194,7 @@ async function adaptSkillForCodex(skillName) {
158
194
  if (adapted !== content) {
159
195
  await writeFile(skillPath, adapted, "utf8");
160
196
  }
197
+ await writeCodexSkillDisplayMetadata(skillName);
161
198
  }
162
199
 
163
200
  async function syncSkills() {
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) ast-grep"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) comment-checker"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) debugging"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) frontend"
@@ -1,5 +1,5 @@
1
1
  interface:
2
- display_name: "git-master (omo)"
2
+ display_name: "(OmO) git-master"
3
3
  short_description: "Atomic Git commits, history surgery, and source archaeology"
4
4
  search_terms:
5
5
  - "git-master"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) init-deep"
@@ -1,5 +1,5 @@
1
1
  interface:
2
- display_name: "lcx-contribute-bug-fix (omo)"
2
+ display_name: "(OmO) lcx-contribute-bug-fix"
3
3
  short_description: "Contribute verified LazyCodex or Codex bug fixes"
4
4
  search_terms:
5
5
  - "lcx-contribute-bug-fix"
@@ -1,5 +1,5 @@
1
1
  interface:
2
- display_name: "lcx-doctor (omo)"
2
+ display_name: "(OmO) lcx-doctor"
3
3
  short_description: "Diagnose LazyCodex/Codex install health against latest sources"
4
4
  search_terms:
5
5
  - "lcx-doctor"
@@ -1,5 +1,5 @@
1
1
  interface:
2
- display_name: "lcx-report-bug (omo)"
2
+ display_name: "(OmO) lcx-report-bug"
3
3
  short_description: "Route LazyCodex or Codex bugs with source evidence"
4
4
  search_terms:
5
5
  - "lcx-report-bug"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) lsp"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) lsp-setup"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) programming"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) refactor"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) remove-ai-slops"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) review-work"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) rules"
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) start-work"
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: teammode
3
+ description: "Codex-only team orchestration: run a named team of cooperating Codex threads with durable, script-managed state. MUST USE when the user asks Codex to create, run, coordinate, inspect, archive, or delete a team of threads/sessions, or to work on something as a team in parallel. The main session is always the leader; members are defined by a concrete part, ownership area, or perspective - never a vague job role; a bundled cross-platform script writes the .omo/teams state plus an auto-generated member field manual. Use a team when the work is not perfectly isolated but parallelizing helps, or when a task still needs exploration under a clear goal; use plain subagents when scope is perfectly isolated or the goal is ambiguous. Triggers: team mode, teammode, make a team, run as a team, team of agents, coordinate threads, parallel Codex threads, archive the team, delete the team."
4
+ ---
5
+
6
+ # Teammode
7
+
8
+ Run a named team of cooperating Codex threads under one leader, with durable state on disk.
9
+ This is a Codex-only workflow. It is inspired by the lifecycle concerns in the
10
+ Yeachan-Heo/oh-my-codex team skill, but it does not copy that runtime model and never depends
11
+ on an external terminal runner - it coordinates through Codex's own thread tools plus a bundled
12
+ state script.
13
+
14
+ ## When to use a team (and when to use plain subagents instead)
15
+
16
+ Use a TEAM when EITHER holds:
17
+ - the work does NOT split into perfectly isolated pieces, but doing it in parallel is clearly
18
+ more convenient - members will need to see and react to each other's findings; or
19
+ - one task still needs exploration, yet its GOAL is already clear - parallel investigation under
20
+ a fixed objective.
21
+
22
+ Use plain subagents (`$ulw` / `multi_agent_v1.spawn_agent`) - NOT a team - when EITHER holds:
23
+ - the work IS perfectly isolated, so there is no coordination cost worth paying; or
24
+ - the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.
25
+
26
+ A team buys cross-member coordination at a real overhead cost; only spend it when coordination
27
+ is the thing you actually need.
28
+
29
+ ## You are the leader
30
+
31
+ The main session is ALWAYS the team leader. Do NOT create a separate leader thread - you
32
+ orchestrate directly. Members are the threads you create; they report to you, and you own the
33
+ final synthesis and any integration.
34
+
35
+ ## Compose by part, ownership, or perspective - not by job title
36
+
37
+ A team is ALWAYS two or more members - never a single-member team. One worker on an isolated
38
+ job is a subagent (`multi_agent_v1.spawn_agent`), not a team; if you end up with a single member,
39
+ either split off a second distinct slice or drop the team and use a subagent.
40
+
41
+ Compose the team from what you actually KNOW about the work. Ground the split in real knowledge
42
+ of the problem, then divide it into clear, non-overlapping responsibilities - one per aspect of
43
+ the work - and give each member exactly one. No two members may own the same thing. Define each
44
+ member by a concrete slice: a specific part of the codebase, an ownership area, or a distinct
45
+ perspective/lens. Assigning a vague role ("backend dev", "release analyst", "the tester") is an
46
+ anti-pattern - it gives the member no real boundary and invites overlap. Each member's `focus`
47
+ names what they own concretely; the `lens` is one of `area`, `ownership`, or `perspective`.
48
+
49
+ ## Run the script - never hand-write team state
50
+
51
+ A bundled, dependency-free Node script owns all team state so you never author `team.json` or
52
+ the member manual by hand. Run it with `node` (or `bun`); it works on macOS, Linux, and Windows.
53
+ Replace `<skill-root>` with this skill's own directory.
54
+
55
+ ```
56
+ node "<skill-root>/scripts/team.mjs" init --name "<team>" --session-name "<session>" [--session <leader_session_id>] [--worktree] [--base-branch dev]
57
+ node "<skill-root>/scripts/team.mjs" add-member --team <session_id> --id A --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
58
+ node "<skill-root>/scripts/team.mjs" bind-thread --team <session_id> --id A --thread <thread_id> [--cwd <path>]
59
+ node "<skill-root>/scripts/team.mjs" member-prompt --team <session_id> --id A
60
+ node "<skill-root>/scripts/team.mjs" set-status --team <session_id> --id A --status reported|blocked|active|archived [--note "<...>"]
61
+ node "<skill-root>/scripts/team.mjs" archive --team <session_id> [--id A]
62
+ node "<skill-root>/scripts/team.mjs" delete --team <session_id> [--force]
63
+ node "<skill-root>/scripts/team.mjs" status --team <session_id>
64
+ ```
65
+
66
+ `init` creates `.omo/teams/{session_id}/` containing `team.json` (the single durable state file:
67
+ team id, the main-session leader, the member roster, status, worktree config, and a lifecycle
68
+ log), `guide.md` (the auto-generated member field manual), and `artifacts/` (a shared exchange
69
+ space). `{session_id}` is the leader's Codex session id when you can pass it via `--session`;
70
+ otherwise the script generates a stable handle. Re-running `init` is a safe no-op. Every mutating
71
+ subcommand rewrites `guide.md`, so the manual always matches the current team.
72
+
73
+ ## Create the team and its threads
74
+
75
+ 1. `init` the team, then `add-member` once per member.
76
+ 2. Create a durable thread per member with `codex_app.create_thread` - ALWAYS this tool for every
77
+ member, never a spawned agent - titled EXACTLY
78
+ `[team name] {session name}` (keep this convention strictly). If `codex_app.create_thread`
79
+ accepts a working directory / cwd argument, set it to that member's worktree; otherwise the
80
+ member's manual tells it to `cd` there first. Use `codex_app.set_thread_title` if the title
81
+ did not land at creation.
82
+ 3. `bind-thread` to record each thread id (and `--cwd`), then send that member's bootstrap
83
+ trigger (printed by `add-member` / `member-prompt`) as the thread's first message. The trigger
84
+ is short on purpose: it tells the new thread to READ its `guide.md` and `team.json` rather than
85
+ carrying the whole protocol inline.
86
+
87
+ Every team member is a real Codex thread created with `codex_app.create_thread` - this is strict,
88
+ not a preference. NEVER substitute `multi_agent_v1.spawn_agent`, or any other in-process subagent,
89
+ for a team member: a spawned agent is an ephemeral helper that does not show up as a team thread,
90
+ cannot carry the `[team name] {session name}` title, and cannot be inspected, titled, archived, or
91
+ re-opened with the `codex_app.*` thread tools - which defeats the entire point of a durable team.
92
+ A member only counts once you have `bind-thread`-ed it to a real `codex_app.create_thread` thread
93
+ id. If the thread-creation tool is unavailable, STOP and say so (see Stop rules); do not quietly
94
+ fall back to a spawned agent.
95
+
96
+ ## Communication
97
+
98
+ Coordinate with `codex_app.send_message_to_thread` (leader-to-member and peer digests) and inspect
99
+ status with `codex_app.read_thread`. The generated manual already binds members to the hard rules,
100
+ so you mostly enforce them: all member-to-member and member-to-leader communication is in English;
101
+ when the END user addresses a member, that member replies in the user's own language. Members
102
+ over-communicate relentlessly - constant, small, lean updates that report every finding, hand-off,
103
+ and even the smallest or most trivial step as it happens rather than one final dump - and send
104
+ `WORKING:`/`BLOCKED:` markers so the leader always knows their state; stale, stuck, or
105
+ silently-blocked members are not acceptable, and a finished
106
+ member reports to the leader immediately. Members hand off files and
107
+ memos through the team `artifacts/` directory and reference them by path instead of pasting large
108
+ content. Wait for every required member's final report before you declare the team done.
109
+
110
+ ## Worktrees (optional isolation)
111
+
112
+ When parallel members would edit overlapping files, enable isolation with `init --worktree`. Create
113
+ one git worktree per member off the base branch, `bind-thread --cwd <worktree>` so each member's
114
+ worktree is recorded in `team.json`, and rely on the manual to direct each member into its own
115
+ worktree. Each member commits inside its worktree so you can integrate.
116
+
117
+ ## Archive, delete, and cleanup
118
+
119
+ DISBAND the team the moment it is no longer needed. A team exists only to do its work; once that
120
+ work is done, or the user no longer wants it, do not leave it lying around - archive every member,
121
+ then delete the team state. A finished team that is never disbanded is a leak.
122
+
123
+ - `archive` closes the team: notify each active member, copy anything useful into `artifacts/`,
124
+ archive each member thread with `codex_app.set_thread_archived`, then `archive` flips the team
125
+ and all members to archived. If a thread-archive tool is unavailable, record that in the team log
126
+ and tell the user - never pretend a member was archived.
127
+ - `delete` removes `.omo/teams/{session_id}` and refuses while the team is unarchived or any member
128
+ is still active unless `--force`.
129
+ - When the work wraps up, integrate each member's worktree the way the user asked - merge directly,
130
+ or open a fresh PR and merge it - then archive and delete. Cleanup is real work; respect the
131
+ user's instruction on how to land it.
132
+
133
+ ## Stop rules
134
+
135
+ - Stop and ask before deleting an unarchived team while any member is still active.
136
+ - Member communication stays English unless the user explicitly requests otherwise; user-facing
137
+ replies follow the user's language.
138
+ - Stop if the requested operation needs Codex thread tools (create/read/send/title/archive) and
139
+ they are unavailable; say so instead of faking it.
@@ -0,0 +1,2 @@
1
+ interface:
2
+ display_name: "(OmO) teammode"
@@ -0,0 +1,111 @@
1
+ // team-guide.mjs - render the member-facing field manual (guide.md) and the short
2
+ // bootstrap trigger a new thread reads on startup. Pure string builders, no I/O.
3
+ //
4
+ // The manual is the durable, two-channel replacement for per-prompt guidance: the leader
5
+ // writes it once at team creation, and every member thread is told to READ it instead of
6
+ // receiving the rules inline each turn.
7
+
8
+ function memberLine(member) {
9
+ const thread = member.threadId ? ` | thread ${member.threadId}` : " | thread not created yet";
10
+ const wt = member.worktree?.path ? ` | worktree ${member.worktree.path}` : "";
11
+ return `- **${member.id}** (${member.lens}) - ${member.focus}${member.deliverable ? ` -> ${member.deliverable}` : ""}${thread}${wt} [${member.status}]`;
12
+ }
13
+
14
+ function worktreeSection(team) {
15
+ if (!team.worktree?.enabled) {
16
+ return `## Worktrees
17
+
18
+ This team does not use isolated git worktrees. Work in the shared repository checkout
19
+ the leader is running from. If your changes would collide with another member's files,
20
+ that is a coordination signal: mark yourself \`blocked\` and tell the leader at once.`;
21
+ }
22
+ const lines = team.members
23
+ .filter((m) => m.worktree?.path || m.worktree?.branch)
24
+ .map((m) => `- **${m.id}**: worktree \`${m.worktree.path ?? "(assign with bind-thread --cwd)"}\` on branch \`${m.worktree.branch ?? team.worktree.baseBranch}\``);
25
+ return `## Worktrees (ISOLATION IS ON - this is not optional for you)
26
+
27
+ This team runs each member in its own git worktree branched off \`${team.worktree.baseBranch}\`.
28
+ **You MUST work only inside your own worktree.** The very first thing you do is \`cd\` into it;
29
+ every edit, command, and commit happens there. Never touch another member's worktree, and
30
+ never edit files outside your assigned scope. Commit your work so the leader can integrate it.
31
+
32
+ ${lines.length ? lines.join("\n") : "- (worktree paths are assigned as threads are bound; read team.json for yours)"}`;
33
+ }
34
+
35
+ export function buildGuide(team) {
36
+ const artifacts = team.paths?.artifacts ?? ".omo/teams/<session_id>/artifacts";
37
+ const teamJson = team.paths?.team ?? ".omo/teams/<session_id>/team.json";
38
+ const roster = team.members.length ? team.members.map(memberLine).join("\n") : "- (no members yet)";
39
+ return `# Team ${team.teamName} - Member Field Manual
40
+
41
+ > Auto-generated by the teammode script. This file is the single source of truth for how
42
+ > this team works. Re-read it whenever you are unsure - do not improvise the protocol.
43
+
44
+ - Team: **${team.teamName}** (id \`${team.teamId}\`)
45
+ - Team state: \`${teamJson}\`
46
+ - Thread/session title convention (use it EXACTLY): \`${team.threadTitleConvention}\`
47
+
48
+ ## Who you are (your identity is fixed)
49
+
50
+ **You are a member of team ${team.teamName}, not a generic assistant.** You own exactly one
51
+ slice of this team's work - the focus and deliverable assigned to your id below - and you are
52
+ accountable for it end to end. Read your row, internalize it, and act as that owner for the
53
+ whole session. Do not drift into other members' scope.
54
+
55
+ ${roster}
56
+
57
+ ## Leader
58
+
59
+ **The main session is the leader. There is no other leader, and you are not it.** You report
60
+ to the leader, take direction from the leader, and send your results to the leader. Peers
61
+ coordinate with each other, but the leader owns the final decision and integration.
62
+
63
+ ## Communication rules (hard rules)
64
+
65
+ - **All communication between team members, and from you to the leader, is in English.** This
66
+ is mandatory regardless of the language the task was given in.
67
+ - **Exception: when the END USER addresses you directly, reply in the user's own language.**
68
+ Team-internal traffic stays English; user-facing replies match the user.
69
+ - **Report to the leader the moment your work is complete.** A finished task that was never
70
+ reported does not count as done.
71
+ - **Over-communicate relentlessly - report even the trivial.** Message constantly and
72
+ proactively: every finding, decision, hand-off, and even the smallest or most trivial step, the
73
+ moment it happens, in short lean notes. Never save it up for one final report. When in doubt,
74
+ send the message - far more and far smaller updates always beats going quiet. The instant
75
+ anything changes a peer's assumption, push it to them. Too many messages is correct here; the
76
+ only failure is going quiet.
77
+ - **Stale, stuck, and silently-blocked states are NOT acceptable.** During long work send
78
+ \`WORKING: <your focus> - <phase>\` so the leader can see you are alive. If you truly cannot
79
+ proceed, send \`BLOCKED: <reason>\` immediately and propose the smallest unblock - never sit
80
+ idle and never disappear. Being quiet is a failure, not a pause.
81
+
82
+ ## Artifacts (how you hand work off)
83
+
84
+ Exchange files and memos through the team artifacts directory:
85
+
86
+ \`${artifacts}\`
87
+
88
+ Drop deliverables, notes, diffs, and findings there as files, and reference them by path in
89
+ your messages instead of pasting large content into a thread. Treat it as the team's shared
90
+ desk: if a peer or the leader needs something from you, leave it in artifacts and point them to it.
91
+
92
+ ${worktreeSection(team)}
93
+
94
+ ## Done means reported and verified
95
+
96
+ Your slice is done only when (1) the deliverable exists, (2) you have evidence it works, and
97
+ (3) you have reported it to the leader. Until all three are true, keep going.`;
98
+ }
99
+
100
+ export function buildMemberPrompt(team, id) {
101
+ const member = team.members.find((m) => m.id === id);
102
+ if (!member) throw new Error(`no member with id "${id}"`);
103
+ const guide = team.paths?.guide ?? ".omo/teams/<session_id>/guide.md";
104
+ const teamJson = team.paths?.team ?? ".omo/teams/<session_id>/team.json";
105
+ const where = member.cwd ? `Work inside \`${member.cwd}\`.` : "Work from the repository root unless your manual assigns a worktree.";
106
+ return `You are member ${member.id} of team ${team.teamName} - owner of: ${member.focus}.
107
+ FIRST read your field manual at \`${guide}\`, then the team state at \`${teamJson}\`; they define your scope, deliverable, the leader, the artifacts directory, and the communication rules.
108
+ ${where}
109
+ Communicate with the team and leader in English; reply to the end user in the user's own language.
110
+ Start now, send WORKING/BLOCKED updates so you never look stale, and report to the leader the moment you are done.`;
111
+ }