Spec draft 2: builder check and Astra round 1 answered
Absolute stamped commands with a controller generation, an authenticated local channel for controllers only, guarded commands, revision-bound packs and a bounded offline exception, one reveal sequence in the core's view, typed layout fills and ids, the delegatedWrite refactor and reply receipts named.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+535
−228
docs/superpowers/specs/2026-11-11-presenter-and-rehearsal-design.md+535 −228
CI passed — run details
diff --git a/docs/superpowers/specs/2026-11-11-presenter-and-rehearsal-design.md b/docs/superpowers/specs/2026-11-11-presenter-and-rehearsal-design.md| index 5bed8ad..09c2eae 100644 |
| --- a/docs/superpowers/specs/2026-11-11-presenter-and-rehearsal-design.md |
| +++ b/docs/superpowers/specs/2026-11-11-presenter-and-rehearsal-design.md |
| @@ -112,8 +112,8 @@ listed so they can be reversed in one place. |
| | P4 | Core and full mode is an **`optional` flag on a slide**; the session carries the mode. | Two decks, or a slide list per mode. | |
| | P5 | A layout is **a recipe that produces ordinary blocks**, each tagged with the slot it filled. Nothing renders from the library. | Layouts as render-time templates (a second representation; a library change would silently restyle old decks). | |
| | P6 | The built-in library is **one committed JSON file** embedded by the Rust core and the editor bundle alike; the new ops that read it live on both sides under the fixtures rule. | Expanding layouts in Go (a second op writer beside the core, which #25 rules out) or in JS only (the API could not use them). | |
| -| P7 | Presenting windows on one machine stay in step **over BroadcastChannel with the deck's Lamport ordering**, and the server session orders commands by the same stamp. | Server only (no network, no talk); local only (no phone). | |
| -| P8 | Rehearsal is **the editor in the presenter's arrangement**, at `/d/{sqid}/rehearse`, not a mode of the remote-capability presenter view. | Making the anonymous `/p/{session}/notes` page editable (it holds only a projector capability; edits must name a person, §6.2). | |
| +| P7 | Controlling windows on one machine stay in step **over an authenticated BroadcastChannel with the deck's Lamport ordering**, every command to the server carries **absolute state** and a stamp, and the **projector's group takes the session back on reconnect** by bumping a controller generation (§3.2). | Server only (no network, no talk); local only (no phone); plain Lamport comparison on reconnect (the phone's stamp can beat the room's). | |
| +| P8 | Rehearsal is **the editor in the presenter's arrangement**, at `/d/{sqid}/rehearse`, signed in and naming a person. | Making `/p/{session}/notes` editable (it is reachable with the remote token, which is transferable and anonymous, §1 ruling 17; an edit must name a person, §6.2). | |
| | P9 | Rehearsal requests are **app rows** keyed by slide id, not document state. | Requests in the Y.Doc (they are about the deck, not part of it; a share-link reader would receive them in every update). | |
| | P10 | Check mode is **computed from the layout engine's paint list** on the server. A browser measurement is a later addition. | Headless Chromium (no such platform capability, §1 ruling 4). | |
| | P11 | The new MCP verbs are **descriptors over #25's one edit transaction**, and the new ops they compile to are also accepted by `slides_update_deck` and the drive API. | A second retry, receipt or authority path per verb. | |
| @@ -206,67 +206,152 @@ Today (§3.4) a presentation is a server row moved by `POST |
| surface fetches the slide it is told to show. It needs the server for |
| every press. The deck needed nothing but the two windows. |
| -Slides gets both, layered: |
| +Slides gets both, layered, without loosening who may drive. |
| -**Locally**, every presenting window of one browser profile — the |
| -projector page, the presenter view, a rehearsal window — joins a |
| -`BroadcastChannel` named for the session (`slides-present:<session |
| -sqid>`), with the `storage` event as the fallback, exactly as |
| -`engine/deck.js` does. A message is the whole position: |
| +#### Controllers and watchers |
| + |
| +Today's capability split stays exactly as it is: the session sqid lets |
| +a page **watch**; the remote token, or the presenter's own signed-in |
| +session, lets a page **drive**. So there are two kinds of presenting |
| +window: |
| + |
| +- **Controllers**: the presenter view (`/p/{session}/notes`, reached |
| + with the presenter's session or the remote token, as now), the |
| + rehearsal page (§6.2), the remote, and a projector page opened from |
| + one of those with the token (today's `data-remote-token`). |
| +- **Watchers**: a projector page opened with the sqid alone, and every |
| + share-link follow page. |
| + |
| +Only controllers send. A watcher's keys browse locally at most and |
| +never reach another window or the server (as today, where a page |
| +without the token posts nothing). |
| + |
| +#### The local channel |
| + |
| +Controllers of one browser profile join a `BroadcastChannel` (with |
| +the `storage` event as fallback, as `engine/deck.js` does). The channel |
| +is named from a **control key**: 32 random bytes minted with the |
| +session and rotated with the remote token, rendered only into |
| +controller pages (never into a sqid-only page, never into a follow |
| +page). Every message carries an HMAC-SHA-256 over its body under that |
| +key (WebCrypto), and a window applies only messages whose MAC verifies. |
| +A sqid-only projector does not join the channel at all: it follows the |
| +server stream as today, and so does not present offline. A projector |
| +that must present offline is opened from a controller (the presenter |
| +view's "Open projector" button, or `p`), and is then a controller |
| +itself, which is the case the deck had. |
| + |
| +Share-link followers never join the channel and never learn the sqid |
| +or the key (§3.4 codex 5 holds); they stay on `/s/{token}` routes. |
| + |
| +A message is the whole position, never a delta: |
| ```json |
| -{"slide":"ab12cd34ef56","step":2,"mode":"core","black":false, |
| - "clock":1731760000000,"t":41,"id":"k3j9…","nav":true} |
| +{"g":3,"t":41,"id":"k3j9…","rev":118,"slide":"ab12cd34ef56","step":2, |
| + "mode":"core","black":false,"clock":1731760000000,"nav":true, |
| + "mac":"…"} |
| ``` |
| -- `t` and `id` are the deck's **Lamport stamp**: a sender stamps one |
| - past the highest `t` it has seen, with its own random id; `(t, id)` |
| - pairs are totally ordered; a window applies a message only if its |
| - pair beats the last one applied; applying never sends; only a local |
| - action sends. Two windows pressing at once agree on the winner and |
| - never ping-pong. |
| -- `hello` on open, answered once with the current state, so a window |
| - opened late catches up. |
| -- `nav` marks a message caused by a move, the only kind that starts |
| - another window's timer. |
| +- `(g, t, id)` is the stamp: `g` the controller generation (below), `t` |
| + and `id` the deck's Lamport pair. Stamps are compared |
| + lexicographically; a window applies a message only if its stamp beats |
| + the last applied; applying never sends; only a local action sends. |
| + Two windows pressing at once agree on the winner and never |
| + ping-pong. |
| +- `rev` is the content revision the position is meant against (§3.6). |
| +- `hello` on open, answered once with the current state. |
| +- `nav` marks a move, the only kind that starts another window's timer. |
| - `clock` is the timer's start (epoch ms) or `null`. |
| -**Through the server**, every local action is also `POST |
| -/p/{session}/command` with the stamp, and every window also listens to |
| -the session stream. The server keeps the newest stamp on the row and |
| -**refuses (204, no change) a command whose stamp does not beat it**, so |
| -a phone and a laptop that both pressed converge on the same total |
| -order the local windows use. The server stamps a command that arrives |
| -without one (the scriptless remote's forms) as `max(t)+1` with its own |
| -id, so old remotes keep working. |
| - |
| -**When the server is unreachable**, the local windows keep presenting |
| -on their own; the phone remote cannot (it has no other path to the |
| -laptop, and a peer-to-peer link is out of scope). When the stream |
| -reconnects, the windows post their newest state and the stamp decides: |
| -a laptop that kept presenting offline wins over the stale row, which is |
| -right, because the laptop is what the room is looking at. |
| - |
| -The row gains `slide_id`, `step`, `mode`, `clock_started_at`, `stamp_t`, |
| -`stamp_id` (one migration, `rastrillo migration generate`, SQL read). |
| -`Slide` (the index) stays, written alongside for one release so a page |
| -loaded before the deploy keeps working, and is then dropped in a later |
| -migration. `present.Event` gains the same fields; the three existing |
| -JSON names keep their meaning. `commandChanges` gains `step`, `mode`, |
| -`clock` and the stamp; `goto` takes a slide id (an index is still |
| -accepted and resolved against the current view). |
| +#### The server |
| + |
| +Every command is **absolute state with a stamp**: the controller has |
| +already worked out "next" against the content it shows and sends the |
| +resulting `{rev, slide, step, mode, black, clock}`. The server applies |
| +it in one transaction with a compare-and-set on the stamp |
| +(`UPDATE … WHERE (g, t, id) < (new)` plus `ended_at IS NULL`), and |
| +publishes only what committed. A command whose stamp does not win |
| +changes nothing and answers `204` with the current state, so the sender |
| +can reconcile. Two advances stamped 41 and 42 therefore cannot collapse |
| +into one: each carries the position it produced, and 42's position is |
| +the later one. |
| + |
| +**Unstamped commands** (the scriptless remote's forms, and pages |
| +loaded before the deploy) keep today's relative vocabulary (`next`, |
| +`prev`, `goto`, `blackout`): the server resolves them against the row |
| +inside the same transaction, using the content at the row's `rev`, |
| +and stamps the result `(g, max_t + 1, "server")`. |
| + |
| +**`end` is not state.** Ending (explicit, the twelve-hour limit, or |
| +offboarding) is terminal, unstamped, always applied, and published as |
| +today's `ended` event. No stamp can undo it. |
| + |
| +**Every command is a guarded write.** Today `presentCommand` checks the |
| +presenter's standing before a plain transaction; that is a gap this |
| +work would widen. Command acceptance moves inside `a.guarded` with the |
| +presenter-reach guard (`team_present.go`), the remote token (or the |
| +presenter's session) is rechecked **inside** the transaction so a |
| +rotation cannot race acceptance, and `/p/{session}/command` joins |
| +`TestTeamEveryWriteRouteRefusesALapseBeforeCommit`, stamped and |
| +unstamped. |
| + |
| +#### Partitions and the controller generation |
| + |
| +Lamport order alone does not make the room win: a laptop offline at |
| +`t=42` and a phone on mobile data at `t=45` would put the phone's |
| +position on the projector at reconnect, which §0.3 forbids. So: |
| + |
| +- The row carries a **generation** `g`. A controller group that loses |
| + the server keeps presenting locally under the generation it had. |
| +- **On reconnect, a projector's group takes the session back**: its |
| + controllers post their current state with `g + 1` (a takeover). The |
| + server accepts a takeover only from a controller (token or presenter |
| + session, checked in the transaction) and only as `max(g) + 1`; it |
| + wins over every stamp of the old generation. Presses the phone made |
| + during the partition are superseded, and the phone shows the |
| + projector's position from then on. |
| +- A group with **no projector open** (just a presenter view, say) does |
| + not take over on reconnect; it adopts the server's state, because no |
| + room is watching it. |
| +- The remote shows **"Projector not connected"** (a text state) while |
| + no projector stream is open on the session, so a presenter pressing |
| + the phone during a partition is told the room is not seeing it. |
| + |
| +This is the "projecting laptop wins" rule, made explicit rather than |
| +hoped for from the stamp. |
| + |
| +#### The row and the event |
| + |
| +The row gains `slide_id`, `step`, `mode`, `rev`, `clock_started_at`, |
| +`rehearsal`, `stamp_g`, `stamp_t`, `stamp_id` and `control_key_hash` |
| +(the projector of another device needs nothing from it; controllers |
| +get the key in their page). One migration, generated and read. For a |
| +session **already live at deploy**: `slide_id` is resolved from |
| +`Slide` against the current view on the first read or command (inside |
| +the transaction; empty deck → `""`, which every surface treats as "no |
| +slide"), `step` 0, `mode` `full` (shows what it showed before), |
| +`rev` the deck's current seq, `clock_started_at` null (the timer |
| +starts at the next move), `rehearsal` false, stamp `(0, 0, "")`, |
| +control key minted on the next token mint. |
| + |
| +`Slide` (the index) stays, kept equal to the position's index in the |
| +current order, so old pages keep working, and `present.Event` keeps |
| +its three names with their meanings and gains `slide_id`, `step`, |
| +`mode`, `rev`, `stamp`, `rehearsal`. A later migration drops `Slide` |
| +once no page older than this deploy can be open (twelve hours, the |
| +session limit). Tests drive an old page and an unstamped form across |
| +the change. |
| The remote stays the anonymous `remote:<session>` actor (§1 ruling 17). |
| -Team mode is unchanged: every `/p/…` request and delivery re-decides on |
| -the presenter's reach (`team_present.go`), and a command is a guarded |
| -write like today. `TestTeamEveryWriteRouteRefusesALapseBeforeCommit` |
| -gains nothing new here because the route is the same. |
| ### 3.3 Core and full mode |
| A slide with `optional: true` is skipped in core mode by every |
| presenting surface: projector, presenter view, remote, follow view and |
| -rehearsal. The session's `mode` decides, `core` by default; `o` toggles |
| +rehearsal (each through its own capability, unchanged). **The follow view is a presenting surface** for steps too: |
| +it shows the slide at the presenter's step, so a follower sees each |
| +reveal when the room does. `present.Event` carries the step and the |
| +share-link fragment route takes `step=` like the projector's. The session's `mode` decides, `core` by default; `o` toggles |
| it and syncs like a move. When a mode change hides the current slide, |
| the position moves to the next shown slide (the deck's `setMode`). |
| @@ -277,94 +362,154 @@ The strip and the viewer mark an optional slide with a text badge |
| ### 3.4 Showing steps |
| -`render.SlideWith` gains `Options.Step` (`-1` = fully built, the |
| -default for every existing caller, so the viewer, the editor stage, the |
| -API's `.html` twin and the thumbnails are unchanged): |
| - |
| -- Each block with a `step` is written with `slides-step="<rank>"`, |
| - where rank is its position among the slide's distinct step numbers |
| - (P2), and `slides-build="<effect>"`. |
| -- A `list` with `build.items = each` writes `slides-step` on each item: |
| - the first item at the block's rank, the rest one press each after it. |
| - This is the deck's "accumulating list", and the only per-paragraph |
| - step. The slide's press count accounts for it. |
| -- The section carries `slides-steps="<n>"` and `slides-at="<k>"`. |
| - `slides.css` hides (visibility, not display: P3) every element whose |
| - step exceeds `slides-at`, marks it `aria-hidden` through the renderer, |
| - and runs the effect on the transition. Under |
| - `prefers-reduced-motion: reduce` every effect is `appear`. |
| -- With scripts off, the projector and `?present=1` page through steps |
| - as `?slide=N&step=k` links, so the scriptless floor (§8) keeps steps. |
| - The viewer and the phone reading view always show the slide fully |
| - built. |
| - |
| -Steps change **in place**: moving between steps of one slide toggles |
| -`slides-at` on the slide already on screen; it fetches nothing and |
| +`render.Options` gains `Build *BuildAt` (`{Step int}`). **`nil`, the |
| +zero value, means fully built**, so every existing caller — |
| +`Options{}`, `Options{AssetBase: …}` — is unchanged, and a regression |
| +test renders a deck with steps through each existing caller and finds |
| +every block visible and no step attribute. Only presenting surfaces |
| +pass a `BuildAt`: |
| + |
| +- Each element with an effective press (§4.2) is written with |
| + `slides-step="<press>"` and `slides-build="<effect>"`; the section |
| + carries `slides-presses="<n>"` and `slides-at="<k>"`. |
| +- Elements past `k` are written `aria-hidden="true"` and `inert` and |
| + hidden by `slides.css` with `visibility` (P3), so they keep their |
| + space. Under `prefers-reduced-motion: reduce` every effect is |
| + `appear`. |
| +- **A step change updates all of it together**: the script that moves |
| + `slides-at` also sets or clears `aria-hidden` and `inert` on exactly |
| + the elements whose state changed, in both directions, and the |
| + announce region says "Step k of n" (catalog key). A move to another |
| + slide says "Slide 7 of 31, step 0 of 4: <title>". |
| +- With scripts off, the projector and `?present=1` page through |
| + presses as `?slide=N&step=k` links, server-rendered at that press, |
| + so the scriptless floor (§8) keeps steps. |
| +- The viewer, the editor stage, the API's `.html` twin and the phone |
| + reading view always render fully built, with no step attributes. |
| + |
| +Steps change **in place**: moving between presses of one slide changes |
| +attributes on the slide already on screen; it fetches nothing and |
| cannot flash, because every block was laid out and its families loaded |
| -when the slide was installed (the font gate already holds the whole |
| -slide). Moving to another slide is today's swap in one task. |
| - |
| -The announce region says "Slide 7 of 31, step 2 of 4: <title>" |
| -(catalog keys). |
| +when the slide was installed. Moving to another slide is today's swap |
| +in one task. |
| -The layout engine gains `LayoutAt(d, index, step)`: blocks past the |
| -step are measured (they keep their space, P3) but not painted. |
| +The layout engine gains `LayoutAt(d, index, press)`: blocks past the |
| +press are measured (they keep their space, P3) but not painted. |
| Thumbnails take `?step=k` on all four surfaces, so the presenter view |
| -and the remote can show "next step" as a picture without a font, as |
| -they do today. PDF stays one page per slide, fully built; a page per |
| -step is out of scope (§3.7). |
| +and the remote show "next press" as a picture without a font. PDF |
| +stays one page per slide, fully built (§3.7). |
| ### 3.5 Edits during a presentation |
| -The deck rebuilt and reloaded every window after an edit. Slides |
| -does not rebuild; but a live deck can change under a talk, by the |
| -presenter in rehearsal or by a collaborator at any time. The rule: |
| - |
| -- **The slide on the projector never changes under the audience** |
| - except by the presenter's own action. Projector and follow pages pick |
| - up the deck's newest state **when they next change slide**, not |
| - while a slide is showing. |
| -- **In rehearsal**, the presenter's own edits are visible at once on |
| - their own screen (they are typing into the stage), and the projector |
| - refreshes the current slide **on the next press**. A session started |
| - from the rehearsal surface carries `rehearsal: true`, and its |
| - projector re-renders the current slide when the deck's seq moves (the |
| - rehearsal room has no audience to protect). This is the one place the |
| - projector watches the deck stream. |
| -- Steps clamp: if the current slide lost blocks and has fewer steps, |
| - the position clamps to its new last step. |
| -- A removed current slide lands as in §3.1. |
| +The deck rebuilt and reloaded every window after an edit. Slides does |
| +not rebuild; but a live deck can change under a talk, by the presenter |
| +in rehearsal or by a collaborator at any time. Every presenting |
| +surface shows content **of one revision** (`rev`, §3.6), and the rule |
| +is about when that revision moves: |
| + |
| +- **In a talk** (`rehearsal: false`), a controller moves to the newest |
| + revision **only at a slide change it makes**: before installing the |
| + next slide, if the deck seq has moved, it fetches the newer pack |
| + (§3.6) and moves from the old order to the new one by slide id (a |
| + removed slide lands on the next surviving slide in the **old** order, |
| + the deck's `land`), and its command carries the new `rev`. Watchers |
| + and followers move to that `rev` when the event says so, also at that |
| + slide change. The slide on the projector never repaints under the |
| + audience. |
| +- **In rehearsal** (`rehearsal: true`), the one trigger is **the deck |
| + seq moving**, from anyone's edit: after one second without a further |
| + seq, the controller fetches the newer pack and re-installs the |
| + current slide at the current press, and posts the new `rev`. The |
| + rehearsal page's own stage is the live editor and needs no refresh. |
| +- Presses clamp: if the current slide now has fewer presses, the |
| + position clamps to its last one. |
| +- The flag is the session's, set at creation and changed only by an |
| + explicit command from a controller (§6.2). Nothing converts a talk |
| + into a rehearsal implicitly. |
| ### 3.6 Offline |
| The deck runs "from Paul's laptop over HDMI without wifi". Slides is a |
| -server app, so presenting offline needs the talk's pages in the browser |
| -before the network goes: |
| - |
| -- **Starting a talk prefetches it.** The projector page, on start and |
| - on reconnect, fetches every slide's projector fragment for the |
| - current seq (`/p/{session}?slide=N&fragment=1`, through the existing |
| - fragment route), their pictures and the font families the deck uses, |
| - and holds them in memory. Moves are then local: the projector |
| - installs from memory and posts the command (§3.2). The presenter view |
| - does the same for its thumbnails and notes. |
| -- **A service worker scoped to `/p/{session}/`** keeps the same set in |
| - Cache Storage, so a reload or a closed laptop lid with no network |
| - still opens the talk. It caches only that session's GETs, is |
| - versioned by the deck seq, and is removed when the session ends. It |
| - never caches a signed-in page, an editor page or a share link. |
| -- The presenter view shows **"Ready offline"** (a text state, catalog |
| - key) once everything is held, and "Not ready offline: N slides |
| - missing" otherwise, so Paul can check before he unplugs. |
| -- When the network comes back, the session reconciles by stamp (§3.2) |
| - and, if the deck seq moved, refreshes the held set — between slides, |
| - per §3.5. |
| - |
| -An **offline pack** (a downloadable self-contained HTML of the deck, |
| -like the deck's zip) is the stronger guarantee and is not designed |
| -here: it is a second build output of the renderer plus a copy of the |
| -presenter engine, worth its own spec once the in-browser path has been |
| -used at a real venue (§11 Q2). |
| +server app, so presenting offline needs the talk in the browser before |
| +the network goes, **and an explicit, bounded exception to revocation**: |
| +a laptop with no network cannot learn that a session ended or that |
| +access was withdrawn. This spec proposes the exception; Paul approves |
| +it or not (§11 Q2). |
| + |
| +#### Packs: one revision, one response |
| + |
| +`GET /p/{session}/pack?rev=N` (controller only: token or presenter |
| +session, checked as the notes route checks today) returns **every |
| +presenting representation of the deck at seq N** in one JSON response, |
| +from one `openDeckAt(N)`: |
| + |
| +- the presenting order for both modes (slide ids), each slide's press |
| + count and its projector HTML (fully built, with step attributes); |
| +- the notes HTML for each slide and the next-press SVG thumbnails; |
| +- the asset refs, font families and static runtime URLs the pages need. |
| + |
| +`openDeckAt(seq)` is `openDeckOn` with the newest snapshot at or |
| +below `seq` and the log replayed up to `seq` (the snapshot is derived |
| +data, so this is always possible); `rev` absent means the current seq. |
| +Because one handle renders everything, a pack can never mix revisions |
| +or duplicate a slide moved mid-fetch. Images are content-addressed and |
| +immutable; they are fetched by ref through the session's asset route. |
| + |
| +The **watcher pack** (`/p/{session}/pack?rev=N&watch=1`, sqid only) and |
| +the **follow pack** (`/s/{token}/pack?rev=N`) carry no notes, no |
| +thumbnails of notes, and nothing a watcher cannot already fetch; the |
| +follow pack stays on the share-link route (codex 5). |
| + |
| +Presenting from packs is what makes positions consistent: every |
| +surface interprets `(slide id, press)` against the pack for the `rev` |
| +in the session state, so a laptop and a phone never read one position |
| +against two different step sequences. |
| + |
| +#### The service worker |
| + |
| +- The projector page moves to **`/p/{session}/screen`**; `/p/{session}` |
| + 303s there (links, QR codes and bookmarks keep working, and the |
| + scriptless page is the same page). The worker is registered with |
| + scope `/p/{session}/`, so the page is inside it. A worker controls |
| + every same-origin subresource request of a page in scope, so |
| + `/static/` scripts, styles and fonts are cached by it too. |
| +- **The offline manifest** is the pack plus: the screen and presenter |
| + page shells, the hashed runtime (`present.js`, the gate bundle, |
| + `slides.css`), the woff2 files of every family in the pack, every |
| + image ref, and every thumbnail the presenter view shows. |
| +- **"Ready offline"** is shown only after the worker is active, every |
| + manifest entry is in Cache Storage, and `navigator.storage.persist()` |
| + has been asked (its answer is shown: "kept until the session ends" or |
| + "the browser may clear this"). Otherwise "Not ready offline: N items |
| + missing". |
| +- **State is kept apart from content**: the position, stamp and clock |
| + live in `sessionStorage`/IndexedDB keyed by session, never in the |
| + cached HTML, so a reload offline resumes the position, not the page |
| + as first served. |
| + |
| +#### The exception, bounded |
| + |
| +- **Who prepares it**: a controller only. A watcher's pack is cached |
| + only in memory and is lost on reload; a follower caches nothing. |
| +- **What it holds**: the controller's pack (with notes) in the |
| + controller's cache; the projector screen's cache holds the watcher |
| + pack (no notes) even when opened by a controller, so notes live only |
| + where a presenter view was opened. |
| +- **Local expiry**: the session's twelve-hour limit, recorded in the |
| + cache's own metadata at preparation and enforced by the worker, |
| + which serves nothing for an expired session and deletes it. |
| +- **Revalidation**: whenever the network answers, the worker asks |
| + `/p/{session}/state` first. A `404`, `410`, `401` or `403` — ended, |
| + expired, refused, token rotated — **deletes every cache for the |
| + session at once and shows the refusal**; a cached answer is never |
| + served in place of an explicit refusal. Sign-out on a controller page |
| + deletes the caches too. |
| +- **What it does not cover**: while the laptop stays offline, a talk |
| + prepared before revocation stays presentable until its local expiry. |
| + That is the exception, and it is why it needs Paul's yes. |
| + |
| +An **offline pack as a download** (a self-contained HTML of the deck, |
| +like the deck's zip) is not designed here (§11 Q2). |
| ### 3.7 Out of scope |
| @@ -387,21 +532,49 @@ stay laid out while hidden. Accumulating lists. Fades. |
| ### 4.2 What changes on a CRDT |
| - **The count is derived, never stored** (P2). The deck stored |
| - `data-steps` on the slide, which was fine for one writer. Two |
| - writers would make it disagree with the blocks; deriving it from the |
| - ranks of the block `step` values cannot. |
| -- **Ranks, not numbers.** Steps `{1, 3, 7}` play as three presses. A |
| - concurrent delete or an agent picking a large number never makes a |
| - press that shows nothing. The inspector shows ranks ("Appears on |
| - press 2 of 3") and writes numbers; "Add a step" writes `max + 1`. |
| + `data-steps` on the slide, which was fine for one writer; two writers |
| + would make it disagree with the blocks. |
| +- **One reveal sequence, computed once, in the core's view.** The view |
| + gives each block (and each item of an `each` list) its effective |
| + **press**, and each slide its press count. `core/src/view.rs` and |
| + `fixtures/view.mjs` compute it; Go, the presenter windows and the |
| + inspector read it. The rule: |
| + 1. A block's own step is its `step`, or 1 for a list with |
| + `items: each` and no `step`, or 0 (always shown). |
| + 2. **A child can never come before its parent**: a block under a |
| + columns block takes `max(own, parent's)`. Parentage is the |
| + renderer's (ruling 20: the first columns block in reading order |
| + that names a child owns it; unreached blocks have no parent). |
| + 3. Distinct effective steps are taken in order. Each is a **group**; |
| + an `each` list in a group expands to one press per item, and the |
| + group lasts as long as its longest list (lists in one group play |
| + their items side by side). Every later group starts after it. |
| + 4. **A press that would reveal nothing visible is dropped**: a group |
| + made only of spacers, or of text blocks with no text, or of empty |
| + lists, takes no press; its blocks are revealed with the next group |
| + that has something visible (or are always shown, if none follows). |
| + 5. Presses are numbered 1..n densely after that; 0 is the slide |
| + before any press. |
| +- **Conformance vectors**: `fixtures/vectors/presses.json`, hand-written |
| + like `font-families.json`, read by the Rust and JS tests (and by a Go |
| + test that checks the view carries them): gaps, duplicates, an `each` |
| + list followed by a block, two `each` lists in one group, a child |
| + stepped before its parent, a merged column cycle, an all-spacer |
| + group, an empty list. A case changes with the rule on both sides in |
| + one commit. |
| - **Same number, same press.** Two blocks with one number arrive |
| - together, which is how a heading and its line come in at once. |
| -- **Items.** `build.items = each` on a list is the only sub-block |
| - step; per-paragraph keys inside the text fragment would put |
| - attributes into text, which the write gate refuses (ruling 19) and |
| - y-prosemirror deletes. |
| + together. |
| +- **Items.** `build.items = each` on a list is the only sub-block step; |
| + per-paragraph keys inside the text fragment would put attributes into |
| + text, which the write gate refuses (ruling 19). |
| +- **Concurrent edits.** In the browser, two people adding "a new press" |
| + at once each write `max + 1` against their own copy and merge onto |
| + one press (or two, if they differ) — a visible placement result, never |
| + lost content. Delegated edits are different: they are transactions |
| + against an `expected_revision`, and of two against one revision one |
| + commits and one conflicts (#25), which is correct. |
| - **Canvas and flow alike.** Steps are independent of placement and of |
| - the phone layer; the phone reading view shows the slide fully built. |
| + the phone layer; the phone reading view is fully built. |
| ### 4.3 The editor |
| @@ -443,12 +616,13 @@ keeps the idea, as data. |
| "slide": {"layout": "flow", "template": "title-body"}, |
| "slots": [ |
| {"slot": "heading", "type": "heading", "region": "heading", |
| - "props": {"level": 2}, |
| + "props": {"level": 2}, "fill": "text", |
| "hint": "layouts.items.heading.hint", "max_chars": 60, "required": true}, |
| {"slot": "items", "type": "list", "region": "body", |
| - "props": {"style": "bullet", "size": "l"}, |
| + "props": {"style": "bullet", "size": "l"}, "fill": "text", |
| "build": {"items": "each"}, |
| - "hint": "layouts.items.items.hint", "max_items": 5, "max_chars": 70} |
| + "hint": "layouts.items.items.hint", "max_items": 5, "max_chars": 70, |
| + "required": true} |
| ], |
| "notes_hint": "layouts.items.notes.hint" |
| } |
| @@ -457,14 +631,28 @@ keeps the idea, as data. |
| - A layout is a **slide recipe**: the slide's placement (`layout` |
| flow/canvas, and a template or boxes), and an ordered list of |
| **slots**, each one block to make: type, region or box, props, an |
| - optional step and build, a hint, and advisory limits. |
| -- `name`, `summary` and `hint` are catalog keys (the hardcoded-English |
| - rule), resolved in the locale of whoever reads them: the editor's |
| - picker, or the MCP descriptor's `slides_list_layouts` answer. |
| + optional step and build, a hint, advisory limits, and a **fill kind** |
| + saying what a filler supplies. |
| +- **Fill kinds** are typed, so every built-in can actually be filled: |
| + |
| + | `fill` | The filler supplies | Written as | |
| + |---|---|---| |
| + | `text` | Markdown (the `set_text` subset) | the block's text | |
| + | `quote` | `{markdown, cite}` | text and `props.cite` | |
| + | `image` | `{asset, alt, decorative?}`: a **registered** asset id of this deck | `props.asset`, `props.alt`, `props.decorative` | |
| + | `none` | nothing (a divider, a spacer, a shape) | — | |
| + |
| + An image fill naming an asset the deck does not have is a refusal of |
| + the batch. A `columns` slot has `children: ["left", "right"]`, naming |
| + **other slots** of the same recipe; expansion resolves them to the |
| + block ids it mints, so a recipe never needs an id in advance. |
| +- `name`, `summary` and `hint` are catalog keys, resolved in the locale |
| + of whoever reads them: the editor's picker, or |
| + `slides_list_layouts`. |
| - Limits (`max_chars`, `max_items`, `required`) are **advice that check |
| - mode reports**, never refusals. A CRDT cannot enforce a length |
| - across concurrent typists, and refusing a person's words at |
| - rehearsal would be worse than a warning. |
| + mode reports**, never refusals. A CRDT cannot enforce a length across |
| + concurrent typists, and refusing a person's words at rehearsal would |
| + be worse than a warning. |
| - `v` is the layout's version. A slide records `from: {layout, v}` |
| only to say where it came from; changing the library never changes |
| an existing slide (P5). |
| @@ -493,26 +681,46 @@ twice. |
| `layouts/library.json` at the repo root, one file. The Rust core embeds |
| it (`include_str!`) and the editor bundle imports it, so the core's ops |
| -and the browser's ops read the same bytes; the Go side serves it from |
| -the core's view of it rather than parsing its own copy. Changing it |
| -means rebuilding the wasm and the bundle and regenerating vectors, |
| -which the gate already checks. |
| +and the browser's ops read the same bytes; the Go side reads the |
| +library through the core (a new read-only ABI export, |
| +`slides_core_layouts`, which bumps the ABI to 3 in `lib.rs` and |
| +`core.go` in the same commit) rather than parsing its own copy. |
| +Changing it means rebuilding the wasm and the bundle and regenerating |
| +vectors, which the gate already checks. **The library is append-only by |
| +version**: a recipe change bumps `v`, and every shipped version stays |
| +in the file, so a slide's `from` always resolves; only the newest is |
| +offered for new slides. |
| Two new ops, on both sides, with fixture files and vectors: |
| - `add_slide_from_layout {after?, layout, fills?, notes?, optional?, |
| - id?}`: makes the slide and its blocks in one batch (block ids minted |
| - like `add_block`'s), tags each block with `slot` and the slide with |
| - `from`, writes `fills` (`{slot: markdown}`; Markdown subset as |
| - `set_text`) and notes. Unknown layout or slot is a refusal of the |
| - batch. |
| -- `set_slot {slide, slot, markdown}`: `set_text` on the block of that |
| - slide whose `slot` matches. No match, or more than one, is a refusal |
| - naming the slot. This is the verb a small model can use without |
| - reading block ids. |
| - |
| -`ids` in the acknowledgement maps the op index to the new slide id, as |
| -now; the blocks are found by slot from then on. |
| + id?, ids?}`: makes the slide and its blocks in one batch, tags each |
| + block with `slot` and the slide with `from`, writes the fills and |
| + notes. **Every required slot gets a block, filled or empty; an |
| + optional slot gets one only if it is filled**, so an unused subtitle |
| + takes no space. Unknown layout, unknown slot, or a fill of the wrong |
| + kind refuses the batch. |
| +- `set_slot {slide, slot, fill, id?}`: writes a fill into the block of |
| + that slide whose `slot` matches. If none matches and the slide's |
| + `from` names a layout version that has the slot, the block is made |
| + from that slot's recipe (placed where the recipe says, ordered after |
| + the slotted blocks before it in the recipe) and then filled; this is |
| + how "add the subtitle" works as a second call. No match and no |
| + recipe, or more than one match, is a refusal naming the slot. This is |
| + the verb a small model can use without reading block ids. |
| + |
| +**Ids.** The core draws no entropy (the clippy ban), so every id is |
| +supplied before execution, as `add_block`'s is. `id` is the slide's; |
| +`ids` is `{slot: block id}` for the blocks the op will make; `set_slot` |
| +takes `id` for a block it may make. **Host and browser minting are |
| +extended to these ops**: `mintOpIDs` (Go, #25's delegated path and the |
| +drive API) and the editor's minting fill in every absent id from the |
| +library recipe before the batch runs, and #25's receipt fingerprint is |
| +still taken over the request **before** minting, as for every other op. |
| +The acknowledgement's `ids` maps the op index to the slide id; block |
| +ids are read back by slot (`slides_get_deck`, or simply `set_slot`). |
| +Fixtures cover a layout slide made and then duplicated in one batch, |
| +and made and then `set_slot` in one batch. |
| The editor's "New slide" menu becomes the layout picker (with "Blank" |
| first, today's behaviour), and the inspector shows a block's slot hint |
| @@ -567,9 +775,23 @@ the deck stream. So rehearsal is mostly arrangement, not machinery: |
| the timer and clock, the position, and the request panel. Signed in, |
| `deckFor` (404 to a stranger), and the scriptless exception the |
| editor already has, with a `<noscript>` linking the presenter view. |
| -- It **starts or joins a presentation session** with `rehearsal: true` |
| - (§3.5), so a projector window or a laptop on HDMI follows it, and the |
| - keys of §3.1 drive both. `p` opens the projector. |
| +- It **starts or joins the presenter's own presentation session**, so |
| + a projector window or a laptop on HDMI follows it, and the keys of |
| + §3.1 drive both. `p` opens the projector. Authority: the rehearsal |
| + page sends commands as the **signed-in presenter of that session** |
| + (`presenterActor`, the same check `presenterNotes` makes, plus the |
| + CSRF token), never with the remote token, so joining never re-mints |
| + the token and never unpairs a phone. Anyone else who can edit the |
| + deck can rehearse it in a session of their own (one per presenter, |
| + as now). |
| +- **The rehearsal flag is the session's, set explicitly.** A session |
| + created from `/d/{sqid}/rehearse` starts with `rehearsal: true`; one |
| + created from Present starts `false`. Joining an existing session |
| + from the rehearsal page **does not change the flag**: it shows the |
| + state ("Projector follows edits: off") with a toggle that is a |
| + command like any other. So opening rehearsal on a running talk never |
| + makes its projector repaint on edits, and a rehearsal becomes the |
| + real talk by turning the toggle off (or starting a fresh session). |
| - **Notes are WYSIWYG** because they already are: `notes` is an |
| XmlFragment with the §2.6 schema, and the editor already binds a |
| ProseMirror view to it. Italic survives, which is the specific thing |
| @@ -611,6 +833,8 @@ than decide (§11 Q3). |
| | `target_slide_id` | for `move`: put after this slide | |
| | `text` | the person's words, ≤ 4000 chars | |
| | `status` | `open`, `done`, `question`, `declined` | |
| +| `rev` | bumped on every change; a reply's precondition | |
| +| `change_seq` | the deck's request change sequence at the last change; the listing cursor | |
| | `actor` | who asked, in `DeckUpdate.Actor` form | |
| | `created_at`, `updated_at` | | |
| @@ -622,9 +846,9 @@ history. |
| deck may ask and answer); never on a share link, never on a |
| projector, never in the PDF. Writes go through `a.guarded` and join |
| the team-mode lapse test. |
| -- The deck stream gains `event: requests` with the deck's request seq |
| - (advisory, like `update`), so open rehearsal windows refresh their |
| - panel. |
| +- The deck stream gains `event: requests` with the deck's request |
| + change sequence (advisory, like `update`), so open rehearsal windows |
| + fetch what changed after their cursor. |
| - A request whose slide was removed stays listed, labelled "slide |
| removed". |
| - **A request's text is the person's words and is data.** The MCP |
| @@ -669,26 +893,28 @@ doesn't fit at 30pt, it's something to say, not something to show." |
| ### 7.3 What it reports |
| -`check(deck) → findings[]`, each `{slide, block?, kind, detail, |
| -values}`: |
| +`check(deck, rev) → findings[]`, each `{slide, block?, kind, key, |
| +values}`, where `key` is a catalog key and `values` its arguments, so |
| +every finding reaches a person in their language. |
| -| Kind | From | |
| +| Kind | Computed from | |
| |---|---| |
| -| `overflow` | the existing layout warning | |
| -| `small_text` | any painted text run under the deck's floor, in frame px | |
| -| `slot_limit` | a slotted block over its layout's `max_chars`/`max_items`, or a `required` slot empty | |
| -| `unreached`, `asset`, `glyph` | the existing warnings | |
| -| `missing_alt` | an image with empty `alt` that is not `decorative` | |
| - |
| -The floor is `meta.min_text_px`, default **30** at the 1920 frame (the |
| -deck's rule). Today's smallest theme size is body `s` at about 37 px, so |
| -a default deck passes; the finding exists for phone-override sizes |
| -that leak, tables, captions and future sizes. A summary gives, for |
| -1920×1080, 1280×720, 1024×768 and 1920×1200, the smallest text in |
| -physical pixels. |
| - |
| -Results are computed from the view at a seq and cached by `(deck, |
| -seq)`; they are never written into the document. |
| +| `overflow`, `glyph`, `font`, `asset`, `unreached` | the existing layout warnings, kept with their kinds (none is dropped from the export page) | |
| +| `small_text` | painted text runs under the floor; `layout` stamps each text run with its block id (an internal field on the paint op, not written into the SVG) | |
| +| `slot_limit` | the **view at the same revision**: a slotted block over its layout's `max_chars`/`max_items`, or a `required` slot empty or missing | |
| +| `missing_alt` | the view at the same revision: an image with empty `alt` that is not `decorative` | |
| + |
| +Both halves come from one `openDeckAt(rev)`, so a finding never mixes |
| +two revisions. The floor is **30 px at the 1920 frame** (the deck's |
| +rule), a constant in v1 and deliberately not a document key (a |
| +per-deck floor is a later `meta` key with an op on both sides, if a |
| +deck ever needs one). Today's smallest theme size is body `s` at about |
| +37 px, so a default deck passes; the finding exists for tables, |
| +captions and future sizes. A summary gives, for 1920×1080, 1280×720, |
| +1024×768 and 1920×1200, the smallest text in physical pixels. |
| + |
| +Results are cached by `(deck, rev)` and never written into the |
| +document. |
| ### 7.4 Where it shows |
| @@ -721,20 +947,36 @@ routes, the CLI commands and the MCP tools at once, with |
| `slides_update_deck`, and one canonical edit transaction: |
| revision-checked, idempotent by client UUID, receipts sealed, authority |
| rechecked at the writer and per emitted chunk, team guard around it. |
| -**Everything here is new descriptors over that transaction and those |
| -reads.** No new authority, receipt, retry or emission code. |
| - |
| -- The new ops of §2 and §5 (`set_slide.optional`, |
| - `set_block.step/build/slot`, `add_slide_from_layout`, `set_slot`) |
| - join the canonical vocabulary, so `slides_update_deck` and the drive |
| - API accept them with no change but the allowed-names list and the |
| - machine schema. |
| -- Each write verb below is a descriptor whose handler builds a short op |
| - batch and calls the same edit transaction function |
| - `slides_update_deck` calls, with the same five envelope fields |
| - (`team`, `sqid`, `expected_revision`, `client_id`, plus its own |
| - arguments). The receipt coordinate already binds the operation name, |
| - so a verb and `slides_update_deck` never share a retry. |
| + |
| +**The new ops** of §2 and §5 (`set_slide.optional`, |
| +`set_block.step/build/slot`, `add_slide_from_layout`, `set_slot`) join |
| +the canonical vocabulary: `slides_update_deck` and the drive API accept |
| +them, with the allowed-names list, the per-op machine schema and ID |
| +minting (§5.4) extended. That alone gives an agent everything. |
| + |
| +**The named verbs** below are for small models. They need one refactor |
| +of #25's code, which this spec names rather than hides, and which goes |
| +back through #25's review standard (an independent Astra review of the |
| +change): |
| + |
| +- The edit transaction becomes **`delegatedWrite(kind, …)`**, with the |
| + operation name a parameter of the receipt coordinate instead of the |
| + hardcoded `slides_update_deck`. For `slides_update_deck` the |
| + coordinate bytes, payload fingerprint and acknowledgement are |
| + **byte-identical** to today's, so existing receipts keep matching (a |
| + test replays a receipt written before the refactor). |
| +- **Deck-op verbs** (`slides_add_slide_from_layout`, `slides_set_text`, |
| + `slides_set_notes`, `slides_move_slide`, `slides_make_optional`, |
| + `slides_add_step`) build a short op batch and run the **deck body**: |
| + `expected_revision` check, `applyOpsOn`, both gates, update row, |
| + edit receipt under their own operation name, attribution, final |
| + authority check. Same receipt table, same acknowledgement shape. |
| +- **`slides_reply_request`** runs a **request body** (§8.2), with its |
| + own receipt table. |
| + |
| +Authority, identity, Home binding, roster lease, emission and |
| +completed-retry rechecks are #25's functions, called in the same order |
| +for every kind. |
| ### 8.2 The verbs |
| @@ -742,32 +984,56 @@ Reads (`slides:read`): |
| | Verb | Returns | |
| |---|---| |
| -| `slides_list_layouts` | the library: id, v, name, summary, slots with hints and limits, in the caller's locale | |
| -| `slides_check_deck {sqid}` | the §7 findings at the current revision | |
| -| `slides_list_requests {sqid, status?, since?}` | requests with replies, bounded and paged like `slides_list_decks` | |
| +| `slides_list_layouts` | the library's newest versions: id, v, name, summary, slots with fill kinds, hints and limits, in the caller's locale | |
| +| `slides_check_deck {sqid}` | the §7 findings at the current revision, with that revision | |
| +| `slides_list_requests {sqid, status?, after?}` | requests changed after a cursor (below) | |
| -Writes (`slides:write`, edit authority as `slides_update_deck`): |
| +Writes (`slides:write`, edit authority as `slides_update_deck`; each |
| +takes `team`, `sqid`, `expected_revision`, `client_id` and its own |
| +arguments): |
| | Verb | Compiles to | |
| |---|---| |
| | `slides_add_slide_from_layout {layout, after?, fills?, notes?, optional?}` | `add_slide_from_layout` | |
| -| `slides_set_text {slide, slot \| block, markdown}` | `set_slot` or `set_text` | |
| +| `slides_set_text {slide, slot \| block, fill \| markdown}` | `set_slot` or `set_text` | |
| | `slides_set_notes {slide, markdown}` | `set_notes` | |
| | `slides_move_slide {slide, after}` | `move_slide` | |
| | `slides_make_optional {slide, optional}` | `set_slide` | |
| -| `slides_add_step {slide, block, step? \| "new", effect?, items?}` | `set_block` with `step`/`build`; `"new"` is `max+1` computed by the op (not the caller), so two agents adding a step at once make two presses or one, never a refusal | |
| -| `slides_reply_request {request, status, text}` | a `slide_request_replies` row (not a document op; idempotent by client UUID through the same receipt table, its own operation name) | |
| - |
| -`slides_reply_request` is the one write that is not a deck op. It does |
| -not touch the document, so instead of `expected_revision` it takes the |
| -request's own `updated_at` as its precondition, and a stale one is |
| -`conflict`. (§11 Q5 asks whether the layout verbs should keep |
| -`expected_revision`.) |
| +| `slides_add_step {slide, block, step?, effect?, items?}` | `set_block`; with `step` absent the op writes `"next"`, which the core and the browser resolve to one past the highest step on the slide **at apply time** — under #25 that is the accepted `expected_revision`, so it is deterministic, and a second agent at the same revision gets `conflict`, not a merged step | |
| + |
| +`slides_reply_request {request, expected_request_rev, client_id, |
| +status, text}` (`slides:write`): |
| + |
| +- Inside the writer transaction: resolve the request to its deck, |
| + check live deck reach (as for an edit), compare `expected_request_rev` |
| + with the request's `rev` (stale → `conflict`), insert the reply, |
| + set the status, bump the request's `rev` and the deck's request |
| + change sequence, write attribution (`connection:<fingerprint>`, as |
| + #25), write the receipt, run the final authority check, commit. |
| +- Receipts: a new additive table `request_reply_receipts` (coordinate |
| + HMAC over issuers, team, subject, client, `slides_reply_request`, |
| + client UUID; payload HMAC over request id, expected rev, status and |
| + text; sealed acknowledgement `{request, rev, reply}`), covered by the |
| + namespace marker's no-adoption checks like #25's receipts. A |
| + completed retry rechecks authority before returning its original |
| + acknowledgement. |
| Descriptions are written for a mid-size model: each says what it is |
| for in one sentence, names the read that gives the ids it needs, and |
| -for `slides_list_requests` says that a request's text is a person's |
| -words to act on as a request and never to execute. |
| +`slides_list_requests` says that a request's text is a person's words |
| +to act on as a request and never to execute. |
| + |
| +**Request listing is bounded and resumable.** Each deck has a monotonic |
| +**request change sequence**; every create, reply and status change |
| +stamps the request with the next value (`change_seq`). `after` is a |
| +`change_seq`; results are ordered by it ascending, at most 50 requests |
| +a page, with `next_after`. So an old request that gets a new reply |
| +reappears after the cursor and is never missed. Each request carries |
| +at most its 20 newest replies (each at most 4000 characters) and a |
| +`more_replies` flag; `slides_get_request {request, before?}` pages the |
| +rest. Every page goes through #25's emission checks (deck reach before |
| +headers and per chunk), and the whole result stays under its 1 MiB |
| +bound. |
| ### 8.3 The request and reply loop |
| @@ -851,7 +1117,20 @@ The house patterns, applied: |
| does in a rehearsal session; steps reveal with no layout change |
| (the existing DOM probe); offline reload of a prefetched talk; |
| clicker keys typed into a notes field type and do not move. |
| -- **Delegated**: each verb end to end through the real HTTPS CLI/MCP |
| +- **Presenting protocol**: absolute stamped commands applied out of |
| + order converge; unstamped forms resolved in the transaction; `end` |
| + never superseded; a takeover after a partition beats the phone's |
| + later stamp; a watcher's message without a valid MAC is ignored; a |
| + sqid-only page never joins the channel; the command route in the team |
| + lapse test, stamped and unstamped, with a token rotated mid-command. |
| +- **Packs and offline**: a pack is one revision under concurrent moves |
| + and edits; watcher and follow packs carry no notes; an expired or |
| + refused session's caches are deleted on the first answer; "Ready |
| + offline" only after activation and storage. |
| +- **Regression**: every existing `render.Options` caller renders a |
| + stepped deck fully built. |
| +- **Delegated**: the `slides_update_deck` receipt from before the |
| + refactor still replays; each verb end to end through the real HTTPS CLI/MCP |
| fixture #25 built: create, add from layout, set text by slot, check, |
| reply; retries return the first acknowledgement. |
| @@ -864,11 +1143,17 @@ Ranked by how much the answer changes what gets built. |
| 1. **Which part first?** §9 proposes steps, then presenter sync and |
| offline, then rehearsal. If the next talk is soon, rehearsal and |
| layouts might matter more than offline. |
| -2. **Offline: in-browser cache, or an offline pack?** §3.6 proposes |
| - prefetch plus a service worker scoped to the talk, with "Ready |
| - offline" to check before unplugging. The deck's zip is the stronger |
| - guarantee and a second build output. Recommendation: browser first, |
| - pack only if the browser path fails at a venue. |
| +2. **Offline, and its exception to revocation.** §3.6 proposes packs |
| + plus a service worker scoped to the talk, with "Ready offline" to |
| + check before unplugging. It means a laptop that prepared a talk can |
| + keep presenting it while offline even if, meanwhile, the session was |
| + ended or the presenter's access withdrawn, until the session's twelve |
| + hours run out; notes are kept only where a presenter view was |
| + opened, and everything is deleted the moment the network says no. |
| + Is that exception acceptable? And is the in-browser path enough, or |
| + do you also want the deck's offline zip (a second build output)? |
| + Recommendation: accept the bounded exception; browser path first, |
| + zip only if it fails at a venue. |
| 3. **Rehearsal's Cut, Move and Make optional: do them, or file them?** |
| §6.3 proposes direct, undoable actions plus a request form for when |
| you want to flag rather than decide. The alternative is the deck's |
| @@ -891,6 +1176,28 @@ Ranked by how much the answer changes what gets built. |
| ## 12. Review record |
| -Draft 1, 2026-11-11, unreviewed. To be reviewed by GPT-6 Astra (at |
| -most three rounds, stopping at the first with no P1), then approved by |
| -Paul before any plan or code. |
| +- **Draft 1**, 2026-11-11. |
| +- **Builder check** (a fresh agent asked what it would have to guess): |
| + eight points, all settled as the session's calls in draft 2: |
| + rehearsal authority and the flag (§6.2), reconnect (§3.2), list items |
| + before later steps (§4.2), optional slots and `set_slot` creating |
| + from the recipe (§5.4), a fixed 30 px floor (§7.3), steps in the |
| + follow view (§3.3), reply idempotency apart from #25's edit receipts |
| + (§8.2), `slides_add_step` without a merge guarantee (§8.2). |
| +- **GPT-6 Astra round 1** (on draft 1): 11 P1, 7 P2. Draft 2 answers |
| + each: absolute stamped commands, unstamped resolved in the |
| + transaction, `end` terminal (§3.2); a controller generation and |
| + takeover on reconnect (§3.2); controllers vs watchers and an |
| + authenticated local channel (§3.2); commands as guarded writes with |
| + the token rechecked in the transaction (§3.2); the offline exception |
| + stated and bounded, for Paul (§3.6, §11 Q2); the worker's scope and |
| + manifest (§3.6); revision-bound packs from one `openDeckAt` (§3.6, |
| + §3.5); one reveal sequence with parents, empty groups and lists, plus |
| + conformance vectors (§4.2); `Build *BuildAt` nil as fully built |
| + (§3.4); `"next"` resolved under the accepted revision, conflicts kept |
| + (§4.2, §8.2); the `delegatedWrite` refactor and reply receipts named |
| + (§8.1, §8.2); live-session migration (§3.2); one refresh trigger per |
| + mode (§3.5); step changes update accessibility state (§3.4); ids for |
| + layout blocks (§5.4); typed fills (§5.2); check findings from one |
| + revision, `font` kept, catalog keys (§7.3); request listing by change |
| + sequence (§8.2). |