Router first architecture

From vibeeval/vibecosystem · View interactive version

Router first architecture is an AI agent skill from the GitHub repository vibeeval/vibecosystem. Router-First Architecture

How to use this skill

Skill file

Router-First Architecture

Route through domain routers before using individual tools. Routers abstract tool selection.

Pattern

Domain routers (like math-router) provide deterministic mapping from user intent to exact CLI commands. Always use the router first; only bypass for edge cases.

DO

DON'T

Co-Activation Pattern

Domain skills should co-activate with their router:

{
  "math/abstract-algebra/groups": {
    "coActivate": ["math-router"],
    "coActivateMode": "always"
  }
}

This ensures the router is always available when domain knowledge is activated.

Two-Layer Architecture

  1. Skill-rules trigger layer: Nudges Claude to use the router (keywords, intent patterns)
  2. Router routing layer: Deterministic mapping to scripts via regex patterns

Keep the trigger layer broader than routing - the router should handle "not found" gracefully.

Source Sessions

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.