# omp-orchestrator **Repository Path**: polarzone/omp-orchestrator ## Basic Information - **Project Name**: omp-orchestrator - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-23 - **Last Updated**: 2026-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @sfsajid91/omp-orchestrator > Multi-agent subagent orchestration for [Oh My Pi (OMP)](https://github.com/can1357/oh-my-pi) using [Herdr](https://herdr.dev) terminal workspaces. `@sfsajid91/omp-orchestrator` is a hybrid **OMP Plugin** and **Agent Skill** that enables an orchestrating AI agent to decompose tasks and delegate them to isolated OMP worker subagents running across dedicated Herdr workspace tabs. --- ## Why Herdr + OMP Orchestration? - **Zero Context Pollution**: Worker reasoning traces, tool executions, and terminal logs stay completely contained in the child tab. The parent orchestrator receives only the concise final answer. - **Dynamic Model Allocation**: Automatically route tasks to the best-fit model lane (e.g. Gemini 3.7 Flash for fast search, Claude 3.7 Sonnet for complex refactoring, o3-mini for reasoning). - **Human-in-the-Loop Transparency**: Worker tabs remain open and live in Herdr for visual inspection, manual stepping, or interactive continuation. - **Hybrid Architecture**: Use native typed tools (`herdr_spawn`) and slash commands (`/herdr:lanes`) when running as an OMP extension, with zero-dependency bash fallbacks (`bin/herdr-worker`) for other harnesses. ```mermaid graph TD A[Orchestrator Agent] -->|Decomposes Task| B[Semantic Lane Classifier] B -->|Selects Model & Thinking| C[OMP Role Resolver] C -->|Invokes herdr_spawn / herdr-worker| D[Herdr Workspace API] D -->|Creates Tab & Starts Process| E[Dedicated Herdr Tab] E -->|Runs Isolated Subagent| F[OMP Worker Session] F -->|Returns Enveloped Result| G[Result Parser] G -->|Injects Clean Answer| A ``` --- ## Model Routing Lanes Lanes map task difficulty and shape to configured OMP `modelRoles` and thinking levels: | Lane | OMP Role | Default Thinking | Best For | |---|---|---|---| | `tiny` | `tiny` | `low` | Single facts, git branch/status checks, version lookups | | `fast` | `smol` | `low` | Bounded code discovery, locating files, fast summarization | | `standard` | `task` | `medium` | Normal feature implementation, bug fixes, local tests | | `hard` | `slow` | `high` | Ambiguous bugs, race conditions, architecture, risky refactors | | `plan` | `plan` | `high` | Architecture proposals, technical implementation plans | | `vision` | `vision` | `medium` | Screenshots, UI layout inspections, OCR | | `review` | `advisor` | `high` | Independent code audits, adversarial diff reviews | | `design` | `designer` | `medium` | UI/UX design systems and styling | | `commit` | `commit` | `low` | Commit messages and changelog summaries | --- ## Installation ### 1. Install as an OMP Plugin (Recommended) ```bash omp plugin install @sfsajid91/omp-orchestrator ``` Or link locally during development: ```bash omp plugin link . ``` ### 2. Standalone Agent Skill Place the skill into your project or user skills directory: ```bash # Project-level mkdir -p .agents/skills cp -r skills/herdr-orchestrator .agents/skills/ # Or User-level cp -r skills/herdr-orchestrator ~/.omp/skills/ ``` --- ## OMP Extension Features ### Tools - **`herdr_spawn`**: Spawns an isolated OMP worker in a dedicated Herdr tab. - Parameters: - `prompt` (*string, required*): The task prompt for the worker. - `title` (*string, optional*): Descriptive 2-5 word tab title. - `lane` (*string, optional*): Routing lane (`tiny`, `fast`, `standard`, `hard`, `plan`, `vision`, `review`, `design`, `commit`). - `model` (*string, optional*): Exact model override. - `thinking` (*string, optional*): Thinking level (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`). - `timeout` (*number, optional*): Execution timeout in ms (default: `300000`). - `close` (*boolean, optional*): Close tab upon completion. Set `true` for one-shot work; default is `false`. - `raw` (*boolean, optional*): Return raw terminal output without `` extraction. - **`herdr_list_lanes`**: Lists all configured model lanes and their resolved OMP models. - **`herdr_list_workers`**: Lists all active tabs and workers in the current Herdr workspace. - **`herdr_close_worker`**: Closes a worker tab by ID. Use it to clean up a completed tab when `close` was omitted. Close one-shot workers after consuming their result. Keep tabs open only for explicit inspection, debugging, or continuation. The equivalent Herdr CLI cleanup command is: ```bash herdr tab close ``` ### Slash Commands - `/herdr:lanes`: Print available model routing lanes and resolved models. - `/herdr:workers`: List open worker tabs in the current Herdr workspace. ### Status Bar Indicator When running inside Herdr (`HERDR_ENV=1`), the plugin displays a live indicator in the OMP status bar: - `○ ◫ herdr: ready` (idle) - `● ◫ herdr: 2 working` (active worker subagents) --- ## Standalone CLI Usage The repository includes standalone shell utilities in `bin/`: ```bash # Spawn disposable workers; omit `--close` only when retaining the tab is intentional bin/herdr-worker --lane fast --title "locate auth flow" --close "Find where auth middleware is defined." bin/herdr-worker --lane hard --title "debug queue race" --close "Find the root cause of intermittent duplicates." # Inspect model routes bin/omp-models route hard bin/omp-models lanes ``` --- ## Development & Testing Built with [Bun](https://bun.sh). ```bash # Install dependencies bun install # Run unit tests (13 tests across models, routing, envelope parsing) bun test # Build compiled bundle bun run build # Verify OMP plugin health omp plugin doctor ``` --- ## Orchestration Best Practices 1. **Semantic Delegation over Mechanical Spawning**: - Delegate when fresh context, specialized capability, or independent verification is valuable. - Do not delegate trivial 1-line edits that the orchestrator can perform immediately. 2. **Escalate with Fresh Context**: - If a `fast` worker locates code but identifies deep concurrency issues, escalate to a fresh `hard` worker rather than bloating the first worker's context. 3. **Parallel Fan-out**: - Fan out independent subtasks in parallel (e.g. backend investigation, frontend inspection, test review). - Avoid having multiple concurrent workers modify the same files simultaneously until worktree isolation is added. 4. **Adversarial Verification**: - For high-risk changes, spawn an independent `review` worker rather than asking the implementing worker to review its own changes. --- ## License MIT © sfsajid91