A portfolio project for a Forward Deployed Engineer role at Wispr. It deploys a voice dictation product (modeled on Wispr Flow) to a large, regulated customer: user provisioning from Okta or Microsoft Entra ID, pre-flight checks that catch rollout blockers before go-live, macOS device checks, an adoption dashboard, and an LLM-built dictation vocabulary per department, measured with a real speech model.
It is not affiliated with Wispr. The "Flow" backend here is a mock I built to behave the way a real SCIM provisioning backend does. Everything public about Wispr that it relies on is linked to its source.
Live demo: https://flow-enterprise-rollout-production.up.railway.app It opens on the AI part: how each hospital department's documents became a dictation vocabulary, including Claude's draft, the safety checks, the Whisper measurements and each round of Claude learning from its failures. The rollout dashboard is the second tab.
| Problem | Buying Flow is the easy part. Getting 2,000 hospital staff onto it is where rollouts stall: thousands of accounts to create and remove as people join and leave, a messy tenant (self-serve signups, an acquired company's email domain, too few seats), Mac permissions MDM can't pre-grant, teams that never start using it, and medical jargon that general speech models misspell. |
| Solution | A kit that automates and de-risks each step: SCIM provisioning that handles Okta's and Entra's differences, a pre-flight check that predicts failures before each wave, device checks tested against the real Flow app, a dashboard that finds stuck teams, and a vocabulary builder that turns each department's documents into a Flow dictionary import. |
| Where the AI is | Claude curates a vocabulary for each department from the customer's own documents. It picks the terms a speech model will get wrong, fixes their spelling and suggests likely mishearings. The code checks the output: every term must appear in the source documents, and no correction may rewrite an ordinary English word. The result is scored by transcribing synthetic dictation with a local Whisper model. |
| Skills demonstrated | Enterprise deployment work (identity, SCIM, MDM, security review), putting guardrails around LLM output, measuring a speech system's accuracy, and reading vendor docs closely enough to reproduce their wire formats. |
Sorted by how solid each finding is.
Measured. From real runs; the prompts, responses and scores are committed in
data/vocab_results/.
- A per-department vocabulary roughly doubles jargon accuracy. On held-out sentences (96 jargon terms, three departments), terms spelled right went from 44/96 (46%) with no vocabulary, to 77/96 (80%) with a rule-based one, 88/96 (92%) with Claude's first draft, and 91/96 (95%) after Claude learned from its failures. Emergency Medicine went from 24% to 97% ("tenecteplase" stopped coming out as "to neck to place").
- The vocabulary has to be per department, which makes it a deployment decision. One hospital-wide list scored 58%: Whisper only reads about 224 tokens of vocabulary, and a shared list spends them on other departments' words. So vocabularies should follow each person's department, which the identity provider already sends over SCIM. This is what ties the rollout half of the kit to the AI half.
- Prompt engineering mostly bought safety, not accuracy. Same model, same documents: a naive prompt invented 6 terms and proposed 35 unsafe correction rules (including "psoriasis" to "sepsis"); the engineered prompt invented none and proposed 4. Accuracy differed less (88% vs 91%), and the naive prompt's own corrections lowered its score.
- Learning from failures works when the speech model's mistakes repeat, not when they vary. Held-out gains from the improvement loop: Emergency Medicine +2 terms, Radiology +1, Revenue Cycle 0. A consistent mishearing ("phosphonotone" for fosphenytoin) could be corrected; a name garbled differently each time ("Etxeberia", "A. Cheberria") could not. The held-out split is what shows this; practice scores alone (up to 100%) overstate it.
- Claude showed useful judgment, and the code still has to back it up. It declined to map "Sue" to the billing modifier XU (staff say "Sue"), and it removed a rule from its own first draft that would have rewritten "CPT" into "CPC". The code check had let that rule through, so model judgment is not a safety system on its own.
- My safety check caught the diagnosis swaps partly by accident. It blocks corrections that rewrite dictionary words, and the macOS dictionary happens to include "psoriasis" and "sepsis". Modern drug names such as hydroxyzine and hydralazine (a known sound-alike pair) aren't in it. docs/clinical-safety.md lists the gaps and what a clinical-grade version needs: ICD-10-CM, RxNorm and a clinician's sign-off.
- A vocabulary can hurt as well as help. With "HCC" and "HCPCS" both in the prompt, Whisper produced "HCCPCS", a blend of the two; and a harmless-looking correction such as "aspects" to "ASPECTS" (a stroke score) would capitalize the everyday word in every note. A test for the second caught a real bug in my first version.
- The pre-flight check predicts rollout failures exactly. It flagged "57 seats needed, 50 on the contract", and assigning the wave anyway produced exactly 7 rejections.
- Checking the real app beats trusting docs from memory. Reading the notarized Flow app showed that MDM can't pre-approve the microphone, and that Flow updates itself in place (so root-owned installs prompt standard users for an admin password). Wispr's MDM guide confirms both.
Shown by design. Working code, but not run against real systems or real users.
- Okta and Entra ID don't speak the same SCIM. Entra sends
"active": "False"as a string and removes group members with a value list unless a tenant flag is set; Okta never deletes users. The simulator reproduces each vendor's documented requests, but not against real tenants. - The dashboard finds stuck teams (Legal & Compliance: 1 of 7 activated) from synthetic usage data. It shows the method, not a finding about real hospitals.
What this does not prove.
- Not Wispr Flow's accuracy. Whisper stands in for Flow's recognizer, and the CSVs are formatted for Flow's dictionary import but haven't been imported into Flow.
- Not real clinicians. The audio is two computer voices, not people dictating in a busy department.
- Not the size of the effect. 26 to 38 terms per department shows the method works.
- Not clinical-grade safety. See docs/clinical-safety.md.
- Not adoption. Whether better accuracy gets a stuck team using Flow is the next pilot.
A 2,000-person hospital buys Flow. The purchase is the easy part. What decides whether the deal renews is the next 60 days:
- Accounts. IT will not hand-create 2,000 accounts, and security will not
sign off unless leavers lose access automatically. That means SCIM
provisioning from their identity provider, and every IdP speaks SCIM a little
differently. Entra ID, for example, sends
"active": "False"as a string unless a tenant flag is set. - The tenant is already messy. Clinicians signed up on their own with work emails months ago. An acquired clinic group is on a different email domain. The seat count on the contract was negotiated before anyone counted.
- Devices. Dictation needs Accessibility and Microphone permissions on every Mac. MDM can pre-approve Accessibility, but Apple does not let MDM pre-approve the microphone, so every user sees at least one prompt. Standard users on a root-owned install can hit an admin password prompt when the app updates itself.
- Adoption. Three weeks in, one department is at 90% daily use and another never started. Nobody notices until the renewal call.
Each of these turns into a stalled rollout, a pile of support tickets, or a security finding. This kit handles each one in code, with tests.
For the customer, time saved only counts once people actually use the product. An illustrative calculation (assumptions, not measurements): 1,000 clinicians who each save 15 minutes a day on documentation, 220 working days a year, is about 55,000 hours a year. Every week the rollout slips pushes that value back, and a department stuck at 14% activation delivers almost none of it.
For Wispr, a clean rollout is what lets seat expansion happen: the pilot turns into Wave 1, Wave 1 into the whole organization. The same problems come back at every enterprise customer, so each fix here is also a candidate product feature (see what should become product).
| Piece | What it does | Where |
|---|---|---|
| Mock Flow SCIM server | SCIM 2.0 (RFC 7643/7644) users and groups, filters, PATCH, discovery, bearer auth, seat limits, verified domains, audit log, 429 throttling | src/flowscim/ |
| IdP simulator | Plays the customer's HR roster through Okta's or Entra ID's exact provisioning behavior, including Entra's documented non-standard requests | src/rolloutsim/clients.py, engine.py |
| Pre-flight checks | Before each wave: seat shortfall, unverified domains, self-serve accounts that will be linked, unmanaged accounts, duplicate emails | src/rolloutsim/preflight.py |
| Adoption dashboard | Seats, activation, weekly use by department and wave, with specific advice for stuck teams; audit trail including rejected requests | /admin on the server |
| macOS MDM kit | Accessibility (PPPC) profile generator and a device readiness check, both verified against the real notarized Flow binary | mdm/macos/ |
| Vocabulary builder (AI) | Mines each department's documents for jargon, has Claude curate it into ranked terms and corrections, validates them, and writes Flow's dictionary CSV import. Measured with Whisper | src/flowvocab/ |
| Runbook | Discovery questions, phases, comms, success metrics, rollback | docs/runbook.md |
| Security questionnaire | Draft answers for a hospital's security review, each tied to Wispr's published docs | docs/security-questionnaire.md |
| Real IdP setup | Pointing a real Okta or Entra ID tenant at the mock | docs/real-idp-setup.md |
flowchart LR
HR[HR roster CSV] --> DIR[Directory + rollout plan]
DIR --> ENG[Provisioning engine]
ENG -->|Okta dialect| OKTA[OktaClient]
ENG -->|Entra dialect| ENTRA[EntraClient]
OKTA -->|SCIM 2.0 over HTTP| API
ENTRA -->|SCIM 2.0 over HTTP| API
PRE[Pre-flight checks] -->|read-only| API
subgraph Flow mock
API[SCIM API] --> STORE[(SQLite: users, groups, audit, usage)]
ADMIN[Admin API + dashboard] --> STORE
end
TEL[Synthetic usage telemetry] --> ADMIN
MDM[MDM kit: PPPC profile + device check] -.-> MAC[Managed Macs]
The provisioning engine does what an IdP provisioning job does on every cycle:
match in-scope users by userName (and link existing accounts instead of
duplicating them), create or update users, deactivate users who left scope,
delete them if the IdP does, then reconcile group membership. It keeps its own
record of what it last pushed, as the IdPs do, so a re-sync with no directory
changes sends zero writes.
You need: macOS (the MDM checks and the speech evaluation use codesign,
plutil and the say voice), Python 3.11 or newer, and
uv. Everything else is installed by uv.
# 1. Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. Get the code and install dependencies (creates .venv/)
git clone <this repo> flow-enterprise-rollout && cd flow-enterprise-rollout
make install # uv sync --all-extras
# 3. Check it works
make test # 87 tests, about 10 seconds, no network or keys needed
make demo # the full rollout in the terminal, under a second
# 4. Optional: the Claude-backed vocabulary curator
cp .env.example .env # then paste your ANTHROPIC_API_KEY into .env (git-ignored)| Command | What it does |
|---|---|
make demo / make demo-entra |
Full rollout with Okta or Entra ID behavior (demo-entra also prints sample requests) |
make dashboard |
Runs the rollout and keeps the server up; open the printed URL |
make vocab / make vocab-claude |
Build department vocabularies with rules or with Claude |
make vocab-eval |
Score them with synthetic dictation and local Whisper (about 2 minutes; first run downloads a 145MB model) |
make profile / make check-device |
Build the macOS Accessibility profile / check this Mac |
make lint |
ruff |
uv run rolloutsim demo --keep-running --public-dashboard |
The hosted demo locally: replays the rollout, then serves a read-only dashboard at / |
Presenting this project? See the demo walkthrough.
Running at https://flow-enterprise-rollout-production.up.railway.app (Railway). The Docker
image replays the full Northwind Health rollout into the SCIM mock at startup, then serves
the vocabulary story at /vocabulary (from the committed runs in data/vocab_results, so
it needs no API key) and the adoption dashboard read-only at /admin, with a banner saying so. The SCIM and admin
APIs keep random tokens that are never printed, so they stay closed to visitors.
- Render (free tier): push to GitHub, then New > Blueprint and pick the repo;
render.yamlsets it up. Free services sleep when idle; on wake the rollout replays in about a second. - Anywhere else:
docker build -t flow-rollout . && docker run -p 8000:8000 flow-rollout, or point Railway or Fly.io at theDockerfile.
make demo starts the mock on a local port and runs the Northwind Health
rollout (62 employees, 3 waves, a 50-seat contract). The data is in data/.
- The tenant before rollout. Three employees already signed up on their own, one of them with a mixed-case email.
- Pilot (Clinical Informatics). Pre-flight passes. 8 users are created and the group is pushed. A second sync sends 0 writes.
- Wave 1 (Emergency Medicine, Radiology). Pre-flight blocks: 4 clinicians
are on
northwindclinics.com, a domain from an acquisition that isn't verified. After it is added, 22 users are created and the self-serve accountWen.Chen@NorthwindHealth.orgis linked, not duplicated. - Wave 2. Pre-flight blocks: 57 seats needed, 50 on the contract. The demo
assigns the wave anyway and gets exactly 7
403rejections. The seat limit is then raised and the next sync provisions the 7 without any manual cleanup. - HR lifecycle. A joiner is created, a mover changes department and group,
and a leaver is deactivated and their seat released. When the IdP later
hard-deletes the leaver, Entra ID sends
DELETE. Okta never does, so the account stays deactivated. - Adoption. Synthetic usage telemetry shows Legal & Compliance stuck at 14% activation, and Revenue Cycle activating but dropping off. Both are flagged with a next step.
- Dashboard at the printed URL.
Dictation fails on exactly the words that matter in a hospital: drug names (iohexol, tenecteplase), scoring systems (LI-RADS, NIHSS), doctors' names (Okonkwo, Wierzbicki), and internal systems (NorthStar PACS, ClaimBridge). Flow lets a team import a dictionary as a CSV (docs). The question an FDE has to answer is which words to put in it for each team.
flowchart LR
DOCS[Department documents] --> MINE[Mine candidates<br/>not-English words, acronyms, names]
MINE --> CUR{Curate}
CUR -->|baseline| RULES[Rule-based ranking]
CUR -->|AI| CLAUDE[Claude: pick, fix spelling,<br/>rank, suggest mishearings]
RULES --> VAL[Validate<br/>must appear in the documents<br/>no rewriting common words]
CLAUDE --> VAL
VAL --> CSV[Flow import CSVs<br/>vocabulary + corrections]
VAL --> EVAL[Evaluate: macOS TTS audio<br/>to local Whisper, scored]
- Mine (
candidates.py): high recall and deliberately simple. Anything that isn't a dictionary word becomes a candidate (as do acronyms, CamelCase product names, and names after "Dr."), kept with the sentences it came from. - Curate (
curate.py): the rule-based curator drops compounds of common words and ranks by type. The Claude curator (claude-opus-5, JSON-schema structured output,fallbacks: "default"so a safety decline reroutes instead of failing) reads the candidates and the full documents. It picks the terms a general speech model will miss, joins names the miner split (a first and last name with no "Dr." in front), ranks by priority, and proposes up to three mishearings for each term. - Validate: every term must appear in the customer's documents (so invented terms are dropped and logged as possible hallucinations). No correction may rewrite an ordinary English word. Flow's import limits (60 characters, 1,000 rows) are enforced.
- Export (
export.py):<dept>-<curator>-vocabulary.csv(one column),<dept>-<curator>-corrections.csv(misheard phrase, correct spelling), and a JSON report listing everything that was rejected and why. - Evaluate (
evaluate.py): 34 dictation sentences with 96 marked terms (data/dictation_eval/), spoken by two macOS voices and transcribed byfaster-whisper(base.en, CPU). The vocabulary goes into Whisper'sinitial_prompt, which biases the recognizer toward listed spellings the way a product dictionary does, within a budget of about 200 tokens. Scores: share of marked terms spelled correctly, and word error rate.
uv sync --all-extras # adds anthropic + faster-whisper
uv run flowvocab build --curator rules # offline baseline
cp .env.example .env # then add your key; .env is git-ignored
uv run flowvocab build --curator claude # reads ANTHROPIC_API_KEY from .env
uv run flowvocab build --curator claude-naive # the first-draft prompt, for comparison
uv run flowvocab eval # about 4 minutes; writes data/vocab_results/eval.md| Vocabulary in the prompt | Jargon spelled correctly | Word error rate |
|---|---|---|
| None | 44/96 (45.8%) | 25.7% |
| Organization-wide list (one list for everyone) | 56/96 (58.3%) | 19.7% |
| All mined candidates for the department | 80/96 (83.3%) | 12.6% |
| Rule-based vocabulary for the department | 77/96 (80.2%) | 12.1% |
| Claude vocabulary, naive prompt | 84/96 (87.5%) | 10.3% |
| Claude vocabulary, naive prompt + its corrections | 82/96 (85.4%) | 9.6% |
| Claude vocabulary, engineered prompt | 87/96 (90.6%) | 10.9% |
| Claude vocabulary, engineered prompt + corrections | 88/96 (91.7%) | 10.7% |
What the engineered prompt changed (same model, claude-opus-5, same documents, same
output schema; the naive prompt is the documents plus a one-line ask). Across the three
departments the naive prompt returned 6 terms that aren't in the documents ("thyroid
nodule", "denial reason code") and 35 correction rules the validator had to remove,
including swaps between real diagnoses such as "choledocholithiasis" to "cholelithiasis"
and "psoriasis" to "sepsis". The engineered prompt returned none that weren't in the
documents and 4 unsafe corrections. Accuracy differs less (90.6% vs 87.5%), and the naive
prompt's own corrections lowered its score. The prompt's main job is safety. The hosted
demo's vocabulary page walks through all of this per department, with the exact prompts and
responses.
flowvocab improve measures a vocabulary on practice sentences (data/dictation_practice),
sends Claude the terms Whisper still got wrong with exactly what it wrote, validates Claude's
revision, and repeats. The held-out sentences (data/dictation_eval) are never shown to
Claude and never used to choose a version; they only report whether a round generalized.
| Department | Practice, draft to best round | Held-out, draft to best round |
|---|---|---|
| Emergency Medicine | 34/38 to 38/38 | 35/38 to 37/38 |
| Radiology | 30/32 to 32/32 | 29/32 to 30/32 |
| Revenue Cycle | 24/26 to 25/26 | 24/26 to 24/26 |
It helped where the speech model made consistent mistakes ("phosphonotone" for fosphenytoin), and not where it made different ones each time (the held-out sentences turned "Etxeberria" into "A. Cheberria", unlike practice). Claude also declined fixes that weren't safe: it would not map "Sue" to the modifier XU, because staff say "Sue", and it removed a rule from its own first draft that would have rewritten "CPT" into "CPC". Every round's failures, changes, reasons and API request are on the vocabulary page.
By department (no vocabulary, then rule-based): Emergency Medicine 24% to 82%, Radiology 41% to 78%, Revenue Cycle 85% to 81%. Codes such as CO-197 are already easy for Whisper, and one blend ("HCCPCS") shows a crowded prompt can cost accuracy.
Clinical safety is a proof of concept. The validator blocks corrections that rewrite common English words; it does not know drug or diagnosis names, and it caught the diagnosis swaps above partly because the macOS dictionary happens to include old medical words. docs/clinical-safety.md lists the gaps and what a production version would check against (ICD-10-CM, RxNorm and others), plus clinician sign-off.
Caveats, stated plainly. The audio is synthetic speech, not clinicians in an
emergency department. Whisper base.en is not Flow's recognizer. With these
small documents, every mined candidate fits in the prompt, so ranking only
matters under budget pressure (the organization-wide row). The test set is 34
sentences. The results show direction and size, not a production number. The
next step at a real customer would be the same harness on a few hundred
recorded, consented dictations.
$ make test
87 passed in 9.2s
- Protocol tests (
test_filter.py,test_patch.py): every PATCH example from Okta's and Microsoft's SCIM documentation, copied verbatim, plus RFC filter semantics and invalid-input cases. - API tests (
test_scim_api.py): auth, uniqueness, pagination, projections, seat and domain rules, soft delete, groups, audit, rate limiting. - End to end (
test_e2e_rollout.py): the whole rollout above over real HTTP against a live server, once each for Okta, Entra ID and Entra ID with the compliance flag. The server's state is checked independently of the simulator. The test also checks the simulator really spoke each vendor's dialect on the wire, and that the IdP backs off and completes when the server throttles it. - Vocabulary builder (
test_vocab.py): mining, rule curation, the validator (invented terms, unsafe corrections, length limits), the exact request sent to Claude (model, structured-output schema, fallbacks) using a fake client, refusal and truncation handling, the CSV format, and the scoring functions. No network or API key needed. The speech evaluation itself runs throughflowvocab eval. - MDM (
test_mdm.py): the profile passesplutil -lintand its code requirement is satisfied by the real Flow app (codesign -R). The device check passes on the real app and fails correctly on a different app, an old version, a root-owned bundle, and a missing install. The real-app tests mountvar/Flow.dmg(download) and skip if it is absent.
| Real | Simulated |
|---|---|
| SCIM 2.0 protocol handling, over real HTTP | Wispr's backend (no public admin API exists; this is a stand-in) |
| Okta and Entra ID request shapes, from their docs | The IdPs themselves (see real IdP setup to use real tenants) |
| Flow's bundle ID, Team ID and code requirement, read from the notarized binary | Usage telemetry (deterministic synthetic data) |
Profile validity (plutil) and signature checks (codesign) |
The customer, its roster and its departments |
This is the knowledge that makes an FDE useful on a customer call, and the simulator encodes all of it:
| Okta | Entra ID (default) | Entra ID with aadOptscim062020 |
|
|---|---|---|---|
| Find a user | userName eq with startIndex/count |
userName eq |
same |
| Profile update | GET then full PUT |
PATCH, one op per attribute |
PATCH, path-less op with dotted keys |
| Deactivate | {"op":"replace","value":{"active":false}} |
{"op":"Replace","path":"active","value":"False"} (string) |
boolean false |
| Hard delete | Never sends DELETE |
DELETE /Users/{id} |
same |
| Remove group member | members[value eq "id"] |
path: "members" with a value list |
members[value eq "id"] |
| Manager | Not sent by default | Follow-up PATCH, id as a bare string |
same |
| Op casing | lowercase | Add / Replace / Remove |
lowercase |
Sources: Okta SCIM guide, Entra SCIM tutorial, Entra SCIM compliance issues.
- "Just assign everyone today." Pre-flight shows exactly who would fail and why. Going ahead means a batch of provisioning errors and users who can't log in on day one. Fix the seats and domains first, then assign. The demo shows both paths.
- "Delete the self-serve accounts and start clean." Linking keeps those users' dictionaries and history. They are your champions, so don't make them start over.
- "Turn on Context Awareness for the clinical wave." It reads text from the active app to improve accuracy, which in an EHR is PHI. That needs a decision from the privacy officer under the BAA first, not a default. (security questionnaire)
- "Push the microphone permission silently." Apple does not allow it for third-party apps. Plan a 30-second "click Allow" step in the launch communications instead.
Things every enterprise rollout will run into, which I would bring back to the product team:
- A provisioning dry-run in the admin portal. Given an IdP group, show the same results as pre-flight: seats, domains, accounts that will be linked. Rollout surprises become a checklist.
- Seat-limit behavior options. Hard reject (today's mock), soft overage with alerting, or auto true-up. It is a commercial decision, but the product should offer the choice.
- An adoption API or export by IdP group and department. Customer success and the customer's IT team need to find stuck teams without screenshots.
- Offboarding SLA reporting. Security asks "how fast is a leaver cut off?" The audit log already has the data; show it as a metric.
- A published device health check. Ship the readiness script (or the same checks in the app) so IT can see which Macs have Accessibility off, the wrong architecture, or a root-owned bundle.
data/ fictional customer: HR roster, rollout plan, simulation inputs
docs/ runbook, security questionnaire, real IdP setup
mdm/macos/ PPPC profile builder, device readiness check
src/flowscim/ mock SCIM server, admin API, dashboard
src/rolloutsim/ directory, Okta/Entra clients, sync engine, pre-flight, usage, demo
src/flowvocab/ vocabulary mining, rule and Claude curation, validation, export, speech eval
data/customer_docs/ department documents the vocabularies are built from
data/dictation_eval/ dictation sentences with scored terms marked
tests/ protocol, API, end-to-end and MDM tests
- The mock is single-process SQLite. It is built to be correct, not to scale.
- The dashboard login is a shared admin token in a cookie. In production it would sit behind the vendor's SSO.
- SAML SSO configuration is covered in the runbook, not simulated in code. Wispr configures it in their admin portal.
- The Windows rollout (MSI via Intune) is documented in the runbook but has no scripts here, because I could not test them on this machine.


