dsh-routing-suite: The Surgery Kit for Steering LLMs Mid-Flight
A runtime injector and reasoning-mode router that patches agent behavior without restart, then keeps models on task with near-field guidance and self-checking control loops.
- dsh-routing-suite is a live control layer for DSH agents, not a static prompt bundle.
- Its real trick is combining runtime injection with state-aware routing, so behavior can change without a restart.
- Near-field guidance turns prompt engineering into a repeated stabilizing protocol that tries to prevent drift and runaway reasoning.
- The suite is more operationally powerful than preset-only alternatives, but that power comes with more moving parts.
Most LLM tooling still assumes the prompt is the control surface. dsh-routing-suite assumes the opposite: the model is a live system, and the control surface needs to stay active after the first instruction. The repo combines a runtime injector with a reasoning-mode router, which means it can patch behavior while a session is already underway.
That is the interesting shift. Instead of treating agent behavior as something you declare once, it treats it as something you maintain. The result is less like prompt writing and more like operating a control loop.
The problem it is trying to fix
The repo is aimed at a familiar failure mode in agentic systems: the model keeps thinking, keeps looping, or keeps overfitting to its own reasoning trail when the task really needs forward motion. Static prompts help at the start, but they do not stop drift once the conversation gets long or the tool surface gets messy.
Near-field guidance: 每轮用户消息后注入固定引导(缓存92-94% 命中),路由96% + 收敛100% + 反稀释
Two moving parts, one control system
The suite is built around two submodules. The injector/ side handles runtime intervention. The preset/ side handles the routing logic that chooses between behavior bands like planning, execution, and weaker self-classification. Together they form a control stack, not two unrelated folders.
# High-level shape of the install flow
# 1. register injector
# 2. map presets into the local DSH profile
dsh plugin --profile web add injector
Copy-Item -Recurse .\preset $env:USERPROFILE\.dsh\.agent-presets\
# The point is not the exact syntax.
# The point is that routing is installed as a live environment layer.
How near-field guidance keeps the model on track
This is the heart of the repo. The README frames near-field guidance as fixed control signals injected after each user message, which means the system is not relying on a single opening instruction to hold attention. It keeps re-applying a short stabilizing layer: recall, converge, anti-runaway.
That matters because the failure mode is temporal. A model can start cleanly and then get lost once the task expands, the context fills, or the tool surface becomes noisy. This repo responds by treating focus as something to re-establish repeatedly, not something you get for free at the top of the conversation.
In practical terms, that makes routing feel closer to a protocol than a prompt. The model is being reminded how to stay aligned every time new user input arrives, and the router can classify the task state at the same time. The control loop is doing two jobs at once: stabilize and steer.
Why runtime injection changes the game
A preset-only system is static. Once installed, it tends to stay fixed until you restart or manually swap files. Runtime injection changes that by letting the suite promote, repair, add, or hot-reload route logic while the agent is already active.
That is the operational difference. If the current mode is wrong, you do not need to tear down the session and rebuild the environment. You can intervene in place. For debugging, for long sessions, and for model-specific routing quirks, that is a meaningful upgrade in leverage.
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
Spec, react, and weak are not just modes
The suite does not try to force every task through one universal prompt. It separates behavior bands. Spec is for planning. React is for direct execution. Weak is a fallback when the model needs a lighter self-classification path.
| Aspect | Preset-only setups | dsh-routing-suite |
|---|---|---|
| Live hot-swapping | Usually no | Yes, via runtime injector |
| Mode switching | Manual or static | Task-aware and session-aware |
| Self-observation tools | Limited | Includes dev-oriented routing state tools |
| Complexity | Lower | Higher |
| Best use case | Simple, stable workflows | Long sessions, debugging, and unstable reasoning tasks |
That matters because routing strategy is a form of governance. The suite is not asking, “What is the one best prompt?” It is asking, “What behavior should this model run under right now?” That is a more operational view of AI control.
What it beats, and what it trades off
Compared with preset-only alternatives, the suite is more powerful because it can intervene live. Compared with narrower routers, it adds runtime flexibility and self-checking tools. But the tradeoff is obvious: more parts, more moving state, more to debug.
That is why this repo is interesting beyond its own ecosystem. It points to a broader shift in open-source AI tooling. People are moving from prompt packs to control planes, from static templates to active behavior management. This project is a clean example of that transition.
| Approach | Strength | Weakness |
|---|---|---|
| Preset-only DSH | Simple to install and reason about | Cannot adapt mid-session |
| Narrow router | Focused mode selection | Less runtime flexibility |
| dsh-routing-suite | Live intervention plus routing depth | More complex to operate |
If you want a single sentence summary: this is not a prompt bundle. It is an attempt to make LLM behavior steerable while the system is already in motion.