diff --git a/README.md b/README.md index 1a78e81a..3109d182 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,108 @@ -# Practice-OS +
-## Text messages
+Every name on screen is fictional [Sample] data for the demo practice, Dana Reyes, LCPC (fictional demo practice).
-(The Front Desk helper is paused and hidden in the app for now.) The Front Desk helper texts people who call a practice line and leave a voicemail, to offer times for a free consultation. Scheduling only, never marketing. Reply STOP to opt out, HELP for help. Message and data rates may apply. During the demo, the practice (Reyes Counseling) is fictional and texts go only to the developer's own phone.
+
+
Board |
Calendar week |
+|
Overview: where referrals come from |
Call script |
+|
A drafted letter waiting for her OK |
Ask Aeon |
+|
Map (the [Sample] partners have no street address, so they list as "Chicago only") |
Onboarding |
-A chatbot gives advice. Aeon runs the business side of the practice.
+Dark mode versions of each are in [docs/screenshots/readme](docs/screenshots/readme).
-- **It works while she's away.** Deadlines are tracked and follow-ups are lined up without anyone asking.
-- **It remembers her practice.** Her fees, hours, payers and decisions carry over from one day to the next.
-- **Its rules have sources.** Every deadline carries the official link, the quoted rule and the date it was last checked.
-- **Its safety is built for therapy.** A plain-code crisis check runs before the model on every message, and Aeon never gives therapy advice.
-- **It finishes the paperwork.** Good Faith Estimates, superbills and credentialing forms come out filled in, ready for her to check and submit.
-- **It runs on her own computer.** Her records stay in one folder on her machine, with her own accounts and keys.
+## Safety by design
-## Install
+These are plain code, not prompts, and they run whether or not the model behaves.
+
+- **Approval gate.** Agents and tools only add rows to `approvals`. Nothing is sent, posted or booked until she approves it, and executors (`lib/executors/`) are the only code that acts. Every decision is written to `audit_log`.
+- **Crisis check before every model call.** `lib/safety.ts` runs on every message and every debrief transcript. Any mention of self-harm, suicide or danger gets a fixed reply (call or text 988; 911 for emergencies) and an urgent alert, before the model sees anything.
+- **Local privacy guard.** `lib/aeon/guard.ts` checks her messages, each tool result, each memory and Aeon's reply: plain-code rules plus a small name-finding model (`lib/aeon/phi-classifier.ts`, bert-base-NER) that runs on her machine. Text is never sent anywhere to be checked, and if the model can't load the text is refused. Until there is a BAA, no client names or details reach the model.
+- **No fees or gifts for referrals.** Letters, scripts and debrief notes are checked in plain code (`lib/referrals/value-check.ts`) so nothing of value is ever tied to a referral.
+- **`DRY_RUN=true`** makes executors log instead of act.
+
+This is not a claim of HIPAA compliance. It is a design that keeps client details away from the model and keeps her records on her own computer.
+
+## How it uses Meta's models
+
+All calls go through `lib/meta.ts` (base URL `https://api.meta.ai/v1`, her own key), and each one writes a row to `practice_os.model_calls`.
+
+| Model | What it does here |
+|---|---|
+| `muse-spark-1.3` | Aeon's chat and tool calls (`lib/aeon/agent.ts`), drafting outreach letters (`lib/referrals/outreach.ts`), filling the partner profile from a cleaned debrief through one tool call (`lib/referrals/debrief.ts`) and the memory reflection pass (`lib/aeon/reflect.ts`). The partner ranking and the call scripts are plain code. |
+| `muse-voice-transcribe-1.0` | Transcribes the coffee debrief (`lib/referrals/debrief.ts`) and the dictation mic in the message box. |
+| `muse-image-1.0` | Images for the Media helper (`lib/growth/image.ts`, `lib/instagram/graphic.ts`), which is switched off in this demo. |
+
+## Architecture
+
+```mermaid
+flowchart LR
+ C[Clinician in the browser] --> UI[Next.js app