feat: hub and skills requirements 032 to 063

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>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-26 08:44:15 +00:00
1 parent e5fd70e183
commit 0fad1bfae3
265 files changed
+10434 -2242

No files matched your search

@@ -0,0 +1,130 @@
# 057 - Schedules in Controls
## User Story
As the operator, I want one list of every automatic hook and timer in
Controls, so that I switch each one off or retime it with one click and
nothing spends tokens or machine time behind my back.
## Decisions (operator-confirmed 2026-11-25; do not re-litigate)
1. **Placement** (operator): a fourth Controls tab, Schedules, right of
Groups (`#stream/schedules`), also pinnable on Home. Rejected: a panel in
Resources; a section of the Settings sheet.
2. **Flag file** (operator): `<council>/schedules.json` is the one store of
the rows; the Schedules tab writes one row per change through
`POST /api/schedules`, and `schedules.py set` writes the same file on the
host. Every first-party hook and timer script reads it on each run. A
missing, linked or malformed file means the defaults. Rejected: adding and
removing hook entries in `~/.claude/settings.json` per toggle, which needs
a passkey-signed host writer. Amended during implementation (2026-11-25):
the first draft kept the rows in the hub settings and mirrored them to the
file, as `notify.json`; `/kvb-coach-on` (058) runs in an agent sandbox that
cannot reach the hub, and the next settings save would have overwritten
its change, so the file became the store. Amended 2026-11-25 after a
timing run: the hub keeps the store as `schedule_settings`, since a field
`schedules` shadowed `Sources.schedules(claims, now)`, the cron rows of
the event stream, and made every `/api/events` call fail.
3. **Rows** (operator): coach reminder (hook, every N hours, default 1, off),
dream reminder (hook, every N hours, default 12, off), dream popup (timer,
daily at HH:MM, default 17:00, off), queue cleanup (timer, list of HH:MM,
default 00:00 and 12:00, on), code graph (service, on or off, on), and
every other relevant entry found automatically: each further user timer
and each further hook command in `~/.claude/settings.json`. The hub's own
`kvb-orchestrator-*` units show read-only, because the hub needs them.
A foreign row shows its schedule and next run and offers its exact off
command to copy; the hub never switches a foreign unit.
4. **Host reconciler**: `kvb-org-organize/scripts/schedules.py`, started by
`kvb-schedules.path` (on a change of `schedules.json`) and
`kvb-schedules.timer` (every 5 minutes), writes
`<council>/schedules-view.json` (timers from `systemctl --user
list-timers --all --output=json`, hooks from `~/.claude/settings.json`)
and applies the first-party rows: `systemctl --user enable --now` or
`disable --now`, and a retime as the drop-in
`~/.config/systemd/user/<timer>.d/schedule.conf` with the validated
`OnCalendar`. Rejected: each script polling hourly, which cannot stop a
daemon and finds no foreign timer.
5. **Dream off by default** (operator): the dream reminder and the dream
popup start off, to save tokens; the installer copies the units and the
reconciler enables them only when switched on.
6. **No passkey**: a schedule switches an automation, not an alarm; the
MAYDAY and resource popups stay under 051. Residual: an agent that can
write the council directory can switch a first-party row, as with
`notify.json`.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["🗓️ A · Schedules"]
A1["🧩 schedules setting + schedules.json"] --> A2["🛰️ schedules.py view + reconcile"]
A2 --> A3["🔌 coach, dream and cleanup scripts read the flags"]
A3 --> A4["🖥️ Controls tab Schedules"]
A4 --> A5["✍️ Tests written, not run"]
end
A5 --> C1
subgraph C["🧪 C · All of 057 and 058"]
C1["🧪 Unit, then e2e once"] --> C2{"🟢 Green?"}
C2 -- "🔴 no: fix" --> C1
C2 -- "🟢 yes" --> CF{"💬 Operator feedback on screenshots?"}
CF -- "✏️ changes" --> A1
end
CF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Setting and file
- [ ] `schedules.ROWS` (hub) and `schedules.py` `ROWS` (host) hold the five
first-party rows with the defaults of decision 3; both `valid_row`
refuse an unknown row, an hour count outside 1 to 24, a time that is
not `HH:MM`, more than 6 cleanup times and a non-bool `on`.
- [ ] `POST /api/schedules` writes `<council>/schedules.json` with the changed
row and every other row as stored, and needs no passkey;
`schedules.py set` does the same on the host.
### Scripts
- [ ] The coach and dream `reminder.sh` print nothing while their row is off
or the file is missing, and use the row's hour count while on.
- [ ] `kvb-dream/hooks/notify.sh` sends no popup while the dream popup row is
off.
### Reconciler
- [ ] `schedules.py view` turns a fixture of `list-timers` JSON and a
settings file into rows: name, unit file, `OnCalendar`, next and last
run, owner `skills`, `hub` or `other`, and for hooks the event and
command.
- [ ] `schedules.py apply` calls exactly `enable --now` or `disable --now`
per first-party timer and service and writes the drop-in for a retime;
it never names a foreign or `kvb-orchestrator-*` unit.
- [ ] `scripts/install.sh` installs `kvb-schedules.path` and
`kvb-schedules.timer` and no longer enables `kvb-dream-notify.timer`.
### Controls tab
- [ ] Controls shows Tools, Rules, Groups, Schedules in that order;
`#stream/schedules` opens it.
- [ ] Each first-party row switches on or off and retimes; the change reaches
`schedules.json` after one click.
- [ ] Foreign and hub rows show their schedule and next run, have no switch,
and a foreign row offers its off command to copy.
- [ ] The Schedules panel pins on Home through the context menu (054).
### Tests
- [ ] Unit: row validation on both sides; `schedules.py view` and `apply`
against fixtures and a fake runner; both reminders and `notify.sh` with
the flag on, off and missing.
- [ ] Integration: a `HubCase` `POST /api/schedules` writes `schedules.json`
and the state carries the rows and the host view.
- [ ] E2E: Chromium at three widths: the tab order, a coach switch on and
off reaching the file, a dream popup retime reaching the file, a
foreign row without a switch, the pin on Home.