By cq27-dev
Local repo-intelligence index + MCP server: semantic search, symbol/graph navigation, impact-surface preflight, git + GitHub papertrail, and a source-anchored memory graph.
Use to enable and operate rag-rat's optional AI memory-maintenance passes — the `dream --verify` / `--compact` model turns that verify repo memories (flag claims that no longer hold) and compact them (shorter summaries). Off by default. This configures `[llm.dream]` / `[llm.dream.remote]` (a chat model, over a Connect endpoint or an ephemeral Modal/RunPod cookbook box — vllm/ollama, never infinity), and sets up running it on demand or on a schedule (systemd timer). Pairs with the `dream-review` skill, which triages the findings these passes produce. Triggers: "configure dream", "enable dream", "AI memory verification", "memory compaction", "schedule dream maintenance", "set up the dream model".
Use when asked to review, triage, or resolve rag-rat "dream" findings — the memory-maintenance worklist the `dream` tool produces. Walks the open findings and, per kind, either fixes the underlying memory / coverage gap (which resolves the finding at the root) or records an accept / dismiss verdict with `dream_review`. Triggers: "dream review", "resolve dream findings", "triage the dream worklist", "go through pending dream findings".
Use to set up rag-rat in a repository that is not indexed yet — when the rag-rat MCP server is DORMANT (its tools return {"status":"no_index"} with a "Run rag-rat init … then restart" remedy), or when the user asks to initialize / configure / "set up rag-rat" / "index this repo" / choose an embedding backend. Drives the setup conversationally: scans the repo, explains only the material choices, recommends the local FastEmbed default for a modest machine, and — only when a remote / GPU embedder is worth it — loads a reference for local infinity (Docker) or an ephemeral Modal/RunPod worker, then previews the config, writes it after confirmation, runs the first index, offers to set up the git maintenance hooks (asks before touching `.git/hooks`), and tells the user to restart the MCP server. Triggers: "set up rag-rat", "rag-rat is dormant", "no rag-rat.toml", "index this repo", "configure rag-rat embeddings".
Use when working in a repository indexed by rag-rat (a `rag-rat.toml` at the root and a rag-rat MCP server available). Establishes the working rule: reach for the rag-rat MCP tools (semantic_search, symbol_lookup, impact_surface, find_callers/trace_callees, repo_brief, important_symbols) to FIND and UNDERSTAND code before falling back to grep/cat, and record durable, non-obvious learnings as rag-rat memories before finishing. Triggers: "use rag-rat", "how do I navigate this repo", any code-understanding task in a rag-rat repo.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
What a repository knows about itself. rag-rat is a local repo-intelligence index and MCP server
for coding agents. It keeps source files read-only, writes only its own SQLite database, and answers
with provenance on every result — current source, the code graph, git/GitHub history, and durable,
source-anchored repo memories that persist across sessions and agents.
Every coding harness already has grep and file reads. rag-rat adds the layer they do not provide:
source-anchored rationale. It connects the code an agent is about to touch to its callers, callees,
tests, git/GitHub history, prior decisions, invariants, risks, and duplicate-code signals — and
labels every result with confidence and coverage, so an agent can judge it instead of trusting it.
sequenceDiagram
participant Repo as Repository
participant Engine as rag-rat engine
participant Agent as Coding agent
Repo->>Engine: Source · git/GitHub · repo memories
Engine->>Engine: Index → graph → (opt) SCIP oracle → reconcile
Agent->>Engine: where / why / who-calls / impact?
Engine-->>Agent: source + call paths + papertrail + memories (with provenance)
Agent->>Engine: record a finding
Engine->>Repo: persist a source-anchored repo memory
Invariant, Decision, Risk, …) that survive
refactors and surface automatically during future queries — the signal grep can't give you. They
are not assistant memory: they are versioned, local, source-anchored facts about this
repository that any future agent retrieves with evidence.Compiler confidence and ranks the load-bearing
symbols.For Claude Code, Codex, and opencode, install the plugin. It registers the MCP server, adds the
hooks, and installs a version-matched rag-rat binary on first run (the Claude Code and Codex
bundles also add the skills; on opencode add them with npx @rag-rat/skills):
# Claude Code
claude plugin marketplace add cq27-dev/rag-rat
claude plugin install rag-rat@rag-rat
# Codex
codex plugin marketplace add cq27-dev/rag-rat
codex plugin add rag-rat@rag-rat
# opencode (add -g for a global install)
opencode plugin @rag-rat/plugin-opencode
After installing, approve the plugin so its tools and hooks run (opencode loads plugins without an approval step — nothing to do there):
Claude Code asks before each rag-rat MCP tool the first time it runs — choose "Yes, don't ask
again," or pre-allow them in ~/.claude/settings.json with
"permissions": { "allow": ["mcp__rag-rat__*"] }.
Codex shows a "Hooks need review" prompt on the first codex session started inside the
repo (the plugin ships grep-augmentation, clone-check, and session-digest hooks that run outside
the sandbox). Choose "Trust all and continue" to enable them. For unattended commands such as
codex review, also allow the plugin's MCP tools in ~/.codex/config.toml so the run cannot stall
on a per-tool approval prompt:
[plugins."rag-rat@rag-rat".mcp_servers.rag-rat]
default_tools_approval_mode = "approve"
This trusts every current and future MCP tool exposed by the installed rag-rat plugin. Only enable it when you trust the plugin's source and installation origin, then restart Codex.
Then open the repository and ask:
npx claudepluginhub cq27-dev/rag-rat --plugin rag-ratLocal codebase intelligence + change-safety gates for coding agents. Pre-indexes your repo's symbols, call graph, deps, and git history into SQLite (28 languages, 100% local, zero API keys), then exposes a lean 16-tool MCP core preset: graph-precise search, callers/impact blast radius, coupling, dead code, taint reachability, and pre-merge verify/critique gates that catch regressions, broken references, AI-slop duplication, and convention drift before they ship.
Repository knowledge engine plugin. Bundles CLI-backed slash commands (rb-setup / rb-init / rb-refresh / rb-ask) plus the agent-repo-init skill. Works in both Claude Code and Codex CLI.
Graph-first code intelligence for AI agents. SurrealDB knowledge graph + 52 MCP tools replace Read/Grep/Glob with deterministic graph traversal. 80–95% fewer tokens on code context. Rust-native, fully local.
Persistent project memory for AI coding agents — semantic search, AST-aware chunking, dependency graphs, and conversation history
Code graph navigation and semantic search for LLM coding agents
Semantic code search and codebase graph tools for Claude Code