feat(query): document hybrid business wiki answers

Teach wiki-query to split entity overview questions into an ordinary wiki context track and a read-only business facts track, then fuse the results. Update the MCP query prompt to explicitly allow read-only hybrid subagents while preserving public-only and mutating-command restrictions. Add a skill instruction regression test and update docs.

Validation: python3 -m unittest tests/test_wiki_skills.py -v; python3 -m unittest tests/test_mcp_query.py -v; python3 -m unittest tests/test_business_facts.py -v; python3 -m unittest discover -v; python3 -m compileall obsidian_wiki tests scripts; git diff --check
This commit is contained in:
Codex
2026-07-07 16:05:16 +00:00
parent 11b4261d29
commit e5f26a5540
6 changed files with 45 additions and 3 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ Order upsert key: `order_id`, falling back to `order_no` when no explicit ID is
## Query Flow And Counting Basis
`wiki-query` decides semantically whether a user question needs business facts. When it does, it loads `obsidian-wiki business schema --json`, chooses a template if one fits, and only then uses guarded SQL for gaps.
`wiki-query` decides semantically whether a user question needs business facts. When it does, it loads `obsidian-wiki business schema --json`, chooses a template if one fits, and only then uses guarded SQL for gaps. For hybrid overview questions such as "某客户的大体情况", it runs two tracks: ordinary wiki retrieval for context/citations and business facts retrieval for customer/order metrics, then fuses the results in one answer.
Template families include: