/rag-rat:dream-reviewfrom rag-rat
Reviews, triages, and resolves rag-rat dream findings by investigating memory gaps and recording verdicts via MCP tools.
Ships in rag-rat. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The dream tool surfaces findings about the repo's memories and load-bearing code. It never
mutates a memory — the deterministic passes and the optional model propose; a reviewer
decides. This skill is that reviewer loop: for each open finding, investigate with the rag-rat
MCP tools, then resolve it — preferring a root fix (repair the memory / close the coverage gap,
so the finding resolves on its own next run) over a bare verdict.
Drive the whole loop through the rag-rat MCP tools — dream and dream_review for the worklist,
and semantic_search / symbol_lookup / impact_surface / find_callers / history_for
/ memory_search / read_chunk to investigate — not grep, and not the rag-rat CLI (an agent has
the MCP but may not have the binary on PATH). It is a batch chore meant to run a few times a day, not
continuously.
dream and dream_review are in the MCP server's admin toolset, which is not listed by
default. If they are not among your tools, tell the user to add [mcp] toolsets = ["admin"] to the
repo's rag-rat.toml and reconnect the rag-rat MCP server (in Claude Code: /mcp), then continue.
index_status. If it reports drift, call heal_index to
repair already-indexed files. (Discovering brand-new files and re-embedding is a CLI/cron job —
rag-rat index --discover then rag-rat reconcile — outside this MCP loop; if findings look
empty, that's the thing to ask a human to run.)dream tool is deterministic-only. It recomputes coverage_gap + stale_reference on
every call and surfaces any memory_divergence / memory_unverifiable findings a prior model
run persisted — but it does not run the model itself. Generating fresh model findings is the
CLI/cron rag-rat dream --verify --compact pass (it provisions a GPU and takes minutes, so it
never runs from a tool call). If the divergence findings look stale, that CLI pass is what refreshes
them.Call dream — no args needed (limit caps the number of coverage_gap findings, default 20).
It returns findings[], each { id, kind, subject, evidence, rank, status }. Work highest rank
first (rank decays with age). The id (a short hex; a unique prefix also works) is what you pass
to dream_review.
Call dream with { "all": true } to additionally list already-accepted / dismissed findings
— use it to find one to reset.
For every finding: investigate first, then act. Prefer the root fix; fall back to a verdict. All
verdicts go through dream_review with { "finding": "<id>", "verdict": "accept" | "dismiss" | "reset" }.
coverage_gap — subject = "path::symbol"A load-bearing symbol (many callers) with no memory binding.
impact_surface / important_symbols (personalize on the symbol) /
history_for — is there a durable, non-obvious invariant, decision, or footgun here?memory_create an Invariant/Decision/Risk bound to that symbol
(bind.id = its sym_… handle, or bind.path). The gap closes automatically on the next dream
call (the binding now exists) — no verdict needed.dream_review with
verdict: "dismiss".stale_reference — subject = <memory id>, evidence lists the unresolved path(s)A memory body references a .rs path that no longer resolves against the index.
memory_get with its memory_id. Locate where the path went: semantic_search /
symbol_lookup on the moved code.memory_update the body to the new path, and/or re-anchor it with memory_update + bind
to re-anchor. The finding resolves once the reference is valid again. If the memory is genuinely
stale, memory_update with status: "obsolete".dream_review with verdict: "dismiss".memory_unverifiable — subject = <memory id>Decided deterministically: the memory's bindings are all gone/absent and none of its identifiers resolve anywhere in the whole-tree index.
memory_get). Does the code it describes still exist under a new name?memory_update + bind; or if it's obsolete, memory_update with status: "obsolete".dream_review with verdict: "dismiss".memory_divergence — subject = <memory id>, evidence = the model's cited pack linesThe model judged the memory to have drifted from current code. The model is ~71–76% accurate — verify before acting.
memory_get, impact_surface, read_chunk). Is
the note actually wrong about current code?memory_update to correct it (or retire it with status: "obsolete"). The
divergence finding drops once the stored verdict flips current on a re-check, or the body edit
self-invalidates the old verdict.dream_review with verdict: "accept".dream_review with verdict: "dismiss".memory_duplicate — subject = "<memory id>|<memory id>"Two live memories whose vectors sit close enough to be the same note under other words (only with an embedding model that has a measured threshold). Fewer than half of such pairs are true restatements; the rest are closely related but distinct rules.
memory_get). Do they state the same rule? If one is newer or more precise, which is
true of current code?memory_update the better note to carry anything the other adds, then retire
the other with status: "obsolete". If one replaced the other, keep the newer and retire the older.
The finding resolves once only one of them is live.dream_review with
verdict: "dismiss". The dismissal holds until either note's title changes.dependent_of_dead_source — subject = <memory id>A live memory derived (derived_from, directly or through other derived memories) from a memory
that no longer stands: obsolete, rejected, or anchored only to code that is gone. The evidence
names the dead source and, when one exists, the memory that supersedes it.
memory_get) and re-check the dependent against the dead source — and against its
successor, if named. Does the dependent still hold without it?memory_update the dependent to stand on its own or on the successor (and re-point
the edge: memory_edge_remove + memory_edge_add), or retire it with status: "obsolete". The
finding resolves by itself once the source stands again, the edge is gone, or the dependent is
retired.dream_review with
verdict: "dismiss" (dropping the derived_from edge is usually the better fix).Each is a dream_review call, { "finding": "<id>", "verdict": … }:
verdict | Meaning |
|---|---|
accept | Real, acknowledged (action pending) — leaves the open worklist. |
dismiss | False positive / won't-fix — hidden from the worklist. |
reset | Undo a prior verdict, back to open. |
open/accepted/dismissed findings are reviewable; a resolved/superseded one is not.Call dream again and repeat until findings[] is empty (or only accepted/dismissed remain under
{ "all": true }). If your fixes created new memories, a fresh call may open follow-on findings —
one more pass usually converges.
dismiss. Dismissing a real issue just hides it.memory_create it (that also closes coverage_gap findings).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cq27-dev/rag-rat --plugin rag-rat4 skills in this plugin
/configure-rag-rat-dreamUse 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".
/init-rag-ratUse 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".
/using-rag-ratUse 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.
Other plugins' skills for the same job