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:
- Stale Inngest dist —
orchestrator/dist/index.jsstill containsproject-runner-dailybecause the dist was never rebuilt after the source change. Inngest is serving the old function definition. - No Agent Handoff edges — LibreChat Agent Handoffs require
edgesconfiguration on the source agent (Forge Chat) pointing to the target agent (Project Runner). Neitheragent-sync.tsnor MongoDB has this configured. Without edges, Forge Chat cannot hand off to Project Runner. - 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 withproject-runner-hourly, but the built dist (orchestrator/dist/index.js) still containsproject-runner-daily. Inngest serves whatever is in the dist.
- Run
cd orchestrator && npm run buildto rebuilddist/index.js - Verify
dist/index.jscontainsproject-runner-hourlyand notproject-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
edgeson 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
edgesfield to the Forge Chat family definition inorchestrator/src/agent-sync.ts: - Add the
edgesfield to theAgentFamilyinterface: - Update the sync logic in
agent-sync.tsto write theedgesfield to each Forge Chat variant (master→variant sync already includesedgesinSYNCED_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
edgespointing 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.mdtitled “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
handoffortransferaction 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 todev