Skip to content
approved Visibility internal Owner erik@uvilo.com Approver _ Created 2026-06-15 Updated 2026-06-15

Orchestration Plan 6

Scope: Build the Project Runner and Task Runner agents — the two master agents that check project phases and dispatch SRP agents respectively (Spec §6, §7). Both use the master + clone pattern.

Spec: Orchestration Spec

Prior plan: Plan 5


Task 1 — Create Project Runner Agent

The Project Runner (Spec §6) checks active projects periodically. When one project phase is completed, it initiates the next phase or notifies the user. Uses the master + clone pattern with different models.

  1. Create system prompt file: Forge/Agents/PROJECT_RUNNER.md

  2. The Project Runner’s workflow (Spec §6.2):

    • Call list_projects (forge-discovery MCP) to get active projects and their phases
    • For each active project, read the current State file to check for phase completions
    • If a phase is completed: initiate the next phase (create next plan/state documents) OR append a todo item to Forge/Output/Erik_Todo.md if human approval is needed
    • Report summary to user (Suprsend notification or todo item)
  3. Configure the agent in LibreChat Agent Builder:

    FieldMasterClone
    ModelOpenRouter / z-ai/glm-5.1anthropic / claude-sonnet-4-6
    Toolsforge-discovery, uvilo-filesystem, forge-spawnforge-discovery, uvilo-filesystem, forge-spawn
    InstructionsPROJECT_RUNNER.mdPROJECT_RUNNER.md (same)
  4. The master agent is not a router — it executes the project check itself. Clones run in parallel with the same task prompt (Spec §6.1). Their outputs are available for comparison but do not feed back into the master’s execution.

  5. Record agent IDs for both master and clone

Deliverable: Project Runner agent (master + clone) created and callable.


Task 2 — Create Task Runner Agent

The Task Runner (Spec §7) checks for incomplete items on the agent todo list and dispatches the correct SRP agent to execute each task. Same master + clone pattern as Project Runner.

  1. Create system prompt file: Forge/Agents/TASK_RUNNER.md

  2. The Task Runner’s workflow (Spec §7.1):

    • Check Forge/Output/Agent_Todo.md for incomplete items
    • For each incomplete task, determine which SRP agent handles it (based on task type or title pattern matching)
    • Spawn the SRP agent via the Spawn MCP tool (disconnect mode for simple tasks, monitor mode for complex ones)
    • Update todo item state to [ ] 🟨 (convoId: "{conversationId}") Existing todo description here
    • On SRP agent completion (checked via status endpoint), update todo item to completed [x] ✅ or blocked [ ] 🚫 and add a new item to Forge/Output/Erik_Todo.md
  3. Configure the agent in LibreChat Agent Builder:

    FieldMasterClone
    ModelOpenRouter / z-ai/glm-5.1anthropic / claude-sonnet-4-6
    Toolsforge-discovery, uvilo-filesystem, forge-spawnforge-discovery, uvilo-filesystem, forge-spawn
    InstructionsTASK_RUNNER.mdTASK_RUNNER.md (same)
  4. Same tool set and clone pattern as Project Runner. Different instructions focused on task dispatch (Spec §7.2).

  5. Record agent IDs for both master and clone

Deliverable: Task Runner agent (master + clone) created and callable.


Task 3 — Create Agent Todo File

The Task Runner reads Forge/Output/Agent_Todo.md for incomplete items (Spec §7.1). This file needs to exist with the correct format.

  1. Create Forge/Output/Agent_Todo.md with frontmatter and an empty task list:

    ---
    title: "Agent Todo"
    ---
    
    # Agent Todo
    
    <!-- Agent todo items appear here. Format:
    - [ ] ⬜ Task description
    - [ ] 🟨 (convoId: "uuid") Task description
    - [x] ✅ Task description
    - [ ] 🚫 Task description
    -->
  2. Ensure Forge/Output/Erik_Todo.md exists for human-in-the-loop items (used by both Project Runner and Task Runner when they need human approval)

Deliverable: Agent_Todo.md created with proper format.


Task 4 — Test Master Agent Workflows End-to-End

  1. Project Runner test: manually add a completed phase to a test project’s State file, invoke Project Runner via POST /orchestrator/run, verify it detects the completion and either initiates the next phase or adds an Erik_Todo item
  2. Task Runner test: add an incomplete item to Agent_Todo.md, invoke Task Runner, verify it dispatches the correct SRP agent and updates the todo item state
  3. Clone comparison test: invoke both master and clone with the same task, verify both produce results (they don’t need to match — outputs are for comparison)
  4. Error handling test: give Task Runner an item that matches no SRP agent, verify it reports a blocked item rather than crashing

Deliverable: Both master agents verified working end-to-end.