agentleFS
Gzyms69Gzyms69/agent-setup-bundle/skills/skill-master-orchestrator/SKILL.md

skill-master-orchestrator

Skill0 starsChanged 3 months agoMITView on GitHub

Master agent orchestration, multi-agent swarm coordination, Task DAG (Directed Acyclic Graph) decomposition, subagent model economy routing, barrier synchronization, and error boundary management. MUST ACTIVATE for multi-agent workflows, complex parallel research/refactoring, or demanding multi-step sessions requiring subagent coordination.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT activate for:

    line 22
  2. Distinctive:

    Never spawn subagents haphazardly.

    line 30
  3. Distinctive:

    When a subagent produces a complete, high-fidelity report or artifact (e.g.

    line 115
  4. Distinctive:

    Do not distort exact error codes, file paths, or line numbers through lossy re-phrasing.

    line 116
  5. Distinctive:

    Error Boundaries: If a subagent encounters a fatal error, contain the failure at the Master level.

    line 124

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Master Orchestrator Skill

This skill defines the operational standards for orchestrating multi-agent systems, decomposing complex workflows into Directed Acyclic Graphs (DAGs), enforcing subagent context isolation, and preventing coordination overhead.

The primary purpose of subagents is context isolation and token budgeting, not organizational role-play.


When to Activate

Activate this skill when:

  • Tasks naturally decompose into independent parallel subtasks (e.g., parallel file audits, multiple search queries).
  • A single task touches multiple disjoint subsystems where isolated contexts prevent cognitive pollution.
  • Running long-horizon refactors requiring strict division between exploration, implementation, and QA.
  • Coordinating roju subagents via invoke_subagent and send_message.

Do NOT activate for:

  • Simple sequential tasks requiring fewer than 3 tool calls (do them inline).
  • Routine single-file edits.

1. Task DAG (Directed Acyclic Graph) Decomposition

Never spawn subagents haphazardly. Model workflows as a deterministic DAG of parallel and sequential stages:

graph TD
    UserQuery[User Objective] --> Master[Master Agent / Orchestrator]
    
    subgraph Parallel_Stage_1 ["Stage 1: Exploration (Concurrent / flash)"]
        A1[Subagent A: API Research]
        A2[Subagent B: DB Schema Audit]
        A3[Subagent C: Frontend Analysis]
    end
    
    Master --> A1
    Master --> A2
    Master --> A3
    
    A1 --> Barrier[Synchronization Barrier / Contract Validation]
    A2 --> Barrier
    A3 --> Barrier
    
    subgraph Sequential_Stage_2 ["Stage 2: Implementation (Gated / pro)"]
        Barrier --> Master_Plan[Master Synthesis & Plan Approval]
        Master_Plan --> Imp[Subagent D: Core Engine Refactor]
    end
    
    subgraph Stage_3 ["Stage 3: Verification (flash_lite / inline)"]
        Imp --> QA[QA & 5-Axis Verification Gate]
    end

DAG Rules:

  1. Parallel Branches: Spawn concurrent subagents ONLY for tasks with zero data dependencies between them.
  2. Synchronization Barriers: Whenever a downstream step depends on upstream outputs, the Master Agent MUST pause, validate all incoming contracts, and synthesize the consolidated state before launching the next phase.

2. Subagent Model Routing & The Two-Tier Cognitive Architecture

Strictly enforce the 3-Vector Execution Matrix defined in rules/subagent-economy.md:

Task CategoryExecution Vector & Model TierRationale
Complex Domain & ArchitectureGemini Inline (inherit / pro)Tier-1 Brain for deep reasoning, subtle invariants, and safety-critical logic.
Bulk Scaffolding & TDD Testschinese-worker (FastMCP / Aider)Tier-2 Zero-Cost ($0.00) factory in sandboxed Git Worktrees (minimax-m3, nemotron-lightning).
Cartography & Directory Auditsinvoke_subagent (research / flash_lite)Rapid, cheap directory traversal and SKILL.md reading without context pollution.
Parallel Docs & API Researchinvoke_subagent (research / flash)High-throughput factual retrieval and error triage across independent domains.
Isolated Subsystem Workinvoke_subagent (self / inherit)Direct Injection Proxy for branch-isolated feature engineering.

3. Subagent Direct Injection Proxy & Contract Template

Direct Injection Proxy Method

Antigravity pre-registers self (inheriting system prompt) and research (read-only research agent). To spawn specialized worker profiles (e.g. SecurityAuditor, FrontendSpecialist, DBOptimizer), call invoke_subagent with TypeName: self and inject the specialized system role and constraints directly into the task contract:

### Task Delegation Contract: [Task Name]

#### Role Injection:
You are operating as a specialized [Domain Role, e.g. Frontend Performance Architect]. Apply rules from [~/.agents/skills/skill-name/SKILL.md].

#### 1. Objective
[Unambiguous statement of the specific problem to solve]

#### 2. Scope & Constraints
- Target Files: `[list of absolute paths]`
- Allowed Operations: `[Read-Only | Create | Modify]`
- Model Tier: `[flash_lite | flash | pro | inherit]`
- Workspace Mode: `[inherit | share | branch]`

#### 3. Expected Output Schema (Zero Context Bleed)
Return your final output in this exact markdown shape:
- Status: `[SUCCESS | FAILED | BLOCKED]`
- Summary: `[3-5 bullet points of findings/changes]`
- Artifacts: `[Full paths of created/modified files]`
- Blocker/Risks: `[Any discovered edge cases or none]`

4. Prevention of the "Telephone Game"

Supervisor architectures often lose 30-50% fidelity when intermediate agents summarize specialist outputs repeatedly.

Direct Synthesis Protocol:

  1. When a subagent produces a complete, high-fidelity report or artifact (e.g. an exhaustive research document or test log), the Master Agent should present or link the artifact directly to the user.
  2. Do not distort exact error codes, file paths, or line numbers through lossy re-phrasing.

5. Watchdog & Deadlock Prevention

  1. No Polling Loops: Antigravity reactive wakeups trigger automatically when subagents complete or send messages. Never write sleep/polling loops.
  2. Lifecycle Termination: Immediately terminate subagents that have completed their turn using manage_subagents kill to free runtime resources.
  3. Error Boundaries: If a subagent encounters a fatal error, contain the failure at the Master level. Do not let one subagent failure crash sibling tasks.

6. Anti-Rationalization Table

Agent ExcuseBLOCKED Rebuttal
"I will spawn 8 subagents to check every folder."BLOCKED: Violates the concurrency limit (max 3) and causes massive token explosion. Batch inspections.
"I'll use pro model for all subagents to ensure quality."BLOCKED: Violates Subagent Economy. Use flash_lite for reads and flash for research.
"I'll let subagents modify the same root files concurrently."BLOCKED: Causes dirty write conflicts. Use workspace isolation and sequential barriers.

7. Verification Gates

  • Is the multi-agent workflow organized into a clear DAG with synchronization barriers?
  • Are all subagents assigned the cheapest adequate model tier?
  • Are subagent prompts structured with the 3-section Task Contract?
  • Are completed subagents terminated promptly with manage_subagents kill?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.