name: corpus-gbrain-query description: 用于显式配置目标 corpus 后,从该 LoreKit corpus 进行图谱、多跳关系或 GBrain 增强候选检索,并保持 LoreKit 知识库为事实源。
corpus-gbrain-query
Optional read-only GBrain query gateway for a configured Lorekit corpus.
Config
Read ~/.config/lorekit/global-corpus.json.
Required:
default_corpuslorekit_binor<default_corpus>/bin/lorekit
Optional:
gbrain_bin
Prefer <lorekit_bin> gbrain query over direct gbrain query, because Lorekit maps candidates back to canonical corpus pages.
Boundary
Lorekit 知识库/ is the only source of truth.
GBrain is a derived candidate recall layer. It must not write 知识库/, 原料/, or 输出/.
Do not run native GBrain mutating commands from this skill.
When To Use
Use when:
- ordinary
corpus-queryrecall is weak - the user asks for multi-hop relationships
- the question is about graph connections, adjacent concepts, or indirect links
- the user explicitly asks for GBrain
Do not use for:
- first-pass exact keyword search
- writes or fileback
- ingest
Action
- Read config.
cd <default_corpus>.- Run
<lorekit_bin> gbrain status --jsonwhen freshness or setup is unclear. - Run
<lorekit_bin> gbrain query "<q>" --json. - Map every candidate back to canonical
知识库/pages using Lorekit output. - Read the canonical pages before answering.
If the GBrain index is stale, report the stale warning. Do not auto-sync unless the user asks.
Output
Return:
- candidate pages
- relationship or multi-hop explanation
- freshness warning if present
- next step: run
corpus-querysynthesis orcorpus-filebackonly after user confirmation