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
21 lines
737 B
Python
21 lines
737 B
Python
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()
|