Skip to main content

Onboarding playbooks

Get a new clinic โ€” or a white-labeled app โ€” live end-to-end. ๐Ÿค– agent ยท ๐Ÿ‘ค staff-delegatable ยท ๐Ÿง‘โ€๐Ÿ’ป George/engineering.


1. New clinic onboarding (materials โ†’ configured clinic)โ€‹

The full path proven on Optimal Performance. A clinic hands over its materials; Atlas/agent imports them; staff reviews + flips live.

Steps

  1. Collect materials โ€” intake/consent forms, protocols, fee schedule/billable codes, brand assets, staff roster + roles, hours/locations, membership tiers, KB docs, sample lab/VO2max/DEXA reports.
  2. Forms โ†’ basis-functions/tools/import_clinic_forms.py โ€” imports PDF/docx forms into clinicsv2/{c}/settings/onboarding (canonical), inactive by default. ๐Ÿค–
  3. Protocols โ†’ basis-functions/tools/import_clinic_protocols.py โ€” validates against the real activity catalog; templates land at clinicsv2/{c}/protocols/{id}. ๐Ÿค–
  4. Knowledge base โ†’ basis-functions/tools/ingest_clinic_kb.py โ€” KB entries (audience-tagged clinic/consumer), auto-embedded for Atlas retrieval. ๐Ÿค–
  5. Fee schedule / billing codes โ†’ import into settings/reimbursement.billingCodes (used by superbills + claims). ๐Ÿค–
  6. Labs/metrics โ†’ verify the analytes they order are supported (docs/claude/labs.md); new analytes follow the ONE-way lab rule (CLAUDE.md). ๐Ÿค–
  7. Verify โ†’ basis-functions/tools/verify_op_forms_config.js (forms), assign a test protocol via assign_clinic_protocol.js. ๐Ÿค–
  8. Review + go-live โ€” staff reviews the inactive imports in Settings and flips them live. ๐Ÿ‘ค
  9. Feedback โ€” post-onboarding feedback sequence (how was it / what to improve) โ†’ rolls to the COO dashboard. ๐Ÿ‘ค

Reference: OP onboarding session (memory), docs/claude/onboarding.md, docs/claude/clinic-forms notes.


2. White-label standalone appโ€‹

Give a client their OWN branded app in the App Store. Two layers โ€” runtime branding (no build) + standalone binary (build + Apple).

Canonical runbook: docs/claude/white-label-runbook.md (spec sheet + per-client instances). Read it first.

Steps

  1. Spec sheet โ€” client fills brand name, bundleSuffix (โ†’ io.<brand>.app), colors/fonts/mode, logo, sections, privacy-policy URL, demo account, clinic binding. ๐Ÿ‘ค/๐Ÿง‘โ€๐Ÿ’ป
  2. Runtime branding โ€” set clinicsv2/{c}/settings/branding (logo/colors/fonts/toggles) in the branding editor โ€” applies live, no build. ๐Ÿค–/๐Ÿ‘ค
  3. Flavor build โ€” add the flavor row in hybrid/sh/flavor.sh, generate icon/splash, build the flavored IPA (sh/build_ipa.sh --flavor <brand>). Extensions stripped (no Family Controls approval wait). ๐Ÿค–
  4. Apple account steps โ€” register the bundle ID (HealthKit + Push ONLY), provisioning profile, App Store Connect record. Click-by-click, delegatable: engineering/white-label-apple-checklist.md. ๐Ÿ‘ค/๐Ÿง‘โ€๐Ÿ’ป (needs Apple org access)
  5. Submit โ€” per the runbook's App Store Connect submission checklist (privacy declarations pre-written). ๐Ÿ‘ค

Do NOT register the 3 DeviceActivity extension IDs (stripped from white-label builds โ€” corrects the old #557 checklist).

Tools: hybrid/sh/flavor.sh, sh/build_ipa.sh, the branding editor (basisflow-web Settings). Instances tracked: Hatter Labs (internal), Optimal Performance (#605).


3. Intake-form โ†’ service mapping (required forms before appointment)โ€‹

Assign forms a client must complete for a service (soft enforcement โ€” book, then reminders). Configured in the service editor (service.requiredForms); the client gets email + task; staff sees incomplete forms on the booked appointment. See #591 (client surfaces), docs/claude/onboarding.md.