Skip to content

Back to the catalog

redhat-et/ripwire
github.comrepo

redhat-et/ripwire

Ripwire is an offline, single-binary CLI (with optional MCP server) that indexes a repository to give coding agents a ranked, deterministic call graph, task-oriented context bundles (--for, --pack-task), and edit-time checks (--edit-check, --quality-delta, --test-gate) that flag blast radius, contract breakage, and code-quality regressions. It installs skills for Claude Code, Codex, Cursor, Windsurf, Gemini, opencode and aider, and ships extensive self-published benchmarks (docs/EVALS.md, LocBench-style head-to-head comparisons against graph-database MCP servers like codebase-memory-mcp, repowise, graphify and aider) claiming large token and latency savings plus higher file@10 retrieval accuracy. The README includes a detailed field report on using it across a ~20-agent, ~1,500-file C++/Metal orchestration engagement.

TL;DR An offline CLI/MCP tool that gives coding agents a ranked call-graph map of a repo plus edit-time blast-radius and quality-regression checks, benchmarked against rival code-context tools.
Document

What it claims

The page's headline numbers come from the project's own evaluations.

  • File localization: on a 60-instance held-out LocBench slice (paired, zero exclusions, all arms re-run 2026-08-08), ripwire puts all gold files in the top 10 (strict file@10) on 58.3% of instances. The best competitor, codebase-memory-mcp, reaches 40.0%. The README says this ratio is 1.46×, and that an earlier claimed 1.75× was wrong.
  • Wider held-out set: on 243 instances across 78 repos, it scores 60.9% against 27.6% for its own pre-routing baseline. That is +33.3pp, with a clustered-bootstrap 95% lower bound of +25.0pp.
  • Head-to-head with a graph-database MCP server: 48 matched questions on django, webpack and ripwire itself. Ripwire won 27, lost 7 and tied 14, using about 77K tokens against about 486K.
  • Indexing: 0.25–0.45 s and 6.6–16.5 MB, against 23–52 s and 391–623 MB.
  • Warm query median: 197 ms against 1,082 ms.

How it works

--for queries go through a router that picks one of three ranking lanes. The output reports which lane ran (route=), and --no-route overrides the choice.

flowchart TD
  Q[--for query] --> S{camelCase/snake token?}
  S -- yes --> N[name-exact lane]
  S -- no --> W{every word a specific symbol name?}
  W -- yes --> N
  W -- "no / too common (e.g. 'split')" --> C[subtoken+body BM25 lane]

Effect of routing: recall@1 on name-shaped queries rises from 61.1% to 91.3%. Sending every query to the name lane instead drops prose MRR from 0.967 to 0.016.

The conceptual lane:

  • Splits identifiers and the query into subtokens.
  • Scores name, doc comment and body with BM25 using per-query IDF.
  • Down-weights fixture and generated paths.
  • Ends the list where scores drop off, rather than at a fixed top-k.

Quality checks:

  • --quality-panel ranks functions by how many of six evidence families agree: McCabe shape, naming, atoms of confusion, churn, colocation, and state. Pooled over 27,889 functions, the largest correlation between any two families is +0.168.
  • --quality-delta reports only regressions, across 11 kinds. The placeholder/TODO kind never gates.

Output format: minified XML that self-reports est_tokens, confidence, and caps/truncation counts.

Evidence worth knowing beyond the headline

Bytes relative to the competitor, by question class:

Question classRipwire bytes vs competitor
Symbol lookup1.35× (worse)
Conceptual search1.23× (worse)
Blast radius0.39×
Task orientation0.06×

The savings are concentrated in orientation and blast-radius questions.

Against grep-and-read: "5.0% of the tokens" is context compression, not equal task completion. Only five questions were fully satisfied by both arms, where ripwire spent 5.2%; the gap is eleven-to-five. When the figure was re-derived, the overall number improved from 7.3% to 5.0%, but the both-answered number worsened from 1.7% to 5.2%.

How to use it

Install (prebuilt binary, SHA-256 verified; this also activates the agent skills):

