Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,58 @@
"Bash(find /c/Users/ragha/Desktop/repowise/docs -type f \\\\\\(-name *.md -o -name *.txt \\\\\\))",
"Bash(grep -r \"def get_\" /c/Users/ragha/Desktop/repowise/packages/server/src/repowise/server/mcp_server/*.py)",
"Bash(npm install:*)",
"Bash(npm run:*)"
"Bash(npm run:*)",
"Bash(ls:*)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/web -name *search* -type f)",
"Bash(grep -E \"\\\\.\\(md|txt|adr\\)$\")",
"Bash(grep -r hybrid /Users/swati.ahuja/Desktop/wise/repowise/packages/core --include=*.py)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/tests -name *search* -o -name *vector*)",
"Bash(grep -r \"get_vector_store\\\\|get_fts\\\\|vector_store\\\\|_state\\\\._vector_store\" /Users/swati.ahuja/Desktop/wise/repowise/packages/server/src/repowise/server --include=*.py)",
"Bash(grep -rn \"transaction\\\\|consistency\\\\|crash\\\\|atomic\\\\|two-phase\" /Users/swati.ahuja/Desktop/wise/repowise/packages/core/src/repowise/core/persistence/*.py)",
"Bash(git push:*)",
"Bash(source /Users/swati.ahuja/Desktop/wise/repowise/venv/bin/activate)",
"Bash(curl -s http://localhost:7337/api/repos)",
"Bash(curl -s http://localhost:7337/health)",
"Bash(curl -s \"http://localhost:7337/api/pages?repo_id=e0779e597a3142e59e3dd57435f0ef1b\")",
"Bash(curl -s http://localhost:3000)",
"Bash(curl -s http://localhost:3000/api/repos)",
"Bash(curl -s http://localhost:3000/health)",
"Bash(curl -s \"http://localhost:3000/api/pages?repo_id=e0779e597a3142e59e3dd57435f0ef1b&limit=5\")",
"Bash(curl -s \"http://localhost:3000/api/repos/e0779e597a3142e59e3dd57435f0ef1b/stats\")",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/web/src/components/graph -type f -name *.ts -o -name *.tsx -o -name *.css -o -name *.json)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/web/src/app -name *.tsx)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/server /Users/swati.ahuja/Desktop/wise/repowise/packages/core -type f -name *.py)",
"Bash(curl -s http://localhost:3000/api/graph/e0779e597a3142e59e3dd57435f0ef1b/dead-nodes)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise -name *.db -o -name *.sqlite -o -name *.sqlite3)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/server -name \"__pycache__\" -type d -exec rm -rf {} +)",
"Bash(find /Users/swati.ahuja/Desktop/wise/repowise/packages/server -name \"*.pyc\" -delete)",
"Bash(curl -s http://localhost:7337/api/graph/e0779e597a3142e59e3dd57435f0ef1b/dead-nodes)",
"Bash(kill 67304)",
"Bash(xargs kill:*)",
"Bash(.venv/bin/python -c \"import repowise.server.routers.graph; print\\(repowise.server.routers.graph.__file__\\)\")",
"Bash(# Apply the same fix to the installed copy in venv/\ncp packages/server/src/repowise/server/routers/graph.py venv/lib/python3.13/site-packages/repowise/server/routers/graph.py && rm -f venv/lib/python3.13/site-packages/repowise/server/routers/__pycache__/graph.cpython-313.pyc && echo \"Copied and cleared cache\")",
"Bash(grep -r \"from.*tabs\\\\|import.*Tabs\\\\|<Tabs\" /Users/swati.ahuja/Desktop/wise/repowise/packages/web/src --include=*.tsx)",
"Bash(grep -E \"\\\\.py$\")",
"Bash(grep -r use-elk-layout /Users/swati.ahuja/Desktop/wise/repowise/packages/web/src --include=*.tsx --include=*.ts)",
"Bash(.venv/bin/python -m pytest tests/providers/test_mock_provider.py -x)",
"Bash(.venv/bin/python -m pytest tests/unit/server/ -x)",
"Bash(.venv/bin/python -m pytest --tb=short -q)",
"Bash(.venv/bin/python -m pytest tests/unit/test_providers/ tests/unit/test_persistence/ -v 2>&1)",
"Bash(.venv/bin/python -m pytest tests/unit/test_providers/test_anthropic_provider.py tests/unit/test_providers/test_gemini_provider.py tests/unit/test_providers/test_openai_provider.py tests/unit/test_persistence/test_openai_embedder.py -v 2>&1)",
"Bash(.venv/bin/python -c \"import anthropic; print\\(anthropic.__version__\\)\")",
"Bash(.venv/bin/python -c \"import openai; print\\(openai.__version__\\)\")",
"Bash(.venv/bin/python -c \"import google.genai; print\\(''ok''\\)\")",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/ -x --tb=short -q)",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/ --tb=short -q)",
"Bash(find . -path */bin/pytest -o -path */bin/python*)",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/unit/server/test_repos.py::test_create_repo -v --tb=long)",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/providers/test_mock_provider.py::TestBaseProviderInterface::test_generate_returns_generated_response -v --tb=long)",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/unit/cli/test_commands.py::TestErrorCases::test_init_no_provider -v --tb=long)",
"Bash(./.venv/bin/pytest tests/unit/server/test_mcp.py -x -q)",
"Bash(/Users/swati.ahuja/Desktop/wise/repowise/venv/bin/python -m pytest tests/unit/persistence/test_vector_store.py::test_mock_embedder_returns_unit_vectors -v --tb=long)",
"Bash(source venv/bin/activate)",
"Bash(pip uninstall:*)",
"Bash(ruff check:*)"
]
},
"enableAllProjectMcpServers": true,
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Default owners for everything in the repo
* @RaghavChamadiya @swati510
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug Report
about: Report a bug to help us improve Repowise
title: "[Bug] "
labels: bug
assignees: ""
---

