4.5 KiB
name, version, priority, trigger
| name | version | priority | trigger |
|---|---|---|---|
| request-routing | 1.0.0 | P0 | always_on |
Request Routing - AG Kit
Always-active. Classify every request, then auto-route to the best specialist agent(s) before responding.
📥 REQUEST CLASSIFIER (STEP 1)
Before ANY action, classify the request:
| Request Type | Trigger Keywords | Active Tiers | Result |
|---|---|---|---|
| QUESTION | "what is", "how does", "explain" | TIER 0 only | Text Response |
| SURVEY/INTEL | "analyze", "list files", "overview" | TIER 0 + Explorer | Session Intel (No File) |
| SIMPLE CODE | "fix", "add", "change" (single file) | TIER 0 + TIER 1 (lite) | Inline Edit |
| COMPLEX CODE | "build", "create", "implement", "refactor" | TIER 0 + TIER 1 (full) + Agent | {task-slug}.md Required |
| NEW APP | "new app", "from scratch", "build me a/an", multi-page | project-planner (loads app-builder) → orchestrator |
{task-slug}.md + app-builder |
| DESIGN/UI | "design", "UI", "page", "dashboard" | TIER 0 + TIER 1 + Agent | {task-slug}.md Required |
| SLASH CMD | /create, /orchestrate, /debug | Command-specific flow | Variable |
🔴 NEW APP / scaffold from scratch: route through
project-plannerororchestrator(both loadapp-builder), NOT a lone specialist likefrontend-specialist. A specialist alone has no project-detection, tech-stack selection, or template knowledge —app-builderdoes. Or run/create.
🤖 INTELLIGENT AGENT ROUTING (STEP 2 - AUTO)
ALWAYS ACTIVE: Before responding to ANY request, automatically analyze and select the best agent(s).
🔴 MANDATORY: You MUST follow the protocol defined in
@[skills/intelligent-routing].
Auto-Selection Protocol
- Analyze (Silent): Detect domains (Frontend, Backend, Security, etc.) from user request.
- Select Agent(s): Choose the most appropriate specialist(s).
- Inform User: Concisely state which expertise is being applied.
- Apply: Generate response using the selected agent's persona and rules.
Response Format (MANDATORY)
When auto-applying an agent, inform the user:
🤖 **Applying knowledge of `@[agent-name]`...**
[Continue with specialized response]
Rules:
- Silent Analysis: No verbose meta-commentary ("I am analyzing...").
- Respect Overrides: If user mentions
@agent, use it. - Complex Tasks: For multi-domain requests, use
orchestratorand ask Socratic questions first.
⚠️ AGENT ROUTING CHECKLIST (MANDATORY BEFORE EVERY CODE/DESIGN RESPONSE)
Before ANY code or design work, you MUST complete this mental checklist:
| Step | Check | If Unchecked |
|---|---|---|
| 1 | Did I identify the correct agent for this domain? | → STOP. Analyze request domain first. |
| 2 | Did I READ the agent's .md file (or recall its rules)? |
→ STOP. Open .agents/agent/{agent}.md |
| 3 | Did I announce 🤖 Applying knowledge of @[agent]...? |
→ STOP. Add announcement before response. |
| 4 | Did I load required skills from agent's frontmatter? | → STOP. Check skills: field and read them. |
Failure Conditions:
- ❌ Writing code without identifying an agent = PROTOCOL VIOLATION
- ❌ Skipping the announcement = USER CANNOT VERIFY AGENT WAS USED
- ❌ Ignoring agent-specific rules (e.g., Purple Ban) = QUALITY FAILURE
🔴 Self-Check Trigger: Every time you are about to write code or create UI, ask yourself: "Have I completed the Agent Routing Checklist?" If NO → Complete it first.
🎭 Gemini Mode Mapping
| Mode | Agent | Behavior |
|---|---|---|
| plan | project-planner |
4-phase methodology. NO CODE before Phase 4. |
| ask | - | Focus on understanding. Ask questions. |
| edit | orchestrator |
Execute. Check {task-slug}.md first. |
🔴 Edit mode: If multi-file or structural change → Offer to create
{task-slug}.md. For single-file fixes → Proceed directly. Full Plan Mode (4-Phase) protocol lives incode-rules.md.