open-multi-agent/tests
EchoOfZion cfbbd24601 feat: skip coordinator for simple goals in runTeam()
When a goal is short (<200 chars) and contains no multi-step or
coordination signals, runTeam() now dispatches directly to the
best-matching agent — skipping the coordinator decomposition and
synthesis round-trips. This saves ~2 LLM calls worth of tokens
and latency for genuinely simple goals.

Complexity detection uses regex patterns for sequencing markers
(first...then, step N, numbered lists), coordination language
(collaborate, coordinate, work together), parallel execution
signals, and multi-deliverable patterns.

Agent selection reuses the same keyword-affinity scoring as the
capability-match scheduler strategy to pick the most relevant
agent from the team roster.

- Add isSimpleGoal() and selectBestAgent() (exported for testing)
- Add 35 unit tests covering heuristic edge cases and integration
- Update existing runTeam tests to use complex goals

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-07 21:21:36 +09:00
..
e2e test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
helpers test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
abort-signal.test.ts fix: correct Team constructor usage in abort-signal tests 2026-04-06 12:54:24 +08:00
agent-hooks.test.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00
agent-pool.test.ts fix: add per-agent mutex to prevent concurrent runs on same Agent instance (#72) 2026-04-07 03:42:24 +08:00
anthropic-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
approval.test.ts feat(orchestrator): add onApproval callback for human-in-the-loop (#32) 2026-04-05 02:46:20 +08:00
built-in-tools.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
copilot-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
gemini-adapter-contract.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
gemini-adapter.test.ts chore: support Node >=18, add optional @google/genai peer dependency and API key fallback 2026-04-04 22:12:28 +03:00
grok-adapter.test.ts feat(llm): add first-class Grok (xAI) support with dedicated GrokAdapter (#44) 2026-04-04 18:20:55 +08:00
llm-adapters.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
loop-detection.test.ts feat(agent): smart loop detection for stuck agents (#49) 2026-04-05 13:01:53 +08:00
openai-adapter.test.ts test: add LLM adapter contract tests, improve coverage from 71% to 88% (#56) 2026-04-05 14:14:43 +08:00
openai-fallback.test.ts feat(llm): add fallback tool-call extraction for local models (#15) 2026-04-05 11:49:10 +08:00
orchestrator.test.ts feat: skip coordinator for simple goals in runTeam() 2026-04-07 21:21:36 +09:00
scheduler.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
semaphore.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
shared-memory.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
short-circuit.test.ts feat: skip coordinator for simple goals in runTeam() 2026-04-07 21:21:36 +09:00
structured-output.test.ts feat: add optional outputSchema (Zod) for structured agent output (#36) 2026-04-03 13:45:47 +08:00
task-queue.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
task-retry.test.ts feat: task-level retry with exponential backoff (#37) 2026-04-03 14:08:36 +08:00
task-utils.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
team-messaging.test.ts test: improve coverage from 37% to 71% (#41) (#53) 2026-04-05 13:37:00 +08:00
text-tool-extractor.test.ts feat(llm): add fallback tool-call extraction for local models (#15) 2026-04-05 11:49:10 +08:00
token-budget.test.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00
tool-executor.test.ts chore: add tests, CI, contributing guide, and PR template 2026-04-02 23:43:54 +08:00
trace.test.ts feat: implement token budget management in agent and orchestrator (#71) 2026-04-06 23:14:08 +08:00