## Describe the Bug

A clear and concise description of what the bug is.

## Steps to Reproduce

1. Run `repowise ...`
2. ...
3. See error

## Expected Behavior

What you expected to happen.

## Actual Behavior

What actually happened. Include error messages or logs if available.

## Environment

- OS: [e.g., Windows 11, macOS 14, Ubuntu 22.04]
- Python version: [e.g., 3.12.1]
- Repowise version: [e.g., 0.1.2] (`repowise --version`)
- Installation method: [pip, pipx, Docker]

## Additional Context

Any other context, screenshots, or log output.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature Request
about: Suggest an idea for Repowise
title: "[Feature] "
labels: enhancement
assignees: ""
---

## Problem

A clear description of the problem you're trying to solve. Ex. "I'm always frustrated when..."

## Proposed Solution

Describe the solution you'd like.

## Alternatives Considered

Any alternative solutions or workarounds you've considered.

## Additional Context

Any other context, mockups, or examples.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Summary

<!-- What does this PR do? Keep it to 1-3 bullet points. -->

-

## Related Issues

<!-- Link any related issues: Fixes #123, Closes #456 -->

## Test Plan

<!-- How did you verify this works? -->

- [ ] Tests pass (`pytest`)
- [ ] Lint passes (`ruff check .`)
- [ ] Web build passes (`npm run build`) *(if frontend changes)*

## Checklist

- [ ] My code follows the project's code style
- [ ] I have added tests for new functionality
- [ ] All existing tests still pass
- [ ] I have updated documentation if needed
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ jobs:
- name: Ruff format check
run: uv run ruff format --check packages/ tests/

- name: mypy type check (core)
run: uv run mypy packages/core/src --config-file pyproject.toml
# mypy strict checking disabled until type annotations are cleaned up
# - name: mypy type check (core)
# run: uv run mypy packages/core/src --config-file pyproject.toml

# ---------------------------------------------------------------------------
# Integration tests (run on push to main only, slower)
Expand Down
22 changes: 21 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# IDE/tool caches
.sfdx/

# Python
__pycache__/
*.py[cod]
Expand All @@ -10,6 +13,7 @@ dist/
downloads/
eggs/
.eggs/
.claude/
# Python build dirs (only at root, not packages/web/src/lib/)
/lib/
/lib64/
Expand All @@ -30,7 +34,6 @@ env/

# uv
.uv/
uv.lock

# Testing
.tox/
Expand Down Expand Up @@ -116,5 +119,22 @@ ehthumbs.db
# repowise API keys (local)
.repowise/.env

# Google service account keys
awesome-gist-*.json

# Local dev scripts and notes
CLAUDE.md
BUILD_STATUS.md
TESTING_GUIDE.md
PLAN.md
run_ingest.py
run_test.ps1
smoke_test.py
provider_config.json
.mcp.json
frontend/
integrations/
providers/

# Private release notes
docs/PYPI_RELEASE.md
102 changes: 102 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to Repowise

Thanks for your interest in contributing to Repowise! This guide will help you get started.

## Getting Started

### Prerequisites

