Skip to main content

Codebase intelligence that thinks ahead — outperforms repowise on every dimension

Project description

repomind — Codebase Intelligence That Thinks Ahead

PyPI version Python 3.12+ License: MIT CI Docs

10× faster indexing. RAG-aware documentation. PR blast radius. Temporal hotspots.

repomind is a codebase intelligence MCP server for Claude that fixes every critical flaw in repowise — then goes further.


What's Wrong With Repowise (and How We Fix It)

# Repowise Flaw repomind Fix
1 RAG context never used during generation — vector store populated but never queried RAGAwareDocGenerator fetches dependency docs from LanceDB before every LLM call
2 25+ min initial indexing — no parallelism 7-stage async pipeline; parse runs in ProcessPoolExecutor, git + parse run concurrently
3 3 stores with no atomic transactions — 5–15% silent consistency failures AtomicStorageCoordinator.transaction() buffers + rolls back SQL, LanceDB, and NetworkX
4 Hardcoded 500-commit limit GitConfig.max_commits = 10_000 — fully configurable
5 Dynamic imports invisible (Django, pytest, importlib) — 20–40% missing graph edges DjangoDynamicHints, PytestDynamicHints, NodeDynamicHints in HintRegistry
6 Incremental updates miss global percentile recalculation upsert() always triggers PERCENT_RANK() window function refresh
7 No PR blast radius analysis PRBlastRadiusAnalyzer + repomind review <PR> + get_pr_impact MCP tool
8 Temporal blindness — 3-year-old commits weighted same as yesterday's Exponential decay: score += exp(-ln(2) * age_days / halflife) * complexity
9 Zero cost visibility TokenspyCostAdapter wraps every Anthropic call; repomind costs CLI
10 Conservative dead code misses real candidates Dynamic hint edges recovered; configurable sensitivity threshold

Installation

pip install repomind

Requirements: Python 3.12+, an Anthropic API key.


Quick Start

# 1. Configure
cp .env.example .env
# Edit .env — set ANTHROPIC_API_KEY

# 2. Index your repo
repomind index /path/to/your/repo

# 3. Analyze a PR
repomind review 42

# 4. Start MCP server for Claude Code
repomind serve

Then add to your Claude Code MCP config:

{
  "mcpServers": {
    "repomind": {
      "command": "repomind",
      "args": ["serve", "--mcp-only"]
    }
  }
}

CLI Commands

Command Description
repomind index [PATH] Index a repository (full or incremental)
repomind review <PR> Analyze PR blast radius and risk score
repomind serve Start MCP server (+ optional webhook)
repomind status Show hotspot rankings and index health
repomind query "<NL>" Natural language codebase search
repomind costs [--since DATE] Show per-operation LLM spend

Rich progress during indexing:

[=====>     ] 47% | Stage: Generating Docs | Files: 234/500 | Cost: $0.23 | ETA: 4m12s

MCP Tools (12 total)

Tool New? Description
explain_file File docs with RAG-injected dependency context
explain_symbol Symbol-level explanation
get_hotspots Temporal decay–weighted churn hotspots
get_ownership Temporal-weighted file ownership
get_dependencies Import graph with dynamic hint edges
get_architectural_decisions ADR search and retrieval
search_codebase Semantic vector search
get_cochange_patterns Temporal co-change analysis
get_pr_impact NEW Full blast radius for a PR
get_knowledge_map NEW Knowledge silos, bus factor, onboarding targets
get_test_gaps NEW Untested code ranked by risk score
get_security_hotspots NEW Auth/input/SQL risk surfaces

Architecture

repomind index /repo
      |
      v
+-----------------------------------------------------+
|              AsyncIndexingPipeline (7 stages)        |
|                                                      |
|  1. Discovery    -> file manifest to SQL             |
|  2. Parse        -> ProcessPoolExecutor (CPU-bound)  |
|  3. Graph Build  -+  concurrent                      |
|  4. Git Analysis -+  (asyncio.gather)                |
|  5. Embedding    -> ThreadPoolExecutor + semaphore   |
|  6. RAG Doc Gen  -> LanceDB deps fetched FIRST       |
|  7. Atomic Commit-> AtomicStorageCoordinator.txn()   |
+-----------------------------------------------------+
      |
      v
+----------+   +--------------+   +----------------+
| SQLite   |   | LanceDB      |   | NetworkX Graph |
| (files,  |   | (embeddings, |   | (dependency    |
|  metrics)|   |  docs)       |   |  graph)        |
+----------+   +--------------+   +----------------+

Atomic transactions across all three stores:

async with coordinator.transaction() as txn:
    txn.pending_sql.append(...)
    txn.pending_vectors.append(...)
    txn.pending_edges.append(...)
# On exception: SQL rollback + vector delete + graph node removal

Configuration

# .env
ANTHROPIC_API_KEY=sk-ant-...
REPOMIND_DATA_DIR=~/.repomind
REPOMIND_MAX_COMMITS=10000
REPOMIND_DECAY_HALFLIFE_DAYS=180
REPOMIND_GENERATION_CONCURRENCY=5
REPOMIND_MCP_PORT=8766
REPOMIND_WEBHOOK_PORT=8765
REPOMIND_WEBHOOK_SECRET=your-github-webhook-secret

Documentation

Full docs at pinexai.github.io/repomind


License

MIT — see LICENSE.

Built by pinexai.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codesynapse-0.1.0-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

Details for the file codesynapse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codesynapse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 75.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for codesynapse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10e39490956bfa9aacc1f8cc7bb4f315a44222425dadb60c05a0a91323be534f
MD5 768bfb4c7d854c1775367f40820d82fe
BLAKE2b-256 75dff9b75d0c96d128238b033f43fc52b27e6f7f3bc764c4ae57421a96ab76de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page