From d4d02b69f27a5a39997e0121288e44277cf2f4c3 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Wed, 22 Jul 2026 22:19:19 -0700 Subject: [PATCH] Live: overlay preview is the verification channel; disconnects resume Two prose fixes from the 3.5-to-4.0.1 forensic diff of a real user regression (15-minute tweaks, repeated disconnects, agent abandoning the picker). The craft-fold made every generate cycle pay the verify- the-built-result loop the overlay already provides to the human; live cycles now verify by construction and run the full check once at accept. And nothing framed a dropped SSE or closed tab as resumable, while the client toasts "Session ended", so agents rationalized bailing to direct edits; the journal is canonical and reopening continues the session. Co-Authored-By: Claude Fable 5 --- skill/reference/live.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skill/reference/live.md b/skill/reference/live.md index 8842b47b9..6f84d88e5 100644 --- a/skill/reference/live.md +++ b/skill/reference/live.md @@ -17,10 +17,10 @@ Execute in order. No step skipped, no step reordered. 3. Poll loop with the default long timeout (600000 ms). Run `live-poll.mjs` again immediately after every event or `--reply`; Codex runs this one-shot poll in the foreground. Never pass a short `--timeout=`. The global bar **Impeccable mark** dims and shows a pulsing amber dot when no agent is long-polling `/poll`. Hover the mark for the hint; restart `live-poll.mjs` to reconnect. -4. On `generate`: reuse `event.scaffold` when present; read the screenshot if present; load the action's reference; deliver variants using the delivery policy below; `--reply done`; poll again. Generate in this thread. You already hold the project's tokens, conventions, and file layout; that context is the job, not overhead. +4. On `generate`: reuse `event.scaffold` when present; read the screenshot if present; load the action's reference; deliver variants using the delivery policy below; `--reply done`; poll again. Generate in this thread. You already hold the project's tokens, conventions, and file layout; that context is the job, not overhead. During a live cycle the overlay's preview IS the verification channel: the user sees every variant rendered in their real page and picks. Do not screenshot, re-render, or QA variants between generate and accept; apply craft-floor's contrast, spacing, and type floors by construction as you write, not as a post-write inspection pass. Full verification, computed contrast, breakpoints, real-copy overflow, runs once at accept on the chosen variant during carbonize cleanup. 5. On `steer`: read the message and `pageUrl`; do the work (page edits, navigation help, or a short reply in the `--reply` message); `--reply steer_done`; poll again. No pickup ack. The Steer bar unlocks when `steer_done` arrives over SSE. 6. On `accept` / `discard`: the poll script runs `live-accept.mjs`, acknowledges the delivered event, and prints `_completionAck`. Plain accepts/discards are terminal immediately. Carbonize accepts remain recoverable until the foreground task runs `live-complete.mjs --id EVENT_ID`; finish that cleanup before polling again. -7. If interrupted, run `live-status.mjs` or `live-resume.mjs` before guessing. The durable journal replays unacknowledged work after helper restart. +7. If interrupted, run `live-status.mjs` or `live-resume.mjs` before guessing. The durable journal replays unacknowledged work after helper restart. A dropped SSE connection or a closed tab does not end the session: the journal under `.impeccable/live/sessions/` is canonical, the injected `live.js` re-attaches when the page reopens, and `live-resume.mjs` replays the active snapshot. Tell the user to reopen the app URL (or restart `live-poll.mjs`) and continue; fall back to the direct-edit loop only when `live-resume.mjs` reports no active session, never because disconnects felt frequent. 8. On `exit`: run the cleanup at the bottom. Harness policy: