nxrobins/dotscope
A self-correcting context compiler for AI coding agents. Ingests any codebase, enforces architectural rules, learns from every commit.
Platform-specific configuration:
{
"mcpServers": {
"dotscope": {
"command": "npx",
"args": [
"-y",
"dotscope"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
Point it at any codebase. It reads your dependency graph, mines your git history, and tells you things about your own code you didn't know.
pip install dotscope
dotscope ingest .⚡ Discoveries
Hidden dependencies (from 200 commits):
billing.py → webhook_handler.py 73% co-change, undocumented
auth/handler.py → cache/sessions.py 68% co-change, undocumented
Cross-cutting hub:
models/user.py imported by 14 files across 5 modules
A change here affects 23 files transitively
Volatility surprise:
config/settings.py — 47 commits, 380 lines changed
Most changed file in the repo. No documentation exists for it.
📊 Backtested against 200 recent commits:
Overall recall: 91% — scopes would have given agents the right files
Token reduction: 88% — from ~47,000 to ~4,200 per resolution
auth/ ████████░░ 93%
api/ █████████░ 96%
payments ███████░░░ 71% ← needs attentionThat's your codebase. Those hidden dependencies are real. That 73% co-change rate between billing.py and webhook_handler.py means every time someone changes one without the other, there's a bug. dotscope found it in your git history and will tell every agent about it before they start working.
---
dotscope writes .scope files — one per module — that carry the architectural knowledge agents can't derive from code alone. When an agent resolves a scope, it gets the right files, the right context, and the rules it should follow:
dotscope check
HOLD implicit_contract
auth/tokens.py modified without api/auth_routes.py (82% co-change)
Likely needs changes: validate_token(), refresh_handler()
NOTE architectural_intent
New import from payments/ in auth/handler.py
Intent: decouple auth/ from payments/
dotscope: 1 hold, 1 note — address holds to proceedThe hold comes with a fix proposal. The agent applies it without thinking.
If a token budget would silently drop a critical file,
Loading reviews...