Overlay native taxonomy JSON and local DeepSeek skills.

repo_paths and compose mount src/taxonomy first. Docker copies dependency then src for taxonomy and skills. SKILL.md prose is rewritten; schema IDs and validate contracts stay. Manifest 1.14.0. Do not run upload_skills.py.
This commit is contained in:
2026-09-20 20:30:25 +02:00
parent 28a4dc8255
commit ee160a5df9
26 changed files with 1775 additions and 14 deletions
@@ -0,0 +1,66 @@
"""Native taxonomy JSON and local DeepSeek skills live under periscope/src."""
from __future__ import annotations
from pathlib import Path
from backend.repo_paths import skills_dir, taxonomy_dir
from backend.services.llm.local_skill import load_skill_markdown, load_skill_validator
ROOT = Path(__file__).resolve().parents[1]
def test_taxonomy_json_is_src():
d = taxonomy_dir()
assert d.parts[-2:] == ("src", "taxonomy")
for name in (
"ic.json",
"passive.json",
"discrete.json",
"connector.json",
"crystal.json",
"fuse.json",
"switch.json",
"test_point.json",
"transformer.json",
):
assert (d / name).is_file(), name
def test_skills_dir_is_src_and_local():
d = skills_dir()
assert d.parts[-2:] == ("src", "skills")
for name in ("extract-pintable", "extract-pattern", "extract-specs"):
assert (d / name / "SKILL.md").is_file()
assert (d / name / "validate.py").is_file()
assert (d / name / "schema.json").is_file()
text = (d / name / "SKILL.md").read_text(encoding="utf-8")
assert "Native Periscope overlay" not in text[:400]
assert "upload_skills" not in text
def test_pintable_skill_mentions_save_tool_and_wroom():
md = load_skill_markdown("extract-pintable")
assert "save_pintable" in md
assert "layout_rules" in md
assert "WROOM" in md
assert "net_class" in md
def test_docker_copies_src_taxonomy_and_skills():
docker = (ROOT / "periscope" / "src" / "backend" / "Dockerfile").read_text(encoding="utf-8")
assert "COPY periscope/src/taxonomy/ /app/taxonomy/" in docker
assert "COPY periscope/src/skills/ /app/skills/" in docker
compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
assert "./periscope/src/taxonomy:/app/taxonomy" in compose
assert "dependency/taxonomy:/app/taxonomy" not in compose
def test_skills_manifest_bumped_for_prompt_change():
text = (ROOT / "periscope" / "src" / "backend" / "skills_manifest.json").read_text(
encoding="utf-8"
)
assert '"default_model_version": "1.14.0"' in text
validate = load_skill_validator("extract-pintable")
assert validate is not None