Stop dumping context. Route it.
loadout-os is a context-aware knowledge router for AI coding agents. Keep a tiny dispatch index always loaded; load memory and rule payloads only when the task matches. One CLI unifies the router (kernel), the MEMORY.md and CLAUDE.md adapters, and a fail-silent runtime hook that injects ≤5 pointer lines per prompt.
Install
npm install -g @mcptoolshop/loadout-os
Health check
loadout-os doctor
Index a store
loadout-os memories index MEMORY.md
One CLI, four surfaces
A Knowledge OS for agents — a deterministic router, two document adapters, a runtime hook, and the rituals that keep them in sync.
The knowledge router
A deterministic keyword + pattern matcher and a hierarchical resolver (global → org → project → session). Core entries always load; domain entries load on keyword match; manual entries only on explicit lookup. No regex DoS, no eval, no network.
MEMORY.md & CLAUDE.md adapters
Point the adapters at your memory store or instruction file and they generate a machine-readable dispatch table, then lint it for missing files, orphans, drift, and over-long entries. Same kernel, two document types.
The runtime hook
A UserPromptSubmit hook injects ≤5 pointer lines (≤200 tokens) to the memory entries relevant to your prompt — pointers, not payloads. A score floor keeps off-topic matches silent, and every error path exits 0 so a broken hook can never block a prompt.
Rituals: refresh · doctor · report
refresh regenerates, validates, and publishes the dispatch index in one command (with a backup compensator). doctor is a read-only 8-check health screen. report gives you usage, dead-entry, and budget observability over the append-only usage log.
Usage
Install
npm install -g @mcptoolshop/loadout-os
loadout-os --help Check the whole system
# read-only 8-check health screen
loadout-os doctor Index a memory store
# MEMORY.md → dispatch table
loadout-os memories index ~/.claude/projects/F--AI/memory/MEMORY.md See where context goes
# usage + dead entries + token budget
loadout-os report --json