# Kickoff — `channels/website-chat` (NEW: website AI-agent chatbot)

You are a new lane. Create it, then move in (fresh-worktree setup is in
project memory: install → `prisma generate` → `@channels/db` build →
`@channels/shared` build):

```bash
git worktree add ../channels-manager-website -b channels/website-chat origin/main
```

Then `PARALLEL-SESSIONS.md` and the full `KICKOFF-PROMPT.md` ritual.

**Mission (durable):** the WEBSITE channel — a public chat endpoint plus a
`website` connection, so site visitors talk to the same agent that answers
DMs. No Meta in the loop: the one channel App Review does not gate.

**Discipline: no plan on disk = no execution.** First deliverable is
`plans/rethink/website-chat-kickoff.md` — triage the board's Intake, grill the
operator one fork at a time with a recommendation, then build TDD. **Once that
kickoff exists it supersedes the shape below** — this block is only the
pre-plan seed.

Shape to plan against (verify every claim against the repo first):

1. `website` joins the channel vocabulary in `packages/shared` (functional
   names, never vendor names); a `website:chat` gate seeded off/shadow.
2. A connection row (Settings → Connections, encrypted store): site key/secret
   + allowed origins. Env/store only — hard rule 1.
3. Public endpoints in `apps/api`: start visitor session, post visitor
   message, fetch reply. Zod at the boundary, CORS locked to allowed origins,
   rate-limited, server-issued opaque visitor id.
4. Inbound → contact + conversation + message (channel `website`) → existing
   agent pipeline → reply persisted for the widget. Conversations surface in
   the Inbox like any channel.
5. Migrations additive.

Grill forks, recommendations attached: transport (recommend short-polling
first, SSE if latency earns it) · scope (recommend endpoint + connection only;
the embeddable widget script is its own package later) · allowed domain(s)
(operator's list) · agent behaviour (recommend reusing DM behaviour via
channel targeting, no new Situations tab).

**Oracle:** a curl conversation against prod — POST visitor message → stored
rows → agent reply returned; per-package tests green; health green after
deploy.
