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

+31 -2
View File
@@ -30,6 +30,25 @@ while its dialog in Claude is still open.
say). If the dialog only appears after the hook returns, the default wait
stays at 110 s and decisions 3 and 4 still apply.
Rejected: a longer fixed wait without the binding.
**Result 2026-11-27** (operator, AskUserQuestion live test, second run):
the Claude dialog appears at once while the hook waits, so both run side
by side and the longer default wait of decision 2 applies.
6. **Closes bound to a session token** (operator, 2026-11-28, after a
skeptic found that any local process sending the guard header could end
another session's cards and forge an AskUserQuestion choice): the hook
keeps one `secrets.token_urlsafe(32)` closer token per session id in a
mode 0600 file beside its replay store
(`~/.local/state/kvb-orchestrator-approvals/closers/<session>.token`,
linked into place on first use, session id checked against
`signing.SESSION`), sends it as `closer` with every ask, every hooked
decision and every closing report, and deletes it after its
`SessionEnd` report. The hub keeps only its sha256 digest and closes a
card only when the digest matches (`hmac.compare_digest`); `Stop`,
`UserPromptSubmit` and `SessionEnd` never close a card without one, and a
PostToolUse records an answer as choice only for a matching one. A card
an older hook registered without a closer still closes by its call key
on PostToolUse, with no choice.
Rejected: signing each report with a passkey (a click per tool call).
## Approach
@@ -61,18 +80,24 @@ flowchart TD
- [ ] An ask allowed in Claude leaves the hub's open cards within 5 s of
its PostToolUse.
- [ ] An AskUserQuestion answered in Claude closes its hub decision with
the answers shown.
the answers shown, and the card leaves an open Match deck within 5 s
of the answer, without waiting for the deck's refresh interval
(operator 2026-11-27: answered cards stayed far too long).
- [ ] A denial in Claude closes the session's open cards at its next `Stop`
or `UserPromptSubmit`.
- [ ] `SessionEnd` closes every open card of the session.
- [ ] After a hook timeout the card reads "open in Claude" and carries no
stale or expired stamp.
- [ ] A closing report without the session's closer token, or with another
one, closes no card and records no choice; the hub stores only the
token's digest; a card of an older hook closes by its call key on
PostToolUse only (decision 6).
### Wait
- [ ] Settings holds the wait (1 to 60 min); the hook's `--timeout` and its
settings.json timeout follow it after `make orchestrator-hook`.
- [ ] The live test result is recorded in this document.
- [x] The live test result is recorded in this document (decision 5).
### Tests
@@ -82,6 +107,10 @@ flowchart TD
- Integration:
- [ ] Each closing hook event through the HTTP handler closes exactly the
cards of its session and call key.
- [ ] `tests/test_hub_dialog_bound_cards.py` `TestCloserBinding` and
`TestCloserToken`: no or a wrong closer closes nothing, the right
one only its own session's cards, no forged choice, older-hook
cards, a 0600 token file and refused session ids.
- E2E:
- [ ] `tests/e2e/test_dialog_bound_cards_e2e.py`: a card closes on a
simulated PostToolUse, Stop and SessionEnd; the "open in Claude"
@@ -0,0 +1,68 @@
# 095 - Compact Agent Message Box
## User Story
As the operator, I want the message box to one agent to be one compact
field with everything inside it, so that I write, attach and send without a
second file picker or explanation text in the way.
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
1. **One merged field** (operator): the message dialog to one agent
(`openAgent` in `orchestrator/templates/page-agent.js`) looks like the
radio composer of 066: text area on top, one footer row inside the same
frame.
2. **No second file picker** (operator): the native "Choose File" input
goes; the paperclip of 082 attaches files.
3. **Controls in the footer** (operator): Post/Call as a small segmented
switch on the left, paperclip, mic and the Send button on the right of
the field's footer.
4. **No explanation line** (operator): "Post arrives at the end of the
turn, ..." goes; the passkey and `operator_message` hint moves into the
Send button's tooltip, the Post and Call meaning into their tooltips.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["✉️ A · Message box"]
A1["🧩 Footer with Post/Call, paperclip, mic, Send"] --> A2["🗑️ File input and explanation line gone"]
A2 --> A3{"🧪 E2E green?"}
A3 -- "🔴 no: fix" --> A1
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
AF -- "✏️ changes" --> A1
end
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Layout
- [ ] The agent message dialog holds no `input[type=file]` and no
explanation paragraph.
- [ ] Post/Call, paperclip, mic and Send lie inside the field's frame in
one footer row at 1366 and 390 px.
- [ ] Send's tooltip names the passkey signature and `operator_message`;
Post and Call each explain their delivery in their tooltip.
### Function
- [ ] A message with a pasted screenshot arrives with its `📎` path line;
Post and Call still choose the class.
### Tests
- Unit:
- n/a: layout only.
- Integration:
- n/a: no server change.
- E2E:
- [ ] `tests/e2e/test_agent_message_box_e2e.py`: no file input, footer
controls inside the frame, send as post and as call, screenshots
at 1366 and 390.
@@ -0,0 +1,70 @@
# 096 - Silent Reject of Expired Match Cards
## User Story
As the operator, I want Reject on an expired Match card to remove it at
once without a feedback dialog or a message, so that I clear expired cards
with one swipe each.
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
1. **No dialog, no message** (operator): Reject, A, ← or a left swipe on an
expired card (080) opens no feedback box and sends no radio message to
its agent; the card leaves the deck at once with the 086 fade. This
replaces 080's reject-by-radio for expired cards.
2. **Gone everywhere at release** (operator): the dropped card rides along
with the next release signature as a dismissal through the hub-wide
dismiss of 093, so it disappears in every browser; the usual undo window
applies. Rejected: dropping it only in this browser.
3. **Release card row**: until the release, each dropped expired card shows
on the release card as "Drop (expired)", without feedback text; Back to
the stack (092) brings it back.
4. **S undoes**: S right after the swipe puts the card back, as for any
other step.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["🗑️ A · Silent reject"]
A1["👋 Reject on expired drops at once"] --> A2["🔑 Dismissal rides the release signature"]
A2 --> A3{"🧪 Unit, integration and E2E green?"}
A3 -- "🔴 no: fix" --> A1
A3 -- "🟢 yes" --> AF{"💬 Operator feedback?"}
AF -- "✏️ changes" --> A1
end
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Reject
- [ ] Reject, A, ← and a left swipe on an expired card open no sheet and
the card leaves the deck within 300 ms.
- [ ] The release card lists it as "Drop (expired)" without feedback text.
- [ ] S right after the swipe brings the card back to the front.
### Release
- [ ] The release signs the dismissal together with the other decisions;
afterwards the card is gone in a second browser.
- [ ] No radio message reaches the card's agent.
- [ ] Undo within the window brings the card back.
### Tests
- Unit:
- [ ] The release plan puts a dropped expired card into the dismissals,
not into the radio rejects.
- Integration:
- [ ] A release with a dismissal through the HTTP handler dismisses the
card and sends no radio call.
- E2E:
- [ ] `tests/e2e/test_match_expired_e2e.py`: swipe left on an expired
card, no sheet, release, gone in a second page, no radio call.
@@ -0,0 +1,67 @@
# 097 - Match Show Filter in the Right-Click Menu
## User Story
As the operator, I want to choose in Match's right-click menu which card
kinds and states the deck shows, so that I work through one kind at a time.
## Decisions (operator-confirmed 2026-11-27; do not re-litigate)
1. **Kinds and states** (operator): a right click in Match (outside code
rows, where 078 line comments keep their own menu) opens the context
menu with a "Show" section: checkboxes Commit, Command, Ask, Decision,
Rule, then Expired, Stale and Greyed (running, queued, blocked), each with
its current count, and "Show all". Rejected: kinds only; saved profiles;
chips in the header.
2. **Per browser**: the choice is remembered in this browser and survives a
reload.
3. **Hidden, not gone**: hidden cards stay in the hub and on the release
card if already decided; the deck header reads "N hidden" next to the
card count, and a click on it reopens the menu.
4. **Never an empty trap**: when every card is hidden, the empty state says
"All N cards hidden by the Show filter" with a "Show all" button.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["👁️ A · Show filter"]
A1["☑️ Show section in the context menu"] --> A2["🔢 Counts, N hidden, Show all"]
A2 --> A3{"🧪 Unit and E2E green?"}
A3 -- "🔴 no: fix" --> A1
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
AF -- "✏️ changes" --> A1
end
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Menu
- [ ] A right click on the Match deck outside code rows shows the Show
section with eight checkboxes and their counts.
- [ ] A right click on a code row still opens its line comment (078).
### Filter
- [ ] Unticking Ask removes every Ask card from the deck and the header
reads "N hidden"; a reload keeps it.
- [ ] With all cards hidden the empty state names the count and "Show all"
restores every card.
- [ ] A decided card that gets hidden stays on the release card.
### Tests
- Unit:
- [ ] The filter over kinds and states, the counts and "N hidden" (node).
- Integration:
- n/a: no server change.
- E2E:
- [ ] `tests/e2e/test_match_show_filter_e2e.py`: menu, untick, header
count, reload, all hidden, Show all, code row comment still works.
@@ -0,0 +1,73 @@
# 098 - Docked Speech Bubbles with Avatar and Close
## User Story
As the operator, I want a speech bubble that sits at the bottom screen edge
to show who speaks by their avatar and to close with one click, so that I
know the speaker without an avatar on screen and can skip a message I do not
need.
## Decisions (operator-confirmed 2026-11-28; do not re-litigate)
1. **Avatar inside the docked bubble**: a bubble that has no visible avatar
to point at sits in the bottom bar (`.bubble-bar`); there it shows the
speaker's avatar (the same `face()` as everywhere in the hub) on the left,
next to the name. A bubble anchored to an avatar keeps its tail and shows
neither the avatar nor the close icon. Rejected: avatar only without close;
a chat dock with history; a mini avatar in the top bar as anchor.
2. **Close icon on every docked bubble**: a visible × button (not only on
hover, so touch works), keyboard reachable, with a tooltip naming what it
does. Rejected: × on hover only; one × for the whole bar.
3. **× skips the message**: on the bubble being read aloud the voice stops
that message and goes on with the next; a silent bubble leaves with the
usual fade (086); a queued one leaves the queue. Rejected: hide the bubble
while the voice reads on; stop all speech.
4. **Own requirement**: 052 (bubbles beside modes) stays as it is.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["💬 A · Docked bubble"]
A1["🧑 Avatar in the docked bubble"] --> A2["✖️ Close button skips the message"]
A2 --> A3{"🧪 Unit and E2E green?"}
A3 -- "🔴 no: fix" --> A1
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
AF -- "✏️ changes" --> A1
end
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Avatar
- [ ] A bubble in `.bubble-bar` shows the speaker's `.avatar[data-face]`
left of the name.
- [ ] A bubble anchored to an avatar shows no avatar and no close button.
- [ ] The avatar inside a bubble is never used as an anchor for a bubble.
### Close
- [ ] Every docked bubble has a `button` with an accessible name and a
tooltip; it takes clicks although the bubble layer ignores the pointer.
- [ ] A click on × of the message being read aloud stops its audio, and the
next pending message starts.
- [ ] A click on × of a silent bubble removes it through `vanish()`, and it
does not come back on the next poll.
- [ ] A click on × of a queued message removes it from the queue.
### Tests
- Unit:
- [ ] The skip of the current, a queued and a silent item (node).
- Integration:
- n/a: no server change.
- E2E:
- [ ] `tests/e2e/test_bubble_dock_e2e.py`: a docked bubble shows avatar
and ×, an anchored one neither, × removes the silent bubble.
@@ -0,0 +1,62 @@
# 099 - Match Card Headline Capped at 120 Characters
## User Story
As the operator, I want a Match card's headline cut to a fixed length while
its code box keeps the whole command, so that a long command does not fill
the card before I see its place, kind and buttons.
## Decisions (operator-confirmed 2026-11-28; do not re-litigate)
1. **Cut on the hub**: every Match card's `title` is at most 120 characters,
cut at the last word boundary before the limit and ended with "…"; the
headline, the peek row, the release card row, the reject sheet and every
toast use it. Rejected: a heuristic summary (program, subcommand, first
argument); a CSS line-clamp that leaves toasts and the release card long.
2. **Whole text stays**: the code box keeps the full `command`, and the
headline's tooltip names the full title when it was cut.
3. **Binding unchanged**: the card hash is computed from the uncut title and
command, so cutting changes no signature and no stale check.
## Approach
```mermaid
flowchart TD
subgraph P["🧭 0 · Preparation"]
P1["📋 Write requirement"] --> P2{"✅ Operator approves?"}
P2 -- "✏️ corrections" --> P1
end
P2 -- "🤖 yes" --> A1
subgraph A["✂️ A · Headline cap"]
A1["✂️ headline() cuts every card title"] --> A2["🏷️ Tooltip with the full title"]
A2 --> A3{"🧪 Unit tests green?"}
A3 -- "🔴 no: fix" --> A1
A3 -- "🟢 yes" --> AF{"💬 Operator feedback on screenshots?"}
AF -- "✏️ changes" --> A1
end
AF -- "👍 fits" --> D1["🏁 Review, commit with operator OK, hand-over"]
```
## Acceptance Criteria
### Cap
- [ ] A command card whose command has 900 characters carries a `title` of
at most 120 characters ending in "…" and its full `command`.
- [ ] A title of 120 characters or fewer stays unchanged.
- [ ] A word longer than the limit is cut inside the word.
- [ ] The card hash of a long command is the same as before the cap.
### Page
- [ ] The headline of a cut card has a tooltip with the full title.
### Tests
- Unit:
- [ ] `headline()` on short, long, single-word and exact-limit titles.
- Integration:
- [ ] A command card from the hub's Match view carries the cut title and
the full command.
- E2E:
- n/a: the existing Match E2E specs render the cut title; no new spec.
+5
View File
@@ -98,3 +98,8 @@ skill defines the format.
- [092 - Release Card Repairs](092-release-card-repairs.md)
- [093 - Stale Operator Requests in Stream and Tasks](093-stale-requests-triage.md)
- [094 - Hub Cards Bound to Their Claude Dialog](094-dialog-bound-cards.md)
- [095 - Compact Agent Message Box](095-compact-agent-message.md)
- [096 - Silent Reject of Expired Match Cards](096-silent-expired-reject.md)
- [097 - Match Show Filter in the Right-Click Menu](097-match-show-filter.md)
- [098 - Docked Speech Bubbles with Avatar and Close](098-docked-bubble-face-and-close.md)
- [099 - Match Card Headline Capped at 120 Characters](099-match-headline-cap.md)