Part 19: Repowise — Codebase Intelligence for Coding Agents banner
OnlyTerp OnlyTerp

Part 19: Repowise — Codebase Intelligence for Coding Agents

Development community intermediate

Description

*60% fewer tokens. 4x faster. Your coding agents stop guessing and start knowing.* ---

Installation

Terminal
claude install-skill https://github.com/OnlyTerp/openclaw-optimization-guide

README

Part 19: Repowise — Codebase Intelligence for Coding Agents

*60% fewer tokens. 4x faster. Your coding agents stop guessing and start knowing.*


The Problem

When a coding agent (Codex, Claude Code, any sub-agent) works on a large codebase, it **greps blindly.** It reads files one by one hoping to find what's relevant. It doesn't know:

    undefined

On a 3,000-file codebase, a coding agent without Repowise: **30 file reads, 8 minutes, missed hidden coupling, shipped broken code.**

With Repowise: **5 CLI calls, 2 minutes, found every dependency, flagged the right reviewer, confirmed no prior decisions existed.**


What Repowise Does

[Repowise](https://github.com/repowise-dev/repowise) indexes your codebase into **four intelligence layers:**

1. Dependency Graph

Tree-sitter parses every file into symbols. NetworkX builds a full dependency graph — files, classes, functions, imports, inheritance, call relationships. PageRank identifies your most central code. Community detection finds logical modules even when your directory structure doesn't reflect them.

2. Git Intelligence

500 commits of history turned into signals:

    undefined

3. Auto-Generated Documentation

LLM-generated wiki for every module and file, rebuilt incrementally on every commit. Coverage tracking, freshness scoring, semantic search.

4. Architectural Decisions

The layer nobody else has. Captures **why** code exists — decisions extracted from git history, inline markers, and explicit CLI. Linked to the graph nodes they govern, tracked for staleness as code evolves.


Setup

pip install repowise

# Index a project (graph + git analysis, no LLM needed)
repowise init --path /your/project --index-only

# Full index with doc generation (needs an LLM)
# Set OPENAI_BASE_URL and OPENAI_API_KEY for your preferred provider
repowise init --path /your/project

**First index:** ~25 minutes for a 3,000-file project (one-time cost). **Incremental updates:** <30 seconds after each commit.

LLM Configuration for Doc Generation

Repowise uses any OpenAI-compatible API for documentation generation:

# Use any fast, capable model
export OPENAI_BASE_URL="https://your-api-endpoint/v1"
export OPENAI_API_KEY="your-key"
repowise init --path /your/project

The `--index-only` flag skips LLM doc generation and just builds the graph + git analysis layers — which is the most valuable part and costs $0.


OpenC