Hub: send in the field (032), coherent speak box (033), stream head band (034), Match at full width with its pile (035, 036), Home without the outer box (037), badge to Match (038), rejects that survive a changed or withdrawn card (039), the release card (040), code marks in the review diff (041), why Deny is off (042), the undo window clock (043), widgets without inner boxes (044), the Artifacts head on one line (045), accepting a red gate's risk (046), one code box (047), done rows greyed and folded (048), one control height (049), menus that stay open (050), radio settings in the Device card (051), bubbles beside the modes (052), agent settings on every face and name (053), pin only by menu (054), WASD in Match (055), the flowing card edge (056), Schedules in Controls (057) and the hub poll cost (059). Skills: the coach leaves for its own repository kevinveenbirkenbach/coach (058; test_install pins its four skills in skills-lock.json and stays red until that repository is published and pinned), hooks and timers start fewer processes (060), council files on hot paths stay bounded and mirror by marker instead of mtime (061), scripts and hooks hand agents less output (062), and block.py builds the commit table and message block in one run (063). Requirement documents 032 to 063 with their implementation amendments. MEDUSA false positives accepted after kvb-think-criticize (36 lines): MM-SCAN-058 (pla inside replace or plan), JB-SCAN-616/641 (the local clip helper), CODEGEN-SCAN-001 (drop-in paths), CGS-SCAN-029 (systemctl argv from constants), CGS-SCAN-040 (runner poll loop), FLA-SCAN-055 (feedback), WM-SCAN-354, AI-BACKDOOR-006, GENAI-SCAN-1270, B604 (runner shell path for passkey-verified commands), TC004, EXA002, EXA006, EXA010 and WEB-SSRF. 🎯 Fix: 92 % 💥 Break: 8 % 💸 Tokens: 89 % ⏱️ Velocity: – 🛡️ Security: ~100 % 🏆 Score: 95 🚦 Gate: ⛔ break 8 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.5 KiB
3.5 KiB
060 - Host Hook and Timer Load
User Story
As the operator, I want the skills' hooks and timers to start as few processes as they need, so that agents and the machine stay fast.
Decisions (operator-confirmed 2026-11-25; do not re-litigate)
- One dispatcher (operator):
kvb-org-organize/scripts/hooks.py pre-bashandpost-bashimport radio, watch, queue, graph and log once and run each handler in its owntry; the first exit 2 wins;enable-plugins.jsregisters it instead of the six Bash entries and rewrites old ones. Each handler keeps its own script for direct calls. Amended 2026-11-25 in the implementation: the radio block keeps its entry forEdit|Write|MultiEdit|NotebookEditand the code graph hook its entry forRead|Edit|Write|MultiEdit|NotebookEdit|Grep|Glob, the tools whose input names a path; a crash counts as exit 0 so the other handlers' JSON answers survive. - Runner ledger (operator): a running job's output stays in memory or
in one file per job;
jobs.jsonis written on a status change only; finished and dismissed jobs are pruned; git toplevels are cached per directory until HEAD, a ref orpacked-refsmoves; the previews poll every 10 s, the jobs stay at 2 s. - Token scan (operator): resources
tokensgets its own timer every 10 minutes;samplestays at 60 s and startsqueue.pyonly while the queue holds a waiting or active entry. - Timers (operator): the firewall view gets the tree heartbeat
ExecConditionand writes only on a change; the sessions snapshot runs every 30 s and skips an unchanged write; the graph supervisor checks every 120 s. Amended 2026-11-25 in the implementation: the firewall also runs while a signed job waits; an unchanged sessions snapshot is still rewritten every 120 s, since the hub drops one older than five minutes.
Approach
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["🪝 A · Hooks"]
A1["🔀 hooks.py dispatcher"] --> A2["🧩 enable-plugins.js rewrites the entries"]
end
A2 --> B1
subgraph B["⏲️ B · Runner and units"]
B1["📒 Ledger on status change"] --> B2["🌳 Cached git toplevels"]
B2 --> B3["🔟 Token timer, lean sample"] --> B4["🧭 Firewall, sessions, graph intervals"]
B4 --> B5["✍️ Tests written, not run"]
end
B5 --> C1
subgraph C["🧪 C · Verification"]
C1["🧪 Unit and integration"] --> C2{"🟢 Green?"}
C2 -- "🔴 no: fix" --> C1
C2 -- "🟢 yes" --> CF{"💬 Operator feedback?"}
CF -- "✏️ changes" --> A1
end
CF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
Acceptance Criteria
Hooks
- One Bash call starts one Python per hook event, counted by a fake interpreter; every handler's exit 2 and output stay as before.
- A crash in one handler leaves the other handlers running.
Runner and units
- A running job with output writes
jobs.json0 times until it ends. - The unit files hold the intervals and conditions of decisions 3 and 4.
samplewith an empty queue starts noqueue.py.
Tests
- Unit: dispatcher order, exit codes and crash isolation; ledger
writes;
samplewithout a queue; the unit file pins. - Integration:
enable-plugins.jsrewrites the six Bash entries to two. - E2E: n/a: no page change.