SuperAPI AI Directory

runecho

Deterministic symbol oracle over a locally built index of the repo: whether a symbol exists, what a file declares, and what changed structurally since the last snapshot. Ships with a PreToolUse guard t

Open website

About this tool

RunEcho is a deterministic symbolic validation tool for AI coding agents, with the goal of preventing an edit before the AI agent writes a call to a nonexistent function or type, rather than discovering the problem only after the build fails. It provides a locally built code index for answering three types of factual questions: "does a certain symbol exist," "what does a certain file declare," and "what structural changes have occurred since the last snapshot."

Main capabilities

  • Symbol existence validation: based on the Intermediate Representation (IR) of the local index, determine whether a certain symbol actually exists.
  • Structure tracking and diffing: parse source code into a compact IR, with each file recording a content hash and its declared functions, classes, exports, and imports; the IR has a deterministic root hash, so "whether the structure has changed" can be determined by hash comparison, and "what changed" can be obtained through a structured diff.
  • Snapshots and drift: IR snapshots are stored in a central history database, and each registered repository has a stable identity, allowing queries for any repository and computation of drift between any two snapshots.
  • Pre-edit guard: runecho-guard checks new code before editing or committing, flagging references to nonexistent symbols (suspected hallucinations).
  • Read-only MCP queries: runecho-mcp exposes read-only tools such as structure, diff, hash, status, health, and locate to AI agents via standard input/output, where locate can deterministically give the file and line number where a symbol is located, avoiding grep or guessing.

The three components

  • runecho-ir: a command-line tool used to register repositories, build indexes, generate snapshots, and view diffs and changes.
  • runecho-mcp: a standard input/output MCP server that exposes read-only query tools.
  • runecho-guard: the guard component, which can be used as a git pre-commit hook, a Claude Code PreToolUse hook (checking before Edit / Write / MultiEdit take effect), or in --protocol mode (reading edits from standard input and outputting a versioned decision document to standard output), suitable for scenarios outside Claude Code.

Determinism and cost Each check is one parse and one table lookup, so the decision is completely consistent across every run, every machine, and every agent, with no model sampling or retries, and no dependence on large language models, API keys, networks, builds, or language servers,Therefore it is a gatekeeper rather than an opinion. The pre-edit guard does not consume context tokens: a clean check writes nothing, and only edits it blocks incur a cost of about 100 tokens. The oracle MCP server is another interface and is not free—its tool schema consumes about 968 tokens at session start, and unscoped structure is costly, so scoping is worthwhile.

Usage Install the binary: you can download a prebuilt release package (no Go required), or build from source (requires Go 1.26+, bash install.sh); building from source also installs the guard hooks. Register a repository and capture the current structure: runecho-ir repo add /path/to/your/repo, then runecho-ir repo reindex <name>; if the registration directory differs from the resolution directory, you can specify a separate source root via --source-root. View registered repositories and drift since the last snapshot: runecho-ir repo list and runecho-ir diff --since=reindex /path/to/your/repo. Register the oracle with an AI agent: for Claude use claude mcp add runecho -- ~/.local/bin/runecho-mcp; for Codex, add [mcp_servers.runecho] and the command field to ~/.codex/config.toml (absolute path, TOML does not expand ~). Install the edit-time guard in Claude Code: /plugin marketplace add inth3shadows/runecho and /plugin install runecho-guard@runecho; the plugin hooks into PreToolUse (guard) and PostToolUse (record results and refresh the index), but does not bundle the binary; if the binary is missing, the hook silently defers instead of erroring on every edit. The commit-time guard can be run in the root of a registered repository with bash install.sh --hook; it blocks commits that call functions that do not exist anywhere in the index, and gives a “did you mean …?” hint when there is a close match; a single commit can use RUNECHO_GUARD_SKIP=1 git commit … bypass.

Applicable scenarios Suitable for scenarios that need deterministic structural information and guardrails: determining whether a symbol actually exists, obtaining structured diffs rather than vague summaries, and intercepting fabricated helper function calls before they are written to the repository. It does not attempt to be a broad semantic search or general-purpose codebase exploration tool; its responsibility is narrower: verifying repository facts and reducing hallucinated code modifications.

Limitations and boundaries

  • It only tracks top-level symbols and imports/exports, and does not provide complete type information.
  • The parser is AST-based but deliberately kept shallow, extracting definitions (functions, classes, methods) rather than semantics: no type inference, call graph, or cross-file binding. Go uses the standard library go/ast; Python, JS/TS, Rust, and Ruby use a pure Go tree-sitter runtime; shell uses shadow scanning; imports/exports for tree-sitter languages still use regex. Each language has known gaps.
  • Index coverage includes more languages than guard checks: shell, Rust, and Ruby can be indexed (structure, locate, diff), but are not validated during edits; guard reference checks exist only for Go, JS/TS, and Python.
  • Guard validation does not cover qualified references: bare calls (foo(...)), bare type annotations (x: SomeType), and SCREAMING_SNAKE constant references; it does not flag qualified references (obj.method(...), pkg.Thing, x.attr), because that would require receiver type resolution and semantic analysis, a boundary deliberately avoided.
  • Snapshots, diffs, and hash queries are all local deterministic operations, and do not provide semantic search, embedding indexes, or a hosted control plane.
  • The guard runs unattended on every commit/edit, without a sandbox; the relevant threat model, what is stored, and how to report vulnerabilities are described in SECURITY.md.
  • Regarding false positives: the proportion of users who "still approve" lacks measurable variance (in 30 days of trial traffic, all 308 asked-gated edits were approved, with zero rejections), so fpaudit instead judges each flagged symbol based on dated git history: whether it was already defined at the time, and whether it is defined now. The project's own real corpus live reading is 15.3% false positives, 33.7% premature (the guard was correct, but triggered before the symbol it flagged existed, i.e. the agent wrote the caller first and the callee later), 51.0% valid (trueunsupported references).
  • Regarding capture rate: in a real model hallucination corpus (N=15 manually verified cases, all with compiler or runtime errors as independent ground truth), the guard captured 4 out of 9; the other 5 were qualified locations (such as df.groupby(...), tree.Root()), which require receiver type resolution and are outside the design scope.
  • Runtime dependencies: the prebuilt binary is self-contained, requiring no runtime and no API key; building from source requires Go 1.26+ and a POSIX or Windows shell; storage is by default under ~/.runecho/; no external services, no API key.

Other documentation Technical reference (architecture, storage schema, IR, MCP tools, maintenance), usage guide (daily operations, integration, reading drift, troubleshooting), token cost (measured context cost per interface), false positive audit (the guard's false-positive/premature/valid rates against git history, and why approval rate cannot be used as a proxy for false positives), changelog and versioning policy, and the MIT license.