Commit a901cc9
authored
feat: v0.3.0 — workspaces, auto-sync hooks, graph intelligence (#76)
* feat: proactive context enrichment via Claude Code hooks
Add PreToolUse and PostToolUse hooks that fire automatically during
agent sessions. PreToolUse enriches every Grep/Glob call with graph
context (symbols, importers, dependencies, git signals) at ~24ms
latency. PostToolUse detects git commits and notifies the agent when
the wiki is stale.
- New `repowise augment` CLI command (hook entry point)
- `install_claude_code_hooks()` in mcp_config.py (idempotent)
- `repowise init` now registers hooks alongside MCP server
- README, User Guide, Quickstart, and Changelog updated
* feat: symbol-level dependency graph with call extraction and 3-tier resolution
- Add symbol nodes (function, class, method, etc.) alongside file nodes in the dependency graph
- Extract call sites from tree-sitter AST for all 7 supported languages (Python, TS, JS, Go, Rust, Java, C++)
- Implement 3-tier call resolution: same-file (0.95), import-scoped (0.85-0.93), global unique (0.50)
- Add CallResolver module for standalone, testable call resolution logic
- Add DEFINES, HAS_METHOD, and CALLS edge types with confidence scoring
- Isolate file-level metrics (PageRank, betweenness, SCC) to file subgraph to avoid symbol pollution
- Update persistence layer: symbol columns on graph_nodes, confidence on graph_edges, typed unique constraint
- Add Alembic migration 0015 for schema changes
* feat: named binding resolution with alias tracking and barrel re-export following
- Add NamedBinding dataclass tracking local_name, exported_name, source_file, is_module_alias per import
- Extract aliases for Python, TS/JS, Go, Rust, Java via per-language _extract_import_bindings()
- Populate Import.resolved_file during GraphBuilder.build() for per-import file association
- Fix CallResolver._build_indices mapping names to wrong files on multi-import files
- Add barrel re-export following (one-hop) for __init__.py and index.ts patterns
- Upgrade call resolution with alias-aware lookups and dedicated module_aliases tracking
- Update architecture docs, changelog, and README
* feat: heritage extraction and resolution for class inheritance graphs
Add multi-language heritage (extends/implements/trait_impl) extraction
from AST class definitions using a dispatch table pattern across 11
languages. Standalone HeritageResolver with 3-tier resolution (same-file,
import-scoped, global unique) integrated into the graph build pipeline.
* feat: leiden community detection and execution flow tracing
Upgrade community detection from Louvain to Leiden (graspologic) with
automatic fallback. Add file-level and symbol-level community detection
with oversized splitting, cohesion scoring, and heuristic labeling.
Add execution flow tracing with 5-signal entry point scoring and BFS
call-path discovery with cross-community classification.
* feat: graph query MCP tools and read-side persistence layer
Add 4 new MCP tools for graph intelligence queries:
- get_callers_callees: symbol call graph navigation with heritage support
- get_community: architectural community exploration with cohesion scoring
- get_graph_metrics: PageRank, betweenness, percentiles for files/symbols
- get_execution_flows: entry point scoring with BFS call-path tracing
Add 8 read-side CRUD functions for graph queries (previously zero existed).
Persist entry point scores in community_meta_json for fast retrieval.
Add composite DB indexes for performant graph lookups (migration 0017).
Enrich existing tools: community summary in get_overview, community block
in get_context, edge-type differentiated arrows in get_architecture_diagram.
* feat: graph intelligence REST API, web UI enhancements, and documentation
Add 5 REST API endpoints exposing graph intelligence to the web UI:
- /communities — list all with labels, cohesion, member counts
- /communities/{id} — detail with members, neighbors, cross-edge counts
- /metrics — PageRank/betweenness percentiles for any file or symbol
- /callers-callees — symbol call graph with heritage support
- /execution-flows — entry point scoring with BFS call-path traces
Web UI enhancements across 4 pages:
- Overview: expandable community list with inline detail, execution flows
panel with call trace visualization
- Docs: collapsible graph intelligence sidebar with percentile bars,
community label, degree counts
- Symbols: two-panel drawer with graph metrics, callers/callees,
class heritage (extends/implements)
- Graph: real community labels in legend, community detail panel on
node click, URL param support for colorMode deep-linking
- Wiki: graph intelligence section in right sidebar
Extract shared BFS trace utility for reuse between MCP tools and REST
router. Add Pydantic schemas and TypeScript types for all new endpoints.
Update all documentation.
* feat: web UI quality improvements, core ingestion hardening, and MCP enhancements
Web UI:
- Fix symbols page not loading on sidebar navigation (replace useSWR
accumulator with useSWRInfinite for reliable client-side nav)
- Add importance-based symbol sorting using graph pagerank scores
- Graph: node sizing by importance, wider edge strokes with hover
tooltips, in-graph fuzzy search, execution flow trace highlighting
- Responsive tables: progressive column hiding on mobile for symbols,
hotspots, dead-code, and findings tables
- Fix graph page height overflow (h-screen → h-full)
- New visualizations: risk distribution chart (hotspots page),
contributor network graph (ownership page), dependency heatmap
(overview page)
- Page transition animations via Framer Motion
- Improved loading skeletons matching actual content layout
- Community panel responsive width (full on mobile, 360px on desktop)
Core:
- Harden community detection with improved cohesion scoring
- Execution flow tracing refinements
- Call resolver and heritage resolver robustness improvements
- Language data registry extraction for parser
- Graph ingestion quality fixes
Server:
- MCP tool enhancements: richer context, overview, and answer tools
- Graph utils improvements for community and metric queries
- Chat tools refinements
Tests:
- Update integration and unit tests for new functionality
* fix: MCP tool quality issues — risk summary, test gaps, dead code metadata, context resolution
- Fix duplicated "bug-prone, bug-prone" in risk_summary by using distinct
label "fix-heavy" for change_pattern when commits are fix-dominated
- Exclude test files from test_gaps in both per-file risk and PR blast radius
- Enrich zombie package dead code findings with aggregated git metadata
(last_commit_at, primary_owner, age_days) instead of hardcoded nulls
- Support directory paths in get_context by normalising trailing slashes
and improving fuzzy suggestions to list files within the directory
- Return explicit null/empty for callers, callees, metrics, community
when they can't resolve, instead of silently dropping from response
* feat: multi-repo workspace support — detection, config, update, watch
Phase 1: Workspace detection and configuration
- scan_for_repos() walks directory trees to find git repos
- WorkspaceConfig/RepoEntry with YAML persistence
- repowise init auto-detects multi-repo directories
- Interactive repo selection and primary repo picker
- --all flag for non-interactive workspace init
Phase 1.5: Workspace-aware update mechanism
- Staleness detection via git commit comparison
- repowise update --workspace with parallel updates (Semaphore(4))
- repowise update --repo <alias> for single-repo targeting
- repowise watch --workspace with per-repo debounce timers
- repowise status --workspace shows commit staleness and timestamps
- Cross-repo hooks placeholder for Phase 3/4
Single-repo usage is completely unchanged. 73 new tests, 738 total passing.
* feat: improved init command UX — pre-scan, grouped advanced config, live insights
- Add fast repo pre-scan before mode selection showing file count, languages,
and commit count so users can make informed configuration choices
- Revamp advanced config (mode 3) into grouped sections (Scope, Exclude,
Git Analysis, Generation, Editor Integration) with contextual hints and
smart defaults based on repo size
- Add missing advanced options: embedder selection, submodule toggle, CLAUDE.md toggle
- Support comma-separated exclude patterns with large directory suggestions
- Emit richer pipeline insight messages after each sub-phase (symbols, graph
stats, hotspots, dead code, decisions) with consistent formatting
- Add "Analysis Complete" interstitial panel between analysis and generation
- Make completion panel next steps contextual based on findings
- Add docs/multi-repo/ to gitignore
* feat: workspace-aware MCP server — multi-repo routing, federated queries
RepoRegistry with lazy loading and LRU eviction manages per-repo database
contexts. All 16 MCP tools route to the correct repo via the repo parameter.
Workspace is auto-detected from the repo path on MCP startup.
- RepoContext bundles session_factory, FTS, vector stores per repo
- repo="all" for get_overview, search_codebase, get_why, get_dead_code
- get_overview appends workspace footer with available repo aliases
- Single-repo mode completely unchanged (zero regression)
- 761 unit tests passing
* feat: cross-repo intelligence — co-change detection, manifest scanning, MCP enrichment
Phase 3 of multi-repo workspace support. Adds cross-repo signals that
run during `repowise update --workspace` and silently enrich MCP tool
responses at query time.
Core analysis (workspace/cross_repo.py):
- Git log mining across repos to detect files committed by the same
author within a 24-hour window (temporal decay, same TAU as intra-repo)
- Manifest scanning for local path references (package.json, pyproject.toml,
Cargo.toml, go.mod)
- JSON persistence in .repowise-workspace/cross_repo_edges.json
MCP enrichment (_enrichment.py):
- CrossRepoEnricher loaded once at MCP lifespan start with O(1) lookups
- get_overview: workspace footer shows cross-repo topology
- get_context: files show cross-repo co-change partners
- get_risk: cross-repo blast radius + boosted dependents count
- get_dead_code: confidence reduced for findings with cross-repo consumers
No new DB tables or alembic migrations. 32 new tests, 793 total passing.
* feat: contract extraction — HTTP routes, gRPC services, message topics, cross-repo matching
Add API contract detection to the multi-repo workspace system. Source files
are scanned for route handlers, gRPC registrations, and message broker
patterns, then providers are matched to consumers across repos.
Extractors: Express/FastAPI/Spring/Laravel/Go HTTP routes, proto+language
gRPC patterns, Kafka/RabbitMQ/NATS topics. Matching uses exact normalized
contract IDs with HTTP method wildcards and gRPC service wildcards.
Results persisted as .repowise-workspace/contracts.json and surfaced via
CrossRepoEnricher in get_overview, get_context, and get_risk tool responses.
WorkspaceConfig extended with ContractConfig for toggling extractors and
declaring manual cross-repo links.
* feat: workspace web UI — REST endpoints, dashboard, contracts view, co-changes view
Server:
- Workspace detection in REST server lifespan (mirrors MCP layer)
- New /api/workspace endpoint for mode detection and summary stats
- New /api/workspace/contracts with type/repo/role filtering
- New /api/workspace/co-changes with repo and strength filtering
- Shared CrossRepoEnricher between REST and MCP (same JSON files)
Web UI:
- Workspace nav section in sidebar, mobile nav, and command palette
- /workspace dashboard: aggregate stats, repo cards, cross-repo intelligence
- /workspace/contracts: filterable contracts and matched links tables
- /workspace/co-changes: co-change pairs with strength visualization
- Auto-redirect to /workspace when in workspace mode with multiple repos
- Single-repo mode unchanged — workspace features hidden entirely
17 new server tests, 886 total unit tests passing.
* feat: workspace CLI commands, workspace CLAUDE.md, and multi-repo bugfixes
Phase 6 — workspace management CLI:
- `repowise workspace list` — show all repos with status, files, symbols
- `repowise workspace add <path>` — add repo with optional --index
- `repowise workspace remove <alias>` — remove from config (preserves data)
- `repowise workspace scan` — discover new repos not yet in config
- `repowise workspace set-default <alias>` — change primary repo
Phase 6 — workspace-level CLAUDE.md:
- WorkspaceClaudeMdGenerator writes to <workspace>/.claude/CLAUDE.md
- Includes cross-repo contracts, co-changes, package deps, per-repo summaries
- `generate-claude-md --workspace` flag for CLI
Bugfixes across Phases 1-5 (23 issues):
- Fix path-prefix check using relative_to instead of string startswith
- Fix background VS task racing with LRU eviction (task cancellation)
- Fix co-change symmetric duplicate edges (canonical key ordering)
- Fix same-repo contract filter (simplified equality check)
- Fix proto comment braces breaking depth parser (comment-aware counter)
- Fix Go HandleFunc wildcard providers never matching (reverse lookup)
- Fix UI crash on null data?.co_changes.length
- Fix enricher bare key access (try/except + .get fallbacks)
- Fix empty repos IndexError in registry
- Fix LRU eviction cap bypass (count only evictable contexts)
- Fix template literal ${expr} not normalized in HTTP paths
- Fix Spring multi-class @RequestMapping prefix per match
- Fix NATS patterns too broad (require variable name prefix)
- Fix os.listdir PermissionError in service boundary detection
- Fix falsy-zero dropping offset=0 in API client
- Fix unmatchedCount keyed on file instead of contract_id
- Fix workspace redirect gated on repoList.length
- Fix broken repo card link when repoId is empty
- Fix scanner symlink/resolve errors
- Fix config from_dict with missing required fields
- Fix private attr access with getattr fallbacks
- Fix Windows path name extraction using Path.name
- Fix enricher log placement
* feat: multi-DB workspace serving, per-repo stats, and init job records
Server changes:
- Detect workspace before engine creation; use primary repo's DB as main
DB instead of global ~/.repowise/wiki.db to avoid stale repo pollution
- Create per-repo async engines for all workspace repos at startup
- Route get_db_session to correct DB based on repo_id (path or query param)
- Aggregate repos from all workspace DBs in list_repos endpoint
- Add per-repo stats (file_count, symbol_count, page_count, doc_coverage,
hotspot_count, repo_id) to WorkspaceRepoEntry via raw sqlite3 queries
- Dispose workspace engines on shutdown
Web UI changes:
- Workspace dashboard uses embedded per-repo stats directly instead of
listRepos() + matching (which only found repos in the main DB)
- All workspace repos now show with correct stats and clickable links
CLI changes:
- Write completed GenerationJob record during init persist so web UI
shows "last synced" timestamp instead of "never"
- Scanner fix: root with .git walks for sub-repos before deciding mode
- MaybeCountColumn for progress bars with unknown totals
- Workspace init: mode/provider selection, per-repo generation, cross-repo
analysis, debug log suppression
Also adds .repowise-workspace/ and .repowise-workspace.yaml to .gitignore
* feat: enrich doc generation with graph intelligence, fix decision pipeline, improve frontend docs UX
Phase A — Doc generation now feeds symbol call graphs, heritage chains,
community metadata, and execution flows into wiki page templates. Fixed
git_meta not being passed during initial generation (depth auto-upgrade
for hotspots now fires). Module pages receive file summaries instead of
bare paths. Repo overview includes architectural communities and primary
execution flows.
Phase B — Removed decisions from CLAUDE.md (keep it short). Fixed JSON
substring filtering bug in list_decisions (tag "api" no longer matches
"rapid"). Added cross-source deduplication in bulk_upsert_decisions so
the same decision from inline_marker and git_archaeology merges into one
record.
Phase C — Replaced ChatMarkdown with WikiMarkdown in docs explorer for
Mermaid + syntax highlighting support. Added version history browser with
LCS-based inline diff view. Decision detail fields now render as markdown.
Fixed ToC anchor IDs (headings get slugified id attributes matching ToC
links). Added deep-linking to docs tree selection via URL search params.
Surface hallucination warnings from LLM validation as amber banners.
Fixed Mermaid runtime error (CSS variable in theme config). Reduced
hallucination validator false positives (skip CLI commands, paths,
constants, decorator names, import bindings).
Updated packages/web and packages/server READMEs.
* feat: auto-sync hooks, polling scheduler, workspace update, and job executor improvements
Add post-commit git hook management via `repowise hook install/status/
uninstall` CLI commands. Init now offers to install the hook automatically.
Update command gains --workspace and --repo flags for workspace-aware
incremental updates.
Server-side: refactored scheduler to use polling fallback (compares git
HEAD against state.json, auto-syncs diverged repos). Job executor gains
proper sync job handling with incremental page regeneration. Webhook
handler launches background sync jobs. Cross-repo enrichment expanded.
Dashboard quick-actions updated. AUTO_SYNC and WORKSPACES docs added.
* docs: update README, changelog, quickstart, user guide, and add CLI/MCP reference docs
- README: add workspaces section, auto-sync section, workspace dashboard entries,
multi-repo row in comparison table, docs links footer, split quickstart into
single-repo and workspace modes
- CHANGELOG: rewrite Unreleased as v0.3.0 with workspace features, auto-sync
hooks, graph intelligence, web UI updates, and improved init UX
- QUICKSTART: add workspace quickstart, hook install, links to new docs
- USER_GUIDE: add workspace/hook CLI commands, workspace web UI pages, auto-sync
section, workspace workflow, fix MCP tool count to 7 registered tools
- New docs/CLI_REFERENCE.md: standalone CLI reference for all commands
- New docs/MCP_TOOLS.md: standalone MCP tools reference with parameters and examples
- Fix dead code analysis, decision extractor, contracts, cross-repo, and MCP tool
improvements
* chore: bump version to 0.3.0
Bump all version strings (pyproject.toml, core, cli, server, web) and
set changelog release date to 2026-04-13. Add missing packages to
setuptools: workspace, workspace.extractors, ingestion.dynamic_hints.1 parent baa4a8a commit a901cc9
187 files changed
Lines changed: 26185 additions & 1334 deletions
File tree
- docs
- architecture
- packages
- cli/src/repowise/cli
- commands
- core
- alembic/versions
- src/repowise/core
- analysis
- generation
- editor_files
- templates
- ingestion
- queries
- persistence
- pipeline
- workspace
- extractors
- server
- src/repowise/server
- mcp_server
- routers
- web
- src
- app
- repos/[id]
- graph
- hotspots
- overview
- ownership
- symbols
- wiki/[...slug]
- workspace
- co-changes
- contracts
- components
- dashboard
- dead-code
- decisions
- docs
- git
- graph
- edges
- nodes
- layout
- search
- symbols
- wiki
- workspace
- lib
- api
- hooks
- scripts
- tests
- integration
- unit
- cli
- generation
- server
- workspace
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 34 | + | |
| 35 | + | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
45 | | - | |
| 40 | + | |
46 | 41 | | |
47 | 42 | | |
48 | | - | |
| 43 | + | |
49 | 44 | | |
50 | | - | |
| 45 | + | |
51 | 46 | | |
52 | 47 | | |
53 | | - | |
| 48 | + | |
| 49 | + | |
54 | 50 | | |
55 | 51 | | |
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
| 55 | + | |
| 56 | + | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
173 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
174 | 173 | | |
175 | | - | |
| 174 | + | |
176 | 175 | | |
177 | 176 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | 193 | | |
186 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
187 | 214 | | |
188 | 215 | | |
189 | 216 | | |
| |||
195 | 222 | | |
196 | 223 | | |
197 | 224 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
201 | 231 | | |
202 | 232 | | |
203 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
12 | 64 | | |
13 | 65 | | |
14 | 66 | | |
| |||
234 | 286 | | |
235 | 287 | | |
236 | 288 | | |
| 289 | + | |
| 290 | + | |
237 | 291 | | |
238 | 292 | | |
239 | 293 | | |
0 commit comments