@techwavedev/agi-agent-kit 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.
- package/CHANGELOG.md +82 -1
- package/README.md +190 -12
- package/bin/init.js +30 -2
- package/package.json +6 -3
- package/templates/base/AGENTS.md +54 -23
- package/templates/base/README.md +325 -0
- package/templates/base/directives/memory_integration.md +95 -0
- package/templates/base/execution/memory_manager.py +309 -0
- package/templates/base/execution/session_boot.py +218 -0
- package/templates/base/execution/session_init.py +320 -0
- package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
- package/templates/base/skill-creator/scripts/init_skill.py +18 -135
- package/templates/skills/ec/README.md +31 -0
- package/templates/skills/ec/aws/SKILL.md +1020 -0
- package/templates/skills/ec/aws/defaults.yaml +13 -0
- package/templates/skills/ec/aws/references/common_patterns.md +80 -0
- package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
- package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
- package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
- package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
- package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
- package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
- package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
- package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
- package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
- package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
- package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
- package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
- package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
- package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
- package/templates/skills/ec/consul/SKILL.md +427 -0
- package/templates/skills/ec/consul/references/acl_setup.md +168 -0
- package/templates/skills/ec/consul/references/ha_config.md +196 -0
- package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
- package/templates/skills/ec/consul/references/upgrades.md +213 -0
- package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
- package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
- package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
- package/templates/skills/ec/documentation/SKILL.md +351 -0
- package/templates/skills/ec/documentation/references/best_practices.md +201 -0
- package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
- package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
- package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
- package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
- package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
- package/templates/skills/ec/gitlab/SKILL.md +529 -0
- package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
- package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
- package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
- package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
- package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
- package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
- package/templates/skills/ec/jira/SKILL.md +484 -0
- package/templates/skills/ec/jira/references/jql_reference.md +148 -0
- package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
- package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
- package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
- package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
- package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
- package/templates/skills/ec/jira/scripts/log_work.py +154 -0
- package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
- package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
- package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
- package/templates/skills/ec/karpenter/SKILL.md +301 -0
- package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
- package/templates/skills/ec/karpenter/references/migration.md +396 -0
- package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
- package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
- package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
- package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
- package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
- package/templates/skills/ec/opensearch/SKILL.md +720 -0
- package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
- package/templates/skills/ec/opensearch/references/operator.md +532 -0
- package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
- package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
- package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
- package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
- package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
- package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
- package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
- package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
- package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
- package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
- package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
- package/templates/skills/knowledge/design-md/README.md +0 -34
- package/templates/skills/knowledge/design-md/SKILL.md +0 -193
- package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
- package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
- package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
- package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
- package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
- package/templates/skills/knowledge/react-components/README.md +0 -36
- package/templates/skills/knowledge/react-components/SKILL.md +0 -53
- package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
- package/templates/skills/knowledge/react-components/package-lock.json +0 -231
- package/templates/skills/knowledge/react-components/package.json +0 -16
- package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
- package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
- package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
- package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
- package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
- package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
- package/templates/skills/knowledge/self-update/SKILL.md +0 -60
- package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
- package/templates/skills/knowledge/stitch-loop/README.md +0 -54
- package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
- package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
- package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
- package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
- package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
|
@@ -1,39 +1,115 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: intelligent-routing
|
|
3
|
-
description: Automatic agent selection
|
|
4
|
-
version:
|
|
3
|
+
description: Automatic agent selection, intelligent task routing, and platform-adaptive orchestration. Analyzes user requests and automatically selects the best specialist agent(s). Detects the runtime platform (Claude Code, Gemini, Opencode) and proactively recommends enabling platform-specific features like Agent Teams and Plugins.
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Intelligent Agent Routing
|
|
8
8
|
|
|
9
|
-
**Purpose**: Automatically analyze user requests and route them to the most appropriate specialist agent(s)
|
|
9
|
+
**Purpose**: Automatically analyze user requests, detect the runtime platform, and route them to the most appropriate specialist agent(s) using the best available orchestration strategy.
|
|
10
10
|
|
|
11
11
|
## Core Principle
|
|
12
12
|
|
|
13
|
-
> **The AI should act as an intelligent Project Manager**, analyzing each request and automatically selecting the best specialist(s) for the job.
|
|
13
|
+
> **The AI should act as an intelligent Project Manager and Team Leader**, analyzing each request, detecting platform capabilities, and automatically selecting the best specialist(s) and orchestration strategy for the job.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## TIER 0 — Platform Detection (ALWAYS ACTIVE)
|
|
18
|
+
|
|
19
|
+
### Detect Runtime Platform at Session Start
|
|
20
|
+
|
|
21
|
+
Before any task routing, detect the current environment and announce capabilities:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
IF "Claude Code" is detected (has Task tool, /agents, Bash, etc.)
|
|
25
|
+
IF CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS is enabled
|
|
26
|
+
→ Platform: Claude Code + Agent Teams ✅
|
|
27
|
+
→ Strategy: Team Leader mode (true parallel teammates)
|
|
28
|
+
ELSE
|
|
29
|
+
→ Platform: Claude Code (standard)
|
|
30
|
+
→ Strategy: Subagents (background/foreground)
|
|
31
|
+
→ 💡 RECOMMEND: "Agent Teams is available but not enabled. Enable it for true parallel orchestration:
|
|
32
|
+
Add to settings.json: { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }"
|
|
33
|
+
END IF
|
|
34
|
+
|
|
35
|
+
→ 💡 RECOMMEND plugins if not installed:
|
|
36
|
+
"/plugin marketplace add anthropics/claude-code" for official plugins
|
|
37
|
+
Check if LSP plugins, commit-commands, etc. would benefit the project
|
|
38
|
+
|
|
39
|
+
ELSE IF "Kiro IDE" is detected (.kiro/ directory, POWER.md files, Kiro agent context)
|
|
40
|
+
→ Platform: Kiro IDE
|
|
41
|
+
→ Strategy: Powers-driven orchestration + Autonomous Agent for async tasks
|
|
42
|
+
→ 💡 RECOMMEND Powers if not installed:
|
|
43
|
+
Check project tech stack and suggest relevant Powers (Supabase, Stripe, Figma, etc.)
|
|
44
|
+
"Open Powers panel → Browse curated powers"
|
|
45
|
+
→ 💡 RECOMMEND Autonomous Agent for multi-repo or async parallel work
|
|
46
|
+
|
|
47
|
+
ELSE IF "Gemini" or "Antigravity" is detected (GEMINI.md loaded, Google model)
|
|
48
|
+
→ Platform: Gemini / Antigravity
|
|
49
|
+
→ Strategy: Sequential persona switching via @agent
|
|
50
|
+
→ No Agent Teams or subagent support
|
|
51
|
+
|
|
52
|
+
ELSE IF "Opencode" is detected (OPENCODE.md loaded)
|
|
53
|
+
→ Platform: Opencode
|
|
54
|
+
→ Strategy: Sequential persona switching via @agent
|
|
55
|
+
→ No Agent Teams or subagent support
|
|
56
|
+
|
|
57
|
+
ELSE
|
|
58
|
+
→ Platform: Unknown
|
|
59
|
+
→ Strategy: Sequential persona switching (universal fallback)
|
|
60
|
+
END IF
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Proactive Capability Announcements
|
|
16
64
|
|
|
17
|
-
|
|
65
|
+
**On first interaction in a session**, if Claude Code is detected, proactively announce:
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
💡 **Platform detected: Claude Code**
|
|
69
|
+
|
|
70
|
+
- Agent Teams: [Enabled ✅ / Not enabled — enable with `{"env":{"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS":"1"}}` in settings.json]
|
|
71
|
+
- Plugins: Run `/plugin` to discover available plugins for this project
|
|
72
|
+
- Subagents: Available for background tasks (`/agents` to manage)
|
|
73
|
+
- Skills: Project skills auto-discovered from `.claude/skills/` and `skills/`
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**If Kiro IDE is detected**, proactively announce:
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
💡 **Platform detected: Kiro IDE**
|
|
80
|
+
|
|
81
|
+
- Powers: [N installed — open Powers panel to browse/install more]
|
|
82
|
+
- Autonomous Agent: Available for async task execution across repos
|
|
83
|
+
- Hooks: Configure quality gates in `.kiro/hooks/`
|
|
84
|
+
- MCP Servers: Dynamically loaded per Power — no upfront context cost
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**On Gemini/Opencode/other platforms**, no special announcement is needed — use standard persona switching.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## TIER 1 — Request Analysis (ALWAYS ACTIVE)
|
|
18
92
|
|
|
19
93
|
Before responding to ANY user request, perform automatic analysis:
|
|
20
94
|
|
|
21
95
|
```mermaid
|
|
22
96
|
graph TD
|
|
23
|
-
A[User Request
|
|
97
|
+
A[User Request] --> B[ANALYZE]
|
|
24
98
|
B --> C[Keywords]
|
|
25
99
|
B --> D[Domains]
|
|
26
100
|
B --> E[Complexity]
|
|
27
101
|
C --> F[SELECT AGENT]
|
|
28
102
|
D --> F
|
|
29
103
|
E --> F
|
|
30
|
-
F --> G
|
|
31
|
-
G
|
|
104
|
+
F --> G{Multi-Domain?}
|
|
105
|
+
G -->|Single| H[Direct Agent]
|
|
106
|
+
G -->|Multiple| I{Platform?}
|
|
107
|
+
I -->|Claude Code + Teams| J[Spawn Agent Team]
|
|
108
|
+
I -->|Claude Code| K[Spawn Subagents]
|
|
109
|
+
I -->|Other| L[Sequential Personas]
|
|
32
110
|
```
|
|
33
111
|
|
|
34
|
-
###
|
|
35
|
-
|
|
36
|
-
**Use this matrix to automatically select agents:**
|
|
112
|
+
### Agent Selection Matrix
|
|
37
113
|
|
|
38
114
|
| User Intent | Keywords | Selected Agent(s) | Auto-invoke? |
|
|
39
115
|
| ------------------- | ------------------------------------------ | ------------------------------------------- | ------------ |
|
|
@@ -50,50 +126,95 @@ graph TD
|
|
|
50
126
|
| **New Feature** | "build", "create", "implement", "new app" | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
|
|
51
127
|
| **Complex Task** | Multiple domains detected | `orchestrator` → multi-agent | ⚠️ ASK FIRST |
|
|
52
128
|
|
|
53
|
-
###
|
|
54
|
-
|
|
55
|
-
## TIER 0 - Automatic Analysis (ALWAYS ACTIVE)
|
|
56
|
-
|
|
57
|
-
Before responding to ANY request:
|
|
129
|
+
### Automatic Routing Protocol
|
|
58
130
|
|
|
59
131
|
```javascript
|
|
60
132
|
// Pseudo-code for decision tree
|
|
61
133
|
function analyzeRequest(userMessage) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
134
|
+
// 1. Classify request type
|
|
135
|
+
const requestType = classifyRequest(userMessage);
|
|
136
|
+
|
|
137
|
+
// 2. Detect domains
|
|
138
|
+
const domains = detectDomains(userMessage);
|
|
139
|
+
|
|
140
|
+
// 3. Determine complexity
|
|
141
|
+
const complexity = assessComplexity(domains);
|
|
142
|
+
|
|
143
|
+
// 4. Select strategy based on platform
|
|
144
|
+
const platform = detectPlatform();
|
|
145
|
+
|
|
146
|
+
// 5. Route
|
|
147
|
+
if (complexity === "SIMPLE" && domains.length === 1) {
|
|
148
|
+
return selectSingleAgent(domains[0]);
|
|
149
|
+
} else if (complexity === "MODERATE" && domains.length <= 2) {
|
|
150
|
+
if (platform === "claude-code-teams") {
|
|
151
|
+
return spawnTeam(domains); // True parallel
|
|
152
|
+
} else if (platform === "claude-code") {
|
|
153
|
+
return spawnSubagents(domains); // Background parallel
|
|
76
154
|
} else {
|
|
77
|
-
|
|
155
|
+
return selectMultipleAgents(domains); // Sequential
|
|
78
156
|
}
|
|
157
|
+
} else {
|
|
158
|
+
// Complex task — orchestrate
|
|
159
|
+
if (platform === "claude-code-teams") {
|
|
160
|
+
return actAsTeamLeader(domains); // Team Leader mode
|
|
161
|
+
} else {
|
|
162
|
+
return "orchestrator"; // Sequential orchestration
|
|
163
|
+
}
|
|
164
|
+
}
|
|
79
165
|
}
|
|
80
166
|
```
|
|
81
167
|
|
|
82
|
-
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## TIER 2 — Multi-Agent Orchestration (Platform-Adaptive)
|
|
83
171
|
|
|
84
|
-
|
|
172
|
+
### On Claude Code with Agent Teams: Team Leader Mode
|
|
173
|
+
|
|
174
|
+
When a complex multi-domain task is detected and Agent Teams is enabled, the AI acts as **Team Leader**:
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
🤖 **Team Leader mode activated** (Claude Code Agent Teams detected)
|
|
178
|
+
|
|
179
|
+
Spawning team for: "Build a secure user dashboard with real-time notifications"
|
|
180
|
+
|
|
181
|
+
**Teammates:**
|
|
182
|
+
|
|
183
|
+
- 🔒 security-reviewer: Auth module audit
|
|
184
|
+
- ⚙️ backend-developer: API + WebSocket endpoints
|
|
185
|
+
- 🎨 frontend-developer: Dashboard UI components
|
|
186
|
+
- 🧪 test-engineer: Full-stack test suite
|
|
187
|
+
|
|
188
|
+
Monitoring progress... I'll synthesize findings when the team completes.
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### On Claude Code without Agent Teams: Subagent Mode
|
|
85
192
|
|
|
86
193
|
```markdown
|
|
87
|
-
🤖 **
|
|
194
|
+
🤖 **Subagent orchestration** (Claude Code detected, Agent Teams not enabled)
|
|
195
|
+
|
|
196
|
+
Running in background:
|
|
88
197
|
|
|
89
|
-
|
|
198
|
+
- security-reviewer subagent → auth audit
|
|
199
|
+
- backend-specialist subagent → API review
|
|
200
|
+
|
|
201
|
+
💡 Tip: Enable Agent Teams for true parallel orchestration:
|
|
202
|
+
Add to settings.json: { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }
|
|
90
203
|
```
|
|
91
204
|
|
|
92
|
-
|
|
205
|
+
### On Other Platforms: Sequential Persona Mode
|
|
206
|
+
|
|
207
|
+
```markdown
|
|
208
|
+
🤖 **Applying knowledge of `@security-auditor`...**
|
|
209
|
+
|
|
210
|
+
[Security analysis results]
|
|
93
211
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
212
|
+
🤖 **Applying knowledge of `@backend-specialist`...**
|
|
213
|
+
|
|
214
|
+
[API analysis, informed by security findings]
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
97
218
|
|
|
98
219
|
## Domain Detection Rules
|
|
99
220
|
|
|
@@ -113,17 +234,20 @@ function analyzeRequest(userMessage) {
|
|
|
113
234
|
| **SEO** | seo, meta, analytics, sitemap, robots | `seo-specialist` |
|
|
114
235
|
| **Game** | unity, godot, phaser, game, multiplayer | `game-developer` |
|
|
115
236
|
|
|
116
|
-
### Multi-Domain Tasks (
|
|
237
|
+
### Multi-Domain Tasks (Platform-Adaptive Orchestration)
|
|
117
238
|
|
|
118
|
-
If request matches **2+ domains from different categories
|
|
239
|
+
If request matches **2+ domains from different categories**:
|
|
119
240
|
|
|
120
241
|
```text
|
|
121
242
|
Example: "Create a secure login system with dark mode UI"
|
|
122
243
|
→ Detected: Security + Frontend
|
|
123
|
-
→
|
|
124
|
-
→
|
|
244
|
+
→ On Claude Code Teams: Spawn security + frontend teammates
|
|
245
|
+
→ On Claude Code: Spawn security + frontend subagents
|
|
246
|
+
→ On Other: Sequential security-auditor → frontend-specialist
|
|
125
247
|
```
|
|
126
248
|
|
|
249
|
+
---
|
|
250
|
+
|
|
127
251
|
## Complexity Assessment
|
|
128
252
|
|
|
129
253
|
### SIMPLE (Direct agent invocation)
|
|
@@ -133,7 +257,7 @@ Example: "Create a secure login system with dark mode UI"
|
|
|
133
257
|
- One domain only
|
|
134
258
|
- Example: "Fix the login button style"
|
|
135
259
|
|
|
136
|
-
**Action**: Auto-invoke respective agent
|
|
260
|
+
**Action**: Auto-invoke respective agent (all platforms)
|
|
137
261
|
|
|
138
262
|
### MODERATE (2-3 agents)
|
|
139
263
|
|
|
@@ -142,80 +266,68 @@ Example: "Create a secure login system with dark mode UI"
|
|
|
142
266
|
- 2 domains max
|
|
143
267
|
- Example: "Add API endpoint for user profile"
|
|
144
268
|
|
|
145
|
-
**Action**:
|
|
269
|
+
**Action**:
|
|
146
270
|
|
|
147
|
-
|
|
271
|
+
- Claude Code Teams → Spawn 2-3 teammates
|
|
272
|
+
- Claude Code → Background subagents
|
|
273
|
+
- Other → Sequential agent invocation
|
|
274
|
+
|
|
275
|
+
### COMPLEX (Orchestrator / Team Leader)
|
|
148
276
|
|
|
149
277
|
- Multiple files/domains
|
|
150
278
|
- Architectural decisions needed
|
|
151
279
|
- Unclear requirements
|
|
152
280
|
- Example: "Build a social media app"
|
|
153
281
|
|
|
154
|
-
**Action**:
|
|
282
|
+
**Action**:
|
|
283
|
+
|
|
284
|
+
- Claude Code Teams → Act as Team Leader, spawn full team
|
|
285
|
+
- Claude Code → Chain subagents with orchestrator persona
|
|
286
|
+
- Other → Auto-invoke orchestrator → Socratic questions first
|
|
287
|
+
|
|
288
|
+
---
|
|
155
289
|
|
|
156
290
|
## Implementation Rules
|
|
157
291
|
|
|
158
292
|
### Rule 1: Silent Analysis
|
|
159
293
|
|
|
160
|
-
#### DO NOT announce "I'm analyzing your request..."
|
|
161
|
-
|
|
162
294
|
- ✅ Analyze silently
|
|
163
|
-
- ✅ Inform which agent is being applied
|
|
164
|
-
- ❌ Avoid verbose meta-commentary
|
|
165
|
-
|
|
166
|
-
### Rule 2: Inform Agent Selection
|
|
295
|
+
- ✅ Inform which agent/strategy is being applied
|
|
296
|
+
- ❌ Avoid verbose meta-commentary ("I'm analyzing your request...")
|
|
167
297
|
|
|
168
|
-
|
|
298
|
+
### Rule 2: Inform Agent Selection + Platform
|
|
169
299
|
|
|
170
300
|
```markdown
|
|
171
|
-
🤖 **Applying knowledge of `@frontend-specialist`...**
|
|
301
|
+
🤖 **Applying knowledge of `@frontend-specialist`...** (via Agent Team)
|
|
172
302
|
|
|
173
303
|
I will create the component with the following characteristics:
|
|
174
304
|
[Continue with specialized response]
|
|
175
305
|
```
|
|
176
306
|
|
|
177
|
-
### Rule 3:
|
|
178
|
-
|
|
179
|
-
**The user should not notice a difference from talking to the right specialist directly.**
|
|
180
|
-
|
|
181
|
-
### Rule 4: Override Capability
|
|
307
|
+
### Rule 3: Proactive Platform Recommendations
|
|
182
308
|
|
|
183
|
-
|
|
309
|
+
When Claude Code is detected but Agent Teams is disabled, remind the user **once per session**:
|
|
184
310
|
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
→ Use explicitly mentioned agent
|
|
311
|
+
```markdown
|
|
312
|
+
💡 **Tip**: You're on Claude Code. Enable Agent Teams for parallel orchestration:
|
|
313
|
+
`{ "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }` in settings.json
|
|
189
314
|
```
|
|
190
315
|
|
|
191
|
-
|
|
316
|
+
### Rule 4: Seamless Experience
|
|
192
317
|
|
|
193
|
-
|
|
318
|
+
The user should not notice a difference from talking to the right specialist directly.
|
|
194
319
|
|
|
195
|
-
|
|
196
|
-
User: "How does React work?"
|
|
197
|
-
→ Type: QUESTION
|
|
198
|
-
→ No agent needed
|
|
199
|
-
→ Respond directly with explanation
|
|
200
|
-
```
|
|
320
|
+
### Rule 5: Override Capability
|
|
201
321
|
|
|
202
|
-
|
|
322
|
+
User can still explicitly mention agents:
|
|
203
323
|
|
|
204
324
|
```text
|
|
205
|
-
User: "
|
|
206
|
-
→
|
|
207
|
-
→
|
|
208
|
-
→ Then route to appropriate agent
|
|
325
|
+
User: "Use @backend-specialist to review this"
|
|
326
|
+
→ Override auto-selection
|
|
327
|
+
→ Use explicitly mentioned agent
|
|
209
328
|
```
|
|
210
329
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
```text
|
|
214
|
-
User: "Add mobile support to the web app"
|
|
215
|
-
→ Conflict: mobile vs web
|
|
216
|
-
→ Action: Ask: "Do you want responsive web or native mobile app?"
|
|
217
|
-
→ Then route accordingly
|
|
218
|
-
```
|
|
330
|
+
---
|
|
219
331
|
|
|
220
332
|
## Integration with Existing Workflows
|
|
221
333
|
|
|
@@ -223,112 +335,73 @@ User: "Add mobile support to the web app"
|
|
|
223
335
|
|
|
224
336
|
- **User types `/orchestrate`**: Explicit orchestration mode
|
|
225
337
|
- **AI detects complex task**: Auto-invoke orchestrator (same result)
|
|
226
|
-
|
|
227
|
-
**Difference**: User doesn't need to know the command exists.
|
|
338
|
+
- **On Claude Code**: Orchestrator acts as Team Leader when possible
|
|
228
339
|
|
|
229
340
|
### With Socratic Gate
|
|
230
341
|
|
|
231
|
-
-
|
|
342
|
+
- Auto-routing does NOT bypass Socratic Gate
|
|
232
343
|
- If task is unclear, still ask questions first
|
|
233
|
-
- Then route to appropriate agent
|
|
344
|
+
- Then route to appropriate agent with best available strategy
|
|
234
345
|
|
|
235
|
-
### With GEMINI.md Rules
|
|
346
|
+
### With GEMINI.md / CLAUDE.md Rules
|
|
236
347
|
|
|
237
|
-
- **Priority**: GEMINI.md
|
|
238
|
-
- If
|
|
348
|
+
- **Priority**: Platform rules (GEMINI.md/CLAUDE.md) > intelligent-routing
|
|
349
|
+
- If platform rules specify explicit routing, follow them
|
|
239
350
|
- Intelligent routing is the DEFAULT when no explicit rule exists
|
|
240
351
|
|
|
241
|
-
|
|
352
|
+
---
|
|
242
353
|
|
|
243
|
-
|
|
354
|
+
## Edge Cases
|
|
244
355
|
|
|
245
|
-
|
|
356
|
+
### Case 1: Generic Question
|
|
246
357
|
|
|
247
358
|
```text
|
|
248
|
-
User: "
|
|
249
|
-
|
|
250
|
-
|
|
359
|
+
User: "How does React work?"
|
|
360
|
+
→ Type: QUESTION
|
|
361
|
+
→ No agent needed, no team needed
|
|
362
|
+
→ Respond directly
|
|
251
363
|
```
|
|
252
364
|
|
|
253
|
-
|
|
365
|
+
### Case 2: Extremely Vague Request
|
|
254
366
|
|
|
255
367
|
```text
|
|
256
|
-
User: "
|
|
257
|
-
|
|
258
|
-
|
|
368
|
+
User: "Make it better"
|
|
369
|
+
→ Complexity: UNCLEAR
|
|
370
|
+
→ Action: Ask clarifying questions first
|
|
371
|
+
→ Then route with best strategy
|
|
259
372
|
```
|
|
260
373
|
|
|
261
|
-
|
|
374
|
+
### Case 3: Contradictory Patterns
|
|
262
375
|
|
|
263
376
|
```text
|
|
264
|
-
User: "
|
|
265
|
-
|
|
266
|
-
|
|
377
|
+
User: "Add mobile support to the web app"
|
|
378
|
+
→ Conflict: mobile vs web
|
|
379
|
+
→ Action: Ask: "Do you want responsive web or native mobile app?"
|
|
380
|
+
→ Then route accordingly
|
|
267
381
|
```
|
|
268
382
|
|
|
269
|
-
|
|
383
|
+
### Case 4: Claude Code Feature Not Enabled
|
|
270
384
|
|
|
271
385
|
```text
|
|
272
|
-
User: "
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
## Performance Considerations
|
|
278
|
-
|
|
279
|
-
### Token Usage
|
|
280
|
-
|
|
281
|
-
- Analysis adds ~50-100 tokens per request
|
|
282
|
-
- Tradeoff: Better accuracy vs slight overhead
|
|
283
|
-
- Overall SAVES tokens by reducing back-and-forth
|
|
284
|
-
|
|
285
|
-
### Response Time
|
|
286
|
-
|
|
287
|
-
- Analysis is instant (pattern matching)
|
|
288
|
-
- No additional API calls required
|
|
289
|
-
- Agent selection happens before first response
|
|
290
|
-
|
|
291
|
-
## User Education
|
|
292
|
-
|
|
293
|
-
### Optional: First-Time Explanation
|
|
294
|
-
|
|
295
|
-
If this is the first interaction in a project:
|
|
296
|
-
|
|
297
|
-
```markdown
|
|
298
|
-
💡 **Tip**: I am configured with automatic specialist agent selection.
|
|
299
|
-
I will always choose the most suitable specialist for your task. You can
|
|
300
|
-
still mention agents explicitly with `@agent-name` if you prefer.
|
|
386
|
+
User: "Run these 5 reviews in parallel"
|
|
387
|
+
→ Platform: Claude Code, Agent Teams OFF
|
|
388
|
+
→ Action: Suggest enabling Agent Teams, use subagents as fallback
|
|
301
389
|
```
|
|
302
390
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
### Enable Debug Mode (for development)
|
|
306
|
-
|
|
307
|
-
Add to GEMINI.md temporarily:
|
|
308
|
-
|
|
309
|
-
```markdown
|
|
310
|
-
## DEBUG: Intelligent Routing
|
|
311
|
-
|
|
312
|
-
Show selection reasoning:
|
|
313
|
-
|
|
314
|
-
- Detected domains: [list]
|
|
315
|
-
- Selected agent: [name]
|
|
316
|
-
- Reasoning: [why]
|
|
317
|
-
```
|
|
391
|
+
---
|
|
318
392
|
|
|
319
393
|
## Summary
|
|
320
394
|
|
|
321
|
-
**intelligent-routing
|
|
395
|
+
**intelligent-routing v2.0 enables:**
|
|
322
396
|
|
|
323
|
-
✅ Zero-command operation (no need for `/orchestrate`)
|
|
324
|
-
✅ Automatic specialist selection based on request analysis
|
|
325
|
-
✅
|
|
326
|
-
✅
|
|
327
|
-
✅
|
|
397
|
+
✅ Zero-command operation (no need for `/orchestrate`)
|
|
398
|
+
✅ Automatic specialist selection based on request analysis
|
|
399
|
+
✅ Platform detection with proactive feature recommendations
|
|
400
|
+
✅ Team Leader mode on Claude Code with Agent Teams
|
|
401
|
+
✅ Subagent fallback on Claude Code without Agent Teams
|
|
402
|
+
✅ Sequential persona switching on Gemini/Opencode/other
|
|
403
|
+
✅ Transparent communication of which expertise and strategy is being applied
|
|
404
|
+
✅ Override capability for explicit agent mentions
|
|
328
405
|
✅ Fallback to orchestrator for complex tasks
|
|
329
406
|
|
|
330
|
-
**Result**: User gets specialist-level responses
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
**Next Steps**: Integrate this skill into GEMINI.md TIER 0 rules.
|
|
407
|
+
**Result**: User gets specialist-level responses with the best available parallelism, regardless of platform.
|