Skip to content

Proposal: add an agent-neutral task routing decision tool #5

Closed

Description

@Garfielk

Motivation

The existing tools can classify items and choose bounded alternatives, but agents still have to assemble the same task-routing questions and policy mapping themselves. A small, typed route decision would let any MCP-compatible agent use Jev for intent, risk, workflow, context, and review gating without coupling the server to Codex, Claude Code, Cursor, OpenCode, or a particular tool name.

Proposed change

Add one jev_route judgment tool that accepts:

  • the task text
  • the host agent capabilities it can actually use
  • optional constraints such as read-only mode or confirmation requirements
  • a caller-defined route catalog, or a documented default catalog

Return a typed, agent-neutral decision containing:

  • intent and workflow
  • risk level
  • required capabilities
  • context policy
  • model tier
  • execution mode
  • whether review or confirmation is required
  • confidence, margin, and an explicit fallback for uncertain decisions

The result must use capability identifiers such as repository.read, repository.edit, command.test, and code.review, rather than client-specific MCP or Skill names. The host agent remains responsible for mapping capabilities to its own tools and enforcing the returned policy.

Deliberate boundaries

  • The server does not read repositories, run commands, invoke other MCP servers, apply changes, or implement an agent loop.
  • Low-confidence or unsupported routes must return an explicit fallback such as ask_user or default_workflow.
  • Existing jev_classify and jev_decide behavior remains unchanged.

Acceptance criteria

  • Add the tool only after agreeing on the input and output contract.
  • Validate typed answers and confidence/margin conservatively; malformed or incomplete answers cannot produce an automatic route.
  • Add offline unit and mock wire tests for high-confidence, low-confidence, missing-capability, and malformed-answer cases.
  • Document examples for multiple MCP-compatible agent hosts and explain that enforcement stays with the host.
  • Keep the implementation small and provider-neutral.

Activity

  1. jkudish commented on Sep 20, 2026

    @jkudish
    Owner

    Thank you for this, both the well-structured issue and the implementation. The instinct is right: routing decisions are exactly the kind of cheap, typed judgment Jev is good at.

    That being said, I'm going to pass on a dedicated jev_route tool. My goal with this package is that it stays as judgment primitives that a host agent composes. Task routing is valid use case, but it's a composition, not a primitive: jev_decide already covers the route choice (your routes as candidates, constraints as priorities, per-route requirement checks like read-only compatibility, and conservative fallbacks when confidence is low), and jev_classify covers the orthogonal axes (intent, risk, model tier).

    What a dedicated tool would add is mainly a default catalog I'd have to own as agents and workflows change. I don't think this policy belongs in this package.

    What I would love to take from this is the recipe itself. I'm adding a task-routing section to the README that shows the two-call composition, using your capability-ID vocabulary (repository.read, command.test, code.review) as the example schema, credited to you. If you'd like to review or extend it, a docs PR would be welcome.

    I'd encourage you to create your own package that builds upon jev-mcp to provide the routing.

    Thanks also for #4/#6; the compatible provider is in review now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions