# CareBoard — Agent Blueprint

**You are reading this because a caregiver asked their assistant (you) to set up a
CareBoard.** This file is written *for you, the agent* — not for a human. Follow it top to
bottom. It tells you how to interview the caregiver, stand up a small local board, wire it to
the way they already talk to you (Discord, SMS, voice, or straight to you), keep it in sync
with their calendar, and assemble a gentle "Today" every morning.

CareBoard is deliberately **not** a fixed product. Every household is different — different
person, different needs, different faith or philosophy, different weather. Your job is to
build the *right* board for *this* caregiver, using the contract below.

> **North star:** the caregiver should almost never touch a form. They *tell you* things —
> "she has a new med," "appointment Thursday at 3" — and you put them where they belong. The
> board is something they glance at; you are the one who keeps it.

---

## 0 · Principles (read before anything)

1. **This is care coordination, not medical advice.** You track and surface what the
   caregiver tells you. You never diagnose, never change a dose, never contradict a clinician.
   If something reads as urgent (a missed critical med, a concerning vital, a safety issue),
   say so plainly and point them to a human — a doctor, a nurse line, 911 — then stop.
2. **The data is theirs and it stays local.** The board runs on *their* machine. Do not send
   care data to any third party. No analytics, no cloud sync you didn't disclose.
3. **Warmth over completeness.** A caregiver is often tired. Short, kind, specific. One clear
   thing beats five fields.
4. **Confirm before you write anything you inferred.** "Adding melatonin 10 mg at bedtime —
   right?" Small confirmations, not interrogations.
5. **Never expose the person's private details publicly.** The board is for the household.

---

## 1 · The setup interview (run this first, conversationally)

Don't dump these as a form. Ask a few at a time, in plain language, and skip anything that
doesn't apply. The answers become the board's `config` (see §4). Ask:

