A living wiki for your codebase, maintained by your AI coding agents.
English | 简体中文 | Español | Português (Brasil)
mex maps your code, turns what agents learn into structured Markdown, and keeps that knowledge connected to the implementation it describes.
Every coding session starts with relevant architectural context instead of another full-repository scan.
New in v0.7.2: source-backed one-call graph retrieval with compiler-resolved TypeScript flows, deterministic evidence, and hard output budgets.
💬 Join the mex community on Discord — discuss ideas, get help, share feedback, and contribute to the project.
npx mex-agent setup
Your codebase knows more than its documentation
Architecture, conventions, edge cases, and past decisions are scattered across source code, pull requests, chat histories, and individual contributors.
AI coding agents rediscover that knowledge every session. A giant instruction file helps at first, but eventually floods the context window, becomes stale, and drifts away from the implementation.
mex creates a living, repo-local wiki that grows as agents work:
- agents document what they learn in readable Markdown
- a deterministic code graph connects that knowledge to exact symbols
- task-aware routing loads only the context needed for the current job
- drift checks identify knowledge affected by code changes
- completed work adds decisions, patterns, and current project state back into the wiki
The code remains the source of truth. The wiki becomes its maintained explanation.
| Ordinary project documentation | The mex living wiki |
|---|---|
| Written once and gradually forgotten | Grows from real coding work |
| Disconnected from the implementation | Claims can point to exact code symbols |
| Loaded as one giant instruction file | Context is routed by task |
| Refactors silently invalidate docs | Changed, moved, and missing symbols are detected |
| Every agent rediscovers the architecture | Agents inherit previous discoveries and decisions |
| Knowledge disappears between sessions | Decisions and reusable patterns persist in the repository |
How it works
1. Map the codebase
mex builds a deterministic local code graph using Tree-sitter and SQLite. It indexes symbols and relationships across TypeScript, TSX, JavaScript, JSX, Python, and Rust, including framework-aware Express route-to-handler relationships.
mex graph
2. Build the wiki
During setup, your coding ag