RIPWIRE_REPO=redhat-et/ripwire bash -c "$(curl -fsSL https://raw.githubusercontent.com/redhat-et/ripwire/main/scripts/install.sh)"
export PATH="$HOME/.local/bin:$PATH"
cd your-repo
ripwire . --for="<the change you are about to make, in words>"

Platforms:

  • Prebuilt for macOS arm64 and Linux arm64 / x86-64 (RHEL 8+).
  • 0.6.1 was the last Intel macOS binary.
  • Windows x64 is a preview from 0.6.3. It needs an AVX2 CPU, is not code-signed, and its --hook is untested.

Building from source: needs CMake 3.24+ and a C++23 compiler (clang 16+, AppleClang 15+ or gcc 13+). All dependencies are vendored, so the build works offline.

git clone https://github.com/redhat-et/ripwire.git
cd ripwire
cmake -S . -B build && cmake --build build -j
./build/ripwire . --max-tokens=3000

Practical guidance from the page:

  • Prefer the CLI over the MCP server. The MCP verb schemas sit in your agent's context every session.
  • A bare --for is the most expensive call. Bound it with:
  • --token-budget=N
  • --signatures-only
  • --detail=N
  • --top-k does nothing on plain --for. It only prints a stderr note.
  • ripwire . --help-task="<task>" recommends one command for the task, and may answer "just grep".
  • Reflex verbs:
  • --from-trace=FILE for a stack trace you have in hand
  • --edit-check=SYM right after an edit
  • --merge-scout=REF1,REF2 before landing parallel branches
  • --pack-task="…" for ranking, bodies, callers and tests in one bundle
  • Scale: 185 flags in total. Without the installed skills, the page warns that agents over-call the map.

Limits

About the evidence:

  • All benchmarks are self-published. The harness is committed under bench/headtohead/r4-2026-08-06/.
  • The LocBench timings predate the 0.6.0 performance work and have not been re-measured.
  • The field report was written by the orchestrating model, covers a pre-0.5 version, and is explicitly not a controlled measurement.
  • The claim that savings compound across many agents is "pre-registered and unrun". Every published figure is a single-agent measurement.

Known weak spots:

  • Multi-file gold: 21.4% strict, but 78.6% any@10. It finds one file and misses its siblings.
  • One-symbol lookups: about 3× the bytes of the competitor.
  • A webpack ranking miss is unfixed. A fix met its target but was reverted for failing a separate requirement.
  • Questions one grep already answers: the tool doesn't pay off.
  • Broad common-word queries: grep sometimes wins.

Pitfalls when reading output:

  • confidence= measures how clearly the ranking separates, not whether the result is correct. A concept absent from the repo still ranks "high".
  • --edit-check's arity heuristic over-counts when trailing parameters have defaults. The field report saw 18 false "incompatible" results. Verify by compiling.
  • Churn needs full git history; a shallow clone reports every file as one commit.

Not covered here:

  • No licence is stated in the visible text.
  • This analysis covers only the first ~60K of the page's ~165K characters. Later reference sections (exit codes, language limits, the full quality-panel section) were not seen.

Organisations named here

  • Red Hat Emerging Technologies
  • Claude Code
  • Cursor
  • OpenCode

Technologies named here

  • Claude Fable 5.0
  • ripwire
  • Claude Code
  • Codex
  • Cursor
  • Windsurf
  • Gemini
  • OpenCode
  • Aider
  • MCP server
  • codebase-memory-mcp
  • repowise
  • Graphify
  • codeseek
  • readmedriftcheck.sh
  • testscopecheck.sh
  • Model Context Protocol
  • Rust
  • TypeScript
  • BM25
  • Claude Fable 5.1
  • Django
  • webpack
  • Go

Techniques named here

  • Ranked deterministic call graph
  • --edit-check contract checker
  • --quality-delta quality gate
  • --for task orientation
  • --pack-task
  • --recall
  • --callers
  • --from-trace
  • --situ
  • --pr-context
  • --test-gate
  • Confidence-gated query router
  • Subtoken + body conceptual search lane
  • Token-budgeted, honesty-labelled output
  • --html visualization with five colour lenses
  • Syntactic test-scaffolding detection