Diverter
GML-MMGroup · GML-MMGroup/Diverter
Chuyển các tác vụ đến các tác nhân AI chuyên biệt và quản lý công việc độc lập của chúng trong các phiên Codex, cho phép tác vụ chính tiếp tục mà không bị gián đoạn.
Diverter chắt lọc chiến lược ủy quyền của Ultra vào các phiên Codex không phải Ultra: gọi đúng chuyên gia khi công việc có thể chia nhỏ, giữ cho luồng chính tiếp tục và để các tác vụ đơn giản vẫn đơn giản. Ủy quyền lấy cảm hứng từ Ultra mà không cần Ultra.
Xem trước
Bạn có thể làm gì với nó
- Tự động giao các tác vụ nghiên cứu hoặc kiểm thử cho các tác nhân chuyên biệt trong khi quá trình phát triển chính vẫn tiếp tục.
- Tích hợp ủy quyền kiểu Ultra và định tuyến chuyên gia vào các phiên Codex không phải Ultra.
- Cải thiện hiệu quả bằng cách cho phép các tác nhân xử lý các công việc độc lập cùng lúc.
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Diverter
English | 简体中文
You turn on Ultra for a complex task—then research, testing, and other independent work start consuming the same premium capacity. Does every step really need Ultra?
💡 Why Diverter
⚡ Diverter distills Ultra's delegation strategy into non-Ultra Codex sessions: call the right specialist when work can split, keep the main thread moving, and let simple tasks stay simple.
- Ultra-inspired delegation without Ultra. Bring task splitting, specialist routing, and result integration to non-Ultra Codex sessions.
- No manual agent choreography. Diverter decides when specialist help is useful and which role fits.
- Keep the main thread moving. Specialists handle independent work while simple tasks stay simple.
✨ See Diverter in action
A release audit splits across specialists, then returns through the same guardrails.
🚀 Quick Start
Diverter requires Codex CLI 0.145.0 or later for native subagents and Root-only turn hooks.
-
Tell Codex:
Fetch and follow instructions from https://raw.githubusercontent.com/GML-MMGroup/Diverter/refs/heads/main/.codex/INSTALL.md -
After installation, open
/hooks, review and trust Diverter'sSessionStartandUserPromptSubmitHooks, then start or reopen a task. -
During installation, choose
auto(recommended) for proactive dispatch oraskfor approval-first dispatch. Inspect or change the user-level policy with:$diverter-mode status $diverter-mode auto $diverter-mode ask
🎯 How Diverter helps
Diverter looks for work that benefits from a specialist, then keeps the main task moving while that specialist handles an independent deliverable.
- Your selected skill keeps control of its workflow and gets focused help only when it adds value.
- Clear write boundaries keep independent changes moving and serialize overlapping work.
- The main thread checks and integrates specialist results into one coherent answer.
When Codex already owns native proactive delegation, Diverter silently steps aside. See OpenAI's subagent documentation.
Verified with 60+ automated tests and real native subagent lifecycle runs.
🧭 Choose your delegation policy
Policy
Behavior
<code>ask</code>
Proposes one lineup and waits for approval before dispatching
<code>auto</code>
Announces one lineup and dispatches it immediately for any Work Mode
Policy changes apply at the next SessionStart; restarting or reopening the task is the predictable way to apply one. auto changes dispatch authorization, not Codex permissions, sandboxing, or handoff write boundaries.
🎭 Roles
Diverter includes ten Bundled Subagents. The installer offers the recommended set (code-mapper, docs-researcher, reviewer, security-auditor, test-engineer, and test-automator), all roles, or a custom selection.
| Role | GPT-5.6 model | Reasoning effort | What it does |
|---|---|---|---|
code-mapper | gpt-5.6-terra | high | Traces code paths, symbols, and ownership boundaries |
search-specialist | gpt-5.6-luna | medium | Gathers focused repository or external evidence |
docs-researcher | gpt-5.6-luna | high | Verifies official APIs, versions, and guarantees |
knowledge-synthesizer | gpt-5.6-luna | high | Reconciles long or conflicting findings |
task-distributor | gpt-5.6-sol | medium | Splits broad goals into bounded work packages |
reviewer | gpt-5.6-sol | medium | Reviews correctness, regressions, and maintainability |
security-auditor | gpt-5.6-sol | high | Audits trust boundaries, secrets, and agent-tool safety |
test-engineer | gpt-5.6-luna | xhigh | Designs minimal test coverage for behavior and risk |
test-automator | gpt-5.6-terra | xhigh | Adds bounded regression tests after behavior is clear |
web-performance-auditor | gpt-5.6-luna | xhigh | Audits Web performance evidence and Core Web Vitals risks |
Diverter selects capabilities first, then maps them to the native roles installed in your Codex environment. Custom role sets can adapt role-lineups.md.
🔄 Work Modes
| Work Mode | Boundary |
|---|---|
read-only | Inspect and report; never write files |
mixed | Investigate first, then perform bounded writes with explicit artifact ownership |
write-capable | Edit only within the explicit handoff and sandbox |
Diverter always names one Work Mode before dispatch.
⚙️ How It Works
- The
SessionStartHook loads the user-level Delegation Policy and full Session Contract, restoring both after compaction. - Before each Root turn,
UserPromptSubmitadds one short Turn Reminder; child turns are filtered deterministically throughagent_idand receive no reminder. - Preflight privately evaluates strong positive task-shape signals, clear exclusions, and read-heavy versus write-heavy tie-breakers. Every
ROOT_ONLYdecision stays silent; eligible work loads Diverter before task work and uses its policy-specific dispatch message as the receipt. - Diverter selects the bounded Child Contribution, Smallest Sufficient Lineup, and Work Mode. Read-heavy exploration, code-plus-docs verification, independent evidence, specialist review, and Root Context Preservation lean toward delegation without requiring a separate concurrent Root deliverable. When another active skill requires a subagent, Diverter absorbs that child task as one required, deduplicated route while the focused skill keeps its core workflow.
askwaits for approval;autoannounces and dispatches immediately. - Root may continue useful work or wait for a needed Child result, while every child remains a leaf. Root then judges, proportionally verifies, integrates, and returns the