- Rust 65%
- Python 25%
- TypeScript 10%
- Shell <1%
- Go <1%
- 3 more languages <1%
reamerx #
Deterministic edit-start evidence for coding agents: impact, paths, tests, and readiness — locally, with explicit gaps.
reamerx is a single Rust binary. It builds a transient in-memory index for the target repository and serves CLI commands or a stdio MCP server. It does not persist a graph, watch the filesystem, upload telemetry, or fetch package/web data.
When to Use #
Use ReamerX immediately before editing when the next step is not obvious:
- A symbol or entrypoint is known, but its blast radius is not (
impact,edit_pack). - A failing diagnostic names a file and line, but not the enclosing patch target (
edit_pack,slice). - The edit target is known, and the open question is which tests to run (
impactwith tests,edit_pack). - Two known symbols need static call-path evidence (
path,trace). - A change may cross imports, field reads/writes, config assets, or frontend references (
impact,changes --audit).
Use normal file reads, rg, tests, and LSP when the target is already obvious or when runtime behavior is the question. See docs/agent-usage-examples.md for concrete workflows.
When Not to Use ReamerX #
- As a general codebase search engine or a replacement for
rg, IDE navigation, or LSP definitions and references. - For runtime behavior, reflection, dependency-injection wiring, event delivery, runtime feature flags, network calls, or other dynamic frontiers that static evidence cannot prove.
- For cross-repository graphs, persistent project memory, vector search, or long-lived symbol databases.
- As an LSP server, refactoring engine, patch generator, SAST/security scanner, or test runner.
- To index a filesystem root, temporary directory, home directory, or other shared/system tree. ReamerX refuses these roots; point
--rootat the project. - For a one-file read or edit where the target and verification command are already obvious.
Evidence Contract #
Every ReamerX result is a compact evidence packet, not an answer:
- File/line/snippet or manifest/command evidence for every claim it can support.
statusand readiness fields forok,truncated,no_match,ambiguous,unknown,unsupported, and frontier cases.- Truncation markers and recommended next calls when a budget or the index is incomplete.
- Explicit static/runtime boundaries. A found call path is static evidence, not proof of runtime execution.
Treat unknown, unsupported, and no_path as real outcomes. Do not infer hidden dependencies, runtime registrations, generated symbols, or test coverage from the absence of static evidence.
edit_pack --budget-tokens bounds the whole serialized packet when optional evidence can be shortened. It uses a conservative estimate margin when trimming. Its budget_ledger.dropped records shortened sections; budget_ledger.over_budget and requested_budget_tokens report an unmet budget. Source context, selected test files, runnable verification commands (including compact isolated_commands and fallback_commands when their detail is trimmed), and requested patch or diagnostic evidence stay available when the budget cannot be met. Explicit patch-contract and diagnostic requests retain complete evidence, so their packets can exceed the budget.
There is no persistent graph, watcher, or background index. The index lives for the process lifetime and is rebuilt when repository files change. Outcome claims are measured with the paired A/B methodology in docs/agent-outcome-benchmark.md; the agent-facing feature boundary is documented in docs/context-feature-guardrails.md.
Install #
cargo build --release
./target/release/reamerx --help
Tagged releases publish x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu tarballs, each with a SHA-256 checksum, as artifacts on the Tangled tag. macOS users build from source.
The commands below use reamerx as shorthand — substitute ./target/release/reamerx or install it to your $PATH. Use --root /path/to/repo to target another repository. Add --json for machine-readable output.
One-command setup #
From the project root:
reamerx init
reamerx doctor --install
init detects locally installed harnesses and writes project-scoped configuration:
- Claude Code:
.mcp.jsonplus.claude/skills/reamerx/SKILL.md - OpenCode:
opencode.json - Pi:
.pi/mcp.jsonunless the direct Pi extension is already installed, in which case init skips it to avoid duplicate tools - Codex +
--hook: project.codex/config.tomlwith a non-blockingPreToolUsehook; MCP itself remains the globalcodex mcp addentry
Use --harness <auto|claude|opencode|pi|codex|all> to choose explicitly, --dry-run to preview, or --force to replace an existing conflicting ReamerX entry. Add --hook to install the non-blocking PreToolUse adoption hook for Claude Code and detected Codex installs; reamerx hook is the advisory command it runs. Codex is detected and reported with the equivalent codex mcp add command because its config is global. Setup performs no network access.
doctor --install reports binary, config, skill, and hook status. Remove only the generated project entries with:
reamerx uninstall
The managed-file manifest is .reamerx/install.json; pre-existing manual entries are left in place.
CLI #
reamerx scan
reamerx init
reamerx init --hook
reamerx doctor --install
reamerx uninstall
reamerx repo-map --limit 40
reamerx symbols "indexFile kind:function"
reamerx context "compile file:cli/src/commands" --no-snippets
reamerx search "config_key file:docs"
reamerx impact "name:RepoIndex kind:struct"
reamerx impact "compile kind:function" --tests
reamerx tests "compile kind:function"
reamerx changes --audit
reamerx symbol 123 --budget-tokens 800 --no-line-numbers
reamerx slice "name:run kind:function" total
reamerx edit-pack "name:compile kind:function" --tests --patch-contract
reamerx trace "resolveCallTarget kind:function" --depth 2
reamerx path "main kind:function" "run kind:function" --depth 4
reamerx profile "compile file:cli/src/commands" --symbol resolveCallTarget --json
Query filters: name:, file:, kind:, lang:, ext:. kind:function includes methods; use kind:callable for explicit function-or-method intent.
MCP #
reamerx mcp
The MCP server uses stdio and exposes 11 tools, grouped by edit-start intent:
- Patch start:
edit_pack - Blast radius:
impact,changes - Navigation:
path,trace - Discovery before a target is chosen:
context,symbols,symbol,search - Local state:
slice - Orientation metadata:
repo_map
Example MCP config:
{
"mcpServers": {
"reamerx": {
"command": "/absolute/path/to/reamerx",
"args": ["--root", ".", "mcp"],
"transport": "stdio"
}
}
}
Run the protocol smoke test:
python3 scripts/mcp_compat_smoke.py --reamerx ./target/release/reamerx --root /path/to/repo
Root and size guards #
ReamerX only indexes project roots. It refuses filesystem roots and shared/system directories (/, /tmp, /var, /usr, the home directory, and similar), so an unresolved MCP workspace root cannot turn into an accidental scan of the machine. Discovery also fails fast with an explicit error when a walk exceeds 100,000 filesystem entries, 25,000 source files, or 256 MiB of accepted files; walks stop at 64 directory levels, and individual files over 1 MB are skipped. Point --root at the repository (or a subdirectory) rather than a shared parent.
For host-specific MCP setup (VS Code/Copilot, Neovim, Cline, Continue, Pi.dev), see docs/host-interoperability.md.
Pi.dev #
Install the extension wrapper from a clone:
python3 scripts/install_pi_extension.py
This builds the binary, installs ~/.pi/agent/extensions/reamerx, registers the bundled skill, wires the built-in MCP config, and runs the integration smoke. Reload Pi.dev after installing.
Pi 0.99+ ships MCP support in core, so ReamerX needs no pi-mcp-extension bridge. The installer writes a native entry to ~/.pi/agent/mcp.json:
{
"mcpServers": {
"reamerx": {
"command": "/absolute/path/to/reamerx",
"args": ["--root", ".", "mcp"],
"exposure": "codemode",
"timeout": 180
}
}
}
exposure: codemode (the default) keeps the 11 ReamerX tools out of the model context until a codemode script calls them, while direct declares them like built-in tools. timeout is a per-request budget and must cover the cold index build, which can take tens of seconds on a large repository; 180 leaves headroom so a healthy cold start is not reported as MCP request timed out. Legacy pi-mcp-extension keys (transport, lifecycle, requestTimeoutMs, top-level settings) are ignored by Pi and removed by the installer.
The installer also removes the obsolete pi-mcp-extension entry from settings.packages if it is present, because an installed /mcp extension replaces Pi's built-in MCP support and stops Pi from reading mcp.json.
Alternatively, use Pi's package flow after building:
cargo build --release --locked
pi install ./pi-extension/reamerx
Do not use both methods simultaneously — Pi will load duplicate reamerx_* tools. See docs/pi-dev-example.md for details.
For the extension's environment switches (REAMERX_PI_INSTRUCTIONS, REAMERX_DISABLE, REAMERX_ACTIVE_TOOLS, binary path and timeout overrides) and what disabling does not cover, see docs/pi-extension-configuration.md.
Release Checks #
python3 scripts/release_gate.py
Runs formatting, clippy, unit tests, MCP smoke, quality fixtures, and benchmark suites. See docs/release-1.0.md.
For paired A/B comparisons against coding-agent harnesses, see docs/agent-outcome-benchmark.md.
Current Scope #
ReamerX is a bounded edit-start evidence tool — not persistent project memory, vector search, an LSP/refactoring server, runtime tracer, web/package research agent, or broad multi-language platform. New features must improve measured readiness, bytes, calls, or verification in benchmarked tasks.
Supported evidence primitives:
- Gitignore-aware, transient file discovery with explicit root and size guards
- Go, Rust, Python, JavaScript, TypeScript, TSX, HTML/Go-template HTML, and CSS via tree-sitter
- Symbol extraction with qualified field symbols (Rust, Go, Python, TypeScript)
- Scoped frontend asset extraction: HTML/JSX IDs/classes/tags, htmx/Alpine/data/ARIA attributes, CSS selectors/custom properties/at-rules
- Query filters for name/file/kind/lang;
kind:function= function-or-method;kind:callableexplicit - Call-expression extraction: TypeScript/JavaScript constructor calls, import-resolved member calls, local returned-instance method calls, literal visitor-dispatch tables
- Lightweight import/module extraction with aliases and resolved same-repo relative, Rust module, and Python module imports
- Transient in-memory call graph
- BM25-style symbol context ranking
- Exact-text search across code, docs, and config-like files
- Compact impact and git-aware change-impact queries with callers, callees, unresolved calls, import evidence, non-call references, field read/write evidence, and optional targeted test impact
- Shortest static call-path queries with ambiguity diagnostics and confidence metadata
- Intra-procedural local-name slices for compact read/write line evidence
- Minimal stdio MCP server (11 tools)
- CLI output suitable for thin extension wrappers
The MCP surface is capped at 11 tools. Prefer improving existing tools over adding new ones. Every supported behavior above is exercised by unit or fixture tests and the release gate; outcome claims are reported only through the paired A/B harness above, including negative results.
context, slice, and edit_pack accept an optional structured diagnostic object (path + message required, range/source/code/severity optional) for editor/compiler/linter/test-runner handoff. CLI and Pi direct tools also support --diagnostic-file / diagnostic_file (bare diagnostic, { "diagnostic": ... } wrapper, or SARIF log).
Additional notes live under docs/, including docs/live-pathing-research.md, docs/live-evidence-adoption-decision.md, and docs/diagnostic-context-packing-rfc.md.
License #
MIT. See LICENSE.
Contributing #
Pull requests go through Tangled. See CONTRIBUTING.md for the pull request checklist and CI layout, and docs/tangled.md for remotes, authentication, logs, and releases.