Skip to content

Testing and Proof

Christian Pojoni edited this page May 2, 2026 · 1 revision

Testing and Proof

This page records what has been verified in the repository.

Current verified commit

7cf49a3 feat: add configurable subagent router

Test command

npm test

Verified result:

12 tests
12 pass
0 fail

Covered behavior includes:

  • simple questions route to answer_directly
  • representative prompts route conservatively
  • app-specific routers support custom intent policy
  • app-specific promptClass values validate through the schema
  • createSubagentRouterTool({ router }) uses the supplied router
  • worker execution works with injected runners and tools
  • profile-provided tools and system prompts work
  • invalid maxWorkers values are rejected
  • nullish tool implementations are rejected before workers run
  • TanStack AI tools are created
  • background runs update handle status

Package dry run

npm pack --dry-run

Verified package contents include:

  • dist/
  • README.md
  • LICENSE
  • demo/routing-in-action.cast
  • package.json

Runtime guarantees tested by code

Deterministic routing

The router uses local scoring rules. It does not call a model or provider API.

Bounded fanout

spawn_multiple_specialists enforces worker count limits before execution.

Tool validation

Workers cannot request tools outside the configured registry. Nullish tool implementations are rejected before worker execution.

App-configurable routing

createSubagentRouter(...) lets apps add intent terms, risk terms, parallel terms, area terms, ambiguity policy, and fallback action while preserving the default router behavior.

Not claimed

The package does not claim:

  • automatic LLM fallback inside the router
  • concrete worker tools
  • tracing storage
  • persistence
  • UI rendering
  • official TanStack affiliation

Clone this wiki locally