Change Data Capture for AI-assisted codebases. Keeps context files alive as your code evolves.
Project description
🧠 ContextMesh
The Change Data Capture (CDC) engine for AI Context. Stop feeding your agents stale docs.
If your AI coding agents (Claude Code, Cursor, Devin) are hallucinating import paths or struggling with multi-file refactors, it's because static context files rot.
ContextMesh is an active, ast-aware framework that monitors your codebase and surgically patches CONTEXT.md files as you code, ensuring your AI always has 100% accurate, hierarchical understanding of your repository.
It is not a scraper. It is a real-time CDC engine.
🚀 The 10x Claim (Benchmarks vs Static Scrapers)
We tested ContextMesh against monolithic generation approaches (e.g., Graphifyy) on a massive Django codebase:
- 💸 99% Cheaper per Commit: Because ContextMesh uses surgical AST Diff-patching (
--from HEAD~1), updating a core feature cost 4,275 tokens ($0.00). Re-running a traditional scraper on a large repo takes ~2,000,000 tokens. - ⚡ Native IDE Speeds: Full scaffold takes several minutes. Evaluating a local save takes ~1.2 seconds.
- 🛡️ 100% Elimination of Context Drift: Our
contextmesh validateengine parses the entire hierarchy. During testing, it caught 34 semantic drift issues (missing children directories, broken lateral links) that markdown scrapers missed entirely.
🔥 Features
- Ghost Watcher Daemon: Run
contextmesh watch(or use the VSCode extension) and it will debounce filesystem events, automatically patching context files in the background without user intervention. - Hierarchical Context Tree: Builds a parent-child mesh of
CONTEXT.mdfiles so your AI understands local logic and horizontal dependencies (e.g.authdepends ondatabase). - VSCode Extension & MCP Server: Don't like CLI tools? Use the VSCode Extension! It natively bridges to the Engine via the Model Context Protocol (MCP), giving Cursor/Claude Code native access to Health Scores and Auto-Fix capabilities.
🛠️ Usage
CLI Installation
pipx install contextmesh-cli
contextmesh init
1. Scaffold your Project
# Generate the semantic mesh for the first time
contextmesh scaffold .
2. Auto-Maintain (The Ghost Watcher)
# Run this, and never worry about context decay again.
contextmesh watch
3. Native IDE Integration (MCP)
ContextMesh acts as a standard MCP server. You can allow Cursor/Claude to natively invoke health checks and context regeneration via STDIO:
{
"mcpServers": {
"contextmesh": {
"command": "contextmesh",
"args": ["mcp-serve"]
}
}
}
🧠 Architecture
- Diff Analyzer: Catches filesystem or git changes.
- Salience Classifier: Rejects trivial changes (e.g., changing a string). Only passes structural AST changes.
- LLM Patcher: Surgically modifies exactly the portion of the
CONTEXT.mdthat changed. - Cross-Doc Validator: Runs rules over the tree to ensure parents don't hallucinate missing children.
🤝 Next.js / Cloud Dashboard
Coming soon in Phase 4 for enterprise governance and tracking team context-health.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextmesh_cli-0.1.0.tar.gz.
File metadata
- Download URL: contextmesh_cli-0.1.0.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ddac8c9a9510e491297b38bc83e4dbb92348eb728536cf65fa18007b863ae6a
|
|
| MD5 |
9e1114b483d464b57c789af5916a83fb
|
|
| BLAKE2b-256 |
4caabae10b176b0e01c9fb591019aefc6c2f3697fc65eb641653cba37f16a33e
|
File details
Details for the file contextmesh_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: contextmesh_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca0dcce106a522614529d7f9685e867678238d5b910336e7bcd2da1539c05a12
|
|
| MD5 |
05f5beb0f9de2a5d6cf95482595061a8
|
|
| BLAKE2b-256 |
86670c0adfdbe5b2ae113abed2a53b21f7fa47ea9940e22b1668bb1830a6860f
|