Tool
explain
Ask RepoQL to investigate a question and write an answer supported by source citations.
explain searches for relevant material, reads it, and uses a language model to develop an answer. It can make further reads as it works. This is useful when the explanation spans several files and you want a connected account of how they fit together.
Define the question before delegating it
Give it a specific behaviour to explain and a scope that contains the relevant implementation. Search terms can point it toward names you have already found. If you are still deciding which subsystem matters, use explore first.
The scope determines where the initial search looks. A scope that is too narrow can leave out a dependency that changes the answer; one that is too broad can spend effort on a different implementation. Treat the scope as an investigation choice, not an access-control boundary.
What happens during an explanation
RepoQL starts with search results and repository structure, then makes source reads while generating the explanation. The returned answer is a synthesis of that evidence. Its token budget controls the answer length, separately from the source context used during the investigation.
This requires cloud inference and an account with access to it. Selected source content is sent to the inference service. Your data explains the processing and retention policy.
Check the claims that matter
Use the citations to inspect the code behind a conclusion, especially before changing behaviour. An explanation can miss a path, misread a condition, or rely on a stale document. Tests and runtime observations may still be needed to establish what happens in a particular deployment.
Example: explain a bounded part of the engine
How does gitignore matching decide whether to include a path?
In RepoQL.Core, use LayeredFileFilter GitIgnoreMatcher as search terms and file:///src/L1/engine/RepoQL.Engine.FileSystem/** as the scope.
The question asks about inclusion decisions in one filesystem implementation. It gives the investigation a concrete boundary and names to start from, without prescribing the answer.
Parameters
Installed CLI options
rql explain --help
| MCP parameter | Use |
|---|---|
| question | Required. The question to investigate. |
| keywords | Required through MCP. Search terms that focus the investigation. The CLI can infer these when omitted; supply them when you know the local names. |
| uriGlob | Optional. Scope for the initial evidence search. |
| tokenBudget | Optional. Maximum size of the synthesized answer. |
Further reference
In the installed manual: help:///commands/explain.md.