# Boardroom ↔ Hermes bridge

Local Mac wire so the public boardroom UI can run agents and kanban — not just show prompts.

**Code only note (t_671273d1):** this file is local until Pages production deploy with Bryan GO. Prefer extensionless paths (`/office`, `/money-day`). Production branch for CF project `boardroom` is **`production`** (not `main`).

## Paths

| What | Where |
|------|--------|
| Bridge server | `~/.hermes/boardroom-bridge/server.py` |
| Start / restart | `~/.hermes/boardroom-bridge/start.sh` |
| PID file | `~/.hermes/boardroom-bridge/bridge.pid` |
| Log | `~/.hermes/logs/boardroom-bridge.log` |
| Office UI | `cloudflare/sites/boardroom/office.html` → live `/office` |
| Seats law | `cloudflare/sites/boardroom/SEATS.md` |
| Live host | `https://boardroom.bryanoneillgillis.com` |
| Wrong host | `boardroom.norcalcarbmobile.com` — NX / not office |

## Start

```bash
~/.hermes/boardroom-bridge/start.sh
curl -sS http://127.0.0.1:8765/api/health
```

Default: `http://127.0.0.1:8765`. Override in the browser with:

```js
localStorage.setItem('hermesBridgeUrl', 'http://127.0.0.1:8765')
```

Office, classic boardroom (`index.html`), goals, and command all read `hermesBridgeUrl`.

## API

| Method | Path | Purpose |
|--------|------|---------|
| GET | `/api/health` | `{ ok, service: boardroom-bridge, agents, profiles }` |
| GET | `/api/seats` | Open-task pulse per seat (`hermes kanban assignees`) |
| GET | `/api/kanban/list?limit=80` | Live boardroom board tasks (not browser seeds) |
| POST | `/api/kanban/create` | `{ assignee, title, body? }` → creates kanban card |
| POST | `/api/run` | `{ agent, task }` or `{ agents: [], task }` → Hermes chat `-Q` |

CORS allows `boardroom.bryanoneillgillis.com`, `*.pages.dev`, localhost, and `file://` (`Origin: null`).

Board env for kanban: `HERMES_KANBAN_BOARD=boardroom`.

## Seat map (UI id → Hermes profile)

Matches `SEATS.md` runtime desks:

| UI id | Profile | Role |
|-------|---------|------|
| `laura` | `laura` | Hermes orchestrator / GChat |
| `kennsington` | `kennsington` | SuperGrok COS (aliases: kensington, assistant) |
| `nora` | `nora` | Mobile / field |
| `elon` | `elon` | CF / ship |
| `sloane` | `sloane` | Content / SEO |
| `mila` | `mila` | Creative / CX |
| `condoleeza` | `condoleeza` | Workspace |
| `giovanna` | `giovanna` | Multi-brand only — not day ops |

Legacy: `samantha` → `laura`. No Camila seat.

## Office floor

- URL: `/office` (extensionless; `/office.html` may 308)
- Desks = names, not model brands
- Chat → `POST /api/run` with seat id
- Task board merges live kanban list + local-only cards
- Bridge offline: UI still works for local tasks; chat returns BLOCKED with start path

## Ops gotchas

1. **Hung bridge** — process LISTEN on :8765 but empty reply (curl 52). Fix: run `start.sh` again (kills old PID + frees port).
2. **Create storms** — many `/api/kanban/create` calls can flap the bridge; health-check after bulk creates.
3. **Hermes gateway** — GChat is Laura lane; bridge is separate (local hermes CLI profiles).
4. **Deploy boardroom static** — only with GO:
   `wrangler pages deploy . --project-name=boardroom --commit-dirty=true --branch=production`
5. **Preview vs prod** — `--branch=main` is Preview only on this project.

## Smoke (local)

```bash
curl -sS http://127.0.0.1:8765/api/health
curl -sS http://127.0.0.1:8765/api/seats | head -c 400
curl -sS 'http://127.0.0.1:8765/api/kanban/list?limit=5' | head -c 400
# optional create (creates a real card — only if you mean it):
# curl -sS -X POST http://127.0.0.1:8765/api/kanban/create \
#   -H 'Content-Type: application/json' \
#   -d '{"title":"bridge-smoke","assignee":"elon","body":"delete me"}'
```

## Related boardroom pages

| Path | Role |
|------|------|
| `/` | Classic boardroom + terminal |
| `/office` | TV / phone seat floor |
| `/command` | One-desk next move |
| `/agents` | Org chart |
| `/processes` | COO processes |
| `/goals` | Goals HQ |
| `/site-health` | CF URL table |
| `/money-day` · `/road` | Field phone checklists |
| `/for-clients` | Client-facing link page |