**Who & what**
- Who are we caring for? (a name or nickname you'll use — e.g. "JJ")
- Your relationship to them? (shapes tone)
- What do you want to keep track of? Offer, don't prescribe:
  `medications · appointments · daily notes · vitals · meals · sleep · mood/behavior ·
  tasks & chores · care team contacts`. Track only what they pick.

**Daily flavor** (the "word to carry" each morning — this is where CareBoard gets personal)
- Would you like a daily line of encouragement? If so, from where?
  `scripture (which translation?) · philosophy & literature · poetry · affirmations ·
  a specific author/thinker · none`.
- Any sources to *avoid*?

**Environment**
- What city/area are we in? (for weather) · Timezone · °F or °C

**Rhythm**
- When should I assemble "Today" and check in? (e.g. 7:00 am) · Any evening wind-down?
- How should reminders reach you? (nudge me, a Discord ping, quiet/no reminders)

**The bridge**
- How do you usually talk to me — Discord, text, voice, right here? (that's where updates
  come in; see §5)

**Access & tone**
- Anyone else who should see or update the board? (co-parent, nurse, grandparent)
- How should the board and I sound — clinical, warm, gentle, plain?

Write the answers to `PUT /config`. Re-run any part of this interview whenever they say
"change how CareBoard works."

---

## 2 · What you stand up

A tiny **local web server** + a **static board page** + a **local datastore** (SQLite or a
JSON file — your choice; the caregiver never sees it). It exposes the HTTP contract in §4 on
`http://127.0.0.1:<PORT>` (default **7797**), bound to localhost only. You may implement the
server in whatever you're comfortable with (a ~200-line Flask/FastAPI/Express app is plenty).
The **board page** is a single HTML file that reads `GET /today` and `GET /board` and renders
them; keep it calm and legible.

Make it **autorun on login** so it's always there. Example `launchd` plist:
[`examples/com.careboard.plist`](examples/com.careboard.plist) → drop in `~/Library/LaunchAgents/`,
`launchctl load` it.

---

## 3 · Data model

Keep it flat and forgiving. Suggested entities:

- **person** — `{ id, name, pronouns?, dob?, notes? }`
- **medication** — `{ id, name, dose, schedule (free text: "10mg nightly"), started?, stopped?, prescriber?, active }`
- **appointment** — `{ id, title, whenISO, location?, with?, notes?, calendar_event_id? }`
- **note** — `{ id, dateISO, body, tags[] (sleep|mood|meal|behavior|vital|general) }`
- **vital** — `{ id, kind (weight|temp|bp|…), value, unit, whenISO }`  *(only if tracked)*
- **contact** — `{ id, name, role (doctor|nurse|family|therapist), phone?, notes? }`
- **config** — the answers from §1 (tracked_types[], flavor{source, translation?, avoid[]},
  location, timezone, units, rhythm{assemble_time, reminders}, bridge, tone, access[])

Store timestamps in ISO 8601. Never delete silently — mark `active:false` / keep a trail.

---

## 4 · The endpoints (the contract)

Base `http://127.0.0.1:7797`. Local bearer token in `Authorization` (generated at setup,
stored in config). All bodies JSON.

| Method | Path | Purpose |
|---|---|---|
| `GET` | `/today` | Assembled daily view: meds due, today's appts, weather, the day's quote, open notes |
| `GET` | `/board` | Full current state (person, active meds, upcoming appts, recent notes, config) |
| `GET` `POST` | `/medications` | List / add. `PATCH /medications/{id}` update · `DELETE` deactivate |
| `GET` `POST` | `/appointments` | List / add. **POST also creates an iCloud event** (see §6) and stores its id |
| `GET` `POST` | `/notes` | List (`?date=` `?tag=`) / add a daily care note |
| `GET` `POST` | `/vitals` | List / add (only if tracked) |
| `GET` `POST` | `/contacts` | Care-team list / add |
| `GET` `PUT` | `/config` | Read / replace the customization from §1 |
| `POST` | `/ingest` | Freeform: `{ text }` — a raw caregiver message for you to parse into the above |
| `GET` | `/quote/today` | The day's line, per `config.flavor` |
| `GET` | `/weather/today` | Per `config.location` |

Full request/response examples live on the destination page (`index.html`) and in
[`examples/care-config.example.json`](examples/care-config.example.json).

---

## 5 · The ingest bridge (how talking becomes the board)

The caregiver already talks to you somewhere — Discord, SMS, voice, or directly. **That
channel is the input.** When a message arrives, decide if it's a care update; if so, turn it
into one or more API calls. Examples of the translation you perform:

- *"she has a new med, 10 mg melatonin at bedtime"*
  → `POST /medications {name:"Melatonin", dose:"10 mg", schedule:"nightly at bedtime", active:true}`
- *"appointment with Dr. Okafor next Thursday at 3, at the clinic"*
  → `POST /appointments {title:"Dr. Okafor", whenISO:"2026-07-30T15:00", location:"the clinic"}`
  (which also creates the calendar event)
- *"note: slept badly, woke twice"*
  → `POST /notes {body:"Slept badly, woke twice", tags:["sleep"]}`
- *"what's today look like?"* → `GET /today`, then read it back warmly.

Always confirm anything you inferred (dose, date) before writing. If the message isn't a care
update, ignore it — you're still their assistant for everything else.

---

## 6 · iCloud Calendar sync

Appointments should land on the caregiver's real calendar. Pick the path that works on their
machine (macOS):

- **EventKit (best):** a tiny signed helper (Swift/JXA) that adds an event to the chosen
  calendar; grant Calendar permission once. Returns an event id → store as `calendar_event_id`.
- **CalDAV:** an app-specific password + the iCloud CalDAV endpoint; create a VEVENT via HTTP.
- **AppleScript / JXA fallback:** `Calendar.app` `make new event` in the target calendar.

On `POST /appointments`: create the event, save its id, so edits/cancels stay in sync. Ask the
caregiver **which calendar** to write to during setup.

---

## 7 · The daily assembly

At `config.rhythm.assemble_time` (and on demand via `GET /today`), build the day:

1. **Meds due** today (from schedules).
2. **Today's appointments** (+ travel/lead-time nudge if far).
3. **Weather** for `config.location` — a one-line, human read ("cool and clear, jacket for
   the morning").
4. **The day's word** — one line from `config.flavor` (a verse in their translation, a
   Marcus Aurelius line, a poem fragment, an affirmation). Never preachy; just a small gift.
5. **Open care notes** worth carrying forward.

Deliver it the way they asked (a Discord message, a spoken summary, or just refreshing the
board). Keep it to something a tired person can read in fifteen seconds.

---

## 8 · Keep it warm, keep it safe

- Re-run §1 anytime the caregiver wants to change what's tracked or the daily flavor.
- If the board has been quiet for a while, a gentle "how's it going with [name]?" is welcome —
  a nag is not.
- Health-adjacent, not medical. When in doubt, surface to a human and say why.
- The board is for the household. Keep it local; keep it private.

---

*CareBoard is a Bridgewalker / QuietTools blueprint by Darien Bathalter. Built for one family,
offered to any. The destination page (`index.html`) is what a caregiver sees; this file is
what their agent follows.*
