Thanks for your interest in contributing to Repowise! This guide will help you get started.
- Python 3.11+
- Node.js 20+
- uv (Python package manager)
- Git
# Clone the repo
git clone https://github.com/repowise-dev/repowise.git
cd repowise
# Install Python dependencies (uv workspace, installs all packages)
uv sync --all-packages
# Install web frontend dependencies
npm install
# Build the web frontend
npm run build
# Verify the CLI runs
uv run repowise --version
# Run tests
uv run pytest tests/unit/This is a ~3,000 file codebase, and reading it front to back is not the plan. Repowise exists to make that unnecessary, so use it on itself.
We keep a public, always-fresh index of this repository at repowise.dev/repo/repowise-dev/repowise. It re-indexes on every push. Pick the tab that matches your question:
| Your question | Where to look |
|---|---|
| What are the moving parts? | Overview and Architecture |
| Where does this symbol live? | Files |
| Which files are dangerous to touch? | Code Health, and the hotspot table on the landing page |
| Who knows this area? | People & History |
| Why is it built this way? | Decisions |
| What changed recently, and how risky was it? | Commits |
Better still, index this repo with the tool you are contributing to. It is free, needs no API key, and takes a couple of minutes:
uv run repowise init --no-prose -y # graph, git history, health, decisions. No LLM, no spend.
uv run repowise serve # dashboard + MCP server on localhostThen point your coding agent at the MCP server (see the Quickstart for Claude Code, Codex and others) and ask it questions directly:
get_context for packages/core/src/repowise/core/pipeline/orchestrator.py
get_why "why is doc generation split from ingestion?"
If something about this experience is bad, that is a bug worth reporting. Contributors are the only people who use repowise on repowise with fresh eyes.
- docs/architecture/ for the written architecture
- docs/layers/INTELLIGENCE_LAYERS.md for what each of the five layers computes and where its code lives
- docs/reference/CLI_REFERENCE.md for every command and flag
- Good first issues on the tracker.
- Help wanted for issues that are scoped and ready to pick up but need more context than a first issue.
- The refactoring backlog. Repowise ranks its own concrete refactoring plans (Extract Class, Split File, Break Cycle, and so on) with the blast radius attached. Each card has a copy-to-agent button. Picking one off that list is a genuinely useful contribution, and it is the fastest way to learn how the health layer thinks.
- Language support. A new language is five small steps: a
LanguageSpec, a tag, a.scmquery file, a parser config and the grammar dependency, with no changes to the parser core. Optional extractors and call-resolution seams add depth on top. Recipe: docs/architecture/language-support.md. Current coverage: docs/layers/LANGUAGE_SUPPORT.md.
Issues are assigned to one person at a time, so that two contributors do not build the same fix in parallel and one of them has to throw the work away.
- Comment on the issue saying you are taking it, and a maintainer will assign it to you.
- Only the assignee should open a PR for that issue.
- If you get pulled away, a one-line comment to unclaim is enough. It carries no obligation and no hard feelings, and it frees the issue for someone else.
- An assigned issue that goes quiet for two weeks goes back to unassigned.
Questions about scope before you claim are welcome. Asking is not claiming.
Some issues describe several separable pieces of work. Say which piece you are taking, and it can be split into its own issue so more than one person can work in parallel.
Before you start, check the file you are about to edit:
uv run repowise health --file <path> # score, markers, findings
uv run repowise risk HEAD # or ask get_risk from your agentSome files in this repo are bug magnets: high churn, a long run of prior fixes, often a bus factor of one. The hotspot table names the current ones. Changes there are welcome, but expect closer review and bring tests.
- Fork the repository
- Create a branch from
main:git checkout -b feat/your-feature
- Make your changes: keep commits focused and well-described
- Run tests before pushing:
uv run pytest tests/unit/ npm run lint npm run type-check
- Check your own change with the tool you are contributing to:
None of this is a gate, and none of it calls an LLM. It is the same signal the reviewer will be looking at, and running it yourself catches the boring problems (a forgotten companion file, an untested hotspot) before anyone else has to.
uv run repowise risk main..HEAD # 0-10 defect score, plus may_break, # missing_cochanges and missing_tests uv run repowise impacted-tests --staged # the tests your diff actually exercises uv run repowise health --file <path> # did the file you touched get worse?
- Push to your fork and open a Pull Request against
main
Use descriptive prefixes:
| Prefix | Purpose |
|---|---|
feat/ |
New features |
fix/ |
Bug fixes |
chore/ |
Maintenance, CI, docs |
refactor/ |
Code restructuring |
We follow Conventional Commits with an
optional scope, e.g. feat(cli): add --resume to init or fix(health): bound duplication detection. Keep the subject line in the imperative mood and under
~72 characters.
repowise/
packages/
core/ # Ingestion pipeline, analysis, generation engine
cli/ # CLI commands (click-based)
server/ # FastAPI API + MCP server
types/ # Shared TypeScript types
ui/ # Shared React UI components
web/ # Next.js frontend
tests/ # Unit and integration tests
docs/ # Documentation
- Python: Formatted with ruff (
ruff format .,ruff check .) - TypeScript: Linted with ESLint (
npm run lint) and type-checked (npm run type-check) - Keep functions small and focused
- Write docstrings for public APIs
-
Create
packages/core/src/repowise/core/providers/llm/<name>.py- Subclass
BaseProviderand implementgenerate(),provider_name,model_name - For local CLI providers, use
asyncio.create_subprocess_exec(nevershell=True), validate user-supplied model names against a safe character set, and resolve paths withPath.resolve() - See
opencode.pyfor a clean reference implementation
- Subclass
-
Register in
registry.py: add to_BUILTIN_PROVIDERSand the_missingpackage map -
Wire up configuration in these files:
rate_limiter.py, addRateLimitConfigtoPROVIDER_DEFAULTSprovider_config.py, add entry toPROVIDER_CATALOGprovider_selection.py, add to_PROVIDER_DEFAULTS,_PROVIDER_ENV,_PROVIDER_SIGNUP, and detectionhelpers.py, add validation invalidate_provider_config()
-
Update the web UI: add to
PROVIDERS,MODEL_PLACEHOLDERS, andPROVIDER_ENV_VARSinprovider-section.tsxandrun-config-form.tsx -
Add tests in
tests/unit/test_providers/: mock the subprocess, test success/error/timeout paths (seetest_codex_cli_provider.pyfor the pattern) -
Write docs:
docs/<NAME>.mdandwebsite/<name>.md, followingdocs/agent/CODEX.mdanddocs/agent/OPENCODE.md.
Adding a new language has a dedicated recipe, see docs/architecture/language-support.md.
- Add tests for new features and bug fixes
- Place tests in
tests/unit/ortests/integration/ - Run the full suite with
uv run pytest
- 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
- Use GitHub Issues for bugs and feature requests
- For security vulnerabilities, see SECURITY.md
- For questions and discussion, join us on Discord
By contributing, you agree that your contributions will be licensed under the AGPL-3.0 license.