Last week, a developer named Daksh shipped a tool called mex. By morning: 300+ stars, a 28k-follower dev tweeting about it, strangers sending PRs.
What made this one land is not the hype. It is the problem it actually solves, which any developer running AI agents on a real codebase has already felt. Context windows fill up fast. You ask your agent to fix a small auth bug and it loads your entire project. Conventions, architecture docs, README, half-finished migration files, config nobody touched in eight months. Most of it has nothing to do with the task. The agent starts drifting because it is swimming in noise it was never supposed to see.
Here is what it actually does. Instead of loading your entire project context into every AI prompt, mex creates a structured scaffold in .mex/ with a ~120-token bootstrap. That bootstrap points to a routing table. The routing table maps task types to specific context files. Working on auth? Load context/architecture.md. Writing new code? Load context/conventions.md. The agent gets exactly what it needs. Nothing else.
Think of it like a table of contents for your codebase that the agent reads before it does anything else. The routing table is a simple config file you define. You set categories: “auth tasks,” “API work,” “frontend changes.” Each category maps to the exact files that matter for that type of work. The agent reads the bootstrap, checks the routing table, pulls the relevant context files, and starts. It does not need your database schema when you are fixing a CSS bug. It does not need your API conventions when you are debugging a shell script. The routing layer enforces that boundary automatically.
One community test across 18 files: 10/10 tasks passed. Average token reduction of 60% per session. “Open UFW port” dropped from 3,300 tokens to 1,050. That is not noise.
That 60% number compounds fast. If you run 20 AI tasks a day, you are cutting token usage roughly in half across every single one. For teams paying by token, that is real money. For solo developers on rate-limited free tiers, that is the difference between finishing a session or hitting a wall at the worst possible moment. The 10/10 task pass rate matters too. It means the routing is accurate, not just trimming context and hoping the agent figures it out. Targeted context is outperforming full context in both cost and accuracy at the same time.
Here is the part that actually surprised people.
The drift detector runs on zero tokens and zero AI. It is a CLI with 8 checkers that validates your scaffold against your real codebase. It catches referenced file paths that no longer exist, npm scripts your docs mention that got deleted, dependency version conflicts, scaffold files untouched across 50+ commits. When it finds issues, mex sync builds a targeted prompt and fires Claude Code on only the broken files. Not everything. Just what broke.
This is the part worth slowing down on. Context scaffolding is only useful while it stays accurate. Most developers set up context files once and forget them. Six months later the codebase has changed. Files got renamed. Dependencies bumped. Scripts removed. Your context is now a lie, and your agent is confidently making decisions based on outdated information. The 8 checkers run in milliseconds. No API call. No token spend. No waiting on a model. You get a score. You see exactly what drifted. Then mex sync hands only the broken parts to Claude Code and lets it fix them surgically. You are not spending tokens re-explaining your whole project to patch one stale file reference.
How to set it up:
- 🗂️ Clone the repo at github.com/theDakshJaitly/mex
- 📁 Drop
.mex/into your project root and define your routing table - 🔍 Run the drift checker, no tokens, instant score
- 🔧 Run
mex syncwhen it finds gaps, Claude Code fixes only the broken files - Full docs at launchx.page/mex/docs
Pro tip: The routing layer is the real upgrade here. You are not replacing your Claude Code setup, you are stopping it from loading context it does not need for the current task. Smaller prompts, faster results, fewer hallucinations from irrelevant noise.
Start by mapping your three most common task types and pointing them to context files you already maintain. An architecture doc and a conventions doc are enough to build your first routing table in under 10 minutes. Then run the drift checker and see what score you get. Chances are something in your existing docs is already stale, files renamed, scripts deleted, version numbers behind. Catching that alone is worth the setup time, before you even run a single AI task through it.
The project is actively maintained and taking contributions. If you are already using context files with your AI setup, this is worth 10 minutes to try. 🚀
I built this last week, woke up to 300+ stars and a developer with 28k followers tweeting about it, now PRs are coming in from contributors I’ve never met. Sharing here since this community is exactly who it’s built for.
by u/DJIRNMAN in PromptEngineering