**Bead** `3e978f25-63f0-4002-9501-83d3f79345f4` · [canonical URI](https://redfish.acequia.io/guerin/.agents/3e978f25-63f0-4002-9501-83d3f79345f4/) · discussion: Talk: Simtable Learnmore Anyhazard This page is the wiki facet of a [bead](https://redfish.acequia.io/guerin/.agents/); the bead is the source of truth.
## Identity - **URI:** https://redfish.acequia.io/guerin/.agents/3e978f25-63f0-4002-9501-83d3f79345f4/ - **Local origin:** `c:\Users\steph\Documents\sites\redfish.acequia.io\guerin\.agents\3e978f25-63f0-4002-9501-83d3f79345f4\` - **GUID:** 3e978f25-63f0-4002-9501-83d3f79345f4 (UUID v4) - **Created:** 2026-06-18 - **Currently animated by:** Claude (CV — shell + filesystem body), model `claude-opus-4-8[1m]` - **Invoked by parciante:** Stephen Guerin (Stephen@redfish.com) - **Slug / route:** `simtable-learnmore-anyhazard`
## Motivation (Why a GUID) An **active bead** that owns the editing loop for one live page: [`simtable.com/learnmore/anyhazard.html`](https://simtable.com/learnmore/anyhazard.html). It is the productionized, single-page successor to the exploratory editor bead [`e0cca7db` (alison-edits-anyhazard)](https://redfish.acequia.io/guerin/.agents/e0cca7db-ed8c-43a5-a027-b406d985e402/about.md), whose `handler.mjs` / `webdav-publish.mjs` / Gemini-cognition `dev-serve.mjs` it reuses. It draws its editing voice/context from the marketing bead [`d119bda6` (simtable-marketing)](https://redfish.acequia.io/guerin/.agents/d119bda6-7258-4f67-a742-7aa87cfafe72/about.md). This is a *design-task + active-handler* bead, not an exploration. It exists to: 1. serve an **editor surface** that shows the current page with per-paragraph **overlays** of proposed replacement text, each with a **`redfish-ai:` 4-line textarea** that converses with the **gemini-access-api** (context-stuffed with the Simtable / AnyHazard goal and strategy); 2. accept an edit, write it as a **CRDT change op** into this bead's `request/` dock; 3. **watch `request/`**, apply accepted ops to the tracked page, **commit to a local `.git`**, and **publish** to `simtable.com/learnmore/anyhazard.html` over WebDAV; 4. be registered as the **handler for `/simtable-learnmore-anyhazard`** on the runtime.
## Mechanism (What this bead does) - `request/` is the inbound change dock (afferent). `response/` is the outbound dock (efferent: apply results, publish receipts). `uploads/` is the generic deposit dock. - `page/anyhazard.html` is the **working copy / source of truth**, tracked in a **local `.git`** inside the bead. Every accepted CRDT op = one commit. The git log is the edit history. - Cognition is **Gemini** (`generativelanguage` v1beta, key from `.credentials/api-keys/gemini.json`, sent as `x-goog-api-key`, never echoed). BYOK: the bead declares the provider; key custody stays on the animating node. - Publishing reuses `webdav-publish.mjs` → `.vscode/webdav-put.js` (server-side PUT; the HostGo webdisk is no-CORS so the browser cannot PUT directly). - It does **NOT** self-wire into the live runtime (`C:\caddy\...\server.js`). It declares its route in `agent.json` and *offers* registration to the runtime owner / bead-orchestrator `4c6470f9`. (The predecessor bead got burned editing `server.js`; do not repeat that.)
## Folder Layout ``` 3e978f25-63f0-4002-9501-83d3f79345f4/ ├── about.md # this file ├── agent.md # the animator's system prompt + watch-loop contract ├── agent.json # acequia/bead profile: route, docks, cognition, handler decl ├── handler.mjs # facade: GET editor / GET /source / POST /redfish-ai / POST /request / POST /step ├── crdt.mjs # the per-paragraph LWW-Register change-op model + apply ├── gemini-cognition.mjs# ctx.cognition.ask over the gemini-access-api (BYOK) ├── webdav-publish.mjs # ctx.webdav shim (reused from e0cca7db) ├── dev-serve.mjs # local DEV runtime: binds handler + watches request/ ├── editor.html # the overlay editor surface ├── context/ │ └── simtable-anyhazard-brief.md # goal + strategy context appended to Gemini ├── page/ │ └── anyhazard.html # working copy (git-tracked) ├── request/ # inbound CRDT change dock + README ├── response/ # outbound apply/publish receipts + README ├── uploads/ # generic deposit dock + README └── 2026-06-18/ ├── notes/00-design.md └── chats/2026-06-18-simtable-learnmore-anyhazard.md ```
## Session Log - **2026-06-18** — Bead opened (`/start-bead simtable-learnmore-anyhazard`). Studied the predecessor `e0cca7db` (handler/webdav/Gemini-cognition patterns) and the runtime (`C:\caddy\origins\stephenguerin.live\`). Located the gemini-access-api (key + `generativelanguage` v1beta). Scaffolded the bead, snapshotted the current page into `page/anyhazard.html` under a local `.git`, and built the editor loop (editor.html, handler, CRDT op model, Gemini cognition, dev-serve watcher). Reused `webdav-publish.mjs`.
## Modus Operandi (How to interact) - Read `agent.md` (the animator contract), then `2026-06-18/notes/00-design.md` (architecture + CRDT op schema + open questions). - Drop a CRDT change op into `request/` to propose an edit; the watcher applies + commits + publishes and writes a receipt to `response/`. - New working concepts → `notes/`. Verbatim chat → `chats/`. Generic deposits → `uploads/`.
## Capabilities - Serves a per-paragraph overlay editor with a Gemini-backed `redfish-ai:` conversation. - Applies CRDT change ops to one page, versions them in git, and publishes over WebDAV. - Can be cited as the reference implementation of an active single-page editor-handler bead. - Does NOT edit other pages, and does NOT register itself on the live runtime by force.
## Lifecycle - **Energization:** edit requests for the AnyHazard learnmore page (via the editor or `request/`). - **Apoptosis:** fades if the page editing need ends; the live page is independent of this bead.
## Limitations - The publish lane requires the animating node's WebDAV creds (`_netrc` machine `simtable.com` + `simtable-webdav-token.txt`). Browser cannot PUT (no CORS). - CRDT model is per-paragraph LWW-Register (a map of registers), not character-level RGA. Honest about granularity (see note 00 / decentralized-cache-management `4456cd24`). - Live-runtime route registration is *offered*, not self-applied.
**Related beads (cite, do not duplicate):** - [`e0cca7db`](https://redfish.acequia.io/guerin/.agents/e0cca7db-ed8c-43a5-a027-b406d985e402/about.md) — predecessor editor (code reused). - [`d119bda6`](https://redfish.acequia.io/guerin/.agents/d119bda6-7258-4f67-a742-7aa87cfafe72/about.md) — marketing copy + strategy context (the editing brief). - [`fe7fbaf5`](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/about.md) — bead-as-webdav-handler (agent.json schema, cognition/handler blocks). - [`4c6470f9`](https://redfish.acequia.io/guerin/.agents/4c6470f9-b74a-4aba-b436-5e998f469cce/about.md) — bead-orchestrator (route registration is offered here). - [`4456cd24`](https://redfish.acequia.io/guerin/.agents/4456cd24-010a-41e9-a14c-a2d1086893bd/about.md) — decentralized-cache-management (CRDT granularity). - Bead protocol: [`.agents/beads.md`](https://redfish.acequia.io/guerin/.agents/beads.md).
## References (bead cross-links) - Bead: E0cca7db · [canonical](https://redfish.acequia.io/guerin/.agents/e0cca7db-ed8c-43a5-a027-b406d985e402/) - Bead: Simtable Marketing · [canonical](https://redfish.acequia.io/guerin/.agents/d119bda6-7258-4f67-a742-7aa87cfafe72/) - Bead: As Webdav Handler · [canonical](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/) - Bead: Orchestrator · [canonical](https://redfish.acequia.io/guerin/.agents/4c6470f9-b74a-4aba-b436-5e998f469cce/) - Bead: Decentralized Cache Management · [canonical](https://redfish.acequia.io/guerin/.agents/4456cd24-010a-41e9-a14c-a2d1086893bd/)
See all: Beads