feat: v0.3.0 — workspaces, auto-sync hooks, graph intelligence#76
Merged
RaghavChamadiya merged 21 commits intomainfrom Apr 13, 2026
Merged
feat: v0.3.0 — workspaces, auto-sync hooks, graph intelligence#76RaghavChamadiya merged 21 commits intomainfrom
RaghavChamadiya merged 21 commits intomainfrom
Conversation
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
…esolution - 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
…rt 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
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.
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.
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.
…tion
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.
…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
…adata, 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
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.
…ive 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
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
…g, 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.
…s, 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.
…o-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.
…fixes
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
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
…eline, 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.
…xecutor 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.
…CP 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
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.
f39cbb5 to
453c6ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
repowise init .from a parent directory scans for git repos, indexes each, and runs cross-repo analysis (co-change detection, API contract extraction, package dependency scanning). Single MCP server serves all workspace repos with federated queries.22 commits. No merge conflicts — main is a strict ancestor.
Release plan
After merge:
Tag triggers
.github/workflows/publish.yml→ builds web UI + Python wheel → GitHub Release → PyPI publish.Test plan
pip install repowiseincludesrepowise.core.workspaceandrepowise.core.ingestion.dynamic_hintsrepowise --versionshows0.3.0v0.3.0tag