$ show code-yeongyu/oh-my-openagent
oh-my-openagent (omo) is a massive, actively-developed TypeScript monorepo that ships as a multi-harness AI-agent orchestration plugin. Its production function is to instrument coding-agent runtimes (OpenCode, OpenAI Codex CLI, and adapters for Claude Code and other harnesses) with a rich layer of lifecycle hooks, background agents, multi-model routing, LSP/AST tooling, team-mode parallelism, and a curated prompt system — all installable via a single `bunx oh-my-openagent install` or `npx lazycodex-ai install` command. The architecture is a workspace of 20+ pure-TypeScript core packages (model-core, rules-engine, skills-loader-core, team-core, tmux-core, delegate-core, hashline-core, lsp-core, mcp-client-core, etc.) that are consumed by two main adapter packages: `omo-opencode` (the full-featured OpenCode plugin with 11 agents, 54+ hooks, team mode, ultrawork/ULW loop, background agents, Codegraph MCP, etc.) and `omo-codex` (a lightweight Codex CLI plugin that vendories a subset of components — rules, comment-checker, LSP, git-bash, ultrawork, ulw-loop, telemetry — as isolated Codex components). A large shared-skills layer provides cross-harness SKILL.md files for programming languages, frontend design, ultimate browsing, debugging, and more. The codebase is notable for its aggressive package layering refactor (documented in ROADMAP.md), its strict no-excuse TypeScript policy, extensive automated QA evidence (.omo/evidence/), and its depth of agent-facing features like hash-anchored edits, prompt-async-gate, runtime fallback with model-suggestion retry, and the start-work/ULW-loop goal orchestration systems. With 64K stars, daily commits, 790 open issues, and a sprawling CI matrix, it is one of the most ambitious open-source agent-orchestration projects in maintenance today.
The LLM identified 8 files worth highlighting for reuse:
A pure-TypeScript rule discovery, matching, and injection engine with both static (lifecycle) and dynamic (per-tool-use) paths. It scans project and user rule directories, matches rules by glob proximity and content-hash dedup, truncates oversized rules with budget awareness, and supports plugin-bundled rule sources. The engine is fully harness-agnostic and is consumed by both the OpenCode and Codex adapters to inject AGENTS.md / .omo/rules context into agent sessions.
A dependency-injected model resolution pipeline that normalizes model strings, matches agent/category requirements, applies per-provider ID transforms, and builds typed fallback chains from mixed plain-string/object config entries. It cleanly separates resolution policy from harness specifics, making it reusable across OpenCode, Codex, and future adapters.
An async skill loader that discovers, deduplicates, and merges skill definitions from six scoped sources (builtin, shared, config, user, opencode, project) with deterministic scope-priority ordering. It supports per-skill MCP server config, allowed-tools parsing, and on-demand skill MCP lifecycle management — a reusable foundation for any harness that needs layered skill composition.
A reservation-based message transport for multi-agent team mode that enforces payload size limits, per-recipient backpressure, and exactly-once delivery semantics with reserve/commit/release lifecycle. It is a clean, reusable primitive for any multi-agent system needing reliable, bounded inter-agent messaging.
A sophisticated delegate-task tool that routes work to subagents by category (deep, quick, visual-engineering, ultrabrain) with per-agent model resolution, background/sync execution modes, skill filtering, and configurable retry logic. It demonstrates non-obvious orchestration patterns: category-to-model mapping, system-content assembly, and background-task description redaction.
A prompt-async gate that mediates async dispatch of prompt tool calls with a reservation-based lifecycle, post-dispatch hold windows to absorb late-arriving errors, semantic deduplication of in-flight prompts, and timeout enforcement via Promise.race. It solves a real race-window problem documented in the project's RFC and is a genuinely non-obvious concurrency primitive.
A BackgroundManager that orchestrates parallel subagent sessions with parent-wake-on-new-output semantics, activity-window tracking, stale-timeout cleanup, fallback-retry providers, and circuit-breaking. It is one of the most complex and well-tested files in the repo, demonstrating production-grade async session management with bounded concurrency and graceful shutdown.
Implements hash-anchored edits where every line is tagged with a content hash (LINE#ID) so the agent can reference stable line identifiers instead of reproducing whitespace. The edit operations validate hashes before applying changes, preventing stale-line corruption. This is a novel solution to the 'harness problem' and is reusable in any agent runtime that does file editing.