Skip to main content

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]
CommandBest forOutput shape
lore queryDirect question answeringAnswer text plus source slugs
lore explainConcept deep divesLong-form explanation plus related source slugs

How Explain Selects Context

  1. Tries an exact slug match for the concept
  2. Falls back to FTS match if exact slug is missing
  3. Loads neighbor articles from graph links
  4. 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

SymptomLikely causeFix
No article found for <concept>Concept is not indexed yetRun lore compile, then retry with precise concept name
Explanation is too shallowNeighbor context is sparseImprove wiki links and rerun compile/index
Sources look unrelatedFTS fallback matched broad termUse a more specific concept name