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:
@@ -38,7 +38,7 @@ obsidian-wiki setup --project . # also drop project-local skills + AGENTS.md int
|
||||
obsidian-wiki setup --copy # copy skill files instead of symlinking
|
||||
```
|
||||
|
||||
For operational questions such as "2026 年 6 月接了多少单", ask your agent with `wiki-query`. The `wiki-query` skill decides whether the question needs structured business facts, then uses the business template catalog or guarded read-only SQL before falling back to normal wiki retrieval.
|
||||
For operational questions such as "2026 年 6 月接了多少单", ask your agent with `wiki-query`. The `wiki-query` skill decides whether the question needs structured business facts, then uses the business template catalog or guarded read-only SQL before falling back to normal wiki retrieval. For hybrid questions such as "某客户的大体情况", it splits the work into a normal wiki context track and a business facts track, then fuses the narrative context with recent order/customer metrics.
|
||||
|
||||
When working from a cloned repo, `scripts/obsidian-wiki-ops.py` is the single repo-local operations entrypoint. It wraps common `obsidian-wiki` commands, Kingdee business sync/templates, the business sync timer, daily update, and the managed MCP service:
|
||||
|
||||
@@ -327,7 +327,7 @@ Staging is for upload/intake only. The normal ingest flow should still classify
|
||||
|
||||
### Optional: Business Fact Queries
|
||||
|
||||
Operational counts and amounts belong in a structured fact database, not in markdown pages. The `business` CLI stores Kingdee sales orders in `<vault>/_meta/business-facts.sqlite`. Normal users should ask through `wiki-query`; the skill decides when to use structured business facts, prefers templates, and only falls back to guarded read-only SQL when no template fits.
|
||||
Operational counts and amounts belong in a structured fact database, not in markdown pages. The `business` CLI stores Kingdee sales orders in `<vault>/_meta/business-facts.sqlite`. Normal users should ask through `wiki-query`; the skill decides when to use structured business facts, prefers templates, and only falls back to guarded read-only SQL when no template fits. For customer/product/person overview questions, `wiki-query` runs a hybrid path: one track gathers wiki context and citations, another gathers read-only business metrics, and the final answer keeps the two sources clearly separated.
|
||||
|
||||
```bash
|
||||
# Sync from an exported or API-fetched Kingdee JSON payload.
|
||||
|
||||
Reference in New Issue
Block a user