From adaeef952000fefbe8992fa3a798918fc0e2a025 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 14 Jan 2026 20:27:38 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-14T20:27:38Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../cli/src/ruvector/enhanced-model-router.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/v3/@claude-flow/cli/src/ruvector/enhanced-model-router.ts b/v3/@claude-flow/cli/src/ruvector/enhanced-model-router.ts index d77ff7d333..df2259555b 100644 --- a/v3/@claude-flow/cli/src/ruvector/enhanced-model-router.ts +++ b/v3/@claude-flow/cli/src/ruvector/enhanced-model-router.ts @@ -167,6 +167,38 @@ const FILE_PATH_PATTERNS: RegExp[] = [ /** * Language detection by extension */ +/** + * High-complexity keywords that indicate Tier 3 (Opus) routing + * These tasks require deep reasoning and architectural understanding + */ +const TIER3_KEYWORDS: RegExp[] = [ + // Architecture & Design + /\b(microservices?|architecture|system\s+design|distributed)\b/i, + /\b(design|architect|plan)\s+(a|an|the|complex)\b/i, + + // Security + /\b(oauth2?|pkce|jwt|rbac|authentication\s+system|security\s+audit)\b/i, + /\b(refresh\s+token|token\s+rotation|role-based|permission)\b/i, + /\b(encryption|cryptograph|certificate|ssl|tls)\b/i, + + // Distributed Systems + /\b(consensus|distributed|byzantine|raft|paxos)\b/i, + /\b(replication|sharding|partitioning|eventual\s+consistency)\b/i, + /\b(load\s+balanc|fault\s+toleran|high\s+availability)\b/i, + + // Complex Algorithms + /\b(algorithm|machine\s+learning|neural|optimization)\b/i, + /\b(graph\s+algorithm|tree\s+traversal|dynamic\s+programming)\b/i, + + // Database Design + /\b(schema\s+design|database\s+architect|data\s+model)\b/i, + /\b(normalization|denormalization|index\s+strateg)\b/i, + + // Performance Critical + /\b(performance\s+critical|low\s+latency|high\s+throughput)\b/i, + /\b(memory\s+optimi|cache\s+strateg|concurrent)\b/i, +]; + const LANGUAGE_MAP: Record = { '.js': 'javascript', '.jsx': 'javascript',