docs(requirements): 095 to 099 and the 094 closer binding

095 compact agent message box, 096 silent reject of expired Match cards,
097 Match show filter in the right-click menu, 098 docked speech bubbles
with avatar and skip, 099 Match card headline capped at 120 characters.
094 gains the live test result, the 5 s close criterion and decision 6:
closes are bound to a per-session closer token. README describes the
094 hook protocol and the uncapped prune list.

🎯 Fix: 97 %
💥 Break: 1 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 96
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

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-28 01:49:02 +00:00
1 parent 6323f087bc
commit 38788b54a5
8 files changed
+383 -5

No files matched your search

+7 -3
View File
@@ -476,20 +476,24 @@ The Agents view "Hierarchy" draws the council's formal offices as a collapsible
The Tasks tab (key 4, `#tasks/list`, `#tasks/board`, `#tasks/rasci`) shows the `kvb-org-rasci` register as a list, a board by status and a RASCI matrix; queue jobs from `council/queue.json` appear as "waiting for a grant", and the filter "Waits on Operator" is the inbox, which the Inbox entry under Stream opens: every pending review, ask, rule request, operator row and choice card, with no Choices column of its own. The Tasks toolbar is one row that wraps on narrow screens (views, filter, estimation, sort and business value, trend on the burn view), the status chips the second; every list row shows its ETA, and `#tasks/3d` draws the tasks and their dependencies on the 3D engine. Its "Request choices" dropdown has one button per channel, post and call to the agents ticked in it, newsletter, broadcast, pan-pan, Sécurité and mayday to all, that sends the fixed request "send me your open decisions as choices" without a text field, one passkey assertion over every recipient (`/api/choices/sign`, then `/api/choices`). Agents answer with `decision_request`, shown as choice cards, and a click on an option is the passkey-signed answer: after the 3 s undo the hub verifies the signature and posts the answer to the asking agent, whose `decision_wait` returns it as `message` and `answer` for `operator_message`. A task's sheet pins its priority (`rasci.py set <task> --prio <n>`) or sets and drops the operator's WSJF estimate (`rasci.py estimate <task> Operator --value <fib> --complexity <fib>` or `--drop`) after a passkey signature; the hub writes an argv-only job, and the runner, started with `--rasci <rasci.py> --council <council root>`, verifies it like an operator command and runs `rasci.py` from `/` without a shell, killing it after 30 s. Agent order stays untouched. The install copies the fresh runner unit and restarts the runner when it is enabled, and only while the installed `council.py`, `nofollow.py` and `rasci.py` match this tree: otherwise it disables the runner and asks for `make install`. The home install and `orchestrator.sh install`, `stop` and `runner` refuse while `~/.local/state/kvb-orchestrator/runner-job.json` names a live runner pid, which the runner keeps only while it runs a hub row, because stopping the runner kills that row; run them in a terminal once no row runs, never as a hub row. A starting runner has the hub fail every job an earlier runner left running back to its agent (`/api/runner/restart`). The runner unit pins `PATH` to `/usr/bin:/bin`, so a signed command names any other program by its full path; a runner started without `--rasci` and `--council` keeps running signed commands and refuses task changes, and so does one whose council is a symlink or another uid's. Each worktree in the tree file may carry `"flow": {"pull": [...], "push": [...], "source": "file"}` or `null`, which the Tree, the Chord edges, the detail panel and the matching task show; a malformed flow shows as `invalid`. Worktrees and tasks with open work (uncommitted, unpushed, unmerged, task not done) carry a warning bar.
Every request has exactly one kind (requirement 093): expired (an ask or decision `lapsed_of()` keeps, listed as `lapsed` in the state), failed (an operator row whose last hub job failed or the runner refused), stale (a review whose staged tree or HEAD moved, a row whose merge preview moved off its Match snapshot) or open. The Stream shows open requests inline and a failed row once, its runner line folded into it; expired and stale requests only behind one collapsed footer line "N stale requests · n expired · n stale" that opens them in place. Tasks → Operator has the chips Open, Expired, Stale, Failed and All, each with its count and listing exactly its kind (All by default). The footer and every chip have "Select all" and "Delete N": one passkey assertion over a `dismiss` item per request (`/api/sign`, then `POST /api/requests/dismiss`), refused unsigned, for a request no longer listed (404), held, or of another kind than its chip (409), so an open request goes only from Open or All. The requests leave every browser's state, Match and the badge at once; `/api/inbox/undo/<batch>` brings them back within the undo window, after which `dismissals.json` in the hub state keeps them hidden while their command and hub job stay the same. No agent gets a message; an open ask is also denied without a reason, so its hook stops waiting, while every other request keeps its record.
The board marks what runs right now (requirement 074), one labelled chip per mark in this order: a running queue job of the task or the queue card's own (`bi-cpu`, accent, its kind and runtime) from the active entries of `council/queue.json`; an agent working (`bi-person-workspace`, ok, the agent and how long ago it beat) when the task's worker or one of its R beat within the last 5 minutes, read from the busy sessions of the host snapshot `agent-sessions.json` and the council claims (state field `beats`); a hub job running (`bi-terminal`, info, the command's head) while `runner-job.json` in the hub state dir names the task (state field `runner`, read without following a link and dropped once the hub records the job as ended). A marked card gets a 2 px border in its first mark's tone and a 3 s glow that animates opacity only; with `prefers-reduced-motion` the border stays and the glow stops. The board chip "Running" shows only marked cards, kept in the page like "Older Done".
Without reinstalling the skills, `make orchestrator-install` installs, builds and starts only the hub, `make orchestrator-check` checks the installed hub (image, container, logs, HTTP, pinned keys, hook, runner, tree timer, disk; exit 1 on a failure), `make orchestrator-pin CREDENTIAL=<blob>` pins the passkey that "Register passkey" shows, `make orchestrator-runner` enables the runner service, and `make orchestrator-hook` registers the PermissionRequest hook in `~/.claude/settings.json`, replacing an earlier Agent Orchestrator entry and keeping the file mode, after a copy to `settings.json.before-kvb-orchestrator-hook` (Claude Code reads `~/.claude/settings.local.json` only in sessions started in the home directory). Agents that reach the Docker socket are root-equivalent: until the agent VMs of core requirement 093 isolate them, the signatures do not hold against such an agent. `make watch-check` shows whether the resource watch hook is stuck (running hooks, holders of the kept queue history, age of the stored stage).
Without reinstalling the skills, `make orchestrator-install` installs, builds and starts only the hub, `make orchestrator-check` checks the installed hub (image, container, logs, HTTP, pinned keys, hook, runner, tree timer, disk; exit 1 on a failure), `make orchestrator-pin CREDENTIAL=<blob>` pins the passkey that "Register passkey" shows, `make orchestrator-runner` enables the runner service, and `make orchestrator-hook` registers the PermissionRequest hook in `~/.claude/settings.json`, waiting the minutes of Settings › Claude dialogs (1 to 60, default 60; 3600 s while the hub has saved none), beside the same client as closing hooks (async PostToolUse, Stop and UserPromptSubmit, and SessionEnd), replacing an earlier Agent Orchestrator entry and keeping the file mode, after a copy to `settings.json.before-kvb-orchestrator-hook` (Claude Code reads `~/.claude/settings.local.json` only in sessions started in the home directory). Agents that reach the Docker socket are root-equivalent: until the agent VMs of core requirement 093 isolate them, the signatures do not hold against such an agent. `make watch-check` shows whether the resource watch hook is stuck (running hooks, holders of the kept queue history, age of the stored stage).
The Controls › Queue tab lists the waiting queue jobs, the learnings `queue.py learned --json` prints (per kind the runs, shares, slot limit and caps, per signature the learned values, the last 20 history rows) and the settings `budget_percent`, `ram_cap_percent` and `slot_limits` per kind and `load_limits`. The hub runs `queue.py` read-only with the queue config mounted read-only at `/queue-config` and never writes the config. "Start now" on a waiting job, there and on the queue job rows of a Kanban card, signs `queue.py override <id>`; staged settings are signed together under one passkey assertion as one `queue.py config set <key> <value>` each (`POST /api/queue`). The runner, started with `--queue <queue.py> --council <council root>`, verifies each like a gate change and runs `queue.py` from `/` without a shell with the operator's HOME, refusing every argv but `override <id>` and `config set` of a known key with a plain number; queue.py itself refuses a value its config check rejects, leaving the file unchanged. An overridden job skips the band, slot limits, reservations and rank, never the live guard (`load_limits`) or the disk (`skills/kvb-org-queue/controls.md`).
The Hardware chart of Resources draws the limits of `<council>/limits.json` (requirements 083 and 084): for the metric picked above the chart (CPU, RAM, swap, disk or PSI) a labelled line each for lower, upper, STOP and MAYDAY, and for CPU and RAM a thin line at the live AIMD target of `limits-target.json`. A click on a line opens the dial for that value; the Calm (band 50 to 70), Balanced (70 to 90) and Max (80 to 95) switch sets every value at once (`orchestrator/kvb_orchestrator/limiting.py`, `PROFILE_TABLE`), and the Limits sheet lists all of them in one table, each cell opening its dial. The hub checks every save with the installed `kvb-org-organize/scripts/limits.py` (a broken lower < upper < STOP < MAYDAY is refused, 400) and writes the file itself through `nofollow.py`, as the council root is mounted read-write. A value at or below the one in force saves at once (`POST /api/limits` with `{limits, proof: null}`); a higher one, or any save while no limits file is in force, needs a passkey signature over the whole limits object (`POST /api/limits/sign`), else nothing is written.
The Hardware chart of Resources draws the limits of `<council>/limits.json` (requirements 083, 084 and 091): for the metric picked above the chart (CPU, RAM, swap, disk or PSI) a labelled line each for lower, upper, STOP and MAYDAY, and for CPU and RAM a thin read-only line at the live AIMD target of `limits-target.json`; each line's tooltip says what its level means and does. The lines move vertically by mouse or touch (pointer events) or, focused, by the arrow keys (1 point) and Page Up/Down (5); a moved line turns dashed and shows its new and old value, and the moves collect in a bar "Save N changes / Discard". Save sends every staged value in one request; an order break blocks it and names the line. The Limits menu holds a checkbox per level (lower, upper, STOP, MAYDAY, target) to show or hide its lines, the Calm (band 50 to 70), Balanced (70 to 90) and Max (80 to 95) profiles, which set every value at once (`orchestrator/kvb_orchestrator/limiting.py`, `PROFILE_TABLE`), and "Matrix…", the table of every value as number inputs that stage the same way; a right click on the chart opens it too. The View menu beside Panels shows or hides the legend, the queue markers, the wait bands and the limit lines (series stay on their legend chips); this browser keeps every such choice in `localStorage`. The hub checks every save with the installed `kvb-org-organize/scripts/limits.py` (a broken lower < upper < STOP < MAYDAY is refused, 400) and writes the file itself through `nofollow.py`, as the council root is mounted read-write. A batch whose every value stays at or below the one in force saves at once (`POST /api/limits` with `{limits, proof: null}`); one with a higher value, or any save while no limits file is in force, needs one passkey signature over the whole limits object (`POST /api/limits/sign`), else nothing is written. A GPU span without a reading names the first `nvidia-smi` error line the sampler kept (`gpus[].error`, such as "Failed to initialize NVML: Driver/library version mismatch") in its tooltip.
"Prune" on the board's toolbar opens the stale task prune: a checklist of every open register task without a register change for N days and without a running mark (N from the days field, 3 to start with; changing it recomputes the list, all ticked), and the answer window on the analog dial, one dial component shared with the undo window (1 to 60 minutes, 10 to start with). One passkey assertion signs two runner jobs (`POST /api/prune`): the announce job, which the runner runs at once as `radio.py send security`, naming every task and the deadline in local HH:MM and ISO 8601, and the apply job `rasci.py prune --since <epoch> <task>...`, whose signed `not_before` is the deadline: the runner leaves a job with a `not_before` ahead queued and unclaimed and runs the next one, never waiting on it. At the deadline `rasci.py prune` sets every listed task stopped that is still open, has no active queue job and no register change since the list was taken; an agent keeps a task before then with `rasci.py keep <task>`, which only touches its change time. The board shows a countdown chip until the deadline. The runner needs `--radio <radio.py>` beside `--rasci` and `--council` and refuses a prune without them, an argv of another shape, more than 50 tasks, an operator/ or hotfix/ row, an announce whose deadline passed or lies over an hour ahead, and an apply job before its deadline; its replay store accepts the approval's counter again for the apply job, which runs after later signatures moved the counter on.
"Prune" on the board's toolbar opens the stale task prune: a checklist of every open register task without a register change for N days and without a running mark (N from the days stepper, 3 to start with; changing it recomputes the list, all ticked), grouped by the slug's prefix before the first "/" (slugs without one under "other"), each group collapsible with a tri-state checkbox and its count, each row with its owner's avatar and its age; a filter field narrows the rows and "Prune N" counts the ticked rows it shows, and a sticky footer keeps the dial and the Prune button in view; and the answer window on the analog dial, one dial component shared with the undo window (1 to 60 minutes, 10 to start with). One passkey assertion signs two runner jobs (`POST /api/prune`): the announce job, which the runner runs at once as `radio.py send security`, naming every task and the deadline in local HH:MM and ISO 8601, and the apply job `rasci.py prune --since <epoch> <task>...`, whose signed `not_before` is the deadline: the runner leaves a job with a `not_before` ahead queued and unclaimed and runs the next one, never waiting on it. At the deadline `rasci.py prune` sets every listed task stopped that is still open, has no active queue job and no register change since the list was taken; an agent keeps a task before then with `rasci.py keep <task>`, which only touches its change time. The board shows a countdown chip until the deadline. The runner needs `--radio <radio.py>` beside `--rasci` and `--council` and refuses a prune without them, an argv of another shape, no task or one named twice (no cap on their number beyond the hub's 1 MiB body limit), an operator/ or hotfix/ row, an announce whose deadline passed or lies over an hour ahead, and an apply job before its deadline; its replay store accepts the approval's counter again for the apply job, which runs after later signatures moved the counter on.
The Controls › Schedules tab is one table of every timer and cron on the host (requirement 068): Source (Skills, Hub, Claude, System, one filter chip each), Name, Schedule, Next, Last and On, with the reconciler's last run once in the header. A click on a schedule cell turns it into a field and Enter saves: daily times (`17:00, 21:30`) or a raw `OnCalendar` expression for a timer, whole hours for a reminder hook, a 5-field cron for a Claude task, which the hub checks, naming the field it refuses (400). Skills and Hub rows go into `schedules.json` without a passkey (`POST /api/schedules` with `{row, value}` or `{unit, value}`); a System timer or a Claude task needs a passkey signature over `schedules.py timer <unit> --on|--off|--reset|--calendar <expr>|--at <HH:MM>...` or `schedules.py cron <file> <id> --cron <expr>|--remove` (`{items, proof}`; 403 without a valid proof, nothing stored). The runner, started with `--schedules <schedules.py> --council <council root>`, verifies each like a queue change and runs `schedules.py` from `/` without a shell, refusing every other argv and every `kvb-orchestrator-*` unit; `schedules.py` writes the drop-in and reloads, or edits the task's cron keeping every other byte of the file, and refreshes the view. Reset removes only the drop-in; the hub never deletes a unit file.
For approvals the hub is only a relay: every approval of an ask, a staged commit or an operator command is signed end to end with a WebAuthn passkey held in KeePassXC (through KeePassXC-Browser, relying party `localhost`, origin `http://localhost:<port>`; ES256, EdDSA and RS256, so a hardware key can be pinned beside it). To register, open the hub at `http://localhost:<port>/` (WebAuthn needs the domain; on `127.0.0.1` the page links there), choose "Register passkey" in the settings and run the host command the page shows, `python3 ~/.local/share/kvb-orchestrator/client/approval.py pin --port <port> --approvers ~/.config/kvb-orchestrator/approvers.json --credential '<blob>'`, in a terminal outside every sandbox: it pins the key in `~/.config/kvb-orchestrator/approvers.json` with mode 0600, a file no sandboxed agent can write and the hub mounts read-only; the hub never pins. Each approval, or one bulk selection, is one signature over the hashes of every item, a nonce and an expiry; each auto-approval rule is signed once. In the inbox, an operator command run with "Run" shows the runner's output in a console under its row until "Close". "Deny" on an ask, an operator row or a rule request signs the denial with its channel and optional reason (a hash no approval shares) and, after the 3 s undo, tells the requesting agent by post or by the radio class picked, never mayday; the hub verifies that signature against the pinned keys before it stores or sends anything, the hook passes the reason on only when it verifies the signature too, and a denied operator row ends as `stopped`. Agents ask for an auto-approval rule with the MCP tool `rule_request` (the rules form's limits; a request stays open for the ask lifetime of one hour, at most 20 in all, and 3 per agent name, which only spreads the queue since MCP names no caller); its row shows a dry run over the last 7 days, and only "Accept" with the passkey stores it. The Controls › Rules tab lists the stored rules grouped as Ask, Review and Decision, each row with its on switch, pattern, directory, the agents it applies to, an expiry chip that turns red under 2 days, and how many of the last 50 asks, reviews or decisions of its kind the rule matcher would have granted; "New rule" opens the rules form in a sheet whose live count `POST /api/rules/match` answers for the draft with the same matcher, reading only and granting nothing, and the settings files, the never-granted patterns, the agent groups and the rule sets follow as sections collapsed by default. The hub stores no rule, of any kind, whose passkey assertion it cannot verify. The executors verify it themselves against the pinned keys and fail closed: the runner (`client/runner.py`, the `kvb-orchestrator-runner` user service) runs only signed commands, each signature once, recorded in `~/.local/state/kvb-orchestrator-approvals/runner.json`; the PermissionRequest hook (`client/permission_hook.py --port <port> --timeout <seconds> --approvers ~/.config/kvb-orchestrator/approvers.json --replay ~/.local/state/kvb-orchestrator-approvals/hook.json`) allows only a signed item that matches its own tool, command, cwd and session, else it leaves the decision to Claude Code's own prompt; it runs for every tool, and its command is a Bash call's command line, or for any other call, and for a Bash call that sets more than its command, description, timeout and background flag, the whole tool input as sorted JSON, so a signature never covers a value the hub did not show (over 4000 characters Claude Code asks itself); the inbox, the stream and Match show an ask like Claude Code's dialog, 1 Yes, 2 No and "Tell Claude what to do instead", whose text denies with it as the reason; it also turns each question of an AskUserQuestion call into a decision card that expires with its timeout, answering the call only once a pinned key signed the pick of every question (a multi-select card toggles options and sends them with one signature, and every such card also takes one signed line of "Other" text); the commit skills run `approval.py verify` on the staged tree before committing, else they ask in the terminal. With no key pinned, every executor refuses; review rejections and a decision a rule takes stay unsigned. A signed rule never covers a command holding `;`, `&`, `|`, a backtick, `$`, `<`, `>`, parentheses or a line break: such a command always asks. The hub page is trusted while it asks for a signature or shows the blob to pin: whoever controls the hub container can show one item and have another signed, or hand over a key of its own. Any local process, sandboxed agents included, can also send the unsigned operator actions (the bare decision choice `/api/decisions/<id>/choose`, which sends no answer, the priority order, settings that add no stream origin, review rejections, the bare ask denial `/api/asks/<id>/deny`, console dismissals) with the hub's guard headers, and the container reads the review pages from `pages/` of the councLine truncated
A hub card of a Claude dialog, an ask or an AskUserQuestion decision, lives as long as that dialog (requirement 094): Claude shows its own dialog at once while the hook waits, and whichever side answers first wins. Each closing hook sends one small `POST /api/asks/ran` with the `session_id` of its input and reads nothing back: PostToolUse closes the oldest open ask of its call and the decisions of an AskUserQuestion call, with the answers from its tool response, as "answered in Claude"; Stop and UserPromptSubmit close every still open card of the session's main agent (a denial or an interrupt in Claude), never a subagent's; SessionEnd closes every card of the session as "session ended". The route takes only the hub's local guard header and no foreign origin, validates every field and closes only cards of the session it names; it approves and denies nothing. Since the guard header alone proves no session, the hook keeps one random closer token per session id in a mode 0600 file beside its replay store (`~/.local/state/kvb-orchestrator-approvals/closers/<session>.token`), sends it as `closer` with every ask, hooked decision and closing report, and deletes it after its SessionEnd report; the hub keeps only the token's sha256 digest and closes a card only for a report whose token matches it, so another local process can neither end a session's cards nor write a choice into its decisions. A card an older hook registered without a token still closes by its call key on PostToolUse, without a choice, but never by Stop, UserPromptSubmit or SessionEnd. A card whose hook stopped waiting reads "open in Claude: answer it there" with the `IN CLAUDE` stamp, never stale or expired, counts as open in Tasks › Operator, and stays until a closing hook ends it or 24 hours pass; only a card of a registration without the closing hooks (no `--bound`) still expires as before. An open Match deck and the inbox poll `GET /api/match/closed` every 2 s while the tab is shown, a counter of closed cards that builds neither the state nor a card, and fetch at once when it moves, so a card answered in Claude leaves within about 3 s. After `make orchestrator-install`, run `make orchestrator-hook` and restart every Claude Code session; a changed wait applies after the next `make orchestrator-hook`.
Restart your agent afterwards so it loads the new skills.
## Maintenance 🔧