v3/docs/adr/ADR-357-dream-cycle-intelligence-dimension-aware-routing.md
Status: Proposed
Authors: claude (dream-cycle agent, 2026-07-02)
Dream Cycle Issue: #TBD (filed same night)
References: arXiv:2605.17106 (HyDRA), arXiv:2606.13317 (SkillCAT), arXiv:2605.15706 (DMoA)
Ruflo v3.6's intelligence router selects between Haiku, Sonnet, and Opus based on a single scalar "complexity percentage" derived from task description length and keyword heuristics. This:
HyDRA (arXiv:2605.17106, May 2026) demonstrates that scoring each query across 4 independent capability dimensions — reasoning, code generation, debugging, and tool-use — with a lightweight ModernBERT-class encoder (86 ms CPU median latency) and applying a shortfall-matching selection algorithm achieves:
SkillCAT (arXiv:2606.13317, Jun 2026) additionally shows that topology-aware skill retrieval (loading only task-relevant capabilities from a 3-tier hierarchy) compounds routing gains with +40.40% task score improvement at zero training cost.
Extend Ruflo's intelligence routing layer with a 4-dimension capability scorer replacing the current scalar complexity gate.
Query
│
▼
DimensionScorer (lightweight, ≤100 ms)
├── reasoning_score ∈ [0,1]
├── code_score ∈ [0,1]
├── debug_score ∈ [0,1]
└── tooluse_score ∈ [0,1]
│
▼
ShortfallMatcher
Input: dimension scores + available model pool
Output: cheapest model meeting predicted requirements
│
▼
Model Dispatch (Haiku / Sonnet / Opus / heterogeneous pool)
| Component | File / Module | Change |
|---|---|---|
DimensionScorer | v3/@claude-flow/cli/src/intelligence/dimension-scorer.ts | New: 4-head sigmoid scorer |
ShortfallMatcher | v3/@claude-flow/cli/src/intelligence/shortfall-matcher.ts | New: cost-optimal selection |
IntelligenceRouter | v3/@claude-flow/cli/src/intelligence/router.ts | Replace complexity % with DimensionScorer output |
SkillCache | v3/@claude-flow/cli/src/intelligence/skill-cache.ts | New: 3-tier topology-aware HNSW cache (domain/task-type/instance) |
| SONA hook | v3/@claude-flow/hooks/src/post-task.ts | Extract contrastive trajectories after each run |
Positive:
Negative:
Neutral:
| Alternative | Reason |
|---|---|
| Keep scalar complexity gate | Leaves 12-54% cost savings and 40% quality uplift unused |
| Full DMoA per-step dynamic activation | Grade B only (no published benchmark numbers); too invasive for single ADR; revisit when numbers available |
| FJ-model influence weighting only | Orthogonal to routing; Grade B; defer to follow-on ADR |