2026-10-31 23:46:28 +01:00
|
|
|
"""The self-improving skills must share the objective held by kvb-skills-tune."""
|
2026-08-02 19:40:52 +02:00
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
SKILLS = REPO_ROOT / "skills"
|
2026-10-31 23:46:28 +01:00
|
|
|
ROUTERS = ("kvb-skills-auto", "kvb-check-confidence")
|
2026-08-02 19:40:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestOptimizeObjective(unittest.TestCase):
|
2026-10-30 16:30:00 +01:00
|
|
|
def test_autotune_names_the_three_axes(self):
|
2026-10-31 23:46:28 +01:00
|
|
|
text = (SKILLS / "kvb-skills-tune" / "SKILL.md").read_text(encoding="utf-8")
|
2026-10-30 16:30:00 +01:00
|
|
|
self.assertIn("## Objective", text)
|
2026-08-02 19:40:52 +02:00
|
|
|
for axis in ("**Tokens**", "**Time**", "**Quality**"):
|
|
|
|
|
self.assertIn(axis, text)
|
|
|
|
|
|
|
|
|
|
def test_routers_point_at_it(self):
|
|
|
|
|
for skill in ROUTERS:
|
|
|
|
|
text = (SKILLS / skill / "SKILL.md").read_text(encoding="utf-8")
|
2026-08-10 17:13:29 +02:00
|
|
|
self.assertIn(
|
2026-10-31 23:46:28 +01:00
|
|
|
"`kvb-skills-tune` skill's **Objective**",
|
2026-10-30 16:30:00 +01:00
|
|
|
text,
|
2026-10-31 23:46:28 +01:00
|
|
|
f"{skill} does not route to the kvb-skills-tune objective",
|
2026-08-10 17:13:29 +02:00
|
|
|
)
|
2026-08-02 19:40:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
unittest.main()
|