Skip to content
archived Visibility internal Owner erik@uvilo.com Approver _ Created 2026-07-25 Updated 2026-07-25

Project Automation Plan 12

Scope: Fix three implementation gaps from Plan 11 that the Execute Eval missed: stale Inngest dist, missing Agent Handoff plumbing, and missing Forge Chat routing rules.

Problem: Plan 11’s Eval approved the implementation based on prompt text, but three integration gaps remain:

  1. Stale Inngest distorchestrator/dist/index.js still contains project-runner-daily because the dist was never rebuilt after the source change. Inngest is serving the old function definition.
  2. No Agent Handoff edges — LibreChat Agent Handoffs require edges configuration on the source agent (Forge Chat) pointing to the target agent (Project Runner). Neither agent-sync.ts nor MongoDB has this configured. Without edges, Forge Chat cannot hand off to Project Runner.
  3. No Forge Chat routing — Forge Chat’s prompt has no instructions for when or how to hand off to Project Runner. When the user pastes a project decision (e.g., “Approve all TypeSense_Index research decisions”), Forge Chat doesn’t know it should route to Project Runner via Agent Handoff.

Task 1 — Rebuild orchestrator dist and fix stale schedule references

The source (orchestrator/src/inngest.ts) is correct with project-runner-hourly, but the built dist (orchestrator/dist/index.js) still contains project-runner-daily. Inngest serves whatever is in the dist.

  • Run cd orchestrator && npm run build to rebuild dist/index.js
  • Verify dist/index.js contains project-runner-hourly and not project-runner-daily
  • Fix the stale schedule table in Forge/Forge_Agent_Orchestration.md — the Cron Scheduling section says “Project Runner | Once daily” — change to “Project Runner | Hourly”
  • Commit and push to dev

Task 2 — Configure Agent Handoff edges in agent-sync

LibreChat Agent Handoffs work by configuring edges on the source agent. Each edge defines a target agent ID and optional passthrough content. Forge Chat needs an edge to Project Runner so it can transfer the conversation under the user’s account.

  • Add an edges field to the Forge Chat family definition in orchestrator/src/agent-sync.ts:
    edges: [
      {
        targetAgentId: 'agent_yG6v4v0wfi5EEHQ8htTXH', // Forge Project Runner GLM 5.1 [Master]
        passthrough: 'You are receiving a handoff from Forge Chat. The user has a project-related request that requires your project-aware capabilities. Read the project state and proceed in Interactive Mode.',
      },
    ],
  • Add the edges field to the AgentFamily interface:
    edges?: Array<{ targetAgentId: string; passthrough?: string }>;
  • Update the sync logic in agent-sync.ts to write the edges field to each Forge Chat variant (master→variant sync already includes edges in SYNCED_FIELDS, so variants inherit from the master)
  • Run agent-sync.ts (or verify it runs on next orchestrator startup) to push the edges to MongoDB
  • Verify in MongoDB that the Forge Chat master agent document now has edges pointing to Project Runner

Task 3 — Add project routing rules to Forge Chat prompt

Forge Chat must know when to hand off to Project Runner via Agent Handoff. Without routing rules, it treats project decisions as regular chat and never invokes the handoff mechanism.

  • Add a new section to Forge/Configs/Agents/Forge_Chat_Prompt.md titled “Project Routing” (or similar) with:
    • When to hand off to Project Runner: The user asks to create a project, approve a phase, make a research decision, check project status, or any request that references a specific project by name
    • How to hand off: Use the LibreChat Agent Handoff tool (the handoff or transfer action generated by the edges configuration) to transfer the conversation to the Project Runner agent. The user remains in the same conversation under their own account — they can interact with Project Runner directly
    • What to pass: Include the project name, the user’s decision or request, and a reference to the relevant document (e.g., the Research file, the Eval report)
    • When NOT to hand off: One-off tasks that don’t involve a project lifecycle phase, general questions about the system, file edits that aren’t part of a project plan
  • Keep the section concise (≤150 words) to stay within the Chat context budget (≤1,500 words)

Task 4 — Build, commit, push

All changes from Plan 12 must be built, committed, and pushed.

  • Run the orchestrator build: cd orchestrator && npm run build
  • Run agent-sync: cd orchestrator && npx tsx src/agent-sync.ts
  • Stage all changes, commit with message Project Automation: Plan 12 — Inngest dist rebuild and Agent Handoff plumbing, and push to dev