repobrain 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- repobrain-0.1.0/.env.example +13 -0
- repobrain-0.1.0/.github/workflows/ci.yml +51 -0
- repobrain-0.1.0/.github/workflows/docs.yml +31 -0
- repobrain-0.1.0/.github/workflows/publish.yml +37 -0
- repobrain-0.1.0/.gitignore +63 -0
- repobrain-0.1.0/CHANGELOG.md +23 -0
- repobrain-0.1.0/LICENSE +21 -0
- repobrain-0.1.0/PKG-INFO +257 -0
- repobrain-0.1.0/README.md +180 -0
- repobrain-0.1.0/docs/architecture/coordinator.md +47 -0
- repobrain-0.1.0/docs/architecture/pipeline.md +62 -0
- repobrain-0.1.0/docs/architecture/temporal.md +57 -0
- repobrain-0.1.0/docs/assets/demo.sh +60 -0
- repobrain-0.1.0/docs/cli/costs.md +35 -0
- repobrain-0.1.0/docs/cli/index-cmd.md +48 -0
- repobrain-0.1.0/docs/cli/index.md +20 -0
- repobrain-0.1.0/docs/cli/review.md +51 -0
- repobrain-0.1.0/docs/cli/serve.md +45 -0
- repobrain-0.1.0/docs/comparison.md +91 -0
- repobrain-0.1.0/docs/getting-started/configuration.md +46 -0
- repobrain-0.1.0/docs/getting-started/installation.md +35 -0
- repobrain-0.1.0/docs/getting-started/quickstart.md +86 -0
- repobrain-0.1.0/docs/index.md +39 -0
- repobrain-0.1.0/docs/mcp/knowledge-map.md +46 -0
- repobrain-0.1.0/docs/mcp/overview.md +40 -0
- repobrain-0.1.0/docs/mcp/pr-impact.md +62 -0
- repobrain-0.1.0/docs/mcp/security-hotspots.md +43 -0
- repobrain-0.1.0/docs/mcp/test-gaps.md +38 -0
- repobrain-0.1.0/docs/video-guide-script.md +128 -0
- repobrain-0.1.0/mkdocs.yml +75 -0
- repobrain-0.1.0/pyproject.toml +91 -0
- repobrain-0.1.0/repomind/__init__.py +15 -0
- repobrain-0.1.0/repomind/cli/__init__.py +3 -0
- repobrain-0.1.0/repomind/cli/commands/__init__.py +1 -0
- repobrain-0.1.0/repomind/cli/commands/costs.py +75 -0
- repobrain-0.1.0/repomind/cli/commands/index.py +86 -0
- repobrain-0.1.0/repomind/cli/commands/query.py +50 -0
- repobrain-0.1.0/repomind/cli/commands/review.py +152 -0
- repobrain-0.1.0/repomind/cli/commands/serve.py +56 -0
- repobrain-0.1.0/repomind/cli/commands/status.py +74 -0
- repobrain-0.1.0/repomind/cli/main.py +35 -0
- repobrain-0.1.0/repomind/config/__init__.py +10 -0
- repobrain-0.1.0/repomind/config/schema.py +106 -0
- repobrain-0.1.0/repomind/core/__init__.py +4 -0
- repobrain-0.1.0/repomind/core/coordinator.py +135 -0
- repobrain-0.1.0/repomind/core/indexer.py +352 -0
- repobrain-0.1.0/repomind/generation/__init__.py +13 -0
- repobrain-0.1.0/repomind/generation/cost_tracker.py +91 -0
- repobrain-0.1.0/repomind/generation/generator.py +156 -0
- repobrain-0.1.0/repomind/generation/prompts.py +128 -0
- repobrain-0.1.0/repomind/generation/rag.py +58 -0
- repobrain-0.1.0/repomind/git/__init__.py +16 -0
- repobrain-0.1.0/repomind/git/cochange.py +83 -0
- repobrain-0.1.0/repomind/git/history.py +119 -0
- repobrain-0.1.0/repomind/git/metrics.py +95 -0
- repobrain-0.1.0/repomind/git/pr_analyzer.py +265 -0
- repobrain-0.1.0/repomind/graph/__init__.py +4 -0
- repobrain-0.1.0/repomind/graph/analyzer.py +64 -0
- repobrain-0.1.0/repomind/graph/builder.py +111 -0
- repobrain-0.1.0/repomind/mcp/__init__.py +3 -0
- repobrain-0.1.0/repomind/mcp/server.py +500 -0
- repobrain-0.1.0/repomind/parsing/__init__.py +12 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/__init__.py +14 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/base.py +22 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/django.py +126 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/node.py +87 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/pytest.py +70 -0
- repobrain-0.1.0/repomind/parsing/dynamic_hints/registry.py +37 -0
- repobrain-0.1.0/repomind/parsing/languages/__init__.py +18 -0
- repobrain-0.1.0/repomind/parsing/languages/base.py +23 -0
- repobrain-0.1.0/repomind/parsing/languages/go.py +84 -0
- repobrain-0.1.0/repomind/parsing/languages/python.py +159 -0
- repobrain-0.1.0/repomind/parsing/languages/typescript.py +93 -0
- repobrain-0.1.0/repomind/parsing/parser.py +72 -0
- repobrain-0.1.0/repomind/parsing/symbols.py +36 -0
- repobrain-0.1.0/repomind/storage/__init__.py +14 -0
- repobrain-0.1.0/repomind/storage/graph/__init__.py +3 -0
- repobrain-0.1.0/repomind/storage/graph/store.py +102 -0
- repobrain-0.1.0/repomind/storage/sql/__init__.py +10 -0
- repobrain-0.1.0/repomind/storage/sql/database.py +186 -0
- repobrain-0.1.0/repomind/storage/sql/repositories/__init__.py +6 -0
- repobrain-0.1.0/repomind/storage/sql/repositories/costs.py +74 -0
- repobrain-0.1.0/repomind/storage/sql/repositories/decisions.py +57 -0
- repobrain-0.1.0/repomind/storage/sql/repositories/files.py +128 -0
- repobrain-0.1.0/repomind/storage/sql/repositories/git_metrics.py +135 -0
- repobrain-0.1.0/repomind/storage/vector/__init__.py +4 -0
- repobrain-0.1.0/repomind/storage/vector/embedder.py +45 -0
- repobrain-0.1.0/repomind/storage/vector/store.py +159 -0
- repobrain-0.1.0/repomind/utils/__init__.py +18 -0
- repobrain-0.1.0/repomind/utils/async_utils.py +57 -0
- repobrain-0.1.0/repomind/utils/file_utils.py +135 -0
- repobrain-0.1.0/repomind/utils/hash_utils.py +20 -0
- repobrain-0.1.0/repomind/utils/logging.py +35 -0
- repobrain-0.1.0/repomind/webhook/__init__.py +3 -0
- repobrain-0.1.0/repomind/webhook/handlers/__init__.py +4 -0
- repobrain-0.1.0/repomind/webhook/handlers/pr.py +92 -0
- repobrain-0.1.0/repomind/webhook/handlers/push.py +46 -0
- repobrain-0.1.0/repomind/webhook/server.py +62 -0
- repobrain-0.1.0/tests/conftest.py +64 -0
- repobrain-0.1.0/tests/integration/__init__.py +0 -0
- repobrain-0.1.0/tests/integration/test_storage.py +72 -0
- repobrain-0.1.0/tests/unit/__init__.py +0 -0
- repobrain-0.1.0/tests/unit/test_coordinator.py +58 -0
- repobrain-0.1.0/tests/unit/test_dynamic_hints.py +98 -0
- repobrain-0.1.0/tests/unit/test_file_utils.py +61 -0
- repobrain-0.1.0/tests/unit/test_git_metrics.py +72 -0
- repobrain-0.1.0/tests/unit/test_graph.py +78 -0
- repobrain-0.1.0/tests/unit/test_graph_builder.py +103 -0
- repobrain-0.1.0/tests/unit/test_parsing.py +97 -0
- repobrain-0.1.0/tests/unit/test_pr_analyzer.py +67 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# LLM Provider
|
|
2
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
3
|
+
# OPENAI_API_KEY=sk-...
|
|
4
|
+
# OLLAMA_BASE_URL=http://localhost:11434
|
|
5
|
+
|
|
6
|
+
# GitHub (optional — for PR analysis and webhook)
|
|
7
|
+
GITHUB_TOKEN=ghp_...
|
|
8
|
+
REPOMIND_WEBHOOK_SECRET=your-hmac-secret
|
|
9
|
+
|
|
10
|
+
# Overrides (all have defaults in .repomind.toml)
|
|
11
|
+
# REPOMIND_LLM__MODEL=claude-sonnet-4-6
|
|
12
|
+
# REPOMIND_GIT__MAX_COMMITS=10000
|
|
13
|
+
# REPOMIND_GIT__DECAY_HALFLIFE_DAYS=180
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
python-version: ["3.12", "3.13"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
cache: pip
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
pip install -e ".[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Run tests
|
|
32
|
+
run: |
|
|
33
|
+
pytest tests/ -v --cov=repomind --cov-report=xml --cov-report=term-missing
|
|
34
|
+
|
|
35
|
+
- name: Upload coverage
|
|
36
|
+
uses: codecov/codecov-action@v4
|
|
37
|
+
with:
|
|
38
|
+
file: ./coverage.xml
|
|
39
|
+
fail_ci_if_error: false
|
|
40
|
+
|
|
41
|
+
lint:
|
|
42
|
+
name: Lint
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
- uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.12"
|
|
49
|
+
cache: pip
|
|
50
|
+
- run: pip install ruff
|
|
51
|
+
- run: ruff check repomind/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
deploy:
|
|
13
|
+
name: Build and deploy docs
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0 # full history for git-revision-date
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
cache: pip
|
|
26
|
+
|
|
27
|
+
- name: Install docs dependencies
|
|
28
|
+
run: pip install mkdocs-material mkdocs-autorefs
|
|
29
|
+
|
|
30
|
+
- name: Build and deploy
|
|
31
|
+
run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
name: Build and publish
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: pypi
|
|
13
|
+
permissions:
|
|
14
|
+
id-token: write # for trusted publishing
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
cache: pip
|
|
24
|
+
|
|
25
|
+
- name: Install build tools
|
|
26
|
+
run: pip install build twine
|
|
27
|
+
|
|
28
|
+
- name: Build package
|
|
29
|
+
run: python -m build
|
|
30
|
+
|
|
31
|
+
- name: Check package
|
|
32
|
+
run: twine check dist/*
|
|
33
|
+
|
|
34
|
+
- name: Publish to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Virtual environments
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
ENV/
|
|
28
|
+
env/
|
|
29
|
+
|
|
30
|
+
# Testing
|
|
31
|
+
.tox/
|
|
32
|
+
.coverage
|
|
33
|
+
.coverage.*
|
|
34
|
+
htmlcov/
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
.mypy_cache/
|
|
37
|
+
.ruff_cache/
|
|
38
|
+
|
|
39
|
+
# Environment
|
|
40
|
+
.env
|
|
41
|
+
.env.*
|
|
42
|
+
!.env.example
|
|
43
|
+
|
|
44
|
+
# repomind runtime data
|
|
45
|
+
*.db
|
|
46
|
+
*.graphml
|
|
47
|
+
lancedb_data/
|
|
48
|
+
repomind_data/
|
|
49
|
+
|
|
50
|
+
# Docs build
|
|
51
|
+
site/
|
|
52
|
+
|
|
53
|
+
# IDE
|
|
54
|
+
.idea/
|
|
55
|
+
.vscode/
|
|
56
|
+
*.swp
|
|
57
|
+
*.swo
|
|
58
|
+
|
|
59
|
+
# macOS
|
|
60
|
+
.DS_Store
|
|
61
|
+
|
|
62
|
+
# Distribution
|
|
63
|
+
*.whl
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to repomind are documented here.
|
|
4
|
+
|
|
5
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
6
|
+
Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
7
|
+
|
|
8
|
+
## [0.1.0] — 2026-04-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **AtomicStorageCoordinator** — context manager that buffers writes across SQL + LanceDB + NetworkX and rolls back all three on failure
|
|
13
|
+
- **AsyncIndexingPipeline** — 7-stage parallel pipeline; parse stage runs in `ProcessPoolExecutor`, git analysis runs concurrently with graph building
|
|
14
|
+
- **RAGAwareDocGenerator** — fetches dependency docs from LanceDB *before* every LLM call (fixes repowise's #1 flaw)
|
|
15
|
+
- **TemporalMetricsCalculator** — exponential decay scoring `exp(-ln(2) * age_days / halflife)` weights recent commits higher
|
|
16
|
+
- **PRBlastRadiusAnalyzer** — direct + transitive graph traversal, risk scoring 0–10, co-change warnings, reviewer recommendations
|
|
17
|
+
- **Dynamic import hints** — `DjangoDynamicHints`, `PytestDynamicHints`, `NodeDynamicHints` recover 20–40% missing graph edges
|
|
18
|
+
- **12 MCP tools** — 8 improved from repowise + 4 new: `get_pr_impact`, `get_knowledge_map`, `get_test_gaps`, `get_security_hotspots`
|
|
19
|
+
- **6 CLI commands** — `index`, `review`, `serve`, `status`, `query`, `costs`
|
|
20
|
+
- **GitHub webhook server** — HMAC-SHA256 validated, incremental re-index on push, blast radius on PR open/sync
|
|
21
|
+
- **TokenspyCostAdapter** — tracks per-operation LLM spend via tokenspy
|
|
22
|
+
- **Configurable git depth** — `GitConfig.max_commits = 10_000` (repowise hardcodes 500)
|
|
23
|
+
- **Percentile rank refresh** — `GitMetricsRepository.upsert()` always triggers `PERCENT_RANK()` window function refresh
|
repobrain-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pinaki Mishra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
repobrain-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: repobrain
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Codebase intelligence that thinks ahead — outperforms repowise on every dimension
|
|
5
|
+
Project-URL: Homepage, https://pinexai.github.io/repomind
|
|
6
|
+
Project-URL: Repository, https://github.com/pinexai/repomind
|
|
7
|
+
Project-URL: Documentation, https://pinexai.github.io/repomind
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/pinexai/repomind/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/pinexai/repomind/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: Pinaki Mishra <pinaki@pinexai.com>
|
|
11
|
+
License: MIT License
|
|
12
|
+
|
|
13
|
+
Copyright (c) 2026 Pinaki Mishra
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in all
|
|
23
|
+
copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
|
+
SOFTWARE.
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Keywords: claude,codebase,developer-tools,intelligence,mcp
|
|
34
|
+
Classifier: Development Status :: 4 - Beta
|
|
35
|
+
Classifier: Environment :: Console
|
|
36
|
+
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
38
|
+
Classifier: Programming Language :: Python :: 3
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
42
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
43
|
+
Classifier: Typing :: Typed
|
|
44
|
+
Requires-Python: >=3.12
|
|
45
|
+
Requires-Dist: aiosqlite>=0.20
|
|
46
|
+
Requires-Dist: anthropic>=0.40
|
|
47
|
+
Requires-Dist: click>=8.1
|
|
48
|
+
Requires-Dist: fastapi>=0.115
|
|
49
|
+
Requires-Dist: fastmcp>=2.0
|
|
50
|
+
Requires-Dist: gitpython>=3.1
|
|
51
|
+
Requires-Dist: httpx>=0.27
|
|
52
|
+
Requires-Dist: lancedb>=0.12
|
|
53
|
+
Requires-Dist: networkx>=3.3
|
|
54
|
+
Requires-Dist: openai>=1.50
|
|
55
|
+
Requires-Dist: pyarrow>=14.0
|
|
56
|
+
Requires-Dist: pydantic-settings>=2.5
|
|
57
|
+
Requires-Dist: pydantic>=2.8
|
|
58
|
+
Requires-Dist: python-dotenv>=1.0
|
|
59
|
+
Requires-Dist: rich>=13.7
|
|
60
|
+
Requires-Dist: scipy>=1.11
|
|
61
|
+
Requires-Dist: structlog>=24.0
|
|
62
|
+
Requires-Dist: tenacity>=9.0
|
|
63
|
+
Requires-Dist: tree-sitter>=0.21
|
|
64
|
+
Requires-Dist: uvicorn[standard]>=0.32
|
|
65
|
+
Provides-Extra: dev
|
|
66
|
+
Requires-Dist: build>=1.2; extra == 'dev'
|
|
67
|
+
Requires-Dist: mkdocs-autorefs>=1.0; extra == 'dev'
|
|
68
|
+
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
|
|
69
|
+
Requires-Dist: mypy>=1.11; extra == 'dev'
|
|
70
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
71
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
72
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
73
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
74
|
+
Requires-Dist: twine>=5.0; extra == 'dev'
|
|
75
|
+
Requires-Dist: types-networkx; extra == 'dev'
|
|
76
|
+
Description-Content-Type: text/markdown
|
|
77
|
+
|
|
78
|
+
# repomind — Codebase Intelligence That Thinks Ahead
|
|
79
|
+
|
|
80
|
+
[](https://pypi.org/project/repomind/)
|
|
81
|
+
[](https://www.python.org/downloads/)
|
|
82
|
+
[](LICENSE)
|
|
83
|
+
[](https://github.com/pinexai/repomind/actions/workflows/ci.yml)
|
|
84
|
+
[](https://pinexai.github.io/repomind)
|
|
85
|
+
|
|
86
|
+
> **10× faster indexing. RAG-aware documentation. PR blast radius. Temporal hotspots.**
|
|
87
|
+
>
|
|
88
|
+
> repomind is a codebase intelligence MCP server for Claude that fixes every critical flaw in repowise — then goes further.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## What's Wrong With Repowise (and How We Fix It)
|
|
93
|
+
|
|
94
|
+
| # | Repowise Flaw | repomind Fix |
|
|
95
|
+
|---|---------------|--------------|
|
|
96
|
+
| 1 | **RAG context never used during generation** — vector store populated but never queried | `RAGAwareDocGenerator` fetches dependency docs from LanceDB *before* every LLM call |
|
|
97
|
+
| 2 | **25+ min initial indexing** — no parallelism | 7-stage async pipeline; parse runs in `ProcessPoolExecutor`, git + parse run concurrently |
|
|
98
|
+
| 3 | **3 stores with no atomic transactions** — 5–15% silent consistency failures | `AtomicStorageCoordinator.transaction()` buffers + rolls back SQL, LanceDB, and NetworkX |
|
|
99
|
+
| 4 | **Hardcoded 500-commit limit** | `GitConfig.max_commits = 10_000` — fully configurable |
|
|
100
|
+
| 5 | **Dynamic imports invisible** (Django, pytest, importlib) — 20–40% missing graph edges | `DjangoDynamicHints`, `PytestDynamicHints`, `NodeDynamicHints` in `HintRegistry` |
|
|
101
|
+
| 6 | **Incremental updates miss global percentile recalculation** | `upsert()` always triggers `PERCENT_RANK()` window function refresh |
|
|
102
|
+
| 7 | **No PR blast radius analysis** | `PRBlastRadiusAnalyzer` + `repomind review <PR>` + `get_pr_impact` MCP tool |
|
|
103
|
+
| 8 | **Temporal blindness** — 3-year-old commits weighted same as yesterday's | Exponential decay: `score += exp(-ln(2) * age_days / halflife) * complexity` |
|
|
104
|
+
| 9 | **Zero cost visibility** | `TokenspyCostAdapter` wraps every Anthropic call; `repomind costs` CLI |
|
|
105
|
+
| 10 | **Conservative dead code** misses real candidates | Dynamic hint edges recovered; configurable sensitivity threshold |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Installation
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install repomind
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Requirements:** Python 3.12+, an Anthropic API key.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Quick Start
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# 1. Configure
|
|
123
|
+
cp .env.example .env
|
|
124
|
+
# Edit .env — set ANTHROPIC_API_KEY
|
|
125
|
+
|
|
126
|
+
# 2. Index your repo
|
|
127
|
+
repomind index /path/to/your/repo
|
|
128
|
+
|
|
129
|
+
# 3. Analyze a PR
|
|
130
|
+
repomind review 42
|
|
131
|
+
|
|
132
|
+
# 4. Start MCP server for Claude Code
|
|
133
|
+
repomind serve
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Then add to your Claude Code MCP config:
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"mcpServers": {
|
|
141
|
+
"repomind": {
|
|
142
|
+
"command": "repomind",
|
|
143
|
+
"args": ["serve", "--mcp-only"]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## CLI Commands
|
|
152
|
+
|
|
153
|
+
| Command | Description |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `repomind index [PATH]` | Index a repository (full or incremental) |
|
|
156
|
+
| `repomind review <PR>` | Analyze PR blast radius and risk score |
|
|
157
|
+
| `repomind serve` | Start MCP server (+ optional webhook) |
|
|
158
|
+
| `repomind status` | Show hotspot rankings and index health |
|
|
159
|
+
| `repomind query "<NL>"` | Natural language codebase search |
|
|
160
|
+
| `repomind costs [--since DATE]` | Show per-operation LLM spend |
|
|
161
|
+
|
|
162
|
+
**Rich progress during indexing:**
|
|
163
|
+
```
|
|
164
|
+
[=====> ] 47% | Stage: Generating Docs | Files: 234/500 | Cost: $0.23 | ETA: 4m12s
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## MCP Tools (12 total)
|
|
170
|
+
|
|
171
|
+
| Tool | New? | Description |
|
|
172
|
+
|------|------|-------------|
|
|
173
|
+
| `explain_file` | — | File docs with RAG-injected dependency context |
|
|
174
|
+
| `explain_symbol` | — | Symbol-level explanation |
|
|
175
|
+
| `get_hotspots` | — | Temporal decay–weighted churn hotspots |
|
|
176
|
+
| `get_ownership` | — | Temporal-weighted file ownership |
|
|
177
|
+
| `get_dependencies` | — | Import graph with dynamic hint edges |
|
|
178
|
+
| `get_architectural_decisions` | — | ADR search and retrieval |
|
|
179
|
+
| `search_codebase` | — | Semantic vector search |
|
|
180
|
+
| `get_cochange_patterns` | — | Temporal co-change analysis |
|
|
181
|
+
| `get_pr_impact` | **NEW** | Full blast radius for a PR |
|
|
182
|
+
| `get_knowledge_map` | **NEW** | Knowledge silos, bus factor, onboarding targets |
|
|
183
|
+
| `get_test_gaps` | **NEW** | Untested code ranked by risk score |
|
|
184
|
+
| `get_security_hotspots` | **NEW** | Auth/input/SQL risk surfaces |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Architecture
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
repomind index /repo
|
|
192
|
+
|
|
|
193
|
+
v
|
|
194
|
+
+-----------------------------------------------------+
|
|
195
|
+
| AsyncIndexingPipeline (7 stages) |
|
|
196
|
+
| |
|
|
197
|
+
| 1. Discovery -> file manifest to SQL |
|
|
198
|
+
| 2. Parse -> ProcessPoolExecutor (CPU-bound) |
|
|
199
|
+
| 3. Graph Build -+ concurrent |
|
|
200
|
+
| 4. Git Analysis -+ (asyncio.gather) |
|
|
201
|
+
| 5. Embedding -> ThreadPoolExecutor + semaphore |
|
|
202
|
+
| 6. RAG Doc Gen -> LanceDB deps fetched FIRST |
|
|
203
|
+
| 7. Atomic Commit-> AtomicStorageCoordinator.txn() |
|
|
204
|
+
+-----------------------------------------------------+
|
|
205
|
+
|
|
|
206
|
+
v
|
|
207
|
+
+----------+ +--------------+ +----------------+
|
|
208
|
+
| SQLite | | LanceDB | | NetworkX Graph |
|
|
209
|
+
| (files, | | (embeddings, | | (dependency |
|
|
210
|
+
| metrics)| | docs) | | graph) |
|
|
211
|
+
+----------+ +--------------+ +----------------+
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Atomic transactions across all three stores:**
|
|
215
|
+
```python
|
|
216
|
+
async with coordinator.transaction() as txn:
|
|
217
|
+
txn.pending_sql.append(...)
|
|
218
|
+
txn.pending_vectors.append(...)
|
|
219
|
+
txn.pending_edges.append(...)
|
|
220
|
+
# On exception: SQL rollback + vector delete + graph node removal
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Configuration
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# .env
|
|
229
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
230
|
+
REPOMIND_DATA_DIR=~/.repomind
|
|
231
|
+
REPOMIND_MAX_COMMITS=10000
|
|
232
|
+
REPOMIND_DECAY_HALFLIFE_DAYS=180
|
|
233
|
+
REPOMIND_GENERATION_CONCURRENCY=5
|
|
234
|
+
REPOMIND_MCP_PORT=8766
|
|
235
|
+
REPOMIND_WEBHOOK_PORT=8765
|
|
236
|
+
REPOMIND_WEBHOOK_SECRET=your-github-webhook-secret
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Documentation
|
|
242
|
+
|
|
243
|
+
Full docs at **[pinexai.github.io/repomind](https://pinexai.github.io/repomind)**
|
|
244
|
+
|
|
245
|
+
- [Installation & Quick Start](https://pinexai.github.io/repomind/getting-started/quickstart/)
|
|
246
|
+
- [CLI Reference](https://pinexai.github.io/repomind/cli/)
|
|
247
|
+
- [MCP Tools Reference](https://pinexai.github.io/repomind/mcp/overview/)
|
|
248
|
+
- [Architecture Deep Dive](https://pinexai.github.io/repomind/architecture/pipeline/)
|
|
249
|
+
- [repomind vs repowise](https://pinexai.github.io/repomind/comparison/)
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## License
|
|
254
|
+
|
|
255
|
+
MIT — see [LICENSE](LICENSE).
|
|
256
|
+
|
|
257
|
+
Built by [pinexai](https://github.com/pinexai).
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# repomind — Codebase Intelligence That Thinks Ahead
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/repomind/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://github.com/pinexai/repomind/actions/workflows/ci.yml)
|
|
7
|
+
[](https://pinexai.github.io/repomind)
|
|
8
|
+
|
|
9
|
+
> **10× faster indexing. RAG-aware documentation. PR blast radius. Temporal hotspots.**
|
|
10
|
+
>
|
|
11
|
+
> repomind is a codebase intelligence MCP server for Claude that fixes every critical flaw in repowise — then goes further.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What's Wrong With Repowise (and How We Fix It)
|
|
16
|
+
|
|
17
|
+
| # | Repowise Flaw | repomind Fix |
|
|
18
|
+
|---|---------------|--------------|
|
|
19
|
+
| 1 | **RAG context never used during generation** — vector store populated but never queried | `RAGAwareDocGenerator` fetches dependency docs from LanceDB *before* every LLM call |
|
|
20
|
+
| 2 | **25+ min initial indexing** — no parallelism | 7-stage async pipeline; parse runs in `ProcessPoolExecutor`, git + parse run concurrently |
|
|
21
|
+
| 3 | **3 stores with no atomic transactions** — 5–15% silent consistency failures | `AtomicStorageCoordinator.transaction()` buffers + rolls back SQL, LanceDB, and NetworkX |
|
|
22
|
+
| 4 | **Hardcoded 500-commit limit** | `GitConfig.max_commits = 10_000` — fully configurable |
|
|
23
|
+
| 5 | **Dynamic imports invisible** (Django, pytest, importlib) — 20–40% missing graph edges | `DjangoDynamicHints`, `PytestDynamicHints`, `NodeDynamicHints` in `HintRegistry` |
|
|
24
|
+
| 6 | **Incremental updates miss global percentile recalculation** | `upsert()` always triggers `PERCENT_RANK()` window function refresh |
|
|
25
|
+
| 7 | **No PR blast radius analysis** | `PRBlastRadiusAnalyzer` + `repomind review <PR>` + `get_pr_impact` MCP tool |
|
|
26
|
+
| 8 | **Temporal blindness** — 3-year-old commits weighted same as yesterday's | Exponential decay: `score += exp(-ln(2) * age_days / halflife) * complexity` |
|
|
27
|
+
| 9 | **Zero cost visibility** | `TokenspyCostAdapter` wraps every Anthropic call; `repomind costs` CLI |
|
|
28
|
+
| 10 | **Conservative dead code** misses real candidates | Dynamic hint edges recovered; configurable sensitivity threshold |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install repomind
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Requirements:** Python 3.12+, an Anthropic API key.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 1. Configure
|
|
46
|
+
cp .env.example .env
|
|
47
|
+
# Edit .env — set ANTHROPIC_API_KEY
|
|
48
|
+
|
|
49
|
+
# 2. Index your repo
|
|
50
|
+
repomind index /path/to/your/repo
|
|
51
|
+
|
|
52
|
+
# 3. Analyze a PR
|
|
53
|
+
repomind review 42
|
|
54
|
+
|
|
55
|
+
# 4. Start MCP server for Claude Code
|
|
56
|
+
repomind serve
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Then add to your Claude Code MCP config:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"mcpServers": {
|
|
64
|
+
"repomind": {
|
|
65
|
+
"command": "repomind",
|
|
66
|
+
"args": ["serve", "--mcp-only"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## CLI Commands
|
|
75
|
+
|
|
76
|
+
| Command | Description |
|
|
77
|
+
|---------|-------------|
|
|
78
|
+
| `repomind index [PATH]` | Index a repository (full or incremental) |
|
|
79
|
+
| `repomind review <PR>` | Analyze PR blast radius and risk score |
|
|
80
|
+
| `repomind serve` | Start MCP server (+ optional webhook) |
|
|
81
|
+
| `repomind status` | Show hotspot rankings and index health |
|
|
82
|
+
| `repomind query "<NL>"` | Natural language codebase search |
|
|
83
|
+
| `repomind costs [--since DATE]` | Show per-operation LLM spend |
|
|
84
|
+
|
|
85
|
+
**Rich progress during indexing:**
|
|
86
|
+
```
|
|
87
|
+
[=====> ] 47% | Stage: Generating Docs | Files: 234/500 | Cost: $0.23 | ETA: 4m12s
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## MCP Tools (12 total)
|
|
93
|
+
|
|
94
|
+
| Tool | New? | Description |
|
|
95
|
+
|------|------|-------------|
|
|
96
|
+
| `explain_file` | — | File docs with RAG-injected dependency context |
|
|
97
|
+
| `explain_symbol` | — | Symbol-level explanation |
|
|
98
|
+
| `get_hotspots` | — | Temporal decay–weighted churn hotspots |
|
|
99
|
+
| `get_ownership` | — | Temporal-weighted file ownership |
|
|
100
|
+
| `get_dependencies` | — | Import graph with dynamic hint edges |
|
|
101
|
+
| `get_architectural_decisions` | — | ADR search and retrieval |
|
|
102
|
+
| `search_codebase` | — | Semantic vector search |
|
|
103
|
+
| `get_cochange_patterns` | — | Temporal co-change analysis |
|
|
104
|
+
| `get_pr_impact` | **NEW** | Full blast radius for a PR |
|
|
105
|
+
| `get_knowledge_map` | **NEW** | Knowledge silos, bus factor, onboarding targets |
|
|
106
|
+
| `get_test_gaps` | **NEW** | Untested code ranked by risk score |
|
|
107
|
+
| `get_security_hotspots` | **NEW** | Auth/input/SQL risk surfaces |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
repomind index /repo
|
|
115
|
+
|
|
|
116
|
+
v
|
|
117
|
+
+-----------------------------------------------------+
|
|
118
|
+
| AsyncIndexingPipeline (7 stages) |
|
|
119
|
+
| |
|
|
120
|
+
| 1. Discovery -> file manifest to SQL |
|
|
121
|
+
| 2. Parse -> ProcessPoolExecutor (CPU-bound) |
|
|
122
|
+
| 3. Graph Build -+ concurrent |
|
|
123
|
+
| 4. Git Analysis -+ (asyncio.gather) |
|
|
124
|
+
| 5. Embedding -> ThreadPoolExecutor + semaphore |
|
|
125
|
+
| 6. RAG Doc Gen -> LanceDB deps fetched FIRST |
|
|
126
|
+
| 7. Atomic Commit-> AtomicStorageCoordinator.txn() |
|
|
127
|
+
+-----------------------------------------------------+
|
|
128
|
+
|
|
|
129
|
+
v
|
|
130
|
+
+----------+ +--------------+ +----------------+
|
|
131
|
+
| SQLite | | LanceDB | | NetworkX Graph |
|
|
132
|
+
| (files, | | (embeddings, | | (dependency |
|
|
133
|
+
| metrics)| | docs) | | graph) |
|
|
134
|
+
+----------+ +--------------+ +----------------+
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Atomic transactions across all three stores:**
|
|
138
|
+
```python
|
|
139
|
+
async with coordinator.transaction() as txn:
|
|
140
|
+
txn.pending_sql.append(...)
|
|
141
|
+
txn.pending_vectors.append(...)
|
|
142
|
+
txn.pending_edges.append(...)
|
|
143
|
+
# On exception: SQL rollback + vector delete + graph node removal
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Configuration
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# .env
|
|
152
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
153
|
+
REPOMIND_DATA_DIR=~/.repomind
|
|
154
|
+
REPOMIND_MAX_COMMITS=10000
|
|
155
|
+
REPOMIND_DECAY_HALFLIFE_DAYS=180
|
|
156
|
+
REPOMIND_GENERATION_CONCURRENCY=5
|
|
157
|
+
REPOMIND_MCP_PORT=8766
|
|
158
|
+
REPOMIND_WEBHOOK_PORT=8765
|
|
159
|
+
REPOMIND_WEBHOOK_SECRET=your-github-webhook-secret
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Documentation
|
|
165
|
+
|
|
166
|
+
Full docs at **[pinexai.github.io/repomind](https://pinexai.github.io/repomind)**
|
|
167
|
+
|
|
168
|
+
- [Installation & Quick Start](https://pinexai.github.io/repomind/getting-started/quickstart/)
|
|
169
|
+
- [CLI Reference](https://pinexai.github.io/repomind/cli/)
|
|
170
|
+
- [MCP Tools Reference](https://pinexai.github.io/repomind/mcp/overview/)
|
|
171
|
+
- [Architecture Deep Dive](https://pinexai.github.io/repomind/architecture/pipeline/)
|
|
172
|
+
- [repomind vs repowise](https://pinexai.github.io/repomind/comparison/)
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT — see [LICENSE](LICENSE).
|
|
179
|
+
|
|
180
|
+
Built by [pinexai](https://github.com/pinexai).
|