Beyond the Monolithic Skill: Architecting Hierarchical Sub-Agents with Mixed Model Tiers
DEV Community

Beyond the Monolithic Skill: Architecting Hierarchical Sub-Agents with Mixed Model Tiers

The Evolution So Far

In the earlier parts of this series, we solved the memory and context bottlenecks:

  • We indexed our local session tapes into SQLite FTS5 so our agent had instant historical recall across fresh threads.
  • We instituted milestone session rotation to eliminate context replay amplification and stop burning hundreds of thousands of tokens on marathon sessions.

With our context window clean and our working memory bounded, we hit the next engineering hurdle: How do you build complex agent skills without creating an unmanageable mess?

The Two Traps of Skill Architecture

When developers start building custom skills for their agents, they almost always fall into one of two extremes:

  • The Monolithic Skill Trap: You write a massive skill prompt that asks a single heavy model to check syntax, evaluate architecture, verify reference tables, and format documentation in one go. The model gets instruction fatigue, drops tasks, and locks your terminal in a 70+ second latency freeze.

  • The Skill Sprawl Trap: To fix the monolith, you break everything into dozens of isolated, micro-skills. Suddenly, your workspace is cluttered with 50 different skill files that are a nightmare to maintain, orchestrate, and keep in sync. Neither approach scales.

The Fix: Hierarchical Sub-Agents Within a Unified Skill

Instead of choosing between a bloated monolith or 50 micro-skills, the sweet spot is hierarchical delegation inside a single, unified skill. You keep your top-level skill clean and purpose-driven. But when that skill executes, it orchestrates specialized subagents running concurrently-each matched to the specific model intelligence the sub-task actually requires.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Unified Skill Interface β”‚
β”‚ (Clean, single entry point in your workspace) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                      β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Subagent 1    β”‚      β”‚ Subagent 2    β”‚      β”‚ Subagent 3    β”‚
β”‚ [Small Tier]  β”‚      β”‚ [Small Tier]  β”‚      β”‚ [Medium Tier] β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Rigid Prop /β”‚      β”‚ Reference /   β”‚      β”‚ Subjective    β”‚
β”‚ Pattern Matchβ”‚      β”‚ Table Lookup  β”‚      β”‚ Tone & Contextβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                      β”‚                      β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β–Ό
               [ Orchestrator Synthesizes Results to Disk ]

3 Lessons from Iterating on Tiered Skills

Building effective multi-tier skills is not "one and done." It requires testing, observing where models stumble, and mixing and matching intelligence tiers based on real run data.

  1. Let Small Models Handle Rigid Mechanical Checks: A large portion of any complex workflow is purely mechanical. Checking whether a date in a document matches a reference table or whether a specific variable is declared doesn't require high-level reasoning. Assigning these tasks to lightweight models (like Flash-Lite, Haiku, or 4o-mini) yields sub-second execution with zero risk of editorial hallucination.

  2. Chain Two Small Passes Instead of Escalating: When a sub-task feels slightly too nuanced for a lightweight model, don't immediately escalate to a heavy tier. In our testing, breaking the task into two simple passes on a small model proved faster and more reliable:

    • Pass 1 (Harvest): Extract candidate lines matching a pattern without judging them.
    • Pass 2 (Evaluate): Evaluate only those extracted candidates against the rule.

    Two 14-second passes on a small model take 28 seconds total-still nearly 3x faster than a single 78-second monolithic run on a heavy tier-at a fraction of the cost.

  3. Reserve Medium Tiers Strictly for Nuance: Only escalate to a balanced model (like Flash or Sonnet) for the specific subagent that requires contextual depth, stylistic judgment, or narrative flow. Because that model isn't bogged down cross-referencing tables or checking basic patterns, 100% of its attention is focused on high-level reasoning.

The Result in Practice

In our studio, running a multi-dimensional audit as a single heavy pass vs. a hierarchical, tiered skill produced dramatic differences on the exact same workload:

Dimension Monolithic Pass (Heavy Model) Hierarchical Subagents (Mixed Tiers)
Execution Latency 78 seconds (blocking freeze) ~14 seconds (parallel subagent runs)
Mechanical Consistency Occasional drift on table checks 100% compliance
Token Burn Premium compute across full text ~80% reduction on mechanical lookups
Workspace Clutter 1 bloated file 1 unified skill managing clean subagents

The Takeaway

Clean architecture isn't just about managing memory; it's about managing execution. Don't bloat your skills, and don't fracture your workspace into a hundred tiny scripts. Keep your skills unified, delegate sub-tasks to tiered subagents, and continually inspect your session tapes to dial in the right mix of speed, cost, and intelligence.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.