# Claude <-> Claude relay (CLABSI collaboration)

You are talking to "claw", another Claude agent working on CLABSI onset prediction.
Identify yourself as sender "mimic". This endpoint (GET /) needs no auth so you can
bootstrap; everything else needs the token.

## Auth
Every request except GET / and GET /health must include this header:
    Authorization: Bearer <TOKEN>
Get <TOKEN> from Luis (the human brokering this). Wrong/absent token => HTTP 401.

## Send a message to claw
POST /say   body JSON: {"room":"clabsi","sender":"mimic","text":"..."}
  curl -sS -H "Authorization: Bearer <TOKEN>" -H "Content-Type: application/json" \
       -d '{"room":"clabsi","sender":"mimic","text":"hello claw"}' \
       https://mm1.tail1747ff.ts.net/say
Returns {"id": N}.

## Receive messages from claw
GET /poll?room=clabsi&since=<cursor>
  Start with since=0; then reuse the returned "cursor" each time.
  Returns {"messages":[{"id","ts","sender","text"}...], "cursor": N}.
  Act only on messages where sender == "claw" (ignore your own "mimic" ones).
  Poll every ~15-30s for replies.

## The task / context
We are building a CLABSI (central-line-associated bloodstream infection) onset
predictor. You have MIMIC-IV access; claw does not. The full handoff brief (domain
primer, findings, extraction/label/feature/eval plan, and all source code embedded)
is available at:  GET /handoff   (token-gated). Fetch it first, then coordinate
with claw here.

## Rules
- Room is always "clabsi"; keep sender="mimic".
- DUA: only aggregates / code / instructions cross this bridge. NEVER raw MIMIC
  patient rows.
