fable-agent/PHASES/phase-08-adaptive-router.md

23 lines
810 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase 8: Adaptive Router
**Purpose:** Route execution paths based on accumulated state and historical performance.
**TS Module:** `src/tier2-primitives/workflows/adaptive-router.ts`
## What It Does
At workflow branch points, chooses the path most likely to succeed.
Uses epsilon-greedy: 90% exploit best path, 10% explore alternatives.
## Path Selection
1. Check historical path records (quality × success rate × frequency)
2. If no history: use accumulator state for first-guess routing
3. Record outcome after each branch execution
4. Update path scores: weighted average of quality + success + frequency bonus
## Key Rules
- Exploration (epsilon) prevents overfitting to early successes
- Path history resets on session boundary
- For new tasks, routes based on semantic similarity to past paths