{"id":"router-first-architecture","name":"router-first-architecture","summary":"ルーターファーストアーキテクチャ","body":"# Router-First Architecture\n\nRoute through domain routers before using individual tools. Routers abstract tool selection.\n\n## Pattern\n\nDomain routers (like `math-router`) provide deterministic mapping from user intent to exact CLI commands. Always use the router first; only bypass for edge cases.\n\n## DO\n\n- Call `math-router route \"<intent>\"` before any math operation\n- Let domain skills co-activate with their router (via `coActivate` in skill-rules.json)\n- Trust the router's confidence score; only fall back if `command: null`\n- Keep trigger keywords/patterns in skill-rules.json broader than routing patterns\n\n## DON'T\n\n- Call individual scripts directly when a router exists\n- Duplicate routing logic in individual skills\n- Let domain skills bypass their router\n\n## Co-Activation Pattern\n\nDomain skills should co-activate with their router:\n\n```json\n{\n  \"math/abstract-algebra/groups\": {\n    \"coActivate\": [\"math-router\"],\n    \"coActivateMode\": \"always\"\n  }\n}\n```\n\nThis ensures the router is always available when domain knowledge is activated.\n\n## Two-Layer Architecture\n\n1. **Skill-rules trigger layer**: Nudges Claude to use the router (keywords, intent patterns)\n2. **Router routing layer**: Deterministic mapping to scripts via regex patterns\n\nKeep the trigger layer broader than routing - the router should handle \"not found\" gracefully.\n\n## Source Sessions\n\n- 2bbc8d6e: \"Trigger layer was narrower than routing layer\" - expanded triggers\n- This session: Wired 8 domain math skills to co-activate with math-router","author":"@parcadei","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/archive/router-first-architecture","license":"MIT","category":null,"lang":"en","tokens":333,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}