Orchestration Plan 7
Scope: Integrate Inngest for cron scheduling and wire up the full orchestration loop — scheduled Project Runner and Task Runner runs, on-demand triggering, and the complete trigger → discover → invoke → monitor → handle failure pipeline (Spec §10).
Spec: Orchestration Spec
Prior plan: Plan 6
Task 1 — Set Up Inngest Project and Schedules
Inngest handles scheduling — it POSTs to the orchestrator’s HTTP endpoint on each schedule (Spec §10.1). The orchestrator does not need its own cron engine.
- Create an Inngest project (or use existing Uvilo workspace)
- Define scheduled functions (Spec §10.1):
Job Schedule Agent Description Project Runner Once daily project_runner Check active project phases Task Runner Hourly task_runner Check for new agent todo items Memory Compaction Once daily (future) Run memory compaction agent Infrastructure Check Monthly (future) Check infrastructure configuration - Each Inngest function POSTs to
POST /orchestrator/runwith the appropriateagent_idandtask_prompt - For the initial implementation, only configure Project Runner (daily) and Task Runner (hourly). The other two are future placeholders.
Deliverable: Inngest project with scheduled functions for Project Runner and Task Runner.
Task 2 — Update Dispatcher to Handle Scheduled Triggers
The orchestrator reuses
POST /orchestrator/runfor both scheduled and on-demand invocations (Spec §10.2).
- Extend the dispatcher to accept Inngest’s POST format:
- Inngest sends a POST with event data including the schedule name and payload
- Map the schedule to the appropriate agent_id and task_prompt
- Add a schedule-to-agent mapping configuration:
- Verify that the same
POST /orchestrator/runendpoint works for both Inngest triggers and manual invocations
Deliverable: Dispatcher handles both scheduled and on-demand triggers.
Task 3 — End-to-End Scheduled Orchestration Test
- Trigger the Project Runner schedule manually (Inngest supports manual triggers via dashboard or API)
- Verify the full pipeline: Inngest → POST /orchestrator/run → invoke Project Runner → agent checks projects → creates todo items or initiates phases
- Trigger the Task Runner schedule manually
- Verify: Task Runner reads Agent_Todo.md → dispatches SRP agent → SRP agent completes → todo item updated
- Let one natural cycle run (wait for the hourly Task Runner trigger) and verify it fires correctly
- Check Postgres: verify AgentJob records are created and updated correctly for scheduled runs
Deliverable: Full scheduled orchestration loop verified end-to-end.