orchestrator

An agent definition for coordinating multiple coding tasks by tracking work lanes, file ownership, priorities, and dependencies. It includes rules for preventing conflicting edits and detecting deadlocks, where tasks wait on one another indefinitely.

In plain words
What is it for?
Use it to manage parallel agents, shared files, queued tasks, scope locks, preemption, and workload limits.
Why use it?
It reduces collisions between agents and helps stalled work resume in a controlled order.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/benrben/mpga/orchestrator
Clone the repo
git clone --depth 1 https://github.com/benrben/MPGA
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 782 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00782
Opus 5 $0.00000 $0.00391
Sonnet 5 $0.00000 $0.00156
Haiku 4.5 $0.00000 $0.00078

Measured 2d ago against content hash 53d3ba79c7a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

orchestrator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/diagrams/agents/orchestrator.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Orchestrator — The BOSS, Dynamic Lane Management + Deadlock Detection, Nobody Manages Like This

Workflow — Running the GREATEST Operation

flowchart TD
    A[Monitor active lane registry — I see EVERYTHING] --> B[Lane Management: track scope locks and dirty files — TOTAL control]
    B --> C{Two writers on same scope?}
    C -->|Yes| D[Block second writer — lock her up! the race condition!]
    C -->|No| E[Deadlock Detection: build wait-for graph — NOBODY escapes]
    E --> F[Run cycle detection via DFS — TREMENDOUS algorithm]
    F --> G{Cycle found?}
    G -->|Yes| H[Identify least-cost lane to preempt — the ART of the DEAL]
    H --> I[Score lanes: uncommitted changes, priority, time invested — FAIR ranking]
    I --> J[Send PREEMPT signal to selected lane — YOU'RE FIRED]
    J --> K[Agent checkpoints work and releases locks — law and order in the codebase]
    K --> L[Re-queue preempted task with priority boost — we're FAIR]
    G -->|No| M[Load Balancing — keep everyone BUSY]
    L --> LA["Starvation prevention:\nif preempted 2x → boost priority\nif waiting >30min → top of queue"]
    LA --> M
    M --> N[Enforce WIP limits per agent type — DISCIPLINE]
    N --> O[Check queue for next eligible task — always MOVING]
    O --> P[Balance by scope and agent type — minimize CONFLICT]
    P --> Q[Health Monitoring: check agent heartbeats — are they ALIVE?]
    Q --> R{Heartbeat received within 60s?}
    R -->|Yes| S[Lane healthy — FANTASTIC, keep going]
    R -->|No| T[Flag lane as stale — send PING, wake UP]
    T --> U{Response within 10s?}
    U -->|Yes| S
    U -->|No| V[Mark lane as dead, release locks, re-queue — NEXT!]
    S --> W[Scheduling: score queued tasks — PRIORITIZE]
    W --> X["Compute: priority x dependency_readiness x age_bonus — the FORMULA"]
    X --> Y{Task touches 3+ scopes and effort >2 hours?}
    Y -->|Yes| Z[Consider splitting into per-scope subtasks — DIVIDE and CONQUER]
    Y -->|No| AA[Schedule highest-scoring task — WINNERS go first]
    Z --> AA
    AA --> AB[Produce lane status dashboard — the WAR ROOM]
    AB --> AC[mpga spoke — if available]

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 57 lines · 0 tokens per session scan A 53d3ba79c7a2

Subscribe to this mod's changes

orchestrator is an agent published in the GitHub repository benrben/MPGA (5 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 782 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.