Overview

Tiered AI task routing is a defense-in-depth strategy for AI workload management that directs tasks to the specific AI model best suited for each job based on task-model fit. This approach prevents wasting expensive compute (high-tier models) on trivial tasks while ensuring critical work receives appropriate resources. The routing mechanism uses labels as strategic gates that enforce cost optimization, security boundaries, and quality thresholds.

Strategic Rationale

The fundamental insight is that not all AI tasks require the same computational power or trust level. A well-architected routing system:

  • Prevents expensive models from handling simple tasks (typo fixes, boilerplate generation)
  • Protects critical assets from unvetted models
  • Optimizes cost per inference across the workload spectrum
  • Maintains security boundaries for sensitive operations
  • Enables parallel execution of independent tasks at appropriate tiers

This is cost arbitrage at the infrastructure layer—routing complexity, not just traffic.

The Five-Tier Architecture

Tier 1: Critical Reasoning & Security (Highest Cost/Value)

Reserved for deep architectural decisions, cross-zone dependencies, and complex reasoning. This tier leverages the most expensive and capable models for problems requiring the highest reasoning capacity.

cc-arch (Blue)

  • Routes to: Claude Code Max 20x
  • Strategic Value: Reserved for architectural decisions, system design, complex reasoning
  • Cost Profile: Highest per-token cost
  • Example Use Cases: “Design the authentication flow for the Eliza module” | “Analyze the dependency graph for monorepo migration”

cc-security (Red)

  • Routes to: Claude Code Max (Mandatory)
  • Strategic Value: Non-negotiable security boundary for authentication, authorization, cryptography
  • Trust Level: Highest—prevents “leakage” of sensitive patterns to lower-tier models
  • Example Use Cases: “Audit OpenBao integration for key leakage” | “Review JWT implementation for timing attacks”

Critical Rule: Any task touching authentication, authorization, or cryptography must use this label to ensure handling by the most capable and trusted model.

Tier 2: High-Context & Deep Research (Google Ecosystem)

Leverages Google’s massive context windows (1M+ tokens) and specialized research capabilities for documentation and knowledge synthesis.

gem-docs (Green)

  • Routes to: Gemini CLI / Deep Research
  • Strategic Value: Ingest entire codebases for comprehensive documentation
  • Cost Advantage: Using Claude for this would be prohibitively expensive and slower
  • Example Use Cases: “Generate API documentation for entire SoundBoard app” | “Create migration guide from Express to Fastify”

gem-research (Purple)

  • Routes to: Google Deep Research
  • Strategic Value: Automates multi-page research reports
  • Time Savings: Eliminates hours of manual documentation reading
  • Example Use Cases: “Research WebRTC stability patterns for iOS” | “Survey state management approaches for React 2024-2026”

gem-jules (Teal)

  • Routes to: Jules (Async Background Agent)
  • Strategic Value: Asynchronous “fire and forget” tasks without real-time supervision
  • Use Pattern: Background work that can run unattended
  • Example Use Cases: “Update all npm dependencies in library zone” | “Run security audit across all apps zone repos”

Tier 3: Bulk Execution & Refactoring (Efficiency)

Optimized for volume work, multi-file changes, and repetitive tasks that benefit from parallel execution.

aid-refactor (Orange)

  • Routes to: Aider + Gemini API
  • Strategic Value: Git-native refactoring with clean, atomic commits
  • Differentiator: Manages git history—produces structured commits, not code dumps
  • Example Use Cases: “Extract shared auth module from these three apps” | “Rename all instances of UserService to AccountService across 15 files”

cop-bg (Cyan)

  • Routes to: GitHub Copilot CLI (Sonnet 4.6)
  • Strategic Value: Independent background task execution from seeded task lists
  • Use Pattern: Reads .management/copilot-tasks.md, claims via branch, works autonomously
  • Example Use Cases: “Expand Eliza task extraction patterns” | “Add ARIA attributes to chat components”

oc-bulk (Gray)

  • Routes to: OpenCode + Oh My OpenCode (Sisyphus Agent)
  • Strategic Value: Parallel execution for volume work
  • Efficiency Play: Background agents handle tedious work without consuming premium resources
  • Example Use Cases: “Fix all ESLint warnings in apps zone” | “Update copyright headers across 200 files”

Tier 4: Low-Cost / Exploration (Free Tiers)

Zero or minimal marginal cost for prototyping, exploration, and potentially disposable work.

qc-spike (White)

  • Routes to: Qwen Code / Local Models
  • Strategic Value: Zero marginal cost for prototypes and experiments
  • Risk Tolerance: Code might be thrown away—protects premium API limits
  • Example Use Cases: “Prototype a flowchart parser concept” | “Generate five alternative approaches to caching strategy”

gem-quick (Yellow)

  • Routes to: Gemini CLI (Free Tier)
  • Strategic Value: Rapid answers for simple questions or error explanations
  • Speed: Fast turnaround without consuming “Tier 1” budget
  • Example Use Cases: “Explain this Kubernetes error code” | “What does CORS preflight failure mean?”

