# Harness Routing Skill

> Procedure for past-only message feature extraction and dynamic orchestration policy selection.

- Skill: `kevin-liu-01/harness-routing-skill` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add kevin-liu-01/harness-routing-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kevin-liu-01/harness-routing-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kevin-liu-01 (https://skillmd.com/u/kevin-liu-01)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kevin-liu-01/harness-routing-skill

---


# cotcodec / harness/routing

## Purpose
<!-- agent-docs:fill:purpose -->

Routing chooses an orchestration condition per visible message from explicit,
auditable features rather than using one condition globally.

## Mental model & key files
<!-- agent-docs:fill:model -->

- `features.py` extracts message/state features available at decision time.
- `policy.py` maps those features to a condition and records the decision.
- Optimization and evaluation live outside the online policy so frozen policies
  remain reproducible.

## Patterns to follow / invariants
<!-- agent-docs:fill:patterns -->

- Features must be available strictly before the routed outcome.
- Record feature values, policy version/hash, selected arm, and fallback reason.
- Keep a fixed-condition baseline and charge routing overhead to the routed arm.
- Fail closed or use a preregistered fallback for unknown message types.

## Common tasks → first action
<!-- agent-docs:fill:tasks -->

- Feature change: prove no future-label leakage and update serialization tests.
- Policy change: freeze a new version and compare against fixed-arm baselines.

## Gotchas
<!-- agent-docs:fill:gotchas -->

- A router trained and evaluated on the same tasks is not a valid routing result.
- Model self-reports are not free features; count their tokens, latency, and risk.

