Explain Command
lore explain "<concept>" [--json]
lore explain provides a deep concept walkthrough by combining the main matched article with nearby graph neighbors.
Query vs Explain
flowchart LR
A[Need direct answer to a question] --> B[lore query]
C[Need deep conceptual synthesis] --> D[lore explain]
| Command | Best for | Output shape |
|---|---|---|
lore query | Direct question answering | Answer text plus source slugs |
lore explain | Concept deep dives | Long-form explanation plus related source slugs |
How Explain Selects Context
- Tries an exact slug match for the concept
- Falls back to FTS match if exact slug is missing
- Loads neighbor articles from graph links
- Synthesizes a detailed explanation from combined context
Examples
# human-readable deep dive
lore explain "Compile Lock"
# script-friendly
lore explain "MCP Server" --json
Example JSON response:
{
"explanation": "...long-form explanation...",
"sources": ["compile-lock", "watch-mode", "index-repair"]
}
Integration Use Cases
- Onboarding deep dives for new engineers
- Architecture review prep before design meetings
- Agent workflows that need broad conceptual context rather than one-off answers
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
No article found for <concept> | Concept is not indexed yet | Run lore compile, then retry with precise concept name |
| Explanation is too shallow | Neighbor context is sparse | Improve wiki links and rerun compile/index |
| Sources look unrelated | FTS fallback matched broad term | Use a more specific concept name |