perf(skills): cut skill tokens and load hooks from cached bytecode
Hooks start their script as __main__ from cached bytecode instead of recompiling it on every call, and the installer migrates registered old hook commands to that form. A disabled plugin is written as false instead of deleted, because a deleted key in settings.local.json lets a true in settings.json win; the auto-compact window drops to 300000. The coach hour prints one ready line chosen by the time of day instead of asking the agent to load the skill, kvb-cleanup moves its procedure into plan.md, and the token counter reads subagent transcripts too and counts with Counter and defaultdict instead of .get defaults. 🎯 Fix: 88 % 💥 Break: 8 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d695bb2b58
commit
6c63c364bd
13 files changed
+250
-130
No files matched your search
@@ -89,6 +89,12 @@ class TestCoachHour(unittest.TestCase):
|
||||
self.assertIn("kvb-coach", self._run("2026-11-03T15"))
|
||||
self.assertEqual(sorted(p.name for p in self.hours.iterdir()), ["2026-11-03T15"])
|
||||
|
||||
def test_the_hour_picks_one_fixed_tip_and_loads_no_skill(self):
|
||||
tips = {hour: self._run(f"2026-11-03T{hour}").splitlines() for hour in ("23", "04", "12", "19", "09", "16")}
|
||||
firsts = {hour: lines[1].split(" ", 1)[0] for hour, lines in tips.items()}
|
||||
self.assertEqual(firsts, {"23": "😴", "04": "😴", "12": "🥗", "19": "🥗", "09": "🚶", "16": "🚶"})
|
||||
self.assertTrue(all(len(lines) == 2 and "load no skill" in lines[0] for lines in tips.values()))
|
||||
|
||||
def test_a_binary_planted_on_the_inherited_path_never_runs(self):
|
||||
planted = Path(self.tmp.name) / "planted"
|
||||
planted.mkdir()
|
||||
|
||||
Reference in new issue
Block a user