[Forge] Create task routing — match incoming work to best-suited available agent

← All Specs

[Forge] Create task routing — match incoming work to best-suited available agent

Quest: Agent Ecosystem Priority: P3 Status: done

Goal

Create task routing — match incoming work to best-suited available agent

Context

This task is part of the Agent Ecosystem quest (Forge layer). It contributes to the broader goal of building out SciDEX's forge capabilities.

Acceptance Criteria

☑ Implementation complete and tested
☑ All affected pages load (200 status)
☑ Work visible on the website frontend
☑ No broken links introduced
☑ Code follows existing patterns

Approach

  • Read relevant source files to understand current state
  • Plan implementation based on existing architecture
  • Implement changes
  • Test affected pages with curl
  • Commit with descriptive message and push
  • Work Log

    • 2026-04-20T15:30:00Z — Implemented route_task() function in scidex/senate/agent_registry.py. The function scores agents by: (1) capability overlap with required capabilities (50% weight), (2) reputation score (30% weight), (3) contribution weight (20% weight). Added /api/agents/route endpoint in api.py to expose the routing capability. Also fixed _db() function to remove SQLite-specific PRAGMA statement that caused PostgreSQL errors. Tested function directly — returns ranked agents correctly. Commit: 6d42da41b.
    • 2026-04-20T23:10:00Z — Resolved merge conflict during rebase on origin/main. Kept origin/main version of _db() function (cleaner comments). Verified route_task() still works after rebase — returns ranked agents with correct match scores. Rebased commit: 6b7c8de62.

    Tasks using this spec (1)
    [Forge] Create task routing — match incoming work to best-su
    File: 4d85ed6b8c76_forge_create_task_routing_match_incomin_spec.md
    Modified: 2026-04-25 23:40
    Size: 2.0 KB