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:
@@ -120,6 +120,8 @@ class McpQueryTests(unittest.TestCase):
|
||||
self.assertIn("obsidian-wiki business template", prompt)
|
||||
self.assertIn("obsidian-wiki business sql", prompt)
|
||||
self.assertIn("read-only business facts", prompt)
|
||||
self.assertIn("hybrid business + wiki questions", prompt)
|
||||
self.assertIn("spawn read-only subagents", prompt)
|
||||
self.assertIn("Do not run arbitrary shell commands", prompt)
|
||||
self.assertIn("If Visibility is public only, do not use business facts", prompt)
|
||||
self.assertNotIn("shell commands, file writes", prompt)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class WikiSkillInstructionTests(unittest.TestCase):
|
||||
def test_wiki_query_documents_hybrid_business_and_wiki_route(self):
|
||||
text = Path(".skills/wiki-query/SKILL.md").read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn("Hybrid Business + Wiki Route", text)
|
||||
self.assertIn("spawn two subagents", text)
|
||||
self.assertIn("ordinary wiki-query", text)
|
||||
self.assertIn("business facts query", text)
|
||||
self.assertIn("fuse the two results", text)
|
||||
self.assertIn("customer_summary", text)
|
||||
self.assertIn("business sql", text)
|
||||
self.assertIn("Do not use hybrid mode when filtered mode is active", text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user