- Python 3.11+
- Node.js 20+
- [uv](https://docs.astral.sh/uv/) (Python package manager)
- Git

### Local Setup

```bash
# Clone the repo
git clone https://github.com/RaghavChamadiya/repowise.git
cd repowise

# Install Python dependencies
uv sync --all-extras

# Install web frontend dependencies
npm install

# Build the web frontend
npm run build

# Run tests
pytest
```

## Development Workflow

1. **Fork** the repository
2. **Create a branch** from `main`:
```bash
git checkout -b feat/your-feature
```
3. **Make your changes** — keep commits focused and well-described
4. **Run tests** before pushing:
```bash
pytest
npm run lint
npm run type-check
```
5. **Push** to your fork and open a **Pull Request** against `main`

## Branch Naming

Use descriptive prefixes:

| Prefix | Purpose |
|--------|---------|
| `feat/` | New features |
| `fix/` | Bug fixes |
| `chore/` | Maintenance, CI, docs |
| `refactor/` | Code restructuring |

## Project Structure

```
repowise/
packages/
core/ # Ingestion pipeline, analysis, generation engine
cli/ # CLI commands (click-based)
server/ # FastAPI API + MCP server
web/ # Next.js frontend
tests/ # Unit and integration tests
docs/ # Documentation
```

## Code Style

- **Python**: Formatted with [ruff](https://docs.astral.sh/ruff/) (`ruff format .`, `ruff check .`)
- **TypeScript**: Linted with ESLint (`npm run lint`)
- Keep functions small and focused
- Write docstrings for public APIs

## Testing

- Add tests for new features and bug fixes
- Place tests in `tests/unit/` or `tests/integration/`
- Run the full suite with `pytest`

## Pull Request Guidelines

- Keep PRs focused on a single change
- Write a clear description of what and why
- Reference any related issues
- Ensure CI passes before requesting review
- All PRs require at least one code owner approval

## Reporting Issues

- Use [GitHub Issues](https://github.com/RaghavChamadiya/repowise/issues) for bugs and feature requests
- For security vulnerabilities, see [SECURITY.md](SECURITY.md)

## License

By contributing, you agree that your contributions will be licensed under the [AGPL-3.0](LICENSE) license.
45 changes: 45 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Security Policy

## Supported Versions

| Version | Supported |
|---------|-----------|
| 0.1.x | Yes |

## Reporting a Vulnerability

If you discover a security vulnerability in Repowise, please report it responsibly.

**Do NOT open a public GitHub issue for security vulnerabilities.**

Instead, please email **security@repowise.dev** with:

- A description of the vulnerability
- Steps to reproduce
- Potential impact
- Any suggested fix (optional)

We will acknowledge your report within **48 hours** and aim to provide a fix or mitigation within **7 days** for critical issues.

## Scope

The following are in scope:

- The `repowise` Python package (PyPI)
- The Repowise web UI
- The Repowise API server
- The MCP server
- GitHub Actions workflows in this repository

## Out of Scope

- Vulnerabilities in third-party dependencies (report these upstream, but let us know so we can update)
- Issues requiring physical access to the machine running Repowise

## Disclosure Policy

We follow coordinated disclosure. Once a fix is released, we will:

1. Credit the reporter (unless they prefer anonymity)
2. Publish a security advisory via GitHub Security Advisories
3. Release a patched version on PyPI
5 changes: 3 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ For per-package detail (installation, full API reference, all CLI flags, file ma
│ Three Stores │ │ Consumers │
│ │ │ │
│ SQL (wiki pages, │ │ Web UI MCP Server GitHub Action │
│ jobs, symbols, │ │ (Next.js) (8 tools) (CI/CD) │
│ jobs, symbols, │ │ (Next.js) (9 tools) (CI/CD) │
│ versions) │ │ │
│ │ │ repowise CLI │
│ Vector (LanceDB / │ │ (init, update, watch, │
Expand Down Expand Up @@ -954,14 +954,15 @@ and supports two transports:
- **stdio** — for Claude Code, Cursor, Cline (add to their MCP config)
- **SSE** — for web-based MCP clients (served on port 7338)

### Tools (8 total)
### Tools (9 total)

| Tool | What it answers | When to call |
|------|----------------|-------------|
| `get_overview` | Architecture summary, module map, entry points. | First call when exploring an unfamiliar codebase. |
| `get_context(targets, include?)` | Docs, ownership, history, decisions, freshness for files/modules/symbols. Pass multiple targets in one call. | When you need to understand specific code before reading or modifying it. |
| `get_risk(targets)` | Hotspot score, dependents, co-change partners, risk summary per target. Also returns top 5 global hotspots. | Before modifying files — assess what could break. |
| `get_why(query?)` | Three modes: NL search over decisions, path-based decisions for a file, no-arg health dashboard. | Before making architectural changes — understand existing intent. |
| `update_decision_records(action, ...)` | Full CRUD on decision records: create, update, update_status, delete, list, get. | After every coding task — record new decisions and keep existing ones current. |
| `search_codebase(query)` | Semantic search over the full wiki. Natural language. | When you don't know where something lives. |
| `get_dependency_path(from, to)` | Connection path between two files/modules in the dependency graph. | When you need to understand how two things are connected. |
| `get_dead_code` | Dead/unused code findings sorted by confidence and cleanup impact. | Before cleanup tasks. |
Expand Down
Loading
Loading