Product

One graph. 27 MCP tools. Every phase of the edit loop.

codeweb turns a repository into a queryable structural graph, then exposes it as deterministic tools your agents call at the moment they need them — before writing, while reviewing, and when optimizing.

The foundation — read the graph.

codeweb_mapBuild (or rebuild) the graph for a repo — the deterministic pipeline over MCP, so a session never dead-ends on "no graph found".
codeweb_briefThe day-one page (~2KB): areas, most depended-on symbols, entry points, test layout, known issues. Call first in a new session — orientation without exploration.
codeweb_explainOne ~1KB card: identity, contract, dependents, blast radius, findings — "tell me about X" in a single call.
codeweb_findConcept search when you do not know the name: free text ("retry backoff") ranked over identifiers/files/domains — stemmed token match weighted by exports, role, and fan-in. Deterministic, no embeddings.
codeweb_callersDirect callers of a symbol (call-edge in-neighbors).
codeweb_calleesThe functions a symbol calls.
codeweb_impactBlast radius: every function transitively affected by a change, plus domains touched. Call before editing.
codeweb_cyclesFile-level dependency cycles (circular imports/calls).
codeweb_orphansUncalled, unexported symbols — dead-code candidates.

Before you add code — reuse, don't reinvent.

codeweb_find_similar"Does something already do this?" Ranks existing bodies by token-shingle or structural-skeleton similarity to your candidate.
codeweb_placementWhere a new symbol belongs (domain + file) by callee gravity, with a duplicate warning.
codeweb_testsThe tests that exercise a symbol — run the right subset after editing.

Assess impact and risk.

codeweb_reviewStructural review of a change: changed symbols, blast radius, domains touched, fan-in-ranked review order.
codeweb_fitnessCheck the graph against architectural fitness rules (forbidden-dependency, layering, no-cycles, max-fan-in, max-LOC).
codeweb_riskRank symbols by change-risk (fan-in, fan-out, LOC, blast radius, churn) for triage.
codeweb_break_cyclesFor each file cycle, propose the cheapest edge to sever — verified to actually break it.
codeweb_deadcodeConfidence-tiered dead code: safe-to-delete vs review-first (test-guarded / entrypoint-like).
codeweb_annotateRecord a verified false positive (suppression memory) so a dismissed finding stops resurfacing — never touches source.

Act on findings — safely.

codeweb_codemodPlan a consolidation merge (report-only over MCP): canonical survivor, exact deletions + caller rewrites, LOC reclaimed, projected gate verdict.
codeweb_hotspotsRank symbols by complexity × fan-in × churn — where to refactor first.
codeweb_campaignAn ordered, cumulatively pre-flighted ROI worklist (dead code + cycle cuts + merges). Read-only plan.
codeweb_simulatePre-flight a delete/merge/move: the regression gate’s verdict for a hypothetical edit, before any code changes.

Close the edit loop.

codeweb_contextBlast-radius-scoped context in one call: a symbol's body, direct callers (with bodies), callees (location-only), and transitive impact ids.
codeweb_refreshRe-extract from disk so mid-task queries reflect edits, not a stale snapshot. Incremental; preserves domains.
codeweb_statsThe local value receipt: cards delivered, regressions flagged before landing, queries served — lifetime and per month.

Meta-analysis across snapshots and time.

codeweb_diffStructural delta + regression verdict between two graph snapshots: nodes/edges/cycles/overlaps/orphans added & removed, coupling delta.
codeweb_reading_orderFoundations-first reading path (depended-upon leaves before orchestrators) for onboarding at scale.

All 27 tools are read-only. The one mutating operation — codeweb_codemod --write — is gated, reversible, and deliberately not exposed over MCP. Every tool has CLI/MCP parity, verified by JSON-RPC conformance tests.

The build, in tiers

Ten features across four tiers

From closing the holes in the agent edit loop (Tier 0) to the architectural scale track (Tier 3) — all deterministic, all zero-dependency, all tested.

Tier 0 — Close the edit-loop holes
  • F1 · Scoped context — codeweb_context — a bounded edit window instead of grepping whole files.
  • F2 · Live refresh — codeweb_refresh — incremental re-extract so queries reflect edits.
  • F3 · Duplication-delta gate — review --before — fail the gate when a changed symbol becomes a body-confirmed duplicate.
Tier 1 — New deterministic brains
  • F4 · Hotspots — complexity × fan-in × churn — where to focus first.
  • F5 · Campaign — One ordered, gated worklist of dead-code deletes, cycle cuts, and merges.
Tier 2 — Deepen the moat
  • F6 · Structural clones — Catch renamed (Type-2) clones via an identifier-normalized skeleton.
  • F7 · Suppression memory — Fingerprinted false-positive suppression that a genuinely new issue can't hide behind.
  • F8 · Reading order — A deterministic, foundations-first onboarding tour.
Tier 3 — The scale track
  • F9 · Incremental edges — Per-file edge cache — byte-identical to a full extract, re-derived only for changed files.
  • F10 · Sharded subgraphs — Answer queries from one shard + a boundary index, same result as the monolith.
Fast path

Eleven languages, parse-free

The deterministic extractor emits atomic nodes and edges for these languages without a heavyweight parser. Everything else routes through an agent fallback that returns the same node/edge shape.

JavaScript TypeScript Python Rust Go Java C# Ruby PHP Kotlin Swift

Engine modes: hybrid (default — uses ctags/ripgrep when available, falls back to regex), tools, and read. Extraction parity across the original five languages is independently verified.

Outputs, per target
  • graph.json — the machine-readable web (nodes, edges, domains, overlaps, meta).
  • report.html — a self-contained interactive map (no CDN, no network).
  • report.md / overlap.md — the same findings in plain markdown.
  • optimize.md — consolidation advice tiered ready / blocked / review, each pre-flighted against the gate.
The human view

Four views of your codebase

Generated live from the axios codebase — no mockups.

Findings view: ranked duplication, hotspots, and dead code

Findings — ranked duplication, hotspots, dead code.

Graph view: force-directed domain map

Graph — the force-directed domain web.

Treemap view: file size by lines of code with duplication heat

Treemap — file LOC × duplication heat.

Matrix view: cross-domain coupling heatmap

Matrix — cross-domain coupling.

Keep structure honest

A CI gate that fails the PR when an edit makes structure worse

The same regression verdict as codeweb_diff, run on every pull request. It builds the graph before and after, and fails on a new dependency cycle, a new body-confirmed duplication, or a symbol that loses all its callers. Pure removals never trip it — deleting code is an improvement, not a regression.

codeweb dogfoods its own gate: PRs that touch the engine run it, and it stays green.

name: codeweb gate
on: pull_request
jobs:
  gate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: GhostlyGawd/codeweb/.github/actions/codeweb-gate@main
        with:
          target: src
Principles

Why it can be trusted in the loop

  • Deterministic — no LLM in the analysis loop; the same repo always yields the same graph.
  • Zero runtime dependencies — the whole pipeline runs on an empty node_modules.
  • Read-only by default — codeweb never executes the code it maps.
  • Evidence over guesswork — every finding is body-confirmed and pre-flighted against a regression gate.