Vendored from omo-codex via sync-components: model/turn_id optional in the
PostToolUse validator (permission_mode kept), CLAUDE_PLUGIN_ROOT hook path.
Builds clean; runs without crash on a CC-shaped PostToolUse payload (no turn_id).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tsconfig.build.json extends ./tsconfig.json (types:[node], strict); without the
base, vendored components lost @types/node and strict config. Also exclude
dist/ and node_modules/ from the --check comparison (they are build artifacts,
not synced source).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirrors the codex sync-skills structure; injects a Claude Code Harness Tool
Compatibility block (maps task()/call_omo_agent()/spawn_agent()/background_output/
team_* -> the Task + Skill tools), extends the detection regex to Codex-native
verbs, and demotes any embedded Codex compat heading to (superseded).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Product-agnostic sync-telemetry-component.mjs (verbatim from omo-codex) +
test; generates the telemetry component's atomic-write/data-path/env-flags/
posthog-activity-state from src/telemetry. product-identity is authored
per-package, not synced.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copies 6 omo-codex components (rules, comment-checker, lsp, ultrawork,
ultragoal, start-work-continuation) into the CC plugin tree and applies a
declarative patch manifest: relax model/turn_id validators, CLAUDE_PLUGIN_ROOT/
DATA env fallbacks, .codex-plugin->.claude-plugin, rules matcher widened to
Write|Edit|MultiEdit, start-work-continuation claude: session prefix. ultragoal
copied verbatim (deep refactor is a later task). --check detects vendor drift.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Marketplace 'sisyphuslabs' / plugin 'omo' reused verbatim; CC native
{name,owner,plugins[]} schema with explicit source ./plugins/omo (no
metadata.pluginRoot, no Codex interface block).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Distinct omo-claude branding (brandColor #D97757, Claude Code copy), same
plugin name 'omo'. Declares skills/hooks/mcpServers paths; homepage/repository
point at code-yeongyu/lazyclaudecode.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirror packages/omo-codex layout for the Claude Code port: package.json
(@oh-my-opencode/omo-claude), tsconfig, index.d.ts, src/ + src/telemetry
stubs, and the plugin/ tree (.claude-plugin, components, agents, hooks,
scripts, skills, test, mcp) with a CC-worded plugin README + placeholder
package.json.
Plan: .omo/plans/omo-claude-plugin-port.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fully rename the ultragoal component to ulw-loop so the identifier
matches the ulw-loop skill it powers. Renames the component directory,
nested skill, TS identifiers (UlwLoop / ULW_LOOP_* / ulwLoop*), the
omo ulw-loop CLI subcommand, the .omo/ulw-loop state directory, the
OMO_ULW_LOOP_STEER directive token, and the @code-yeongyu/codex-ulw-loop
package. Also threads Atlas-style right-sized parallel worker delegation
and a Prometheus-style QA + maximum-parallelism plan into the ulw-loop
skill, with a critical post-subagent QA gate.
Updates aggregate wiring (plugin package components, hooks.json,
sync-skills), the install-codex agent-link test fixture, and user docs.
Rename ultragoal skill to ulw-loop with a CLI bootstrap fallback and
openai.yaml hint metadata, while keeping ultragoal as a discoverable
alias. Drop the metis and momus skills in favor of bundled ultrawork
planner agents and rewrite the planing-prometheustic skill. Update
aggregate and sync-skills tests to match.
Discover component .toml agent files and symlink (or copy on Windows)
them into the Codex agents dir during install, recording an installed
agent manifest and wiring agent config_file entries into config.toml.
Add CodexAgentConfig type and support local marketplace source.
Trim rule and result char budgets after compaction via new
postCompactMaxRuleChars/postCompactMaxResultChars config, applied
through withPostCompactBudget. Extract codex-hook helpers into
dynamic-target-fingerprints, hook-output, path-utils,
rules-engine-factory, and transcript-rule-filter modules.
Ports the OpenCode /start-work flow onto Codex as a discoverable skill.
The skill drives plan selection, Boulder state with codex:<session_id>
prefixed ids, worktree binding, parallel spawn_agent sub-tasks with
6-section prompts, 4-channel Manual-QA evidence (HTTP / tmux / browser /
computer use), ledger append at .omo/start-work/ledger.jsonl, and a
4-phase verification gate. Pairs with the start-work-continuation Codex
Stop / SubagentStop hook component that re-injects continuation while
boulder.json shows incomplete work for the active codex: session.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
metis/momus are Codex subagents, not skills. Move them to
components/ultrawork/agents/ as TOML agent role files:
- metis.toml: gpt-5.5 high, pre-planning analyst that detects
contradictions, ambiguity, missing constraints, and execution risks.
Ouroboros/ralplan-inspired gap analysis. Read-only.
- momus.toml: gpt-5.5 xhigh, plan reviewer with OKAY/ITERATE/REJECT
three-verdict system. Blocker-finder with approval bias. Read-only.
planing-prometheustic SKILL.md rewritten to match the structure of
packages/prompts-core/prompts/prometheus/gpt.md (the omo Prometheus
GPT-5.5 prompt):
- Same XML-tagged sections: identity, mission, core_principles,
output_verbosity_spec, scope_constraints, phases, plan_template,
critical_rules, stop_rules
- Same phase flow: Classify Intent -> Ground -> Interview -> Plan
Generation (with Metis) -> High Accuracy Review (with Momus)
- Metis called via spawn_agent(agent_type="metis") not skill load
- Momus called via spawn_agent(agent_type="momus") not skill load
- "Rigorous Review" renamed to "High Accuracy Review"
- Removed shared-skills/skills/metis/ and momus/ (deleted)
- sync-skills.mjs no longer copies metis/momus into plugin/skills/
Improvements inspired by Q00/ouroboros and Yeachan-Heo/gajae-code:
planing-prometheustic:
- Add brownfield detection (greenfield vs brownfield context awareness)
- Add topology enumeration (Round 0) to lock component list before
deep interview, preventing depth-first overfitting to one component
- Add interview routing rule (facts→code, tradeoffs→user, mixed→both)
- Add retrieval budget (direct reads first, subagents only when needed)
- Add challenge perspective shifts (Contrarian/Simplifier/Ontologist)
- Per-component clearance checklist (every component must pass)
- Handle ITERATE verdict from Momus (max 2 auto-fix rounds)
- NO numeric scoring — qualitative clearance only, per Prometheus style
metis:
- Add brownfield/greenfield detection with evidence to output
- Add topology enumeration (top-level components) to output format
- Add topology directives (planner must cover every active component)
- Add per-component coverage tracking guidance
- Explicit prohibition on numeric scoring formulas
momus:
- Add ITERATE verdict between OKAY and REJECT (fixable gaps the
planner can patch without user input, max 2 auto-fix rounds)
- Update output format for three-verdict system
- Update review process step 6 for three-way decision
- REJECT now reserved for fundamental blockers or missing user decisions
Add three GPT-5.5 optimized skills to the shared-skills package:
- planing-prometheustic: Prometheus-style strategic planning consultant
that produces decision-complete work plans through interview, context
gathering, gap analysis, and optional rigorous review.
- metis: Pre-planning consultant that classifies intent, discovers
codebase patterns, identifies hidden requirements, flags AI-slop
risks, and outputs actionable directives for the planner.
- momus: Practical work plan reviewer that verifies plans are executable
and references are valid. Blocker-finder with OKAY/REJECT verdicts
and max 3 blocking issues per rejection.
All three use GPT-5.5 prompting style (XML-tagged blocks, outcome-first
structure, personality/collaboration separation) and are auto-synced
into omo-codex plugin/skills/ by sync-skills.mjs.
The aggregate plugin test originally asserted that every component lacked .codex-plugin/plugin.json. That was correct when omo was only an aggregate Codex namespace: the root manifest owned plugin identity and components were implementation details.
PLUGIN_BUNDLED changes the invariant for rules. The rules component now ships bundled-rules/hephaestus.md and uses a plugin-root marker to resolve bundled resources when it runs as a component package, while Codex still sees the aggregate omo manifest as the installable plugin.
Chose Path A and touched only packages/omo-codex/plugin/test/aggregate.test.mjs. The test now allowlists the rules manifest and still asserts every other component has no plugin manifest, preventing accidental sprawl.
Verified npm test from packages/omo-codex/plugin, bun run test:codex, and bun test src/cli/install-codex/. bun run test:codex exits 0 and covers the Linux, macOS, and Windows Codex adapter code paths.
Add the cross-platform agent-linker test file to the explicit list in the
'test:codex' script so the existing codex-compatibility CI job, which
runs on ubuntu-latest / macos-latest / windows-latest, actually exercises
it on every supported host OS.
Also add one host-platform test that omits the 'platform' parameter and
asserts against process.platform directly: on Unix the test verifies
symlinks land at ${CODEX_HOME}/agents; on Windows it verifies regular
file copies with the bundled name field. The other nine tests still mock
the 'platform' parameter to exercise all three code paths on every host;
this tenth test is the real-host integration check that the platform
detection logic itself works.
Result: 10 tests in src/cli/install-codex/link-cached-plugin-agents.test.ts,
all wired into 'bun run test:codex', which the existing CI matrix runs
on every push and PR to master/dev across all three supported operating
systems.
The Python SessionStart hook (sync-agents.py) was a runtime side-effect
that copied agent TOMLs into CODEX_HOME/agents on every session start.
That design had three problems:
1. It was a Python script invoked via 'python3 ${PLUGIN_ROOT}/...' which
is fragile on Windows where the binary may be 'python', and is the
wrong layer for a one-shot install task.
2. Agent TOMLs landed as regular file copies, with no provenance link to
the plugin cache and no tracking for clean uninstall.
3. An older release shipped TOMLs without the required 'name' field;
because the current bundle no longer ships them, the hook never had
a chance to overwrite the broken copies on disk, leaving Codex
permanently warning at session start.
Replace the runtime hook with an install-time linker:
linkCachedPluginAgents() (src/cli/install-codex/link-cached-plugin-agents.ts).
The omo-codex CLI now calls it right after linkCachedPluginBins(). For
each 'components/*/agents/*.toml' in the plugin cache, it:
- Linux / macOS: creates a symlink at ${CODEX_HOME}/agents/<basename>
pointing at the cache TOML. The cache directory is the single source
of truth; removing the cache cleanly breaks the link.
- Windows: copies the file (symlinks require admin or Developer Mode).
- Both platforms: writes a '.installed-agents.json' manifest under the
plugin cache listing the installed absolute paths, so a future
'omo uninstall --platform=codex' can remove them deterministically.
Stale regular-file copies (from the old sync-agents.py) are removed and
replaced on Unix. On Windows the existing copy is overwritten.
Tests (src/cli/install-codex/link-cached-plugin-agents.test.ts):
9 cross-platform tests that mock the 'platform' parameter to exercise
the Linux, macOS, and Windows code paths in a single 'bun test' run,
matching the existing pattern from linkCachedPluginBins. Covers symlink
creation, Windows copy, stale-file replacement, manifest writing,
idempotency, multi-component discovery, and the empty-bundle edge case.
Removed:
- packages/omo-codex/plugin/components/ultrawork/hooks/sync-agents.py
- packages/omo-codex/plugin/test/bundled-agents.test.mjs
(it tested the Python hook; behaviour is now covered by the TS tests)
- SessionStart hook entry in both ultrawork and aggregate hooks.json
- 2 sync-agents tests + 1 manifest assertion in ultrawork-hooks.test.mjs
- 'hooks/sync-agents.py' in ultrawork/package.json files list
- sync-agents.py reference from aggregate.test.mjs component markers
Updated:
- components/ultrawork/README.md, AGENTS.md: describe the install-time
linker as the source of truth, no more SessionStart agent sync.
Verified end-to-end:
bun run src/cli/index.ts install --no-tui --platform=codex
ls -la ~/.codex/agents/ # all 4 TOMLs are symlinks pointing to cache
cat ~/.codex/plugins/cache/.../omo/0.1.0/.installed-agents.json # manifest present
Rewrite # Task Tracking from a single soft paragraph to a strict
update_plan covenant: mandatory for any 2+ step work, exactly one
in_progress, no batched completions, plan closure required, promise
discipline (do not commit to follow-up work you will not finish in
this turn). Pins the {step, status} schema with the pending /
in_progress / completed enum, and adds the explicit failure-mode
verdict that improvising past step 2 without an update_plan call is
itself a defect.
Add # Subagents section documenting that Codex's spawn_agent returns
immediately, runs in parallel, and should be fired 2-5 at a time via
multi_tool_use.parallel for independent investigations. Names the four
bundled roles (explorer / librarian / plan / codex-ultrawork-reviewer),
pins the four-field CONTEXT / GOAL / DOWNSTREAM / REQUEST spawn prompt
template, and instructs the model to call wait_agent sparingly only
when the next critical-path step is strictly blocked.
Compress the three repeated 'omo-codex LSP MCP diagnostics tool
(auto-runs on every edit via the lsp component, but you may also
invoke it explicitly)' phrasings to plain lsp_diagnostics, with the
auto-inject context defined once in # Parallelize aggressively. Saves
about 290 chars and defends the new sections' growth per the
prompt-engineering entropy gate.
The Hephaestus baseline is now 16578 chars; the prior 14627-char
version was already being silently truncated by the per-rule cap.
That truncation is fixed in the companion commit that bypasses the
cap for plugin-bundled rules, so the full discipline now lands on
every Codex session.
The 12000-char per-rule cap exists to guard against absurd user-authored
AGENTS.md files. For PLUGIN_BUNDLED rules the plugin author already
controls the body size, and silent mid-section truncation breaks the
contract that bundled discipline lands in full.
The current bundled Hephaestus baseline is 16k chars: everything from
`# AGENTS.md` onward (Output, Success Criteria, Stop Rules, Task
Tracking) was being dropped from every Codex session without warning.
Skip truncateRule when the source is plugin-bundled; the maxResultChars
budget (40000 default) via truncateBudget still caps total injection.
Locks the behavior with two regression tests in bundled-rules.test.ts:
bundled body > maxRuleChars lands intact, project body > maxRuleChars
still truncates with the standard notice.
The synced Codex skills (refactor, review-work, remove-ai-slops) emit
`spawn_agent(agent_type="explorer"/"librarian"/"plan", ...)` guidance
that sync-skills.mjs injects into every skill containing OpenCode-only
orchestration calls. Only codex-ultrawork-reviewer.toml was bundled, so
Codex had no matching agent role to dispatch.
An older omo-codex release shipped explorer/librarian/plan TOMLs but
without the required top-level `name` field, leaving Codex to warn:
Ignoring malformed agent role definition: agent role file at
~/.codex/agents/<name>.toml must define a non-empty `name`
This commit bundles three correctly-formed TOMLs into
components/ultrawork/agents/. Each has the full schema Codex parses:
`name`, `description`, `nickname_candidates`, `model`,
`model_reasoning_effort`, `service_tier`, `developer_instructions`.
The existing sync-agents.py SessionStart hook installs them via rglob
into CODEX_HOME/agents/.
Models match the original design: explorer + librarian on gpt-5.4-mini
low effort (fast contextual + external research); plan on gpt-5.5
xhigh effort (deep reasoning + interview-style planning).
Tests:
- test/bundled-agents.test.mjs: locks the sync-hook contract by
running sync-agents.py against a temp CODEX_HOME and verifying each
TOML lands with the expected name + schema.
- test/aggregate.test.mjs: locks the schema keys on every bundled
TOML and the spawn_agent contract (every in-scope agent_type
referenced by a synced skill has a matching bundle).
Follow-up: the sync-skills.mjs compatibility table also references
`spawn_agent(agent_type="worker", ...)`. No worker.toml is present
in CODEX_HOME and Codex does not warn about its absence, suggesting
worker is a built-in Codex role. Confirm and ship worker.toml if not.
Promote the four real-usage QA channels (HTTP call, tmux, Browser use, Computer use) into a dedicated top-level `# Manual-QA channels` section in both the Codex ultrawork directive and the ultragoal skill. Each channel ships with the concrete invocation (`curl -i`, `tmux new-session` + `send-keys` + `capture-pane`, Playwright / puppeteer / Chromium, OS-level GUI automation) and the artifact to capture. The Goal section now declares `TESTS ALONE NEVER PROVE DONE` and requires every criterion to build a fresh real-usage scenario and run it through one of the four channels every time. Auxiliary surfaces (CLI stdout / DB diff / parsed config dump) are explicitly demoted: they only satisfy genuinely CLI- or data-shaped criteria, never user-facing behavior.
Bootstrap criterion item 2 and execution step 4 used to repeat the same surface enumeration; they now collapse onto the new channel table (single source of truth, less drift). EXECUTE-AS-SCENARIO in the ultragoal skill follows the same compression. The previous CLEANUP (paired teardown + receipt) + leftover-state stop rule from the prior commit are preserved.
Regression tests in `components/ultrawork/hooks/ultrawork-hooks.test.mjs` pin: the `# Manual-QA channels` heading, all four channel labels (`HTTP call`, `tmux`, `Browser use`, `Computer use`), `TESTS ALONE NEVER PROVE DONE`, `every criterion needs its own real-usage scenario`, and `every time`. README + CHANGELOGs document the restructure and the new size (11,005 chars / 232 lines). All 11 ultrawork hook tests + 7 aggregate tests pass. Installed locally via `runCodexInstaller` into `~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/0.1.0/`; cache hooks emit the new directive end-to-end and the identifier-like `ulw_helper.ts` keyword-boundary check still suppresses.