perf(skills): cut the tokens and start-up time every agent pays

Requirement 071, from the skeptic audit picks.

Output: radio.py show groups older rows per peer and class into one
line each (7 days 143,520 -> 3,229 bytes); rasci.py show is narrower
(7,081 -> 2,915 bytes) and archives tasks ended over 7 days ago into
rasci-archive.json, still listed by get, --all, artifacts and tools
and revived by any command that names them; make test runs quiet.

Hooks: hooks register as python3 -I -S (site import skipped), the
hook paths of watch, queue, radio, graph and log skip argparse, and
traceback, tempfile, configparser, tomllib, statistics and urllib load
lazily; councilroot.guard() serves watch and radio; the dream
reminder exits before Python when no row can be on. pre-bash 68 ms,
post-bash 50 ms.

Hub: names.json keeps only the entries every lookup needs (11.6 MB ->
11 KB, lookups identical) and phrasing is cached; a state build takes
55 instead of 104 ms.

Context: the commit-chain skills shrink from 3,330 to 1,192 words with
their names kept, details moved to chain.md and reference.md files read
on demand; descriptions capped at 25 words; .ignore and .rgignore keep
state and worktrees out of searches. overhead.py of
kvb-check-efficiency measures hook and script cost per call.

🎯 Fix: 93 %
💥 Break: 5 %
💸 Tokens: 107 %
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 83
🚦 Gate: ⚠️ tokens 107 % > 100 (on-demand reference files; resident text and daily cost fall): operator approved the commit

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-27 10:49:30 +00:00
1 parent 5c969be21c
commit 9403e17e97
53 files changed
+1219 -522

No files matched your search

+22 -3
View File
@@ -95,8 +95,10 @@ class TestRasci(unittest.TestCase):
f"| 2 | - | work/a: Alpha | Ship A | running | Skills | - | {local(start)} | - "
"| Skills | Skills | | Operator, Pkgmgr | Operator |",
)
self.assertEqual(lines[4], "gaps: 3 (show --gaps)")
self.assertEqual(
lines[4], "gaps: work/b has 0 A; work/b has no key result; work/a has no key result"
self._out("show", "--gaps")[-3:],
["gap: work/b has 0 A", "gap: work/b has no key result", "gap: work/a has no key result"],
)
def test_show_prints_the_compact_table_by_default(self):
@@ -108,7 +110,7 @@ class TestRasci(unittest.TestCase):
"|---|---|---|---|---|---|",
"| 1 | - | work/b: Beta | queued | subagent Explore (haiku) | |",
"| 2 | - | work/a: Alpha | running | Skills | Skills |",
"gaps: work/b has 0 A; work/b has no key result; work/a has no key result",
"gaps: 3 (show --gaps)",
],
)
@@ -261,6 +263,22 @@ class TestRasci(unittest.TestCase):
f"| done | - | - | - | {local('2026-11-01T12:00:00+00:00')} |", self._out("show", "--all", "--wide")[2]
)
def test_tasks_ended_over_a_week_ago_move_to_the_archive_and_stay_reachable(self):
now = datetime.datetime.now(datetime.UTC)
self._run("set", "work/old", "--status", "done", "--end", (now - datetime.timedelta(days=8)).isoformat())
self._run("set", "work/new", "--status", "done", "--end", (now - datetime.timedelta(days=1)).isoformat())
live = json.loads((self.root / "rasci.json").read_text(encoding="utf-8"))
archived = json.loads((self.root / "rasci-archive.json").read_text(encoding="utf-8"))
self.assertEqual((sorted(live), sorted(archived)), (["work/new"], ["work/old"]))
self.assertIn("status: done", self._out("get", "work/old"))
self.assertEqual(sorted(line.split(" | ")[2] for line in self._out("show", "--all")[2:] if line.startswith("| ")), ["work/new", "work/old"])
self._run("kr", "work/old", "add", "late note")
self.assertIn("key result 1 [ ]: late note", self._out("get", "work/old"))
self.assertNotIn("work/old", json.loads((self.root / "rasci.json").read_text(encoding="utf-8")))
self._run("rm", "work/old")
self.assertEqual(self._run("get", "work/old").returncode, 2)
self.assertNotIn("work/old", json.loads((self.root / "rasci-archive.json").read_text(encoding="utf-8")))
def test_artifacts_and_tools(self):
self._run("set", "work/a", "--workdir", "/w/a", "--branch", "feat/a", "--status", "done",
"--artifact", "image:core:dev", "--artifact", "volume:db",
@@ -415,7 +433,8 @@ class TestRasci(unittest.TestCase):
self._out("wsjf")[2:], ["| 1 | work/a | - (0/1 KR) | - | - | - | - | queued |", "unestimated: work/a"]
)
self._run("set", "work/b", "--title", "Beta")
self.assertEqual(self._out("show")[-1], "gaps: work/b has 0 A; work/b has no R; work/b has no key result")
self.assertEqual(self._out("show")[-1], "gaps: 3 (show --gaps)")
self.assertEqual(self._out("show", "--gaps")[-1], "gap: work/b has no key result")
self._run("set", "hotfix/db", "--status", "done", "--branch", "fix/db", "--workdir", "/w/db")
self._run("set", "operator/push", "--branch", "main", "--artifact", "dir:/tmp/push")
self._run("set", "work/a", "--branch", "feat/a")