Special Tier: Recursive Improvement (Non-AI)

friction (Pink)

  • Routes to: Peppermint (Human/System Log)
  • Strategic Value: Does not route to AI agent—routes to knowledge collection framework
  • Purpose: Flags “Silent Struggle” or “Broken Processes”
  • Principle: “Never Make the Mistake Twice”
  • Example Use Cases: “Gemini CLI hangs when context exceeds 500k tokens” | “Docker context switch to windows-pc fails without verbose error”

Task-Model Fit Matrix

The routing decision depends on multiple dimensions:

DimensionTier 1Tier 2Tier 3Tier 4
ComplexityArchitecturalComprehensiveRepetitiveExploratory
Trust LevelSecurity-criticalTrusted researchCode changesThrowaway
Context SizeModerateMassive (1M+ tokens)Multi-fileSingle-file
Cost ToleranceHighestModerateLowZero
Response TimeReal-timeAsync acceptableBackground OKImmediate

Governance Principles

Defense in Depth

The tiered approach creates multiple layers of cost optimization and security enforcement:

  1. Security boundary: cc-security prevents sensitive logic from reaching lower tiers
  2. Cost gates: Trivial tasks cannot consume expensive compute
  3. Quality thresholds: Critical work gets appropriate resources
  4. Risk isolation: Experimental work uses isolated, low-trust tiers

Strategic Label Selection

Labels are not arbitrary tags—they are routing directives that enforce:

  • Task classification: What type of work is this?
  • Model selection: Which model is optimally suited?
  • Cost allocation: What is the acceptable cost per inference?
  • Trust boundary: What level of access is permitted?

The Anti-Pattern: Undifferentiated Routing

The failure mode is treating all AI tasks as equivalent and routing everything to the most capable (and expensive) model. This results in:

  • Wasted compute on trivial tasks
  • Unnecessary cost accumulation
  • Security boundary violations
  • Opportunity cost (premium resources unavailable for critical work)

Implementation Strategy

Label-Based Dispatch

Each task receives a label that determines routing:

task:
  label: cc-security
  description: "Review authentication token generation"
  # System automatically routes to Claude Code Max
  # No override permitted for security-labeled tasks

Cost Tracking

Track cost per tier to identify optimization opportunities:

Tier 1 (Critical): $45.20 (12 tasks)
Tier 2 (Research): $8.30 (45 tasks)
Tier 3 (Bulk): $2.10 (200 tasks)
Tier 4 (Free): $0.00 (380 tasks)

Routing Validation

Before task execution, validate:

  1. Label is appropriate for task type
  2. Security requirements match tier trust level
  3. Cost tolerance aligns with task value
  4. Model capabilities match task complexity

Research Directions

Automatic Label Suggestion

Develop heuristics for suggesting appropriate labels based on:

  • File paths being modified (e.g., /auth/ triggers security label suggestion)
  • Keywords in task description (e.g., “prototype” suggests qc-spike)
  • Estimated complexity metrics
  • Historical routing patterns

Cost Optimization Metrics

Track and optimize:

  • Cost per task type across tiers
  • Tier migration candidates (tasks currently over-provisioned)
  • Security boundary violations (attempts to route sensitive work to lower tiers)
  • Tier saturation (when high-value tiers become bottlenecks)

Hybrid Routing

Explore multi-tier task decomposition:

  1. Use Tier 4 for brainstorming/exploration
  2. Use Tier 2 for comprehensive research
  3. Use Tier 1 for final architectural decisions

This creates a progressive elaboration workflow where ideas filter up through tiers.

Integration with Existing Systems

This routing architecture connects to:

Operational Insights

Context Switching Cost

Switching between tiers has overhead:

  • Different API authentication
  • Different prompt formats
  • Different output quality expectations

Optimization: Batch tasks by tier to minimize context switching.

The “Friction” Escape Hatch

The friction label serves as a critical safety valve—when the routing system itself becomes a bottleneck, flag it for process improvement rather than working around it. This prevents “Silent Struggle” from becoming normalized.

Security as Non-Negotiable

The cc-security label is mandatory for certain task types. This is not a suggestion or optimization—it is a hard boundary that cannot be overridden for cost reasons.

Summary

Tiered AI task routing transforms AI workload management from undifferentiated “send everything to the best model” to a strategic routing architecture that:

  • Optimizes cost through task-model fit
  • Enforces security boundaries
  • Enables parallel execution
  • Captures process friction for continuous improvement

The routing labels are not metadata—they are strategic gates that enforce organizational principles about cost, security, and quality.

Source Files

  1. Tiered AI Task Routing and Labeling Architecture.txt
  2. ai strategy analysis.txt
  3. Aloysius Productions - Adversarial Epistemic Architecture Strategic Audit.txt