# Acceptance

Balm's acceptance is the journey each clause of [CONTRACT.md](CONTRACT.md) names, run through a public door: the app, `/book`, `/intake/<token>`, the portal, the API or the `rer` commands, with fakes only at the paid or network edge (clearinghouse, card processor, SMS, fax and mail sandboxes). A clause is accepted when its journey passes, not when code exists. The status beside each clause mirrors the builder-owned Status table in CONTRACT.md, including the AGENT-004 denial assertion and archive proof round on 27 October 2026; the table began at commit `1744e3a2470ba3b8d3e57a5f0122f0171938b1ba` (17 October 2026). Its current counts are: 69 done, 49 partial and 7 missing of 125 clauses.

## First release

These journeys are accepted and covered by `tests/balm.test.mjs`, `tests/schedule.test.mjs`, `tests/payments.test.mjs`, `tests/charting.test.mjs` and `tests/archive.test.mjs`:

- The owner sets up the clinic (name, time zone, services, practitioners and their weekly hours) and invites practitioners and reception, who each see and change only what their role allows.
- A new client books online at `/book` from the practitioner's real open times, gets a private link to the intake form, and sends it once; a taken slot is refused, even when two people race for it.
- Staff work from a day or week calendar by practitioner or room, move visits by drag or form, and book recurring series whose conflicting dates are shown before saving; a canceled visit is offered by email to the waitlist and the first acceptance is booked.
- A practitioner reads the intake and writes a treatment note for their client. Only that practitioner and the owner can read it; amendments keep every earlier revision.
- Reception or the owner prepares the invoice for an attended visit, a person approves it, and it is numbered and exported as the same bytes every time; payments received elsewhere are recorded once per reference.
- On a self-hosted install connected to the clinic's own Stripe account, a patient saves a card from their private link with the clinic's authorization, the desk checks them in and charges the copay in one action with a receipt, an approved invoice is paid by the card or from a pay link sent by email, each payment posts to invoices once, and the patient opens a statement across visits and per-visit superbills (CPT, ICD-10, NPI, tax ID) as PDFs. RER Managed says online payment is not available yet.
- A practitioner writes a note from the visit's PT, OT or speech template, signs the exact latest revision with name and credentials (refused while a required section is empty), and later adds signed addenda to the locked note; CPT minutes give 8-minute-rule units on the note and its invoice; a plan of care is signed by its therapist and certified once by the referring physician from a private link, shown as signed or not on the case and the schedule; and the scribe drafts an unsigned note from dictation with the install's own AI key.
- An agent key can prepare invoices, appointment reminder text and new intake-form versions; only a signed-in person approves them, and each approval is recorded with the digest of what was approved. Agents never read notes or intake answers.
- Every opening of a client file, every read of intake answers or notes, every change, download and agent read appears in that file's access audit, which only the owner reads.
- The owner moves patients in from a documented-shape Cliniko patient CSV: preview, apply that exact preview, read the journal with the original file, and undo it without losing clients who have since been booked or edited.
- The owner exports and restores the whole clinic with `rer export` / `rer import` (damaged archives and populated destinations are refused), backs up a hosted clinic with `rer run backup:hosted` (an owner-only SQL file of the hosted database) and restores it into a fresh copy with `rer run restore:hosted`, and erases a client or staff member who has no health records, fenced against older backups.

The original release did not promise insurance claiming, text delivery, a patient portal, telehealth video or multi-location clinics. The current code adds partial insurance workflows, consented texts through the configured SMS adapter and a patient portal; live SMS still requires the clinic's A2P registration and credentials. Telehealth is missing and multi-location scheduling remains incomplete. The target below retains every requirement; prescribing and clinical decision support remain outside scope (see the contract's Honest boundaries).

# Target journeys

Each clause below is listed with its status and the journey that accepts it.

## Clinic setup, roles and security

- **BALM-001 — Live roles and server-side authority** (done). Call every page and handler signed out, as each role, with a deactivated staff member and with a revoked or foreign agent key; each is refused or scoped by role, and an agent-prepared item is approved only by a signed-in person whose approval records the digest. The BALM-001/SCHED-002 journey in `tests/schedule.test.mjs` also asserts default desk-only copay details and audited, revocable, named-practitioner balance visibility without broader patient scope or payment powers.
- **SETUP-001 — Clinic, services, practitioners and hours** (done). From a fresh install, complete the checklist through the app, invite a practitioner and a receptionist, and see the public booking page offer only the practitioner's hours.
- **ROLE-002 — Billing, assistant, student and supervisor roles** (done). Sign in as each new role and attempt every read and write in the access matrix; allowed actions succeed, others are refused with no write, and each refusal is audited. Sign in as the biller and open `REPORT-002`'s financial reports.
- **SEC-001 — Two-step sign-in and session control** (done). Enforce two-step sign-in, sign in with and without the second step, let a session idle past the timeout, and sign out a device remotely; the next request from each refused session is denied.
- **SEC-002 — Public doors that refuse abuse** (done; `tests/security.test.mjs`, SEC-002). Post to booking, intake, portal sign-in/confirmation and payment (including document) doors cross-origin and see refusal without effects. Race online bookings and keep at most three future pending visits per normalized email. Exhaust address and patient quotas through public requests, including missing-email records and forwarded-header changes in local mode; denial causes no booking, intake, payment, session, audit or provider-send effect and echoes no patient or clinical data. Portal sign-in preserves its generic notice. Inspect secret-salted hashed counters and bearer-token storage/expiry; replay a submitted intake and a consumed portal link and see both refused.
- **US-001 — US clinic defaults** (done). Set up a clinic in America/Chicago, book, invoice and import a patient file with US dates; every screen, file and message shows USD, en-US dates, +1 numbers and the practice's EIN and NPI. `tests/setup.test.mjs` exercises clinic identity, invalid EIN/NPI/state/ZIP refusal, US availability and booking, +1 storage, an immutable USD invoice and MM/DD/YYYY import. `tests/payments.test.mjs` exercises statement, receipt and superbill output. Product use at 1440 and 390, 19 October 2026.
- **OWN-001 — Owned, open-source and free** (partial). Install from a clean checkout with the documented commands, run the clinic loop, and observe no outbound request other than the declared integrations the owner enabled. With no hosting record, attempt real-patient creation through the app, `/book`, intake, import and migration and see each refused; complete and remove the hosting record and verify the audited real-patient switch and renewed refusal required by `HIPAA-005`. Acceptance depends on both no undeclared outbound requests and `HIPAA-005` real-patient gating; a no-outbound test alone cannot complete `OWN-001`. Current implementation: MIT licensing and local installation ship. `tests/runtime.mjs` → `ownedCleanStart` (`node tests/runtime.mjs --owned-clean-start`, nightly/release tier) extracts the committed checkout without private settings, data, dependency links or build output, runs the real `rer install` from the runner's populated pinned-package cache, `rer setup` and foreground `rer dev`, then completes booking, intake, note revision, invoice approval and payment through the real browser, Worker and D1. It observes attempted CLI/descendant socket connections, including refused ones, and browser HTTP/WebSocket destinations: no integration is enabled and no external request is allowed. The schedule, patient file, invoices, booking and intake are checked at 1440 and 390. `tests/balm.test.mjs` (the four `OWN-001:` tests) separately observes Worker egress with mail enabled and asserts only that declared provider is called. The lifecycle disables Wrangler's optional banner version check, metrics/error reports and Miniflare's remote Request.cf lookup. Remaining: `HIPAA-005`'s complete/remove hosting record, audited real-patient switch and refusal at every named patient-creation door, plus its required AWS/BAA deployment and live S3/R2 backup receipts. No-outbound evidence alone does not complete this clause.

## Scheduling

- **BALM-002 — Calendar, recurring series and waitlist offers** (done). Book a recurring series whose date overlaps an existing visit, see that date shown before saving, move or skip it and book the series in one step; move one visit, then move and cancel the rest of the series; cancel a visit at least two hours ahead, see it offered by email to every fitting waitlist entry, accept as one, see the visit booked, a second acceptance refused and the others emailed that it is taken.
- **SCHED-001 — Online booking from real open times** (done). Book online for a new patient, see the slot disappear and the intake email sent, book a taken or off-grid slot and be refused, and race two bookings for one slot and see exactly one succeed.
- **SCHED-002 — Practitioner, room and equipment calendar** (done; `tests/schedule.test.mjs`, SCHED-002). Book two practitioners into one room at the same time and see the second refused; book the AlterG for a visit that overlaps one already holding it and see that refused; drag a visit onto a time the AlterG is taken and see it refused, then onto a free time and see the move with who made it from when in its history; as a practitioner see only your own visits draggable, another practitioner's visit unreachable and a drop into another practitioner's diary refused; read the week view for three practitioners and see each visit's intake (due or in), authorization ("10 of 12 visits left") and, for reception, the owner and an explicitly granted practitioner, balance ("$95.00 owed") flags; book two patients at the same time for a PT whose capacity is 2 and see both side by side in the PT's column; print the day sheet and export it as CSV filtered to the AlterG and see the same visits and flags; an ungranted practitioner’s sheet lists only their visits without balances; the owner grants a named practitioner balance visibility, their calendar and printed/CSV sheets show balances only for their own visits, other practitioners remain ungranted, reception/practitioners/agent keys cannot grant themselves access, the audit keeps grant and revocation, and revocation hides balances on the next request without adding copay/card access or payment powers. An agent key is refused.
- **SCHED-003 — Recurring visit series** (done; `tests/schedule.test.mjs`, SCHED-003; `tests/archive.test.mjs`). Book a 12-visit series that collides with a holiday and an existing visit; see the conflicts named, resolve them, and cancel "this and following" from visit 8 with earlier visits untouched. The plan’s start date, weekly frequency and duration drive the series; wrong weekday counts are refused. Named local-date holidays close new bookings and moves, existing visits remain, and each conflicting date can be moved or explicitly skipped. Also move one visit, refuse a conflicting rest-of-series move without changing any, move the rest, then move/cancel a whole series from a later visit including its earlier booked visits. Restore the clinic archive and see the holiday still refuses a booking.
- **SCHED-004 — Reschedule, cancel and no-show policy** (done; `tests/schedule.test.mjs`, SCHED-004). Move as staff and through the patient’s private link and see one appointment with its actor/time history, same submitted intake and authorization reservation. Refuse off-grid moves and moves inside notice; moving invalidates the earlier bearer. Require a cancellation reason and retain who/why. Cancel inside the configured window and see a frozen fee proposed with nothing charged, refuse absent confirmation or separate patient authorization and unauthorized roles, then race/replay native approvals and see one Stripe charge against its own invoice. Mark a no-show, see its different fee only proposed and count it in REPORT-001 attendance.
- **SCHED-005 — Waitlist that fills openings** (partial). Put three patients on the waitlist, cancel a matching visit, accept from the second patient's text reply after the first lets the hold lapse, and see one booking and a "slot taken" message to the third. Evidence: `tests/schedule.test.mjs` — INTAKE-001 SCHED-005: ordered email holds expire to the next patient, book once and retain intake reuse; `tests/waitlist-journey.mjs` — waitlistPreferencesJourney; `tests/archive.test.mjs` — COMM-003 SCHED-005: public CLI archive round trip preserves exact calls, waitlist preferences and custody in an empty install; `tests/waitlist-browser.mjs` — native waitlist preferences, patient-file entry, matching DST offer and one booking Gap: Native email offers match practitioner, service, date range, selected clinic-local weekdays and the complete visit within preferred times. Matching patients take ordered 15-minute turns, ending no later than one hour before the visit; the minute scheduler advances expired or removed turns. A live hold protects the practitioner and room across placing doors. Acceptance rechecks current entry status, preferences, hold authority, availability, capacity, blocking authorization and Medicare overlap; intake reuse and archive history remain. Text offers and replies and the complete three-patient text acceptance journey remain unproved. The fleet holds no authorized clinic US SMS sender: Twilio A2P 10DLC registration or a verified toll-free sender and configured credentials are required; network-edge fixtures do not prove live delivery.
- **SCHED-006 — Patient self-service scheduling** (done). As a returning patient, book at `/book` and land in the same file; as a portal patient, book a follow-up, reschedule it inside the rules, and be refused outside notice or past the authorized visit count; book through the page embedded on a test website. `tests/schedule.test.mjs` / `tests/self-service-journey.mjs` assert fixed patient scope, service/notice rules, certified-plan dates, authorized visits including a last-visit race, cancellation and reminder scope, exact/ambiguous returning identity and concurrent first booking. `tests/mobile.test.mjs` / `tests/self-service-browser.mjs` exercise owner configuration, portal booking/move/cancel, reminder move and a real cross-origin HTTPS test website through final top-level booking; every changed screen is used at 1440 and 390 pixels.
- **SCHED-007 — Service types, locations and availability rules** (done). Create two locations, an evaluation and a follow-up service and a day off; online booking offers each service only where and when its rules allow. Filter `REPORT-001`'s reports by each location and see the figures split by location. Evidence: `tests/schedule.test.mjs` (SCHED-007: service and location rules govern public, portal, staff and series availability with padded race refusal), via `tests/service-availability-journey.mjs`, proves both locations, the two service durations/prices and CPT suggestions, allowed practitioners/locations, location-local hours, named holidays/time off, replacement hours and combined buffers. It asserts public, portal, staff and series refusals and a simultaneous padded-placement race. `tests/report.test.mjs` (ROLE-002 REPORT-001: owner reports and CSVs split room locations) proves the owner’s two-location filters and all six CSVs. `tests/archive.test.mjs` (CLI archive preserves jobs, both signatures) restores the restrictions, defaults, buffers, location zone/hours and date rules and refuses a restored closed-date booking. `tests/viewport-proof.mjs` captures the actual Clinic, booking, portal, draft suggestions and schedule screens at 1440/390 and proves the schedule’s 300-ms hover/immediate-focus tooltips. Staff entry and reports remain in the clinic zone; public/portal slots use the selected location zone. The same journey proves location-night bookings across the clinic’s midnight, with authorization eligibility still checked separately for each clinic date. Imported original visits retain their times, with future MOVE-002 through MOVE-005 scheduling expansion inheriting service/location mapping and conflict review.
- **SCHED-008 — Check-in, attendance and change history** (done). Book, check in and mark attended, then mark another visit no-show and another canceled; each visit's history lists every change and its actor/time. Attendance atomically starts a blank draft for the treating practitioner and an unapproved, unnumbered charge; concurrent attendance creates only one of each. Clinical access, signing and billing approval remain scoped. `tests/schedule.test.mjs` names SCHED-008 and exercises these public commands and screens.
- **SCHED-009 — Calendar subscription** (done; `tests/schedule.test.mjs`, SCHED-009). Subscribe to the feed, book and cancel a visit, see the feed follow; revoke the feed and see the old address refused.
- **SCHED-010 — Practitioner capacity and double-booking** (done; `tests/schedule.test.mjs`, SCHED-010). Set one PT's capacity to 2; as reception book two patients at 9:00 and see both succeed and show side by side; book a third at 9:00 and be refused; race two staff bookings for the last place and see exactly one succeed; open `/book` and the portal for that PT and see 9:00 not offered; book two Medicare patients at 10:00 for the PT and see the warning before saving and the override recorded on both visits; import a WebPT scheduler fixture with an overlapping pair for a practitioner whose capacity is 1 and see both visits land and the pair named in the reconciliation.

## Intake and patient portal

- **INTAKE-001 — One-use intake bound to its form version** (done). Book online, open the emailed link, submit the intake, replay the submission and be refused; reopen the link and see no clinical answers echoed back; read the answers as the treating practitioner and owner and be refused as reception and as another practitioner. A returning patient with a submitted intake for the current form version books and receives no new intake link. A patient with an open, unexpired link books again and the same link stands, without a duplicate. Enter a past-dated booking and see no email sent. After the clinic publishes a new form version, book a patient whose submitted intake answered the older version and see a fresh link emailed for the current version; the earlier answers stay bound to the exact version answered. Open the link after the scheduled start and complete intake in the waiting room; at scheduled end, on attendance/completion or cancellation, GET and POST refuse. Publishing while a form is open refuses a stale form ID and requires reload. `tests/balm.test.mjs` and `tests/schedule.test.mjs` name INTAKE-001 and assert these journeys, all-booking-door suppression/renewal, one stored live request under racing bookings, version retention and scoped reads.
- **INTAKE-002 — Intake packets and outcome questionnaires** (done). Publish a PT packet with the LEFS, answer it as a patient, see the score in the chart, publish a new version and see earlier answers still bound to the old one.
- **INTAKE-003 — Signed consents and policies** (done). `tests/intake-portal.test.mjs` signs all six clinic documents as a parent for a minor, downloads each fixed PDF, refuses stale policy versions, sends a private re-signing link and signs only the changed policy while keeping earlier PDFs identical. The same product flow passed on the temporary `sd-balm-cu1` deployment at 1440 and 390 with real QA-inbox mail on 18 October 2026.
- **INTAKE-004 — Insurance and identity capture** (done). `tests/intake-portal.test.mjs` completes intake with two policies, card fronts/backs and photo ID, refuses missing subscriber fields, and verifies two native policies and prepared 270 requests, original-image access controls and synchronized staff corrections. `tests/archive.test.mjs` carries the policy, inquiry and original photos through export and restore. The hosted patient journey passed at 1440 and 390 with real QA-inbox intake mail on 18 October 2026.
- **PORTAL-001 — Patient portal** (partial). Sign in as a patient and as a guardian of two children, see only their own records, complete a form, and update insurance with the change audited. `tests/portal.test.mjs` (a verified guardian switches between two minors without seeing unrelated records and submitted insurance is audited without changing verified coverage): owner-verified per-minor grants, two-child isolation, guardian intake completion, audited contact and insurance submissions, no active coverage or sign-in takeover and immediate revocation. `tests/portal.test.mjs` (SMS portal codes are generic, hash-only, one-use credentials and never authenticate staff): configured Twilio network edge, bounded expiring code, wrong or replayed code refusal, shared-number denial and patient-only session. Existing portal, billing and messaging journeys remain. Ct approved the conservative floor on 23 October 2026, with riders: owner verifies authority and confidential-care restrictions per minor, no inferred shared-email relationship, delegation ends at 18, contact and insurance updates await clinic verification and cannot silently change sign-in or claims. `tests/portal.test.mjs` (only the owner applies a digest-reviewed patient contact or insurance update and changed patient facts refuse stale proposals) proves reviewed active-policy application, eligibility reset, contact and session revocation and stale-proposal refusal. Guardian SMS sign-in, notice when delegation ends at 18 and extended confidential-minor restrictions remain incomplete. Managed portal email or SMS sign-in is unavailable; Twilio is proved only at its network edge, not against a live US sender.
- **PORTAL-002 — Home exercise programs** (partial). On a fresh install with no practice-made exercises, assign a 5-exercise program from the shipped library in a daily note, open it as the patient, log three sessions, and see adherence in the next note. `tests/portal.test.mjs` (note-linked home programs retain hold dosage, three daily pain sessions and a patient-only printable copy): source-note isolation, hold and frequency, three dated pain and adherence sessions, bounds, next-note adherence and patient-only printable text PDF. `tests/portal.test.mjs` (a fresh licensed exercise library supports filtered search, atomic media CSV import and five-exercise assignment from a daily note): five illustrated bilingual library exercises assigned on a fresh install, fixed source and license and dosage and patient display. The shared PORTAL-007 prerequisite remains incomplete: only a 23-item CC0 starter collection ships, below 900 PT / 350 OT / 250 SLP. Program PDFs now include the trusted shipped line illustrations and bilingual exercise text. Practice-uploaded raster images are not embedded in print output; complete 1,500-item coverage and its scale proof remain pending. Existing practice-made exercises can be assigned from a note, but note-form media upload and richer program grouping remain incomplete.
- **PORTAL-007 — Shipped exercise library** (partial). On a fresh install, count the library by discipline and region and see every minimum met; search "resistance band" filtered to shoulder and see only matching shoulder exercises; open any exercise and read its license; import three practice exercises from a CSV and find them in search. `tests/portal.test.mjs` (a fresh licensed exercise library supports filtered search, atomic media CSV import and five-exercise assignment from a daily note): fresh-install counts of 13 PT / 5 OT / 5 SLP, English and Spanish instructions and illustrations, source and license display, shoulder with resistance-band filtering, native multipart three-exercise CSV and media import, missing-media atomic refusal and duplicate-free repeat. `src/balm/portal/library-data.ts`; `docs/exercise-library.md`. A 23-item original CC0 starter collection ships, with region, position, equipment and default dosage. The required 1,500 items, discipline minima (900 PT / 350 OT / 250 SLP), complete regional coverage, large-catalog usability and committed exact-candidate scale proof are not met. No duplicated dosage variants are counted toward those minima.
- **PORTAL-003 — Secure messaging** (done). Send a message with a photo as a patient, see an alert with no clinical text, reply as the practitioner, and find the thread in the file and the audit. Implementation evidence: `src/balm/messages/`; `src/balm/portal/`; `src/balm/ui/messages.ts`; `migrations/core/0035_balm_message_attachments.sql`; `tests/portal.test.mjs`; `tests/reminders.test.mjs`.
- **PORTAL-004 — Statements, receipts and superbills in the portal** (done). After a paid visit and an unpaid one, open the portal and download the receipt and superbill, then pay the balance and see it at zero. This covers all current billing capabilities; PAY-009 owes every fixed issued statement in the portal, including older cycles, and PAY-002 to PAY-008 owe portal access to their new receipts, superbills and payment capabilities before shipping.
- **PORTAL-005 — Accessible, English and Spanish patient pages** (partial). Complete booking and intake in Spanish with a screen reader and keyboard only; axe-core reports zero serious or critical violations on each patient page in English and Spanish; the manual checklist passes for each page and its record is kept. `tests/portal.test.mjs` (the patient chooses a remembered Spanish portal interface without translating clinical content): patient-file language choice and selected portal UI strings, with unchanged clinical text. `tests/viewport-proof.mjs`: pinned axe-core WCAG 2.0/2.1/2.2 A and AA checks, screenshots and reflow at 1440/390 when BALM_AXE=1; English and Spanish portal home and sign-in have zero serious or critical violations. Only selected portal UI phrases are translated; booking, intake, consent documents, reminders, statements, remaining portal text and custom clinic content are not fully bilingual. Automated coverage is limited to the four portal language and page combinations. VoiceOver and NVDA, keyboard-only Spanish booking and intake, 200% zoom, 320-pixel reflow, error and suggestion and timing-extension manual checks are NOT RUN; a human accessibility review is required. See docs/patient-accessibility.md for the dated page checklist. No WCAG 2.2 AA conformance claim is made.
- **PORTAL-006 — Patient access to their record** (partial). Request the record as a patient, see the due date on the staff work queue, release it, and download both formats from the portal. Implemented request/30-day queue and reviewed immutable release and patient PDF and FHIR downloads: `tests/portal.test.mjs` (patient record requests keep a 30-day deadline, release exact reviewed originals, and isolate every download). Ct approved owner-only review and explicit partial release on 23 October 2026, with no email delivery or clinical API-key export. The release screen still needs an exact record inventory bound to the displayed digest. The partial snapshot includes plans, visit diagnoses, episodes, coverage, authorizations, claim-level remittances, billing facts, messages, pain and adherence and available issued billing and estimate and uploaded originals. Shared multi-patient transport batches, remaining original categories, normalized clinical mappings and terminology validation are incomplete. Recorded attended visits use an unknown Encounter completion status; unsplit staff names and unrecorded organization activity use explicit data-absent-reason fields rather than inferred facts. Both formats name omissions; a partial delivery stays on the owner queue, does not establish complete fulfillment and keeps the record-preservation hold. All record requests currently prevent destruction; an explicit complete fulfillment and hold release workflow remains unbuilt. PDF describes originals while FHIR embeds them. Independent offline HL7 7.0.3 validation against the unchanged US Core 6.1.0 profiles reports zero errors and one encounter-type code warning for the synthetic record; terminology checks are unavailable. Complete-record US Core coverage and interoperability remain unproved. Requests, released copies and audit travel in archives and participate in approved retention destruction; `tests/archive.test.mjs` (public CLI archive round trip refuses damaged or populated stores) proves byte-for-byte released FHIR restoration, grants, patient updates and practice library preservation; integration secrets are excluded.

## Clinical documentation

- **BALM-004 — Templates, signed notes, plan-of-care link and scribe drafts** (done). Write a PT daily note from the visit's template, try to sign with a required section empty and be refused, sign it and see it locked with an addendum allowed; record 38 minutes across two timed codes and see 3 billed units on the note and its invoice; send a plan of care by link, sign it as the physician and see it signed with the date on the case and the schedule; draft a note with the scribe from dictation with a faked model and see an unsigned draft, and without a key see the one line.
- **CHART-001 — Private revisioned treatment notes** (done). Write and amend a note as a practitioner; read every revision as the author and the owner, and be refused as reception and another practitioner.
- **CHART-002 — PT, OT and SLP templates** (done). Run the same journey for PT, OT and SLP: sign an evaluation, three daily notes, a progress report and a discharge summary in that discipline's templates. Each daily note opens with the diagnoses, goals, precautions and flowsheet carried forward and the subjective blank; signing a daily note with an intervention missing its minutes, and an evaluation without goals, is refused with the element named; the progress report and discharge show each goal's status; changing a template leaves every signed note byte-identical.
- **CHART-003 — Plan of care and physician certification** (partial). Sign an evaluation and its plan of care, send it by fax, and see it locked and marked pending with the fax confirmation. Edit it and see a new version that must be sent again, the sent version unchanged. Receive the physician's signed fax, file it to that plan version, and see the plan signed with the signer, the signature date, the certification date and the signed image attached in the chart; file a second copy to it and be refused. Send another plan by link and sign it as the physician. Leave a third plan unsigned 30 days past its first treatment and see it marked late on the work list and the daily close; set the practice's threshold to 21 days and see a plan 22 days past its first treatment marked late. Let a certified plan pass its recertification date and see the next visit flagged. Every added plan version, fax-send and returned-certification door must update the owner’s audited REPORT-004 daily close before it ships; pending, late and expired plan work must appear and clear from its recorded outcome. Before returned-plan certification ships, file each signed fax/scan as an immutable CHART-009 original against its named plan version and episode, find it in chart history, and retain that linkage through export/restore. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.
- **CHART-004 — Draft, sign, lock and amend** (done). Sign a note, try to edit it and be offered an addendum, add one, and read both the original and the addendum; an unsigned note past 24 hours appears on the daily close. `tests/charting.test.mjs` exercises signer/time/credentials, locked original revisions beside signed addenda, all overdue drafts (including unlinked drafts and those behind newer signed notes), owner-set deadlines, edits that preserve the original deadline and practitioner/owner scoping. Product use at 1440 and 390, 19 October 2026.
- **CHART-005 — Objective measures and flowsheets** (done; `tests/charting.test.mjs`, `tests/retention.test.mjs`). Record knee flexion and LEFS at evaluation and three later visits; the progress report shows the change and the graph matches the entries. A care-team grantee and an emergency (break-glass) reader see the measures, audited (`CHART-013`). Also record a graded muscle test, girth, gait, balance and a flowsheet with sets and reps; see wrong units, out-of-range grades and flowsheets without sets refused, other clinicians and reception refused, a signed note's measures locked against change, a draft's mistaken measure removed with an audit row, and an approved HIPAA-002 destruction remove the patient's measures.
- **CHART-006 — Billing captured from the note** (done). Document 38 minutes across 97110 and 97140 and one untimed 97161 for a Medicare patient; the charge shows 3 timed units distributed by the rule, the right modifiers and diagnosis pointers. Sign the same note with 8 minutes of 97110 and 8 minutes of 97140 for a CMS-method payer and an AMA-method payer: the first charge bills 1 unit, to the code the clinician picks on the tie, and the second bills 2 units, one per code. With 10 minutes of 97110 and 8 of 97140, the CMS charge bills its 1 unit to 97110. Under a fixed 15-minute threshold the 8-and-8 note bills no timed unit and the scrubber names both codes. A charge whose primary uses the CMS method and whose secondary uses the AMA method sends the secondary claim with 2 units and the primary with 1. Proven primary-payer slice: `tests/insurance.test.mjs` (CHART-006) asserts draft and signed-note CMS/AMA previews, primary-over-secondary selection, inclusive clinic-local coverage, cash/untimed units and a labelled provisional calculation that preserves the missing-method claim hold; it also asserts signed-charge pricing, frozen invoice procedure units and payer-setting basis, superbills, claims and 837P, with issued documents unchanged after payer edits. The fixed-threshold slice also proves 8+8 minutes at a 15-minute threshold yields no timed units and names both codes in the scrubber; 30 and 29 minutes yield 2 and 1 timed units with one untimed evaluation; pricing, 837P, authorization usage, daily-close clearing and fixed original documents agree. The configured threshold survives public CLI archive restore. The same primary journey now chooses 97140 for the 8+8 CMS tie through the edit form, refuses missing/overselected choices and invalid/untimed preferences, signs the recorded revision and carries 0/1 units through pricing, invoice, superbill and 837P. A preference for the smaller remainder cannot defeat the 10+8 allocation. The choice and signed allocation survive the public CLI archive in `tests/archive.test.mjs`. The selected-diagnosis journey in `tests/insurance.test.mjs` records different ICD-10 links per CPT through the note edit form, refuses invalid or absent selections without signing, and carries signed code identities through priced invoice snapshots, per-visit and period superbills and 837P. Reordering visit diagnoses remaps claim positions without retargeting; removing a selected diagnosis holds the claim until corrected. Issued superbills keep their original links, and the selections survive the public CLI archive in `tests/archive.test.mjs`. The same primary journey now asserts the complete Medicare 38-minute example plus one untimed evaluation, with 3 timed units/4 total, GP modifiers, distinct selected diagnosis pointers and the actual 837P. Distinct-service applicability is asserted by `tests/insurance.test.mjs` (CODE-001: effective CMS quarters), using `tests/code-sets-journey.mjs` and `tests/code-sets-claims.mjs`: a signed clinician rationale is required for a permitted modifier, indicator-zero edits still refuse, and the accepted modifier reaches the actual 837P. Secondary-payer re-unitizing is asserted by `tests/insurance.test.mjs` (INS-013: prior adjudications reach secondary and tertiary claims), using `tests/cob-journey.mjs`: CMS primary 1 unit versus AMA secondary 2, retaining per-code primary adjudication in 837P. The recorded-diagnosis/tie and core CLI archive journeys preserve signed choices, fixed thresholds and original issued bytes. `tests/viewport-proof.mjs` (CHART-006 scenes) and `tests/cob-browser.mjs` exercise the primary/fixed/Medicare notes/charges and secondary payer screens at 1440/390. CODE-001’s production licensed-data ingestion and INS-006’s live clearinghouse proofs retain their own obligations and statuses.
- **CHART-007 — Documentation compliance alerts** (done). Reach the 10th visit without a progress report, an expired certification and a KX-threshold patient; each warning appears before signing and on the daily close. Configure a payer that requires total treatment minutes on every daily note, leave them out, and see signing blocked with the element and the payer named. Implementation evidence: `src/balm/charting/compliance.ts`; `src/balm/domain/signing.ts`; `src/balm/ui/documentation.ts`; `tests/charting.test.mjs`; `docs/documentation.md`.
- **CHART-008 — Supervision and co-signature** (done). Document as a student, co-sign as the supervisor, and see the note locked with both signatures and the claim under the supervisor. A care-team grantee and an emergency (break-glass) reader read the co-signed note, audited (`CHART-013`).
- **CHART-009 — Attachments and searchable history** (done). Attach a faxed MRI report and two photos, search the chart for "MRI", and open the result; reception without clinical rights is refused. Assert the owner-filed MRI and first clinician’s photos are all searchable/downloadable by a second treating practitioner; owner access remains full, unrelated practitioners, reception and agents are refused. Assert immutable originals, audited upload/search/download, inclusive date/type/text filters, erasure refusal and CLI export/restore. Current record kinds conform now; REF-003, CHART-003, REF-002, CHART-011 and MOVE-002 to MOVE-005 carry their episode/fax/certification/new-document obligations before shipping.
- **CHART-010 — Alerts and precautions** (done; `tests/alerts.test.mjs`, CHART-010; `tests/archive.test.mjs`). Add a weight-bearing precaution and see it on the calendar visit, check-in and the next note.
<!-- contract-docs:begin CHART-011 -->
- **CHART-011 — Clinical letters and exports** (partial). Clinicians send progress letters, plan-of-care summaries and discharge summaries to referring providers, payers and patients by fax, secure link or print, from templates filled from the chart, with each send recorded. Before clinical letters ship, their fixed originals and patient and episode references join CHART-009 searchable history under its clinical access and audit rules, including `CHART-013` break-glass reads with their reason. **Acceptance evidence:** Send a progress letter to the referring physician by fax and to the patient by portal; both sends appear on the file with their content fixed. Find each newly added document in chart history, filter it by its episode when episodes exist, and reopen its original bytes as an entitled clinician. Evidence: `tests/charting.test.mjs` — “CHART-011: clinician reviews and delivers a fixed progress original with episode history and reason-audited emergency reads” via `tests/clinical-letter-journey.mjs` (chart-filled signed-note draft, exact-digest review, edited draft, explicit portal delivery, fixed original after an addendum, episode search and reason-audited break glass); `tests/portal.test.mjs` — “a verified guardian switches between two minors without seeing unrelated records and submitted insurance is audited without changing verified coverage” (delivered original, selected child isolation and revoked guardian refusal); `tests/archive.test.mjs` — “prior authorization signed packets and recorded payer decisions survive a public CLI archive round trip” (letter original, author and send restore); `tests/retention.test.mjs` — “HIPAA-002: approved destruction removes clinical bytes and private tokens, retains anonymous accounts and immutable audit and receipt, and cannot be replayed” (letter original and delivery custody) Gap: Progress-letter drafts from the clinician's signed note can be reviewed, edited and explicitly delivered to the patient's portal as a fixed original with patient, episode, author and send facts. CHART-009 history and CHART-013 reason-audited break glass cover those originals. Held: referring-physician fax delivery and confirmation need a HIPAA-eligible fax provider account under a BAA, which is not held. Plan-of-care and discharge letter templates, other provider and payer recipient workflows, secure-link and print routes, and the full two-channel acceptance journey remain unproved.
<!-- contract-docs:end CHART-011 -->
- **CHART-012 — Ambient scribe** (partial). Record a consented visit, review the draft, change one statement and sign; the signed note shows the clinician as author, the audio is gone, and a visit without consent offers no recording. Inherits HIPAA-001: model configuration and every model request require the active recorded BAA covering that provider and endpoint.
- **CHART-013 — Care team access with audited emergency access** (done). Grant a covering clinician access, read as them, revoke and be refused; break glass as another clinician and see the owner's notice and the audit row. Assert only the owner grants and revokes (reception and practitioners refused), the grantee reads every note but cannot amend or add to another's note and sees no other part of the file or uploaded documents; break glass refuses reception and a reason under 10 characters, opens notes and documents for 12 hours with each read and download audited with the reason, the owner's in-app notice names the clinician, patient and reason without note text, and ending it early refuses the next read.

## Referrals and care coordination

- **REF-001 — Referrals and referring providers** (done; `tests/report.test.mjs`, REF-001). Enter three referrals with NPI lookup, schedule two and mark one lost; the referral report shows conversion by provider and source, and `REPORT-001`'s referral conversion matches it in its CSV.
- **REF-002 — Fax in and out** (missing). Receive a referral fax, file it to a new referral, send a plan of care by fax and see the confirmation on the file; receive the physician's signed plan of care by fax, file it to that plan and see the plan signed with the fax kept in the chart. Before fax filing ships, incoming referral, imaging, order and signed-plan originals join CHART-009 searchable chart history against their patient and, where applicable, named plan version and episode, retaining clinical access, audit and original bytes. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician. Inherits HIPAA-001: future fax connections and sends must enforce the recorded active fax BAA before provider use.
- **REF-003 — Episodes of care** (done; `tests/charting.test.mjs`, REF-003). Open two episodes for one patient, document in both, and see visit counts, authorization use and outcomes kept apart, including `CHART-005` measure series and graphs, and `REPORT-001`'s visits per episode and drop-off. Before episodes ship, every existing and new CHART-009 document/history record is assigned to its episode and searchable by that episode, with separate episode counts and the existing clinical access rules retained. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.

## Reminders and patient communication

- **REMIND-001 — Reminder content a person approves** (done). Prepare a reminder with an agent key, approve it as a person, and export the exact approved text with the approval digest recorded.
- **COMM-001 — Delivered email confirmations and reminders** (done; `tests/reminders.test.mjs`, COMM-001; `tests/archive.test.mjs`). Book a visit and see the confirmation and intake email delivered; advance the clock and see the reminders sent once each with delivery recorded; a failed delivery shows on the file. Exercise signed Resend and SendGrid delivery events, exact duplicate/reordered events, invalid signatures, unrelated attempt/recipient refusals, whole-batch atomic refusal and bounded raw requests. Both reminder leads send once and receive recorded delivery events; a lost provider response is labeled unknown and never resent automatically. Move a visit and a whole/rest series, read the immediate changed-times email, confirm its private link, then move/cancel again and see the old link refused. Suppressed development mail remains not sent; practitioners see only their appointment-associated attempts and reception sees permitted file history. Export/restore through the CLI and find the verified delivery state preserved. Delivered means acceptance by the receiving mail server, never a patient read. Every future provider inherits the same states and authenticated reconciliation before shipping. Inherits HIPAA-001: patient mail attempts require an active recorded BAA for the configured mail account and covered plan; removing it blocks later sends.
- **COMM-002 — Two-way text messages** (partial). Send a reminder by SMS, reply C and see the visit confirmed, reply R and see a reschedule request, reply STOP and see no further texts; a patient without consent gets none. Inherits HIPAA-001: SMS enablement and each later send require an active recorded BAA covering the configured account and plan. Evidence: `tests/reminders.test.mjs` — COMM-002: patient-local quiet hours defer scheduled texts without an attempt and recheck live authority before once-only delivery; `tests/communication-browser.mjs` — native policy and patient-zone forms, visible deferral and one eligible attempt; `tests/archive.test.mjs` — COMM-003: public CLI archive round trip preserves exact calls and custody in an empty install (also preserves patient zones and immutable quiet-policy facts); `tests/payments.test.mjs` (existing consented text-to-pay edge) Gap: Scheduled appointment reminder quiet hours are proved at the HTTP edge only, with explicit patient IANA zones and owner-recorded daily intervals; no patient zone or legal-policy default is inferred. Still unproved: authorized live delivery from a clinic US A2P 10DLC or verified toll-free SMS sender and configured credentials, which are not held; inbound sender verification; STOP and HELP; C, R and other reply routing; quiet hours for confirmations, payment links and other SMS purposes; and the complete live reminder, confirmation, reschedule and STOP journey. Visit replies still use the private email link. Network-edge fixtures establish neither sender authorization nor live delivery.
- **COMM-003 — Communication history on the file** (partial). Exchange an email, a text, a portal message and a fax with one patient and log a call; the file lists all five with their states.

<!-- contract-status:COMM-003:start -->
**COMM-003 — Communication history on the file** (partial). Evidence: `tests/reminders.test.mjs` — “COMM-003: manual calls and communication search preserve patient and conversation authority, original facts and audit” and “COMM-003: live authority changes refuse call writes and search reads before any result escapes”; `tests/communication-journey.mjs` (exact call direction, clinic-local time, authenticated staff identity and disposition; patient and conversation isolation, hidden match counts and snippets, honest email acceptance and audited reads and writes); `tests/archive.test.mjs` — “COMM-003: public CLI archive round trip preserves exact calls and custody in an empty install” (every original call field, complete patient audit rows, identical searchable history and restored custody guards); `tests/retention.test.mjs` (late call entry extends custody; reviewed destruction removes originals); `tests/communication-browser.mjs` (native call entry and search, clinical isolation and icon tooltips at 1440 and 390; push Verify). Gap: Manual calls, existing appointment email delivery metadata and already-authorized secure messages are searchable under current patient and conversation permissions. Incoming email beyond existing records, text and fax transport and history, their delivery receipts and the complete five-channel acceptance journey remain unproved. A BAA-backed fax provider account and clinic US SMS sender and credentials are not held. Manual call records establish neither a recording nor delivery; email provider acceptance establishes neither delivery nor reading.
<!-- contract-status:COMM-003:end -->
- **COMM-004 — Follow-ups and recalls** (done; `tests/reminders.test.mjs`, COMM-004). Leave a patient with an open plan of care and no next visit, see the outreach accepted by the configured mail provider, book a visit and see the sequence stop. The same journey asserts all five configured kinds, signed evaluation/discharge triggers and feedback URLs, per-kind opt-in and withdrawal, elapsed-day delay/repeat behavior, a shared rolling contact cap under racing ticks, disabled sequences, private scoped file history, and unknown submissions held for review without another send.

## Telehealth

- **TELE-001 — Video visits from the calendar** (missing). Book a video visit, join as patient and clinician, document and sign; the claim shows POS 10 and modifier 95 for a commercial payer that requires them. Inherits HIPAA-001: future video connections must enforce the recorded active video BAA before provider use.

## Patient billing and payments

- **BILL-001 — Approved, numbered invoices with fixed bytes** (done). Prepare, change the visit, see approval refused, re-prepare and approve; download the invoice twice and get identical bytes.
- **PAY-001 — Payments recorded once per reference** (done). Record a check payment, record the same reference again and be refused, and try to exceed the invoice and be refused.
- **BALM-003 — Patient payments through the clinic's own Stripe account** (done). On a self-hosted install with Stripe faked at its HTTP edge, save a card from the patient's link with the authorization, check the patient in and charge the copay in one action with a receipt, send a pay link by email and pay the balance, and see each payment posted to its invoice once, on the statement and on the superbill; replay the Stripe webhook and see nothing posted twice; on RER Managed see the one line.
- **PAY-002 — Cards on file and payments at check-in** (partial). Save a card in intake, charge a $30 copay at check-in, refund it with approval, and see the Stripe charge and refund mirrored on the patient's ledger. Open the portal as that patient and exercise each new receipt, superbill and payment door this clause adds. Evidence: `tests/payments.test.mjs` — “PAY-002: intake and portal authorize hosted card setup, approved original refunds reconcile once, and Terminal posts a copay once” (`tests/card-payments-journey.mjs`: separate consent and entry audit, hosted SetupIntent, $30 check-in, exact owner approval, original refund ID and ledger reversal, fixed payment receipt, patient-scoped portal receipt and superbill, and one reader payment); “PAY-002: a lost refund response stays reserved until the original Stripe refund is reconciled without another send” (verified legacy original, biller approval, stale-source refusal and no repeated refund); “PAY-002: an uncertain Terminal send is reconciled on its original intent without another collection”; `tests/retention.test.mjs` — “PAY-002 PAY-004 HIPAA-002: Stripe and external refunds retain totals without private originals” (uncertain-refund preservation fence and anonymous money facts after approved destruction); `tests/card-payments-browser.mjs`; 26 October 2026 held-key live Stripe test mode via `tests/card-payments-browser.mjs`: intake HSA card SetupIntent seti_1UUclsDg8BoejKxopRM4HSYz, portal SetupIntent seti_1UUcmADg8BoejKxoBaGj0fql, $30 copay intent pi_3UUcmRDg8BoejKxo2IrY5qH2 and original charge ch_3UUcmRDg8BoejKxo2O4gqeAU, approved refund re_3UUcmRDg8BoejKxo2HcpPJLt, account acct_1URgLjDg8BoejKxo, simulated reader tmr_GttxTA3H45K4Ae and Terminal copay intent pi_3UUcmeDg8BoejKxo0U3M6rAU; native consent, check-in, refund approval, ledger, reports, patient documents, reader configuration, pending and paid screens passed at 1440 and 390, including delayed hover and immediate-focus icon tooltips; `tests/card-payments-journey.mjs` — checkInResponsibilityJourney (final-payer coinsurance and outstanding responsibility selected and confirmed separately from copay; exact cents after payment and credit; competing collection, replay, decline and payer holds; a pending collection also refuses a new patient Checkout payment; patient-only fixed receipts and report parity); `tests/payments.test.mjs` — “PAY-002: an uncertain Terminal send is reconciled on its original intent without another collection” (saved-card and Terminal unknown outcomes retain original identity; staff revocation during a reader request prevents reservation and sending); `tests/archive.test.mjs` — “retail and finance originals, paused entitlements and preparation authority survive a public CLI archive round trip” (selected purpose, invoice, original provider identity, ledger and receipt bytes); `tests/card-payments-browser.mjs` (network-edge check-in forms, pending and paid states and patient receipts at 1440 and 390 in push Verify) ; `tests/payments.test.mjs` — “PAY-002: an uncertain Terminal send is reconciled on its original intent without another collection” (historical schedule and patient file retain saved-card and Terminal recovery after the check-in window, original identity, no repeated send, and 1440 and 390 recovery screens) ; `tests/card-payments-browser.mjs` — held-key Stripe test-mode responsibility journey (saved-card and simulated Terminal coinsurance and balance, independently read-back provider amounts, decline and replay, reservation caps, zero patient balance, ledger and report parity, immutable isolated portal receipts and native screens at 1440 and 390) Gap: Physical paired-reader operation beyond Stripe’s test-mode simulated reader remains unproved; a simulated reader is not physical point-of-sale proof. Physical pairing, tap or insert operation and actual device qualification remain omitted.
- **PAY-003 — Payment links and online prepayment** (partial). Text a link for a $120 balance, pay it, and see the balance at zero; book a prepaid service online and see the payment on the visit. Open the portal as that patient and exercise each new receipt, superbill and payment door this clause adds. Evidence: `tests/payments.test.mjs` — deposit and full booking payments reserve slots, confirm exact cents once and expose isolated fixed portal receipts; `tests/schedule.test.mjs` — declined, abandoned and uncertain Checkout keeps one reservation until provider resolution and paid conflicts need human review; `tests/archive.test.mjs` — booking prepayments and fixed receipts survive a public CLI archive round trip without bearer authority; `tests/booking-prepayment-journey.mjs`; `src/balm/payments/links.ts`; `src/balm/sms/index.ts` ; `tests/schedule.test.mjs` — “PAY-003: declined, abandoned and uncertain Checkout keeps one reservation until provider resolution and paid conflicts need human review” (signed expiry recovers a lost create response without another send, releases its slot, removes only the unpaid retention hold, and enforces the combined pending cap); `tests/booking-prepayment-journey.mjs` — bookingPrepaymentJourney (shared sign-in identity refused before reservation or Checkout; isolated immutable paid receipt remains reachable in the portal) Gap: Booking deposits and full prepayment are proved at the Stripe HTTP edge, with patient amount confirmation, durable slot and payment identity, exact visit credit, fixed receipts and signed-in portal continuation. Default ADOPTED pending ct: unstarted reservations expire after 15 minutes, and public booking credentials expire within 24 hours after an attempt while signed-in portal access remains; an attempted Checkout keeps its slot until provider-confirmed expiry or payment, and a confirmed payment that cannot fulfill the booking stays in human review without an automatic refund. Authorized live SMS delivery and the $120 text-to-pay journey remain unproved because no clinic US A2P or verified toll-free sender is held. Live Stripe sandbox qualification of the new booking-payment path remains unproved; network-edge fixtures prove neither sender authorization nor live provider acceptance.  Public prepayment refuses a submitted sign-in email held by a different patient or active guardian; clinic-assisted identity resolution is required before taking money.
- **PAY-004 — Statements, receipts, adjustments and refunds** (done). Bill three visits, pay one, write off part of another with approval, and send a statement that matches the ledger. Before shipping, open the signed-in patient portal and exercise each new receipt, superbill and payment door this clause adds (`PORTAL-004`). See the write-off and any refund in `REPORT-002`'s adjustments, A/R and deposits. `tests/payments.test.mjs` (PAY-004, `tests/account-ledger-journey.mjs`) asserts no effect before exact-digest owner approval, role refusal, race/replay and stale-balance refusal, fixed external receipts, unused-credit refunds that send nothing, oldest-first allocation to current and later invoices, report/CSV agreement, per-patient consent and clinic-date cadence, one notice under racing ticks, stopped cadence, fixed issued statement amounts/bytes after later transactions, and same-patient portal/desk/private-link downloads. `tests/archive.test.mjs` asserts approved proposal and receipt preservation through CLI export/restore; `tests/retention.test.mjs` asserts anonymous report totals after destruction. External money records actual completed outside transactions; Stripe refunds stay PAY-002, and PAY-009 keeps clinic-wide and mailed cycles with the same fixed-original portal obligation. ROLE-002 carries the biller’s authority before it ships.
- **PAY-005 — Superbills** (done). Produce a superbill for a month of visits and check every required field against the signed notes and ledger. `tests/payments.test.mjs` (PAY-005) checks multiple signed visits, practice/rendering NPIs, tax ID, CPT/ICD-10, fees and payments through desk, private link and patient-session PDF doors, incomplete-document refusal and role/patient scope. Before shipping, open the signed-in patient portal and exercise each new receipt, superbill and payment door this clause adds (`PORTAL-004`).
- **PAY-006 — Payment plans and balance reminders** (done; `tests/payments.test.mjs`, PAY-006). Create an explicitly authorized 3-month plan starting January 31 and see January 31, February 28 and March 31 charges post once, including racing scheduler ticks. Pay part of the balance through the portal and see the final installment capped at the remainder. Leave a balance unpaid and see opted-in reminders and the human review-list entry; a paid balance or manual stop ends reminders, and a stopped plan never charges. Lose a real Stripe success response at the network edge, see review without a second POST, then reconcile the original charge by webhook. Refuse unauthorized roles and missing authorization. Read the plan terms and each posted receipt as that patient in the portal and refuse a different patient. Before shipping, open the signed-in patient portal and exercise each new receipt, superbill and payment door this clause adds (`PORTAL-004`).
- **PAY-007 — Good Faith Estimates** (done). Book a self-pay evaluation 4 business days ahead and see the estimate issued within 1 business day; book another 12 business days ahead and see it issued within 3 business days; request an estimate without booking and see it issued within 3 business days; each estimate is kept on the file, and billing above one by $400 raises the flag. Before shipping, open the signed-in patient portal and exercise each new receipt, superbill and payment door this clause adds (`PORTAL-004`).
- **PAY-008 — Packages, memberships, products and gift cards** (partial). Sell a 5-visit package, attend two visits and see three left; sell a brace with sales tax and redeem a gift card. Open the portal as that patient and exercise each new receipt, superbill and payment door this clause adds. Evidence: `tests/payments.test.mjs` (cash packages draw down at attendance and taxed gift sales reconcile with patient originals and deposits); `tests/retail-journey.mjs` ; `tests/retention.test.mjs` (PAY-008: eligible retail groups retire independently without losing patient value, clinical records or dated totals); `tests/retail-retention-journey.mjs`; `tests/payments.test.mjs` (PAY-008: named staff sales require finite owner grants, revoke immediately and preserve lifecycle authority); `tests/retail-staff-journey.mjs`; `tests/payments.test.mjs` (PAY-008: unused gift-funded visits return exact value once to the original patient gift without a cash refund); `tests/retail-gift-settlement-journey.mjs` Gap: Owner-only cash sale commands now record finite visit packages and memberships, products with an owner-documented state tax rate, and patient-bound gift value. The public-door journey proves five visits sold, two attended and three left, no extra package visit charge, a taxed brace, guarded gift redemption, portal receipt isolation and unchanged receipt originals, existing visit superbills, ledger totals and financial deposits. Conservative default ADOPTED; ct APPROVED WITH CHANGES on 25 October 2026, limited to owner-only cash recording and bounded preservation refusal. Sale recording grants no renewal, expiry, transfer, refund, provider charge, insurance billing or tax determination. Owner staff sale forms now record every sale kind and matching visit assignments. Finite memberships support explicit patient-authorized pause and resume without losing unused visits, exhaustion and a separate later cash purchase; no renewal or provider charge is authorized. Eligible digest-approved destruction removes retail identifiers, originals and membership events while preserving anonymous dated accounting and gift totals. Evidence: `tests/retail-browser.mjs` exercises all four forms, pauses, resumes, portal receipts, reports and the destruction inventory at 1440 and 390; `tests/retail-journey.mjs` proves membership consumption and exhausted-assignment refusal; `tests/retention.test.mjs` (HIPAA-002: approved destruction removes clinical bytes and private tokens, retains anonymous accounts and immutable audit and receipt, and cannot be replayed) proves old retail destruction with unchanged report totals. Conservative default APPROVED WITH RIDERS by ct on 26 October 2026 at review pin 9c7a53cd9636849a4e6ed12642137cfcdc78550f: the active owner may record reversible membership pauses and resumes only with explicit audited patient authorization for each transition. Unused visits are preserved without forfeiture or expiry; neither transition authorizes automatic renewal, a provider charge or a change to external billing. Later cash purchases remain independent. The synchronized membership pause and retention rider below applies. This approves policy defaults only; implementation and acceptance are not certified, and PAY-008 remains partial. The focused `tests/archive.test.mjs` journey (retail and finance originals, paused entitlements and preparation authority survive a public CLI archive round trip) covers exact transition authorization fields, paused visits, cancelled exhausted memberships, receipt bytes, inactive staff and excluded agent grants. The same file’s HIPAA-002 ERASE-001 public CLI erasure-journal journey refuses older retail and cancellation records against the later destruction journal and preserves anonymous sale totals. Current additional proof: the existing retail journey asserts structured transition authorization, immutable pause history, refusal to cancel unused visits, once-only exhausted membership cancellation, refusal to resume a cancelled membership and independent later purchases. The existing retention journeys refuse destruction with unused visits or gift value, extend retention from actual later consumption, then destroy fully consumed and redeemed historical records while preserving dated anonymous totals. Conservative exhausted cancellation default approved with riders by CT RL-104 on 28 October 2026: only the active owner records a specifically patient-authorized cancellation after all visits have actually been consumed; no forfeiture, settlement, refund, renewal, provider action or external billing change is authorized. Additional proof in `tests/retail-journey.mjs` refuses every missing transition authorization field and malformed timestamps, verifies that a later purchase leaves an existing paused membership unchanged, and asserts no outbound notice or provider billing action. The state-rule journey in `tests/retention.test.mjs` independently asserts fixed historical retention deadlines after sale, pause, resume, consumption and gift redemption, unchanged deadlines after reads, legal holds, and refusal to destroy unresolved visits or gift value. Additional proof in this candidate: `tests/retail-journey.mjs` (loaded by the cash packages test in `tests/payments.test.mjs`) asserts once-only patient-authorized finite renewal with a new cash receipt, refusal for non-owner, foreign patient, cancelled source, representative assertion and missing cash or authorization, exact portal history without internal consent evidence, and independently expected obligation, deposit and CSV values. `tests/retention.test.mjs` asserts active, paused and exhausted obligations at fixed historical dates and unchanged dated obligation totals after approved destruction; `tests/archive.test.mjs` preserves the renewed original and consent fields and refuses replay and inactive authority after CLI restore. `tests/retail-browser.mjs` exercises the renewal form and shows portal history and obligation reports at 1440 and 390. The same retail journey now proves once-only concurrent unused-visit cash settlement, a 3,001-cent refund with equal ledger and report arithmetic, preserved originals, and refusal of unauthorized, mismatched, unconfirmed and booked-assignment requests; the archive journey carries its exact settlement and consent facts and its accounting preparation source. Current original-gift settlement proof restores 3,001 cents to the same patient gift once, preserves purchase originals, refuses cash conversion and representative assertions, and allows the restored value to be spent once. Cash deposit totals never invent a refund, and accounting preparation credits gift liability. Archive restore preserves original-gift settlement facts, while eligible destruction preserves anonymous dated gift arithmetic. Current scoped custody proof: eligible connected retail groups can be digest-reviewed and destroyed without removing the patient, clinical records or newer unrelated purchases. Gift and renewal dependencies, unused value, clinical retention floors and legal holds remain fences. Anonymous dated totals, covered-visit billing and transaction replay refusal survive. Representative assertions refuse for every membership transition. Remaining Gaps under CT RL-104: ct approval of original-gift unused-entitlement restoration and remaining non-cash settlement; automatic renewal and renewal before exhaustion; ct approval of the adopted finite named staff grant default and broader staff sale authority; representative authorization; provider handoff and confirmation; outbound lifecycle notice consent and delivery; historical obligation detail already destroyed without dated use facts, explicitly marked incomplete; record-specific clinical destruction while newer retail originals remain; remaining provider and representative authority cases. Current native proof refuses every retail command and receipt read from a revoked owner device, expires and revokes delegated sale grants, excludes delegated authority from archives, refuses old full and scoped retail originals against a later destruction journal, and preserves unresolved gift value on a current restore. PAY-008 remains partial. The [PAY-008 and AGENT-005 adopted-default riders](#pay-008-and-agent-005-adopted-default-riders) govern this slice and map deferred work to existing clauses.
- **PAY-009 — Statement runs by mail, email and portal** (done). Run a cycle with one email-preference patient and one mail-preference patient; see one emailed notice opening the portal statement and one statement in the mailed PDF batch and the vendor file, the batch's per-patient amounts and total matching the ledger, both deliveries on the ledger, and a second run producing nothing new; run a later cycle after another payment, then open both issued statements in the portal and verify each keeps its original bytes and amount. `tests/payments.test.mjs` (“statement cycles preserve mail batches, actual delivery outcomes and every portal original without changing the ledger”, via `tests/statement-cycles-journey.mjs`) proves the full cycle, export amounts and originals, actual mail outcomes, same-month repeat, later payment, both historical portal originals, filters, returned address hold, monthly scheduling, age-based dunning and text submission at the provider edge. `tests/statement-cycles-browser.mjs` exercises real forms and downloads at 1440 and 390. `tests/archive.test.mjs` (“ROLE-002 CHART-008 PAY-007 INTAKE-002: CLI archive preserves jobs, both signatures, estimate originals and versioned scores”) restores preferences, delivery history and exact statement and batch originals through the CLI and patient portal. Mail files stay local until clinic staff hand them off; prepared, submitted and accepted states never claim completed postal delivery.

## Insurance billing

- **PAY-010 — Co-provider estimates, payer AEOBs and GFE availability** (partial). Manually record two provider quotes, issue the aggregate with per-provider subtotals and see the clinic’s billed-over-estimate comparison use only its own subtotal; import a payer AEOB, review it and see it in the portal. Manual boundary approved by ct on 22 October 2026. GFE availability notice on booking, portal and scheduling is the first build item; the existing notice and its assertions are carried here. Gap: no payer AEOB endpoint or account, live interoperability unproved.
- **INS-001 — Payers, plans, fee schedules and providers** (done). Set up Medicare, a commercial payer and a fee schedule, enroll two providers, and see a charge priced from the right schedule. See Medicare default to CMS total-time, set the commercial payer to AMA/CPT per-service, and bill one note with 8 minutes each of 97110 and 97140 to each: Medicare's charge has 1 timed unit and the commercial payer's has 2. Add a payer with no method and see its timed charge held by the scrubber with the payer named. Proven by `tests/insurance.test.mjs`, “INS-001: dated plan contracts price service-date units and fees without rewriting issued documents; owner records provider licenses” and “CHART-006 primary slice: CMS, AMA and fixed-threshold note previews agree on invoice, superbill and claim, with frozen payer basis”; `tests/archive.test.mjs`, “CHART-006 INS-001 AGENT-003 PAY-004 COMM-001 SCHED-003 SCHED-009 HIPAA-003 CHART-010 CHART-009: public CLI archive round trip refuses damaged or populated stores”. Dated exact-plan schedules and owner-only license history have actual form/screen proof at 1440/390; service-date methods feed invoices, claims, note previews, authorization usage/daily close and grounded review. Legacy setup remains a baseline; immutable dated revisions and issued originals retain their basis.
- **INS-002 — Eligibility and benefits checks** (partial). Run eligibility for a test patient through the clearinghouse sandbox and see benefits, copay and remaining deductible stored on the policy. Run the next-day batch with one policy the sandbox returns as inactive and one moved to a Medicare Advantage plan, and see both visits flagged before the day starts. Evidence: `tests/insurance.test.mjs` — “INS-002: owner prepares dated eligibility cohorts, imports matched answers and reviews affected visits without inferred policy changes”, via `tests/eligibility-cohort-journey.mjs` (clinic-local business dates, recorded holidays, monthly active policies, duplicate visits, changed and cancelled visits, stale policies, concurrent preparation, matched 271 results, unchanged plan facts and independently expected calendar and daily-close flags); `tests/archive.test.mjs` — “COMM-003 SCHED-005: public CLI archive round trip preserves exact calls, waitlist preferences and custody in an empty install” and “HIPAA-002 ERASE-001: public CLI erasure journals refuse both ordinary erasure and later destruction resurrection”; `tests/retention.test.mjs` (eligibility originals extend custody and follow reviewed destruction); `src/balm/insurance/eligibility-batches.ts` Gap: Owner-triggered local preparation now covers the next business day’s scheduled policies and the first business day’s monthly active-policy cohort, using explicit clinic-local dates and recorded holidays. Linked inquiries deduplicate each policy and service date; changed source facts require another preview. Matched synthetic 271 imports flag inactive, changed or exhausted coverage on affected booked visits and the owner’s daily close without inferring replacement payer or plan facts. Requests remain visibly prepared or exported until an actual response or submission is recorded. A phone or payer-website check retains its named source. Claim.MD or Availity sandbox account, clearinghouse enrollment, provider credentials and applicable BAA authority are not held. Live real-time intake and episode checks, unattended outbound next-day and monthly checking, and the full sandbox benefit-response journey remain unproved. Local preparation and fixture imports establish neither payer truth nor provider acceptance.
- **INS-003 — Authorization and visit tracking** (done; `tests/authorization.test.mjs`, INS-003 / REPORT-004). Add 12 authorized visits and attend 8; the file and day sheet show 4 left. The inclusive end date allows booking; the next day warns, can be acknowledged in warn mode and remains refused in block mode. A 12-unit authorization with 3 units per reservation counts a booked and unsigned attended visit as 6 reserved units; signing 8 minutes each of two timed CPTs replaces one reservation with 1 CMS unit, or 2 AMA units. Set a higher low remainder and see its warning before booking; exhaust the allowance and see staff, returning `/book` and portal bookings refused, while a portal move releases and reuses its own reservation. Calendar, visit panel and CSV show units. The owner’s audited REPORT-004 daily close includes low and expired unit allowances, future reservations and known CPTs outside scope; renewed current coverage clears the obsolete warning and allows booking again. A known outside-scope CPT flags the entire visit and reserves/debits nothing for visit or unit authorizations; scope is checked after whole-visit CMS allocation. Practitioners cannot read the owner aggregate. Simultaneous disjoint-scope accounting is inherited by INS-004 or the next authorization clause when a payer needs it.
- **INS-004 — Prior authorization requests** (partial). Prepare a request from a signed evaluation, record its submission and approval, and see the authorization created from the decision. `tests/insurance.test.mjs` (signed evaluation authorization requests retain external decisions and create exactly one counted authorization) proves the fixed signed evaluation, plan and outcome-score packet, owner clinical access, owner or biller entries for external submission and decisions, denial without an allowance, atomic approval without duplicate authorization and the referral, patient-file and daily-close counters. `tests/authorization-request-browser.mjs` exercises the actual forms and referral at 1440 and 390. `tests/archive.test.mjs` (prior authorization signed packets and recorded payer decisions survive a public CLI archive round trip) proves restored original bytes, decisions and audit. Submission is performed by staff outside Balm in Availity or the payer portal and recorded with an attestation, date and reference; no automated or live integration is claimed. INS-006 and AGENT-001 inherit this authority and external-work boundary. CT ruling, 26 October 2026: the recorded-request default is approved with riders; no completion is accepted. Approved: one immutable exact-digest packet of the signed evaluation, its therapist-signed plan of care and its recorded outcome scores; no outbound action from this door; an external Availity or payer-portal submission recorded with its channel, date, reference and attestation, then a dated approval or denial with its source; exactly one INS-003 authorization from an approval in the same transaction and none from a denial; PORT-001 archive custody and HIPAA-002 reviewed destruction. Riders: staff prepare requests, so a biller may prepare one against the insured referral, and the owner reviews and approves release of that exact packet digest before the biller downloads it, with the same seven-day, revocable, audited access ROLE-002 gives payer records-request and appeal releases; the owner may still prepare directly, and reception, practitioners and agents stay refused. A submission may be recorded only by someone who received that exact packet through Balm, the owner after an audited download or a biller holding an approved release of that digest, and it names who performed the external submission. The created authorization carries the decision's recorded dates, CPT scope and booking rule, and concurrent approve and deny decisions leave at most one decision and one allowance. AGENT-001 and INS-006 inherit this clinical authority and exact-digest custody before they prepare, attach or transmit a prior authorization packet. Simultaneous disjoint-CPT-scope accounting remains due in INS-004 before support for a payer requiring it. Gap: Partial under CT's 26 October 2026 ruling. Implemented and asserted: biller preparation through the command and existing native form; owner-reviewed exact-digest release with a seven-day expiry, audited biller download, revocation and expired-release refusal; submission only after packet receipt, naming the submitter; retained dates and source terms, copied authorization allowance, dates, CPT scope and booking rule, one decision from concurrent approval and denial, and mismatched-plan and missing-score preparation refusal. Unproved: live authority changes during the new commands; recent authorization records extending retention and later-destruction restore fencing. Browser approval, denial and release forms at 1440 and 390 are loaded in push Verify; exact-SHA success remains a landing gate. Simultaneous disjoint-CPT-scope accounting remains due before support for a payer requiring it. No Balm transmission, payer enrollment or business associate agreement is established; AGENT-001 carries future prior authorization transmission.
- **INS-005 — Claim creation and scrubbing** (done). Create a claim from a signed visit with a missing referring NPI and a 97140 and 97530 pair that the loaded NCCI table edits; the scrubber names both with the table version, and the fixed claim, with the clinician's distinct-service attestation and modifier 59, passes. Proven by `tests/insurance.test.mjs`, “INS-005: referring NPI and dated 97140/97530 edit hold a claim until attested correction; payer authorization, certification and filing requirements hold every export”, and “CODE-001: effective CMS quarters, billable diagnosis children, clinician distinct-service attestations, MUE and licensed charge delivery”. Screens and actual forms are checked at 1440/390. Signed charges, identifiers, enrollment, diagnosis pointers, payer fees and KX are scrubbed before batching. Dated loaded NCCI/MUE releases and billable ICD-10 children are enforced; the exact 97140/97530 pair names both codes and version, then passes only with a signed clinician distinct-service attestation, modifier 59 and valid referring NPI. Owner-recorded sourced payer requirements hold missing authorization or episode-matched physician certification; sourced service-date initial/correction filing instructions hold unknown decision dates and overdue filing. Prepared exports and sends recheck current requirements atomically. No payer rule or filing extension is guessed.
- **INS-006 — Claim submission and acknowledgments** (partial). Submit a batch in the clearinghouse sandbox, receive acceptance for one and a rejection for another, correct and resubmit, and print a CMS-1500 for a paper payer. Every added submission channel must feed the owner’s audited REPORT-004 daily close before it ships; a file export remains unsent, and only its actual recorded submission clears the item. Inherits HIPAA-001: every clearinghouse submission requires an active recorded BAA covering the configured gateway and enrollment. Evidence: `migrations/core/0134_balm_functional_acknowledgments.sql`; `tests/insurance.test.mjs` — “INS-006: matched 999 syntax originals never submit, adjudicate or move money and unsafe imports change nothing”: exact AK1 controls with optional AK2, single-transaction group acceptance, original bytes, accepted and rejected syntax with sourced reasons, wrong batch and transaction, malformed envelopes and counts, replay, concurrent import, current human authority, unchanged money and no regression after ERA; the existing INS-010 owner-carrier journey refuses biller imports and downloads and hides private 999 results while retaining owner access; existing signed-care 837P, 277CA, correction and ERA journeys retained. `tests/daily-close.test.mjs` — “REPORT-004: daily close names every category, links its records, audits named patients, and clears only after the work is complete”: 999 acceptance leaves export unsent. `tests/archive.test.mjs` — “CHART-006 INS-001 AGENT-003 PAY-004 COMM-001 SCHED-003 SCHED-009 HIPAA-003 CHART-010 CHART-009: public CLI archive round trip refuses damaged or populated stores”: exact 999 original and replay identity restored. `tests/retention.test.mjs` — “HIPAA-002: approved destruction removes clinical bytes and private tokens, retains anonymous accounts and immutable audit and receipt, and cannot be replayed”: protected originals, reviewed custody, destruction and replay refusal. `tests/functional-ack-browser.mjs`: actual multipart upload, visible syntax results, sourced reasons and original download; 1440 assertions and 1440 and 390 screens. Gap: Native 837P export, configured HTTPS adapter, matched 999 syntax receipts and claim-level 277CA imports ship; 999 never establishes payer acceptance, payment or actual submission and cannot clear an exported but unsent claim or regress adjudication. Claim.MD or Availity clearinghouse sandbox account, enrollment and provider credentials are not held; payer certification, live submission and acknowledgment, correction and resubmission proof, 276 and 277 polling and the complete sandbox and paper-payer acceptance journey remain unproved. Managed provider calls remain unavailable. Existing CMS-1500 and secondary and tertiary claim behavior stays within INS-013's proved scope; no live provider qualification is claimed.
- **INS-007 — ERA posting** (partial). Import a sandbox 835 covering paid, partly paid and denied lines; each line posts correctly and the deposit total matches the remittance. Current implementation and remaining scope: Balanced positive 835 payments, CO writeoffs and PR balances post atomically once. Payer-loop REF*2U is accepted; a name-only N1*PR uses the selected payer, while explicit ID and claim/payer mismatches still refuse. Tested through the import door; no live ERA, reversals, PLB, suspense/unmatched queue, split adjudications or secondary reconciliation.
- **INS-008 — Denials and A/R work queue** (done). Receive a denial for a missing KX modifier, see it queued with the fix, send the corrected claim and see it paid.
- **INS-009 — Medicare therapy rules** (done). Bill a beneficiary across the threshold and see KX applied with the documentation check; record an ABN for a maintenance visit and see the claim modifier. Implementation evidence: `src/balm/insurance/medicare.ts`; `src/balm/insurance/medicare-claim.ts`; `src/balm/insurance/facts.ts`; `src/balm/ui/insurance-medicare.ts`; `tests/insurance.test.mjs`; `tests/archive.test.mjs`; `docs/insurance.md`.
- **INS-010 — Workers' comp, auto and injury cases** (partial). Open a workers' comp case, bill a visit to the carrier with the claim number and a PWK-referenced progress note, and send the required progress report to the adjuster. Case setup, owner-reviewed progress-report custody, patient isolation and the PWK/REF claim file are asserted by `tests/insurance.test.mjs`, “INS-010: owner records carrier instructions and a patient-bound progress report in a PWK claim, while unconfigured report delivery refuses without sending”; the INS-001 CLI archive journey restores the carrier case and its sourced instructions. Report delivery is BLOCKED on a BAA-backed carrier attachment account/channel not held. Per-carrier requirement automation remains unproved. Conservative default ADOPTED pending ct: owner-only case/report preparation, explicit audited matching, and no injury-batch submission until the required clinical report channel is configured and proven.
- **INS-011 — Institutional claims for rehab agencies** (missing). Configure a rehab-agency practice, bill a Medicare visit, and see an accepted 837I in the clearinghouse sandbox. Evidence: `migrations/core/0141_balm_institutional_claims.sql`; `tests/insurance.test.mjs` — institutional Medicare claim preparation preserves signed charges, refuses stale facts and exports unsent 837I originals once; `tests/daily-close.test.mjs` — institutional exports remain actionable unsent work on daily close without changing money; `tests/archive.test.mjs` — institutional claim originals survive public CLI archive round trip without submission authority; `tests/retention.test.mjs` — HIPAA-002: approved destruction removes clinical bytes and private tokens, retains anonymous accounts and immutable audit and receipt, and cannot be replayed Gap: Current main judgment retained: no accepted institutional claims. Native owner-recorded agency instructions and one original outpatient Medicare visit support structural test export only. A Claim.MD or Availity clearinghouse sandbox account is not held: enrollment, provider credentials and applicable BAA authority, payer certification, live 837I submission, acknowledgment and correction resubmission, and the accepted sandbox receipt remain unproved. UB-04 printing, other institutional bill types, multiple-visit, secondary and correction workflows remain unfinished. INS-006 transport obligations are unchanged. Local structural proof establishes no payer acceptance or production data-license authority.
- **INS-012 — Manual payer payment posting** (done). Post a workers' comp check covering two claims (one with a CARC 45 contractual adjustment, one with deductible), with interest and a recoupment against a third claim; see the batch refuse to close while it is unbalanced and close once it balances to the check, each line show its CARC codes, the recouped claim reopen with its balance, and the deposit report match the check. See the batch in `REPORT-002`'s deposit reconciliation.
- **INS-013 — Secondary, tertiary and crossover claims** (done). A Medicare-primary claim for a patient with a Medigap plan returns a primary 835 forwarded to that plan; no secondary claim is created and the Medigap 835 posts. A commercial-primary claim with a commercial secondary sends a secondary 837P whose 2320 and 2430 loops carry the primary's paid amounts and adjustments and that validates as X12 5010 837P; the secondary posts from its own 835, and a tertiary claim follows the same way. The patient statement appears only after the last payer posts. Secondary and tertiary claims must appear in the owner’s audited REPORT-004 daily close before they ship, with each unsent payer claim remaining until its actual submission is recorded.
- **CODE-001 — Versioned code sets and edit tables** (partial). Load two quarterly NCCI releases where a pair's edit starts in the later quarter, and scrub one claim dated before and one after; only the later is flagged, naming the table version. Point a header ICD-10-CM code and be refused with its billable children; see modifier 59 proposed only after the attestation; run the update command twice and see the second change nothing.

## Reporting and accounting

- **REPORT-001 — Operational reports** (done). Run a month of synthetic visits and see each figure match a hand count; export each report and reopen it. Assert visits by status and no-show rate, plan-of-care completion (completed, in progress, dropped off, visits per plan), signed new evaluations by discipline, utilization and productivity against weekly hours less clinic holidays, and payroll counts by service, with inclusive clinic-local date bounds, the practitioner filter and owner-only refusal; every CSV reopens to the same figures. Plan-of-care completion counts each episode of care once with its own visits (`REF-003`, asserted in `tests/charting.test.mjs` REF-003 with its CSV); referral conversion by source and provider, its practitioner filter and CSV are asserted under `REF-001`; `SCHED-007` carries the location filter.
- **REPORT-002 — Financial reports** (done). Bill, post an ERA and card payments for a month, and see the A/R aging and deposit report match the ledger. Assert charges by date of service, payments by kind and ERA adjustments by posting date, collections per attended visit, days in A/R, payer and patient aging buckets from the date of service equal to each patient's ledger, owner-only refusal with the named patient audited, and an ERA, a card day and a desk day in the deposit list with posted, credit and unposted amounts; every CSV reopens to the same figures. `INS-012`, `PAY-004`, `PAY-008` and `ROLE-002` carry their records and the biller.
- **REPORT-003 — Outcomes and MIPS quality reporting** (partial). Record outcome measures across 20 episodes and see the change by practitioner; sign notes for eligible Medicare encounters and see the quality data codes on each claim line pass the scrubber; export the year's measurement sets and see the file accepted by the QPP Submissions API sandbox, with each performance rate matching a hand count. Evidence: `tests/report.test.mjs` (REPORT-003: twenty episode outcomes match independent counts, filters and CSV without incompatible pairs or unauthorized reads), via `tests/outcome-report-journey.mjs`; `tests/outcome-report-browser.mjs` (collapsed outcome filters, removable applied-filter chips, results and CSV at 1440 and 390, invoked by push Verify) Gap: Native owner-only audited outcome cohorts and comparable baseline-to-follow-up means are proved across 20 episodes, with practitioner grouping, recorded diagnosis and coverage filters, missing-data counts and separate instrument item sets and scoring versions; unversioned signed-chart pairs are counted separately and never averaged. CSV preserves negative changes as numbers and neutralizes formula-like text labels. Outcome filters start collapsed, with visible applied-filter chips that remove one optional filter while preserving the others and the cohort dates. Unproved and retained: dated MIPS measure selections per performance year; signed denominator, numerator and exclusion snapshots; clinician MIPS performance rates; quality-data-code claim lines and scrubber and submission proof; yearly measurement-set JSON; upload or QCDR handoff; and QPP Submissions API sandbox acceptance with hand-counted performance rates. The CMS QPP sandbox account is not held. No MIPS or live provider qualification is claimed.
- **REPORT-004 — Daily close** (done). End a day with one unsigned note, one late plan of care, one uncollected copay and one unsent claim; the daily close lists all four, and clearing each empties the list. `tests/daily-close.test.mjs` names REPORT-004 and asserts all seven categories, pending, late, missing and expired plans independent of attendance, unattached unsigned drafts, expired authorizations with future visits, current-form renewal, working record anchors, patient access audits, owner-only access (reception/practitioner/agent excluded), future-only records excluded, no note text, exported claims remaining unsent, and an empty aggregate only after signing, certification, charging, copay collection (desk and posted card payments), actual claim submission, current intake and authorization renewal. The aggregate uses clinic-local today and backlog; future CHART-003 plan doors, INS-003 unit authorizations, INS-006 channels and INS-013 secondary claims inherit the same daily-close obligation before shipping.
- **ACCT-001 — Accounting handoff** (done). Connect a QuickBooks Online sandbox, sync a day with card, ERA and cash payments, run it again, and see the books match without duplicates. `tests/payments.test.mjs` (reviewed QuickBooks journals reconcile a mixed payment day and resume lost responses without duplicates) proves owner-only connection, reviewed mappings, all money categories, exact approval, independent readback, lost-response recovery and repeat safety. `tests/accounting-sandbox.mjs` observed actual QuickBooks journal 259; `docs/evidence/ACCT-001-sandbox.json` records matching account cents and exactly one journal after replay. `tests/accounting-browser.mjs` exercises the native forms at 1440 and 390, including cash submission and icon-control tooltip checks. The retail and finance archive journey in `tests/archive.test.mjs` proves company authorization stays inactive after restore. Accounting success grants no ERA-request, refund or correction authority; AGENT-005 keeps its existing execution and recipient consent obligations.

## HIPAA, audit, retention and portability

- **AUDIT-001 — Append-only access audit** (done). Open a file, read intake and notes, download an invoice and read names with an agent key; the file's audit lists each, and an attempt to update or delete an audit row is refused.
- **ERASE-001 — Erasure fenced against old backups** (done). Erase an unused patient and staff member, restore an older archive and re-import the patient, and see both refused; try to erase a treated patient and be refused.
- **PORT-001 — Whole-clinic export and restore** (done). Export, damage a copy and see it refused, import into a populated store and see it refused, import into an empty one and see the clinic intact.
- **HIPAA-001 — HIPAA deployment readiness** (done). Enable SMS without a recorded BAA and be refused; record the BAAs and the risk analysis, and see the readiness check pass and its record exportable. Integration readiness records are native-owner-only, audited owner-entered facts, not legal verification or a compliance claim. Each BAA records the provider and account, covered plan, signed date and original reference; revocation keeps its history and blocks later attempts. Every existing patient-mail, SMS, scribe-model, clearinghouse and backup edge checks its recorded BAA; staff authentication remains available for remediation. Fax and video remain unconnected. Hosting eligibility, real-patient creation gates and live backup receipts remain HIPAA-005; a passed integration checklist cannot satisfy those duties. Evidence: SMS refusal, BAA facts, officers, encryption, risk review, passing check and export: `tests/setup.test.mjs` (HIPAA-001: owner records readiness facts and BAAs; SMS stays off without an active agreement). Native forms and export at 1440 and 390: `tests/readiness-browser.mjs`. Archive: `tests/archive.test.mjs` (HIPAA-001: public CLI archive restores the readiness review and complete BAA history). Patient mail and SMS revocation: `tests/reminders.test.mjs` (COMM-001: booked visit is reminded on schedule, confirmed in one reply, moved and canceled safely; private messages stay in Balm). Model revocation: `tests/charting.test.mjs` (billed CPT units follow the 8-minute rule onto the invoice, and the scribe drafts from dictation with the clinic’s own key). Gateway revocation: `tests/insurance.test.mjs` (signed care becomes a scrubbed 837P, a payer acknowledgment and an ERA with the right patient balance exactly once). Storage revocation: `tests/archive.test.mjs` (HIPAA-004 automatic encrypted backups reach the owner's storage, show a recovery point, and the last one restores into a scratch deployment with a later change present).
- **HIPAA-002 — Retention and destruction** (done; `tests/retention.test.mjs`, `tests/archive.test.mjs`). Choose the practice's state and see its adult and minor periods applied from the shipped table with the source named; set a 7-year retention, try to erase a treated patient and be refused, advance past retention, approve destruction and see the destruction record. Exercise owner-only policy and approval, longest adult/payer/practice deadlines, minor majority rules, unresolved-state refusal, legal holds, wrong/stale/expired previews, one-time destruction, revoked private links, unchanged anonymous REPORT-001/002 totals, audit detail scrubbing, immutable receipts and ERASE-001’s known-later-journal restore fence. See all 50 states and DC in the table, each with an https primary source and retrieval date, verified rows carrying adult and minor periods, and every ambiguous row refusing destruction until the owner records the applicable longer rule.
- **HIPAA-003 — Disclosure accounting and access reports** (done; `tests/disclosures.test.mjs`, HIPAA-003; `tests/archive.test.mjs`). After releasing records outside Balm to an attorney and a referring provider, use "Record a completed disclosure" as the owner or authorized staff to record each recipient, actual release date, purpose or legal basis, and records released. Verify the form says it records a completed release and never implies it sent records. Refuse edits and deletion of either entry; correct one by adding a new entry linked to its original, keeping both unchanged. Produce the patient's accounting of disclosures and access report for an inclusive clinic-local date range; every disclosure in that range, including the linked correction, appears, individual accesses are listed, other patients and out-of-range events are excluded, and CSV downloads and archive restore preserve the entries and links. Clinical sends and fax delivery are accepted under `CHART-011` and `REF-002`. Current implementation: owner-only completed-release recording, immutable entries, inclusive date-range reports, CSV downloads and archive round trips are covered by the cited tests. The form currently says "Record a completed release"; the exact required label and linked correction entries remain unimplemented acceptance steps. The builder-owned Status row remains done; it does not establish these additional steps.
- **HIPAA-004 — Backups and recovery** (done; `tests/archive.test.mjs`, HIPAA-004). Enable automatic backups, change data, restore the last backup to a scratch deployment and see the change present. Owner-only Clinic -> Backups takes an S3-compatible bucket and the public half of an owner-held key pair (`rer run backup:keygen`), records the owner's consent in the audit, and writes encrypted `.rer` archives on the chosen interval without a click, including into a bucket that refuses overwrites and deletions and requires upload checksums (S3 Object Lock, R2 bucket lock). The stored bytes are ciphertext; an older backup is never rewritten or deleted; a storage outage shows on the owner's schedule and is retried; and the recovery point shows on the schedule and the Clinic page. `rer run backup:drill` restores the newest backup into a scratch copy and matches its counts; `backup:restore` plus `rer import` restores it with a change made after the first backup present, and an older backup imported with the newest backup's journal refuses a patient erased since. Defaults (ct, 22 Oct): Balm holds only the public key (a lost private key cannot be recovered; destroying it leaves every backup made to it unreadable); storage credentials are sealed under the install secret; Balm never deletes or overwrites a backup, and the bucket's expiry and lock rules decide how long backups stay; erasure and destruction do not reach earlier backups until those rules remove them; nothing is sent until the owner records consent; and RER Managed hosting says backups are unavailable (named Gap: Managed hosting has no outbound connection to the owner's storage yet; outside this acceptance, which is met on a self-hosted install). Live runs against Amazon S3 and Cloudflare R2 belong to `HIPAA-005`. Inherits HIPAA-001: backup configuration, resumption and every storage attempt require an active recorded storage BAA, even for encrypted archives.
- **HIPAA-005 — BAA-covered hosting and real-patient mode** (partial). On a deployment with no hosting BAA recorded, try to create a patient in the app, book at `/book` and import a patient CSV outside demo mode, and see each refused with no patient written; record a Cloudflare BAA that omits R2 on a deployment using R2 and still be refused; deploy the documented AWS stack, see the readiness check list each AWS service it uses as HIPAA-eligible, record the AWS BAA, and create a patient; read the audit row for the switch to real-patient mode. Inherits HIPAA-001: real-patient mode must require the owner-recorded integration readiness check as well as this clause's hosting eligibility and live receipts; recording a hosting BAA in the integration register alone never enables real-patient mode. Evidence: `migrations/core/0128_balm_hosting.sql`; `tests/setup.test.mjs` (HIPAA-005: hosting qualification fences patient creation, incomplete R2 coverage, revocation and inactive authority); `tests/payments.test.mjs` (PAY-003: deposit and full booking payments reserve slots, confirm exact cents once and expose isolated fixed portal receipts): no patient, reservation or provider effect when blocked, including an earlier reservation; `tests/balm.test.mjs` (Cliniko patient CSV: preview, exact-review apply, journal with the original, and undo that keeps used clients): changed readiness refuses apply and resume; `tests/movein.test.mjs` (CHART-009 AGENT-008 cliniko: propose mapping, reconcile, owner-approved atomic cutover, duplicate-free repeat and whole-bundle undo): reviewed cutover rechecks mode; `tests/archive.test.mjs` (HIPAA-001: public CLI archive restores the readiness review and complete BAA history): hosting evidence survives without executable qualification; `tests/readiness-browser.mjs`: native hosting forms at 1440 and 390; `docs/hosting-readiness.md` Gap: Native owner-recorded deployment, account and service evidence, explicit R2 coverage, audited mode changes and same-transaction patient creation fences now ship for staff creation, public booking before payment reservation, resumed patient CSV batches and reviewed bundle cutovers. Archives preserve hosting evidence and revocations without restoring executable qualification or patient mode. Conservative default adopted: new installs and restores block creation; the owner may explicitly select synthetic demo data or activate only against current matching qualification and complete readiness. These records are attestations, not independent provider or legal verification; no synthetic record establishes live qualification or permission for real-patient use. Unproved: an actual documented HIPAA-eligible AWS stack with each used service listed and the AWS BAA recorded, successful real-patient activation there, and inherited HIPAA-004 live receipts for an automatic backup and successful restore drill against SSE-KMS S3 with Object Lock, against locked R2 on a Cloudflare BAA including R2, and the off-site storage target BAA. The practice-owned hardware qualification, full-disk encryption record and off-site backup BAA path also remain unproved. No AWS deployment runtime is supplied by this slice. HIPAA-005 stays partial until those account and live-provider obligations are proved.

## Moving in

- **MOVE-001 — Reviewed patient import with undo** (done). Preview, apply and undo a synthetic Cliniko file in which one patient was booked after import; the booked patient is kept and the journal says why.
- **MOVE-002 — WebPT migration** (partial). Import fixtures built from each documented layout (a Data Export package, a scheduler report and an A/R aging and balance report) and reconcile counts and balances under `MOVE-006`; see future appointments on the calendar with the right practitioner, service and authorization link, an overlapping pair for one practitioner landing as booked (`SCHED-010`), and an unmappable practitioner named in the report; open a migrated chart PDF in its episode; book and attend against a migrated authorization and see its remaining visits drop. Before additional chart-document migration ships, imported originals and their patient/episode references join CHART-009 searchable history under its clinical access and audit rules. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.
- **MOVE-003 — Jane migration** (partial). Import fixtures built from each documented layout (a patient CSV, an appointments CSV, a batch chart export, two per-patient intake PDFs, and the invoice and A/R reports). See future appointments on the calendar with the right practitioner and service, and each chart PDF on the right patient, with a PDF that matches nobody held for filing. Reconcile patient, appointment, document and balance totals under `MOVE-006`, with the patients whose intake was not exported and the opening-balance treatment named in the report. Before additional chart-document migration ships, imported originals and their patient/episode references join CHART-009 searchable history under its clinical access and audit rules. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.
- **MOVE-004 — SimplePractice migration** (partial). Import fixtures built from each documented layout (an all-clients data export, the appointments and client details report CSVs, and the billing and insurance reports). See future appointments with the right practitioner and service, and each client's notes and documents on the right patient. Reconcile counts and balances under `MOVE-006`. Import a second export made with separated data excluded and see the reconciliation name it incomplete and list the affected clients. Before additional chart-document migration ships, imported originals and their patient/episode references join CHART-009 searchable history under its clinical access and audit rules. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.
- **MOVE-005 — Full Cliniko migration** (partial). Import a Cliniko account with US dates through each named endpoint, from a fixture built from Cliniko's public API documentation, and reconcile it under `MOVE-006`; import the same account from the CSV exports and see the missing notes and attachments named. Before additional chart-document migration ships, imported originals and their patient/episode references join CHART-009 searchable history under its clinical access and audit rules. Find each newly added document in chart history, filter it by episode when episodes exist, and reopen the original bytes as an entitled clinician.
- **MOVE-006 — Reconciled cutover** (partial). Run a migration with one unmappable record and one balance difference; the report names both and cutover waits for the owner's approval. Evidence: `tests/movein.test.mjs` (CHART-009 AGENT-008 cliniko: propose mapping, reconcile, owner-approved atomic cutover, duplicate-free repeat and whole-bundle undo), via `tests/movein-reconciliation-journey.mjs` (reconciliationInventory, reconciliationClaimCarry and reconciliationAuthorizationCarry): explicit source counts, named inventory omissions, exact-aging open-claim carry, original controls, invalid patient and payer refusals, stale approval refusal, concurrent cutover, duplicate-free repeat through both import doors, 835 matching and unchanged cutover reconciliation after payment; reviewed authorization carry with exact source usage, pre-cutover history exclusion, booking reservations, signed-unit consumption, exhaustion refusal, role refusals and preserved usage on repeat; `tests/agent-migration-browser.mjs`: owner preview and saved reports at 1440 and 390, invoked by push Verify; `tests/archive.test.mjs` (public CLI archive round trip refuses damaged or populated stores; retail and finance originals, paused entitlements and preparation authority survive a public CLI archive round trip): exact report, original inventory files, historical invoice facts, carried claim facts and balances survive restore; `tests/movein-reconciliation-journey.mjs` (reconciliationInvoiceCarry): historical invoice facts, matching independent aging, refused differences, owner cutover, unchanged repeat and whole-bundle undo; `tests/retention.test.mjs` (HIPAA-002: state rules; HIPAA-002: approved destruction): recent historical invoice import extends retention, private invoice originals and shared source copies are destroyed only after reviewed eligibility, and anonymous dated amounts survive Gap: Source and destination patients, visits by month, historical documents, policies, invoice and authorization inventories and opening balances compare uploaded files with editable source controls. Three-column inventories name every uncarried record and create no usable authorization or invoice. Reviewed open-claim conversion files now carry original source, patient and payer controls, dates, billed amounts and balances into the existing run-out ledger in the same guarded transaction as patients and source aging. Every carried patient needs an independent aging record; claim balances must match it and the owner controls exactly. Unknown identities, ambiguous controls, changed payer mappings and closed run-out refuse carry; repeat never resets payments. Carried receivables prevent undo under existing retention custody. Other differences and omissions need a reason bound to the preview; errors block apply. Bounded groups, chunked source retention and the 1,284-patient apply remain proven. Limits remain 50,000 records and 20 MB per file. Unproved: complete native packages under MOVE-002 through MOVE-005, native invoice layouts. Native qualification needs original-header export examples and package mapping examples, including the owner-requested Jane chart mapping file; those source examples are not supplied. Reviewed historical invoice conversion now retains original references, dates, billed amounts and remaining balances in immutable patient billing history, with exact invoice counts and independent aging reconciliation. It issues no new bills or duplicate debt. Reviewed conversion authorizations now retain source allowances, prior usage and cutover dates in native policies and authorizations; visits before cutover are not counted twice, and native reservations and signed charges consume the remaining allowance. Native authorization layouts remain incomplete. Native edits refuse changing the dimension of a carried usage baseline. Existing-visit warnings use the clinic-local cutover date. Approval exposes original allowance, prior usage, policy and member mapping, scope, reservation, practitioner and booking action, and warns that native policy custody prevents undo immediately. Native incumbent claim layouts remain incomplete. MOVE-007 retains run-out under RL-103; no complete cutover is claimed.
- **MOVE-007 — Pre-cutover A/R run-out** (partial). Import an 835 mixing one migrated claim, one Balm claim and one line matching neither; the first two post to their claims, the third waits in the unmatched queue, the deposit balances, and the migrated balance reconciles to the imported A/R aging. Correct a denied migrated claim and see it resubmitted as frequency 7 with its original payer claim control number. Mixed native/migrated/unmatched 835, reviewed source aging, once-only atomic posting, explicit suspense matching, payer/age reconciliation and guarded close are asserted by `tests/insurance.test.mjs`, “MOVE-007: reviewed aging and mixed 835 retain migrated payments and unmatched suspense without losing or duplicating a deposit”; migrated balances/postings/deposits travel through the named INS-001 CLI archive journey. Corrected legacy frequency-7 gateway submission with original payer control and a single transferred balance is asserted by the denied-receivable test; scanned mixed native/legacy/unmatched paper EOB posting is asserted by the paper-EOB test in that same file. Local functional acceptance is covered; live payer transport remains INS-006. Conservative default ADOPTED pending ct: owner-only access and unknown-line review, no automatic outbound/destructive action, legacy patient responsibility held for review, and retention destruction waits on unresolved remittance identity.

## Mobile and integrations

- **MOBILE-001 — Tablet-first clinician web app** (done). As a clinician-owner under BALM-001, complete schedule → check-in/attendance → note/sign → home exercise → payment on a tablet. Drop the network mid-note, queue Save and see text retained and saved on reconnect. A missing session requires sign-in and explicit Save; a lost success response creates no duplicate revision; an intervening edit refuses overwrite and retains the local text. Inspect the note editor at 1440 and 390. `tests/mobile.test.mjs` names MOBILE-001 and runs this real-browser public-door journey in the existing browser CI shard; `tests/charting.test.mjs` covers immutable request replay and actor scoping.
- **MOBILE-002 — Native clinician and patient apps** (missing). Install both apps from TestFlight and an Android test track, record a scribe visit, sign the note and see a push alert with no clinical text.
- **INTEG-001 — API, webhooks, agent keys and FHIR export** (partial). Create a scoped key, read appointments and prepare an invoice through the documented commands, receive a webhook for a booking, and export a patient as FHIR that validates against US Core. Scoped read and preparation and owner-approved signed once-only webhooks: `tests/integ.test.mjs` (scoped keys read only authorized fields, prepare invoices for a human, and lose authority on revocation; booking webhooks require owner consent and explicit approval, verify raw-body HMAC, and never retry an uncertain send). Ct approved explicit owner consent, individual audited approval of each minimum-necessary booking notification, no clinical API-key scope and no retry of uncertain outcomes on 23 October 2026. Scoped read feeds now use bounded stable-ID pagination and the payment feed returns card receipts, recorded and payer movements and posted account movements once without allocation duplicates. `tests/integ.test.mjs` (the payment scope returns one card receipt or posted external movement without duplicating its invoice allocations) proves the card and credit case. Only booking events have webhook delivery; patient, charge and payment event types, automatic scheduling and complete-record structured US Core interoperability remain unfinished. Existing keys and older agent.create callers retain the documented workspace scope and three preparations; the UI defaults to schedule-only. RER Managed webhook sends remain unavailable. Record-export validation is shared with PORTAL-006.
- **INTEG-002 — Opt-in marketing contact sync** (missing). Opt one patient in and one out, sync, and see only the opted-in contact with no clinical fields.

## Push further with agents

- **AGENT-001 — Referral-to-collection case agent** (partial). Run a referral whose certification stalls and whose claim is denied; the agent cites each blocker, prepares the follow-ups for approval, waits on unapproved steps, and shows the case closed only after the paid ERA and zero patient balance. Current implementation and remaining scope: One case per referral follows intake, eligibility, authorization, visits, signed notes, claims, ERA and patient balance with cited records; eligibility, authorization-request, claim, denial-fix and statement steps run only after a desk person approves, with the approver kept. No fax, consent or plan-of-care certification stages, payer-chase or card-on-file asks, clinician confirmation of clinical assertions, or explicit case closing; claims rely on the 837P export or adapter, with no live clearinghouse. Before the case agent prepares, attaches or transmits a prior authorization packet, or adds any prior authorization transport through Availity, a payer prior-authorization interface, fax or email, it inherits INS-004's clinical authority, exact-digest custody and recorded-submission rules; its owner-approved re-authorization emails appear in the referral's INS-004 request history and take their decision through INS-004's decision door. Electronic transmission needs the practice's clearinghouse enrollment and a recorded business associate agreement; that is engineering and agreement work in this clause, not a reason to narrow it.
- **AGENT-002 — Care continuity agent** (partial). Cancel two visits in a patient's plan; the agent proposes a sequence inside the authorization, the clinician approves, the patient accepts by text. Evidence: `tests/cases.test.mjs` (care continuity prepares cited feasible dates and only the current treating clinician approves the exact preparation), loaded from `tests/continuity-journey.mjs` (continuityJourney and continuityBookingJourney); `tests/continuity-browser.mjs` (native preparation, separate portal release and patient acceptance); `tests/archive.test.mjs` (COMM-003 SCHED-005 public CLI archive round trip, including continuity originals and disabled restored offers); `tests/retention.test.mjs` (HIPAA-002 state rules, including later continuity review and release custody) Gap: Treating-clinician preparation and exact-digest approval use the current therapist-signed plan and native cadence, two unreplaced cancellations, waitlist preferences, availability, capacity and remaining visit or unit authorization. Approval creates no booking or offer. A separate clinician release offers the exact dates in the patient's signed-in portal for at most 24 hours, with no hold or outbound notice. Explicit patient acceptance rechecks every source and current patient and releasing-clinician authority, then books all dates and their ordinary authorization reservations in one transaction or changes nothing; replay cannot replace the same cancellations twice. Archives retain originals and acceptance accounting with execution disabled. Conservative interim floor under the standing scope rule: treating clinician only, unchanged signed cadence, direct patient confirmation only, no guardian delegation, no agent clinical access and no automatic outbound action. Held: an authorized clinic US SMS sender and configured credentials are not held. Patient text offers and acceptance, live sender qualification and the complete cancellation-to-text-accepted-bookings journey remain unbuilt and unproved. Scoped agent preparation, delegation and provider execution boundaries remain pending ct approval. Waitlist matching, ordered timed holds and progression remain owed by SCHED-005.
- **AGENT-003 — Documentation defensibility check** (done). Draft a note billing 4 units with 40 minutes of mostly unskilled exercise; the agent names the unsupported unit and the missing skilled rationale with sources, and the clinician's edit clears them. `tests/charting.test.mjs` names AGENT-003 and asserts the four-unit/40-minute discrepancy, missing skilled need, source links, plan and payer requirements, progress-report due, clinician edit/recheck with cleared findings, unchanged draft and human signing, clinical-role and agent refusals, model failure/invalid citations, and stale answers after rule changes. `tests/archive.test.mjs` and `tests/retention.test.mjs` assert preservation of the original result and destruction of its clinical excerpts. Checks follow BALM-004’s existing configured-model door; future CODE-001, INS-001, INS-013, CHART-003 and ROLE-002 capabilities inherit the grounded-review obligation.
- **AGENT-004 — Denial resolver** (done). Feed a sandbox denial for a missing authorization; the agent prepares an appeal citing the authorization and note, the biller approves, and the agent marks it resolved only when payment posts. Evidence: `tests/cases.test.mjs` (denial appeal preserves cited adjudications, fences current evidence and billing authority, and resolves only on posted payment; rejected claims explain the original 277CA codes and cite the acknowledgment without inventing an ERA), via `tests/denial-resolver-journey.mjs`; `tests/insurance.test.mjs` (a payer denial lands with its reason and fix, and the clinician can draft an appeal and correct the claim); `tests/archive.test.mjs` (denial appeal originals and complete adjudications survive public CLI archive round trip); `tests/denial-resolver-browser.mjs` (rejected, prepared, approved and paid states at 1440 and 390, invoked by push Verify)
- **AGENT-005 — Month-end reconciliation** (partial). Run a month with one missing ERA and one duplicated card payment; the agent explains both, requests the missing ERA and prepares the refund for approval. Evidence: `tests/cases.test.mjs` (month reconciliation cites missing ERA and duplicate settlement originals and only approves preparations); `tests/finance-review-journey.mjs` (financeReviewJourney and wholePayoutJourney: whole payout originals, multi-patient totals, once-only links, stale-source refusal and live authority); `tests/agent-migration-browser.mjs` via payoutBrowser in `tests/finance-review-journey.mjs` (native payout recording, linking and exact preparation approval at 1440 and 390); `tests/archive.test.mjs` (retail and finance originals, paused entitlements and preparation authority survive a public CLI archive round trip); `tests/retention.test.mjs` (HIPAA-002: state rules, payer/practice maximums and minor majority protect treated records until their period ends) Gap: Owner-recorded settlement observations support an explicitly scoped finance.reconcile.prepare key. The public-door journey proves a missing ERA explanation and request draft, a possible duplicate card settlement explanation and refund draft, cited original references, repeat-safe preparations, scoped refusal, digest-bound owner approval and no money movement or outbound request. Conservative default ADOPTED; ct APPROVED WITH CHANGES on 25 October 2026 for preparation only. Owner-recorded evidence and once-only draft approval establish neither provider truth nor execution authority. Requests, refunds and allocation corrections remain disabled in this slice. Owner-recorded charge originals, allocated payout portions with fees and accounting originals now join monthly settlement observations by patient and original reference. `tests/finance-review-journey.mjs` proves one cited explanation per recorded amount, a 100-cent accounting difference, agreement after its recorded remainder, missing-source explanations and isolation of identical references on another patient. The focused `tests/archive.test.mjs` journey (retail and finance originals, paused entitlements and preparation authority survive a public CLI archive round trip) covers the recorded sources, approved preparation digest and refusal to revive an agent grant. These are recorded comparisons, never processor truth. Owner-recorded whole-payout envelopes now cite a practice account, payout reference, gross, fees, net, date and original evidence. Explicit immutable links bind existing patient portions to card settlements with the same patient, original charge and exact gross; conflicting account or reference, duplicate source, reused settlement, cross-month and excessive links refuse. Fixed comparisons independently total linked gross, fees, net, charge and accounting originals and the unallocated gross, fees and net remainder. Preparation approval binds the exact stored digest, rechecks cited sources and links, and never grants execution. The public-door journey proves independently hand-counted multi-patient totals, missing portions, replay, unsafe-link refusal, stale approval, current owner and scoped key authority, unchanged balances and zero provider effects. The existing CLI archive journey preserves whole originals, links, fixed comparisons and historical approvals without reviving grants; the retention journey preserves existing finance custody fences after preparation approval. Cross-period and full EFT accounting reconciliation, actual missing-ERA pursuit and outbound requests, refunds, allocation corrections, execution approval and uncertain-outcome handling, resolution lifecycle and complete record-specific destruction, inactive and stale-restore coverage remain unproved. Execution requires actual relevant provider originals and fresh specific authority; recorded comparisons establish neither provider truth nor recipient consent. Requests, refunds and corrections stay disabled; AGENT-005 remains partial. The [PAY-008 and AGENT-005 adopted-default riders](#pay-008-and-agent-005-adopted-default-riders) bind future execution and map deferred work to existing clauses.
- **AGENT-006 — Outcome follow-through** (partial). Run an episode with one missed questionnaire; the agent follows up once within limits and drafts a brief that the clinician edits into the progress report. Current proof: `tests/cases.test.mjs` (AGENT-006: episode questionnaires follow up once within shared limits and a cited score and adherence brief becomes a clinician-edited progress report): missed questionnaire, one bounded follow-up, immutable PSFS score, selected-program adherence, open questions, clinician edit and episode assignment; `tests/outcome-followthrough-journey.mjs`; `tests/agent-followthrough-browser.mjs` (patient request, clinician brief and edited report at 1440 and 390). Remaining: Native treating clinicians choose an episode questionnaire and home-program cadence, prepare due cycles, confirm current patient opt-in and approve each exact generic portal notification. One follow-up per unanswered request shares the clinic contact cap, including uncertain attempts. The cited brief keeps scores, selected exercise logs and patient questions; the clinician edits an unsigned episode progress report. Conservative default ADOPTED pending ct: native treating clinician only, explicit audited current consent and digest-bound approval for every send, no agent-key clinical access or unattended sending, no diagnosis or treatment change. Unattended preparation and cadence execution and ct approval remain unproved. BALM-001, COMM-004, INTAKE-003 and HIPAA-002 inherit the same authority, consent, contact-limit and custody duties for later execution.
- **AGENT-007 — Front-desk inbox agent** (partial). Send one of each message type; each is sorted and drafted correctly, the clinical one reaches the clinician without a drafted answer, and nothing is sent before approval. Evidence: `tests/cases.test.mjs` — inbox prepares cited administrative requests, preserves clinical privacy and approves an exact current preparation once without effects, via `tests/inbox-journey.mjs`; `tests/communication-browser.mjs` — native preparation and review forms at 1440 and 390; `tests/archive.test.mjs` — COMM-003 SCHED-005: public CLI archive round trip preserves exact calls, waitlist preferences and custody in an empty install, plus HIPAA-002 ERASE-001: public CLI erasure journals refuse both ordinary erasure and later destruction resurrection; `tests/retention.test.mjs` — HIPAA-002: state rules and approved destruction journeys Gap: Native human-invoked portal-message triage and exact-digest preparation approval only. Existing conversation permissions remain authoritative; clinical conversations stay untouched, and mixed or uncertain requests require human review. No agent-key message access, reply delivery, booking, referral filing or records release is supplied. Incoming email, SMS and fax ingestion, history and delivery receipts, approved reply delivery, reschedule and referral execution and the complete multi-channel acceptance journey remain unproved. A BAA-backed fax account and an authorized clinic US SMS sender with credentials are not held; file history must cover both channels. Conservative interim authority is limited to already-entitled native humans approving preparation, with no execution grant; scoped delegation and provider boundaries remain pending ct approval.
- **AGENT-008 — Migration agent** (done). Give the agent the `MOVE-002` to `MOVE-005` fixtures, one with two unusual custom fields added; it proposes a mapping, flags both fields with examples, and the import applies only after the owner approves. `tests/movein.test.mjs` (CHART-009 AGENT-008 cliniko, webpt, simplepractice and jane: propose mapping, reconcile, owner-approved atomic cutover, duplicate-free repeat and whole-bundle undo): four provider fixtures, two unusual custom fields and source examples, unmapped record explanations, balance differences, reviewed report, scoped preparation and separate owner mapping and cutover approvals; `tests/migration-agent-journey.mjs`; `tests/agent-migration-browser.mjs` (upload, unapproved mapping, owner cutover and saved reconciliation at 1440 and 390). The mapping agent uses supported header rules and names unsupported fields with source examples for owner review; it never invents meanings or balancing entries. Scoped keys receive metadata only and cannot read clinical files or execute imports. Native complete incumbent export support remains the unchanged MOVE-002 through MOVE-006 obligations.
- **AGENT-009 — Replacement booking authorization agreement** (missing). Accept a series' reviewed replacement visits through the signed-in patient's portal offer; verify the bookings and remaining authorization agree, with no authorized visits remaining beyond the reviewed count. Evidence: None yet. Gap: Ct split from AGENT-002 on 29 October 2026; the portal acceptance journey must prove the reviewed replacement count and remaining authorization agree.
- **AGENT-010 — Concurrent PT and OT continuity** (missing). Through the treating clinician's patient file, prepare plan-derived replacement proposals for a patient receiving concurrent PT and OT treatment; verify the proposed dates remain feasible while continuity counts both disciplines. Evidence: None yet. Gap: Ct split from AGENT-002 on 29 October 2026; the clinician preparation journey must prove feasibility with both disciplines counted.

## PAY-008 and AGENT-005 adopted-default riders

Ct's 25 October 2026 **APPROVED WITH CHANGES** ruling at `fae6cc46b81f4b0bed15dd2362dc6134b265423b` approves these conservative defaults only. Both clauses remain partial; every status, count and existing acceptance journey is unchanged. The review inspected source and assertions without executing them and grants no legal, provider, production or landing authority. The earlier builder-reported movement to 65 done, 30 partial and 15 missing remains uncounted by ct. These notes qualify the adopted defaults and allocate existing obligations; they add no acceptance points.

**Retail recording.** The active owner records a sale, confirms cash already received or gift redemption, and assigns finite packages or memberships to the named patient's matching cash-pay service. Authorized attendance consumes a visit without granting sale authority. Amounts are integer USD cents. Product tax requires the owner's recorded state, rate and supporting evidence; calculation proves arithmetic alone, supplies no rate and establishes neither applicability nor legal correctness. Patient-bound gift value stays separate from ordinary credit and cannot buy another gift, transfer or overdraw. Sale recording authorizes no renewal, expiry, transfer, refund, provider charge or insurance billing. Staff sale work and the complete membership lifecycle remain due. Receipts, existing visit superbills, ledger entries, reports and deposits retain their access limits and fixed-original duties.

**Membership pause and retention.** The active owner records each pause and resume against the named patient and finite membership, with effective time, current unused visits and explicit patient authorization identifying the requested transition, when and how authorization was obtained, and the recording actor. Resume changes the membership state without deleting its pause history. General intake, treatment or card consent does not authorize a membership transition. Pause and resume preserve unused visits without forfeiture or expiry; paused membership visits cannot be consumed until resumed, and exhaustion follows authorized consumption only. Neither transition authorizes automatic renewal, a provider charge, insurance billing, a new purchase or alteration of an external billing arrangement. Each later cash purchase has separate authorization, receipt, ledger entries and entitlements and neither resumes nor renews an earlier membership. For affected retail records, retention is measured from the later relevant retail event, including an actual sale, redemption, consumption, pause or resume, without shortening any later clinical deadline or applicable adult, minor, payer or practice requirement; legal holds continue to block destruction. Reads, exports and restores do not restart retention. Apply HIPAA-002’s documented applicable rules, exact-inventory approval and eligible destruction, preserving anonymous dated accounting facts, permitted audit structure and destruction evidence, with ERASE-001’s later-journal restore fence. A retail event does not justify indefinite retention or retention of unrelated records. Preservation without visit expiry does not imply perpetual retention of identifiers; destruction must not silently cancel an unresolved entitlement. Resolution of outstanding entitlements and complete preservation, destruction and inactive or stale restore behavior remain named Gaps until proved. This rider supplies no new legal retention period. Complete cancellation and renewal handling, staff sale authority, any billing-system or card-processor handoff, patient-facing notices and complete membership reporting remain named PAY-008 Gaps, with existing portal, financial reporting, authority and custody duties retained in their receiving clauses.

**Finite lifecycle default (CT RL-104, 28 October 2026).** The default is approved with riders, as recorded in [RULINGS.md](RULINGS.md). Only the active owner records specifically patient-authorized cancellation of an exhausted membership, without forfeiture or settlement. No intake, treatment or card consent substitutes for transition authorization.  Only the active owner records an explicitly patient-authorized finite renewal of an exhausted, uncancelled membership for the same patient and service, with separate cash already received, new price and visit count, authorization evidence and times, a new immutable receipt and entitlements, and a once-only link to its source. Neither purchase changes the other, and an existing cancelled or unconsumed membership cannot authorize renewal. Representative assertions are refused until their authority is established. Portal notices show recorded purchases, pauses, resumes and cancellations without internal consent evidence; they authorize no outbound send. Whole-clinic reports and CSV show recorded state, consumed and unused visits, allocated unearned purchase value and separate gift liability at period end, preserving anonymous dated facts after approved destruction. Unearned value is not a refund quote; previously destroyed purchases without dated use facts are explicitly incomplete. This renewal default authorizes no automatic renewal, forfeiture, refund, provider charge, external billing change or new staff sale authority. Policy approval does not certify implementation or completion; PAY-008 remains partial. Only the active owner records a specifically patient-authorized cancellation and settlement of unused visits on a cash-funded finite membership, after the exact cash refund has already been completed outside Balm. The refund equals the recorded purchase price allocated to all unused visits, rounded once to cents; this arithmetic is not a legal refund determination. The record requires separate completed-refund evidence and reference, explicit transition authorization, no booked assigned visit, and a live unused-count check. It atomically preserves the settled count, cash refund and cancellation once, without inventing attendance or changing the original receipt. Gift-funded, representative-authorized, missing-evidence and mismatched-amount settlement refuse. The ledger, financial reports, deposit reconciliation, portal notice and accounting preparation include the same recorded refund; approved destruction preserves anonymous dated arithmetic, and archives retain the original authority evidence. The record supplies no provider verification and initiates no refund or outbound action. Non-cash and gift settlement, delegated staff, representative consent, automatic renewal, provider notices and detailed retention remain unfinished; PAY-008 remains partial.

**Original-gift settlement default (adopted pending ct, 28 October 2026).** Only the active owner, under explicit patient transition authorization, restores the exact unused portion of a gift-funded finite membership to that same patient's original gift. It cancels the settled membership atomically, preserves attendance and receipt originals, and cannot pay cash, transfer value, create another gift or initiate a provider refund. Concurrent restoration and spending are once-only and never overdraw. The ledger, portal, period-end gift liability and accounting preparation distinguish restored gift liability from cash refunds; restoration records extend affected retention and archives preserve their facts. This conservative default awaits ct approval and supplies no representative authority or legal refund determination. PAY-008 remains partial.

**Finite staff sale default (adopted pending ct, 28 October 2026).** Cash recording and matching visit assignment remain denied to staff unless the active owner explicitly grants them to a named active reception person or biller for at most seven days, with an audited reason. Delegated product tax must match the exact state, rate and source recorded by the owner in that grant; staff cannot substitute tax policy. Immutable approval originals remain archive evidence while executable grants are excluded. Every write rechecks the grant, its expiry, the staff version, the granting owner's current authority and the current native session. Revocation and staff changes end the grant; archive restore excludes it and requires new authorization. This grant adds no clinical read, representative consent, membership transition, settlement, renewal, provider action or outbound authority. The same patient-bound gift and tax arithmetic, original receipts and financial reporting duties apply to delegated sales. This conservative grant default awaits ct approval; broader staff sale scope remains unfinished and PAY-008 stays partial.

**Preparation and future execution.** The active owner records patient-bound observations with kind, USD amount, actual transaction date, settlement reference, original trace or charge reference and source evidence. An explicit owner-bound `finance.reconcile.prepare` grant permits preparation for the requested month across recorded clinic observations; it grants no clinical read, financial execution or outbound communication. Findings are cited explanations and drafts: a missing ERA proves no payment and a possible duplicate proves no refund entitlement. Once-only owner approval of the exact stored draft digest approves preparation alone. Before any future request, refund or allocation correction, an authorized human must review the actual relevant payer, processor and accounting originals; entered evidence and matching references alone cannot establish provider truth. Execution approval must bind patient, practice account, source originals and revisions, purpose, exact content, named recipient and channel, USD amount and applicable payment destination, with current patient or representative authority and recipient consent recorded where the action requires them. A key grant or draft approval supplies neither authority nor consent; no clinical consent is inferred. Changed sources, payment or ERA state, patient or account association, amount, recipient, consent or authority require fresh review and approval. The current digest and once-only checks do not revalidate those facts, and earlier findings may remain returned after circumstances change. Future execution must distinguish prepared, approved, attempted, uncertain and confirmed outcomes, prevent duplicate requests, refunds and corrections on replay, and reconcile an uncertain original attempt before another attempt. Execution and that lifecycle remain unproved and disabled in this slice.

**Bounded custody and restore.** Refusing unsafe destruction while preservation is incomplete is an immediate fence, never indefinite retention because a retail sale or finance observation exists, nor grounds to retain unrelated records. Identify affected records, apply documented applicable retention and legal holds, and complete authorized destruction of identifying and private copies while preserving anonymous accounting facts and totals, the permitted audit skeleton, destruction evidence and the later-journal restore fence. Custody adds no chart-reading authority and this ruling supplies no new period or legal rule. Existing archive assertions cover a gift receipt original and a reconciliation finding, not complete new-record preservation, destruction or every approved, stale and inactive restore case. Export excludes agent keys and private access credentials. Restored historical approvals are evidence only: they cannot reactivate inactive actors, revive revoked capabilities or trigger outbound actions; current authority must be checked again.

The following receiving clauses apply in both CONTRACT.md and ACCEPTANCE.md; their existing journeys remain binding:

| Deferred work and rider | Existing receiving clauses |
| --- | --- |
| Retail scope, finite patient and service assignment, staff sale authority and complete membership lifecycle | `PAY-008`, `ROLE-002`, `BALM-001` |
| Month reconciliation, every unmatched amount, cited preparations and scoped live authority | `AGENT-005`, `INTEG-001`, `BALM-001` |
| Actual refunds, allocation corrections, original payment authority and exact-action, fresh-review, replay and uncertain-outcome fences | `PAY-002`, `PAY-004`, `BALM-003` |
| Payout, EFT, charge and accounting matching, actual missing-remittance pursuit and resolution | `INS-007`, `ACCT-001`, `AGENT-005` |
| Fixed statements and receipts, portal access, ledger and deposit arithmetic | `PAY-009`, `PORTAL-004`, `REPORT-002` |
| Affected-record custody, eligible destruction, anonymous totals, export and recovery, inactive and stale restore | `HIPAA-002`, `ERASE-001`, `PORT-001`, `HIPAA-004` |
| Access audit and completed disclosures under existing boundaries | `AUDIT-001`, `HIPAA-003` |

`HIPAA-003`'s payer exception remains intact: these riders require no new accounting entry for every payer communication. Real-patient and BAA gates remain with `HIPAA-001` and `HIPAA-005`.

## Before real patient data

Required before real patient data (`HIPAA-005` is missing; the real-patient gate is not implemented): a supported deployment with its hosting BAA (or practice-owned hardware) recorded, the readiness check, the other recorded BAAs and the risk analysis; until then the deployment must refuse to create real patients. Current demo mode alone does not enforce this requirement, and `OWN-001` cannot be completed by no-outbound evidence alone. The Cliniko fixture is synthetic; real export compatibility is claimed only when `MOVE-005` and `MOVE-006` pass on fixtures built from Cliniko's documented API and export layouts. Provider journeys (clearinghouse, Stripe, Twilio, fax, video, accounting) run against each provider's sandbox; a passing sandbox journey does not establish production enrollment with a payer.

ROLE-002 / CHART-008 adopted defaults: see `docs/ACCESS-MATRIX.md`. ct approved the baseline with changes on 22 October 2026; the completed flows and ruling changes are proven below and mapped in CONTRACT.md. The ROLE-002 matrix journey also refuses all shipped non-daily templates and evaluation codes for assistants, including revisions, asserts no clinical write and checks audited refusals. `tests/balm.test.mjs` (ROLE-002: owner-assigned jobs) proves billing/adjustment/report access, location isolation, draft-only restrictions and audited refusals. `tests/charting.test.mjs` (CHART-008: student submission) proves return, immutable author signature, co-sign race/lock, supervisor claim rendering and inherited care-team/emergency read audits. `tests/archive.test.mjs` (CLI archive preserves jobs) preserves jobs and both signatures; `tests/retention.test.mjs` (approved destruction removes clinical bytes) removes the clinical signature history only under approved destruction. The existing `tests/insurance.test.mjs` billing journeys now use an invited biller, preserving owner configuration, clinician attestations and every existing assertion. `tests/payments.test.mjs` (ROLE-002: the biller completes) adds successful card, plan, reminder/statement, adjustment/write-off/credit/refund, document and A/R work. The role matrix journey submits and co-signs each assistant/student/fellow role.

PAY-007’s baseline was approved with changes by ct on 22 October 2026; the clause is done after ct’s approved 22 October carve; co-provider estimates, payer AEOBs and notice of GFE availability are carried by PAY-010. The approved baseline is: explicit owner-recorded uninsured/self-pay choice, current cash fees and recorded/anticipated care quantities, owner-reviewed manual issuance by the patient’s requested portal or paper method, no automatic outbound notice. `tests/payments.test.mjs` (PAY-007: scheduled and requested estimates) / `tests/good-faith-journey.mjs` assert the 4-day/1-day, 12-day/3-day and unbooked/3-day cases, exact original retention, signed-in patient isolation and the $399.99/$400 boundary. `tests/archive.test.mjs` (CLI archive preserves jobs) carries the original PDF through CLI restore.

INTAKE-002: `tests/intake-portal.test.mjs` (INTAKE-002: service and discipline packets) asserts packet priority and PT/OT/SLP/pediatric selection, all five named instruments, score arithmetic, missing/out-of-range refusal, clinical read limits, stale-form refusal and earlier version/answer/score retention. The practice enters its authorized instrument item wording. `tests/archive.test.mjs` (CLI archive preserves jobs) carries the exact form version and score through CLI restore. The focused CLI restore and actual owner publication, patient response/signature and clinician chart score screens pass at 1440 and 390.

ROLE-002’s location foundation closes REPORT-001’s current location inheritance: `tests/report.test.mjs` (ROLE-002 REPORT-001: owner reports and CSVs split room locations) asserts the owner filter, explicit weekly-hour allocation, source-note plan and first-visit referral attribution, CSVs and fixed historical room scope. `tests/retention.test.mjs` (approved destruction removes clinical bytes) asserts unchanged location report figures after destruction. SCHED-007 closes its service-location availability and buffer requirements through the named schedule, report and archive journeys.

CHART-008 ct fix round (22 October 2026): `tests/charting.test.mjs` (CHART-008: student submission) refuses a PTA naming an OT supervisor without a staff grant, requires a recorded supervision level, puts a student evaluation in the co-sign queue, refuses a Medicare student visit co-signed on site from a claim batch and exports an in-room visit under the therapist. `tests/archive.test.mjs` (CLI archive preserves jobs) preserves the supervision level. The same journey asserts an owner-recorded cited state deadline, exact due time from visit end, overdue queue, governing-plan content and its audit, and access revoked on return. The journey also proves explicit state/current-payer permission for a named assistant, owner-only rule creation, refusal without a matching rule, own final daily signature/lock, therapist-only immutable supervision attestation, no claiming before attestation, re-scrub to therapist rendering and revocation without altering prior signatures. The supplied ct ruling’s owner-recorded state/payer permission is enforced with no independent permission by default and no billing until actual supervision is recorded by the named therapist. Wrong-payer, expired and revoked rules refuse signing; students and fellows always use dual signatures. Archive/destruction journeys preserve/purge the independent clinical signature and therapist attestation. CHART-008 is done on this evidence.

PAY-007 ct fix round (22 October 2026): `tests/payments.test.mjs` (PAY-007: scheduled and requested estimates) / `tests/good-faith-journey.mjs` refuse missing service/diagnosis codes, assert the plan codes in the original PDF, record both printed-original handoff and mailing (digest-bound, owner-only, once), show staff and `/book` self-pay requests on the owner schedule with their original due dates until issued and never infer self-pay from unknown coverage. `tests/archive.test.mjs` (CLI archive preserves jobs) restores referral diagnosis, requested method, paper receipt and original PDF. `tests/good-faith-journey.mjs` also proves notices at all three doors, reception request/biller preparation, owner-only exact-digest issuance, a linked replacement without changing the original, duplicate and late replacement refusal, replacement portal isolation and the six-year destruction refusal. The c29 manual co-provider/AEOB slice below is carried by PAY-010 with ct’s approved manual boundary; payer submission/polling and live interoperability remain unavailable.

ROLE-002 completion: `tests/balm.test.mjs` (ROLE-002: owner-assigned jobs) proves the location manager’s booking, move, cancellation and charge-free check-in; refuses foreign source/destination, unassigned room, foreign patient and charge attempt without write; proves biller preparation of a selected signed-note release, no note text before approval, owner review/exact-digest approval, fixed original, role isolation, immediate revocation and audited refusals. Existing billing/public insurance journeys and REPORT-001/002 tests prove the matrix’s remaining allowed work. `tests/archive.test.mjs` (CLI archive preserves jobs) preserves the release PDF and approval, and `tests/retention.test.mjs` (approved destruction removes clinical bytes) purges its clinical copies. Owner approval authorizes biller access for seven days, with no outbound send; HIPAA-003 inherits recording a completed external disclosure, and CHART-011/REF-002 keep sending obligations.

SEC-001 implemented proof: `tests/mobile.test.mjs` (SEC-001: staff enroll and recover through real browser forms) / `tests/staff-security-browser.mjs` completes real form enrollment, recovery, first setup, idle policy and device revocation at 1440 and 390; credentials are masked in optional screenshots. `tests/security.test.mjs` (SEC-001: every staff job needs an independent second step; owner device revocation, one-use recovery and idle timeout deny the next request) asserts all PHI-reading jobs without/with independent proof, factor encryption, one-use/replay refusal, origin/rate fences, owner session listing and clinic-wide/idle settings, no non-owner policy changes, remote revocation and idle denial on the next read and write. `tests/staff-security-journey.mjs` repeats the idle point with actual elapsed time on a clean exact candidate outside push Verify. `tests/archive.test.mjs` (CLI archive preserves jobs) asserts factors, pending seeds, recovery credentials and device proofs are absent after restore. Ct approved the enrollment/recovery/archive semantics with riders on 22 October 2026. `tests/security.test.mjs` (SEC-001: staff regenerates a private recovery set) proves ten codes shown once, salted hashes, fresh-authenticator regeneration invalidating the old set, and each use audited and shown privately at the next sign-in without outbound mail/SMS. Its every-staff-job journey proves enrollment is session-bound. `tests/security.test.mjs` (SEC-001: federation preserves live Balm roles and independent factors) / `tests/federated-staff.mjs` proves linked Auth OIDC for every staff job, hostile role/MFA claims cannot widen access or replace Balm proof, and live job/deactivation changes apply to existing sessions. Actual elapsed idle is proven on the exact candidate by heavy-slot run `sx-balm-c29-security`. Losing the factor and every code leaves the user without PHI until re-enrolled; email-only reset, owner bypass and assisted reset are unavailable. Direct Workspace/Okta/SAML linking is unavailable; the optional linked Auth OIDC path is proven.

PAY-010 c29 manual boundary APPROVED by ct, 22 October 2026: contributing providers’ written quotes are manually recorded with identifiers, provenance, codes, quantities and charges; the owner reviews the aggregate digest and issues a fixed original with provider subtotals. The clinic’s billed comparison uses its own subtotal, so other providers’ quotes cannot dilute the $400 flag (`tests/payments.test.mjs`, PAY-010: contributing provider quotes stay in the aggregate original / `tests/estimate-contributors-journey.mjs`). Payer-authored AEOB PDFs are owner-only imports with an explicit patient-policy match, exact-original review and a recorded patient request before portal publication (`tests/payments.test.mjs`, PAY-010: an owner matches, reviews and publishes the payer original / `tests/payer-estimate-journey.mjs`). It neither calculates payer benefits nor sends patient details, requests provider quotes, submits an insured GFE or polls a payer. Original documents and approvals survive CLI restore and follow the six-year retention floor. `tests/estimate-browser.mjs` exercises the real forms and patient portal at 1440/390; `tests/good-faith-journey.mjs` runs the existing deadlines on the exact candidate outside push Verify as `sx-balm-c29-gfe`. PARTIAL for the transport deferral; no payer endpoint/account is selected or live interoperability claimed. The existing acceptance points above are unchanged. The per-provider comparison follows [CMS’s patient-provider dispute rule](https://www.cms.gov/initiatives/your-patient-rights/medical-bill-rights/know-your-rights/without-insurance).

INS-012 (sx-balm-c30): `tests/insurance.test.mjs` (INS-012: balanced manual EOB batches) / `tests/manual-payer-journey.mjs` proves every existing acceptance point: the two-claim workers-comp check, CO-45 and PR-1, failed unbalanced close without posting, interest and a separate-claim recoupment, once-only balanced close, reopened balance and matching deposit/CSV. Repeated entries for one claim, manual denials, patient statements and owner/biller EOB access are asserted. `tests/manual-payer-browser.mjs` uses the real forms and inspects all end states at 1440/390. `tests/archive.test.mjs` (INS-012: CLI archive preserves jobs) restores the fixed EOB, recouped balance and deposit arithmetic. The same signed cash projection drives every invoice balance, payment plan, statement, daily close and financial report. The existing REPORT-002 and PAY-004 CSV assertions now include the added interest/recoupment columns; their original amounts remain asserted.

INS-008 (sx-balm-c30): `tests/insurance.test.mjs` (INS-008: sourced claim work follows a KX denial through correction and payment) / `tests/denial-work-journey.mjs` proves the unchanged acceptance through a real gateway request with a network-edge fake: missing KX, named remedy, frequency-7 replacement carrying original payer control, paid ERA and cleared balance. It also proves payer/age/CARC filters, sourced filing instructions, unknown deadlines before a payer decision date, overdue appeals, recorded external follow-up/appeal, role refusals and retained action history. `tests/denial-work-browser.mjs` exercises the real forms and all end states at 1440/390. The existing CO-197 corrected-authorization journey remains. No live clearinghouse enrollment is asserted; INS-006 carries it.

CHART-002 (sx-balm-c30): `tests/charting.test.mjs` (CHART-002: PT, OT and SLP complete signed episodes) / `tests/chart-template-journey.mjs` proves each unchanged acceptance point for all three disciplines, plus re-evaluation, required custom pick lists and versioned body/diagnosis variants. The browser uses real template, compose, save and signature forms at 1440/390. Charting, reporting, roles, recalls, the tablet and CLI archive checks pass with explicit complete clinical fixtures; the tablet re-prepares its invoice from the newly signed interventions before approval. The obsolete exact section-label assertion was removed because required daily elements changed.

INS-013 (sx-balm-c30): `tests/insurance.test.mjs` (INS-013: prior adjudications reach secondary and tertiary claims, crossover waits without duplicates, and patient balances wait for all payers) / `tests/cob-journey.mjs` proves every unchanged acceptance point: named Medicare/Medigap crossover without a duplicate, commercial secondary and tertiary prior-payer loops and actual line adjudication, payer-specific units, each payer’s own ERA, last-payer-only statements, and the inherited audited daily close until actual submission. Both public-door files pass independent pyx12 X222A1 validation (`tests/cob-x12-validate.py`, run 20261023T010850282130Z-heavy-slot-c4549c5d). `tests/cob-browser.mjs` uses the real forms at 1440/390, retains the primary EOB with the print packet and records actual paper submission separately. `tests/charting.test.mjs` (AGENT-003: grounded pre-sign questions) includes `tests/cob-defensibility-journey.mjs` for all covering payers’ unit/documentation rules and stale changes. The clause’s explicit configured-wait/human-decision path stays owner-only, audited and nonautomatic; an ordinary pending payer balance cannot be collected, while an already recorded visit copay remains capped and collectible. Live enrollment remains INS-006; no live payer receipt is claimed.

CODE-001 (sx-balm-c30): `tests/insurance.test.mjs` (CODE-001: effective CMS quarters, billable diagnosis children, clinician distinct-service attestations, MUE and licensed charge delivery) proves each enumerated acceptance point with native-format source fixtures at the CMS network edge and reviewed private test uploads. It also proves same-day MUE across separately batched claims and reviewed HCPCS timing through signed charge → invoice → 837P, preserving both source releases after later uploads. `tests/code-import-journey.mjs` proves bounded durable continuation, atomic concurrent cursors, replay and refusal to publish a late-corrupt archive. `tests/code-sets-browser.mjs` proves the real owner and clinician forms, update warnings, modifier proposal and 1440/390 end states; calendar controls retain delayed-hover/immediate-focus tooltips. Existing scribe/diagnosis-selection assertions now include server-loaded immutable catalog metadata; unavailable procedures remain refused without creating a draft. The unproved boundary is a real deployment-licensed CPT file, applicable owner-confirmed CMS/AMA terms and complete production-release ingestion/throughput. No license or live payer acceptance is claimed.

<!-- contract-docs:begin BASE-AGENT-001 -->
- **BASE-AGENT-001 — One MCP door per seed** (partial). *Tier:* Agent surface **Requirement.** Every seed, hosted or self-hosted, serves one remote MCP endpoint at `/mcp` over Streamable HTTP. It speaks the current revision (2026-07-28) and accepts 2025-11-25 clients through the twelve-month deprecation window. It implements `server / discover`, tools, resources and prompts. Lists are deterministic and carry `ttlMs` and `cacheScope: "private"`. Roots, Sampling and Logging are not served. **Acceptance.** 1. `server / discover` returns the supported versions, capabilities, `serverInfo` and instructions. 2. A 2026-07-28 request works with no handshake, and a 2025-11-25 client completes `initialize` and lists the same tools. 3. An unsupported version returns `UnsupportedProtocolVersion`. 4. Two `tools / list` calls return the same order, with cache fields. 5. A foreign Origin returns 403, and a header and body method mismatch returns `HeaderMismatch`. 6. An oversized body returns 413 with no effect. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Transport and native person pages are integrated; full adoption awaits the declared native families and the pinned Base conformance edges.
<!-- contract-docs:end BASE-AGENT-001 -->

<!-- contract-docs:begin BASE-AGENT-002 -->
- **BASE-AGENT-002 — The seed's jobs are tools, through the UI's own actions** (partial). *Tier:* Agent surface **Requirement.** Each Core job a person does in the product is a tool. Where one is not, the Agent surface says why: it runs on a device, it is a person's interactive screen, it belongs to a connector or the import door, or it is an installation fact. Risk is never the reason: a risky job is a tool with its class (BASE-AGENT-006). Tools are named `<seed>.<area>.<verb>` and declare input and output schemas and truthful annotations. Each calls the same server action as the UI, so validation and authorization are written once, and the seed's embedded agents use the same registry. A business refusal returns `isError` with the seed's stable error code. **Acceptance.** 1. The Core clause ids in each tool's `_meta`, with the not-a-tool reasons that `server / discover` serves, cover every Core clause in the contract, and no reason is risk; the harness and `rer check` fail on a gap. 2. Each tool's fixture result validates against its `outputSchema`. 3. Read tools declare `readOnlyHint`; tools that can carry destructive declare `destructiveHint`, and tools that can carry external declare `openWorldHint`. 4. A refusal returns the same error code the UI gets for the same action. 5. The UI action and its tool, on the same fixture, give the same record state and the same audit event type. 6. The seed's embedded agents appear in the audit as calls to the same tools. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Configuration tools are declared; native patient, scheduling, clinical, financial, payer, communications and custody tool families from ct draft 50afa951126064a91707ac76b4fce9ace8b0109f remain unregistered. No target-only job is claimed.
<!-- contract-docs:end BASE-AGENT-002 -->

<!-- contract-docs:begin BASE-AGENT-003 -->
- **BASE-AGENT-003 — Records are resources** (partial). *Tier:* Agent surface **Requirement.** Each primary record type has a URI template, and tools return `resource_link`s to the records they touch. A read returns exactly the fields the caller's role sees in the UI. File bytes count against any byte budget on the grant. A record the caller cannot open reads as not found, identical to a missing id. Text from customers, imports or files carries an untrusted marker in `_meta`. **Acceptance.** 1. `resources / templates / list` names every record type in the Agent surface. 2. Reads as two roles return exactly what the UI shows each. 3. An out-of-scope id and a missing id give identical responses. 4. A write's `resource_link` reads back the new state. 5. Bytes over budget return `budget_exhausted` and no partial content. 6. Customer-sourced text carries the untrusted marker. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Six configuration resource families are declared. Patient and clinical resources and the optional resource-refresh family are undeclared. Pinned Base has no client-scoped retained-artifact redaction and atomic pending-execution/capture hook for Balm erasure; native custody remains a gap.
<!-- contract-docs:end BASE-AGENT-003 -->

<!-- contract-docs:begin BASE-AGENT-004 -->
- **BASE-AGENT-004 — Business identity and short-lived, audience-bound tokens** (partial). *Tier:* Agent surface **Requirement.** The door is an OAuth 2.1 resource server. Its RFC 9728 metadata names the authorization servers this installation trusts. That is the paired Business when Business provisioned it, verified with the owner-claim trust the installation already holds for its import door; otherwise it is the seed's own sign-in. Access tokens are RFC 9068 JWTs with `aud` set to the seed's canonical MCP URI, `sub` the sponsoring person, `act` the agent (RFC 8693) with its specialist, scopes per tool family, and a lifetime of 15 minutes or less (5 by default). The policy scopes rules on the sponsor, agent and specialist the token names. The consent behind the tokens can last longer and is revocable. Tokens travel only in the Authorization header, and there is no passthrough. **Acceptance.** 1. An unauthenticated call returns 401 with `resource_metadata`, and the metadata names the trusted servers and scopes. 2. A Business token for this seed works, and the same token sent to a sibling seed returns 401. 3. An expired token returns 401, and a token with a lifetime over 15 minutes is refused. 4. A read-only token calling a write tool returns 403 `insufficient_scope` with every needed scope in one challenge. 5. A token in a query string is refused and not logged. 6. Revoking consent in the seed or in Business refuses the next call within 60 seconds. 7. After unpairing, Business tokens are refused and the seed's own sign-in still works. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Owner-bound Business identity and native account admission are integrated. The optional multi-sponsor verification family is undeclared; complete roster, email-change and local-key refusal evidence remains owed.
<!-- contract-docs:end BASE-AGENT-004 -->

<!-- contract-docs:begin BASE-AGENT-005 -->
- **BASE-AGENT-005 — An agent acts as a person in a role, never more** (partial). *Tier:* Agent surface **Requirement.** Every call is authorized as the sponsoring person's current role and access (BASE-ACCESS-004), intersected with the grant's resources, actions and budget. A grant only narrows. No call widens the calling agent's own authority. A call that would widen its own grant or its sponsor's role, or change the company policy or Pause, is refused with `self_escalation`, whatever the policy says; narrowing its own grant is allowed. Other access and security changes are ordinary actions in the access and security classes. An agent never acts after its sponsor is suspended. Anything an agent reads (records, files, emails, imports, other seeds' results) is data and cannot change its scope, its targets or a call's class. **Acceptance.** 1. For each role fixture, every tool's allow or deny through MCP equals the UI's for the same action. 2. A one-folder, read-only grant holds, and widening through arguments is refused. 3. Downgrading the sponsor changes the next call's result, and suspending the sponsor returns 401. 4. Calls that widen the agent's own grant or its sponsor's role, or change the policy or Pause, return `self_escalation` and change nothing, even under a policy with every class autonomous; dropping a scope from its own grant runs. 5. An injection fixture yields no out-of-grant call and no change of class: record text asking for a wider action, or claiming that a recipient is internal. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Native owner authority, staff self-widening refusal and an ordinary staff narrowing call are exercised. Remaining authority families and role-specific journeys are unfinished.
<!-- contract-docs:end BASE-AGENT-005 -->

<!-- contract-docs:begin BASE-AGENT-006 -->
- **BASE-AGENT-006 — Every action declares its risk class** (partial). *Tier:* Agent surface **Requirement.** Classes come from the fleet list in RISK-POLICY.md: standard, external, money, commitment, accounts, gated, access, security, destructive, sensitive and live. In the registry, each tool declares the classes it can carry and a server-side classifier that decides them per call from the arguments, current records and, for gated, the provider's answer. The classifier also supplies each class's facts: the measure (items, recipients, amount and currency, people or records), the counterparty (internal, known, new or public), the direction for access, the provider and step for gated, and the data kind for sensitive. A classifier never reads a flag, label or claim supplied by the agent or by record text. A seed cannot add a class; it proposes one for the fleet list. **Acceptance.** 1. Every tool in `tools / list` carries its possible classes in `_meta`, equal to the Agent surface table. 2. For each tool, fixture calls cover every class it can carry, and the computed classes and facts equal the fixture's expected values. 3. An argument or record text asserting a class or a confirmation (`internal: true`, `confirmExternal: true`) leaves the computed classes unchanged. 4. Money calls carry amount and currency, external calls their counterparty and recipient count, access calls their direction, and destructive calls their item count. 5. No tool in `tools / list` declares a class outside the fleet list, and `rer check` fails on one. 6. A refused call's audit row still records its computed classes. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: The declared configuration jobs compute standard, sensitive, money, live and access. Removing a clinic SSN retains its sensitive risk fact for the same caller and retry key in an atomic native audit receipt, without retaining the tax identifier. Other native tool families remain undeclared and their classes are not claimed.
<!-- contract-docs:end BASE-AGENT-006 -->

<!-- contract-docs:begin BASE-AGENT-007 -->
- **BASE-AGENT-007 — The company's policy decides, at one chokepoint** (partial). *Tier:* Agent surface **Requirement.** Every agent door calls one decision function: MCP, the integration API with agent tokens, and the seed's embedded agents. It evaluates the call's classes against the company's policy, as above. The seed ships no dispositions and fills no gap with one: agent access opens only under a complete policy that setup has asked for (RISK-POLICY.md), and before then every agent call returns `policy_unset` with the setup link and changes nothing. *Autonomous* runs the call. *Review* runs it and adds it to the review feed. *Approval* saves a pending action with server-computed facts and returns `input_required`, with a URL-mode elicitation to the seed's approval page and a pending handle. Each person the rule names approves the exact saved revision in a signed-in browser, and changed inputs need a new approval. The retried call returns the result and a receipt. A rejection returns `approval_rejected`, and a lapse past the wait the rule sets returns `approval_expired`. *Blocked* returns `policy_blocked`, naming the class, rule and revision. **Acceptance.** 1. The Base harness runs each tool under each disposition for every class it can carry, and sees it run, run and enter the review feed, wait with no effect, or be refused. 2. Before setup is complete, the setup page lists every class the seed's tools carry with examples and no answer pre-selected, an agent call returns `policy_unset` with the setup link and changes nothing, and an incomplete revision cannot be confirmed; a `*` rule completes it, and a tool an upgrade adds with an unanswered class appears in `tools / list` once that class is answered, while the other tools keep running. 3. Under "money autonomous up to $500, approval up to $10,000, blocked above", calls of $400, $600 and $20,000 run, wait and are refused; a per-day cap sends the call that crosses it to the next rule. 4. A call carrying two classes takes the stricter disposition. 5. An approval shows server-computed facts and an expiry, returns the URL elicitation and a handle, and completes once after the named approver approves; a changed input needs a new approval, and a rejection or lapse leaves no effect. 6. The same call through MCP, the integration API and an embedded agent gets the same decision. 7. A policy change applies to the next call within 60 seconds, and the audit cites the new revision. 8. A policy document with a bad signature or another Business's id is rejected, and the door keeps the last valid revision. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: Held clinic identity changes complete only after the native person approval, and the approved retry retains its receipt under the current policy. The existing scoped preparation REST API keeps its prior native fence and is not yet migrated into this policy pipeline.
<!-- contract-docs:end BASE-AGENT-007 -->

<!-- contract-docs:begin BASE-AGENT-008 -->
- **BASE-AGENT-008 — Truthful attribution** (partial). *Tier:* Agent surface **Requirement.** Every agent act is recorded and shown as `"<agent> for <person>"`, and mail and messages an agent sends outside name it that way as their sender. An approval, a review mark, a confirmation (a warning dialog, a typed-field confirmation, a delivery confirmation), a decision or a signature attributed to a person comes only from that person's signed-in session. When an agent does the equivalent act, the record names the agent, and the act carries its own class; a binding decision or a signature is commitment. Agent doors ignore arguments that stand for a person's confirmation. No tool solves a bot check, or enters a person's own password or 2FA code at an outside service. A provider step that demands a person goes to a person, whatever the policy says; the gated class marks such steps before they run. **Acceptance.** 1. An agent call carrying a person-confirmation flag is classified and decided exactly as without it. 2. Approving, marking reviewed or answering a policy question with an agent or device token returns 403 and changes nothing. 3. A form-mode elicitation "accept" never completes an approval. 4. Where an agent's decision, signature or field confirmation runs without a person, it reads `"<agent> for <person>"` in the record, the activity view, exports and any certificate, never as the person's own act. 5. After a person approves an agent's prepared action, the record shows the person as approver and the agent as preparer. 6. Activity and exports at 1440 and 390 show `"<agent> for <person>"` for every agent act. 7. Mail an agent sends to an outside address names `"<agent> for <person>"` as its sender. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Native audit and intake preparation/publication distinguish agent, sponsor and actual reviewers. Attribution across the remaining native families is unfinished.
<!-- contract-docs:end BASE-AGENT-008 -->

<!-- contract-docs:begin BASE-AGENT-009 -->
- **BASE-AGENT-009 — Every agent action is audited with its class and decision** (partial). *Tier:* Agent surface **Requirement.** Extending BASE-OPS-005, each call that reads private data or changes anything records the agent client, name and specialist, and the run or task id (`traceparent` when sent); the sponsoring person, the grant, the tool and the targets; the classes and their facts, and the policy revision and rule; the decision (autonomous, review, approval, blocked, unset or self_escalation) and the outcome (done, refused, pending or failed); the approval or review id and person, and the idempotency key. For a period, the seed's Agents page shows actions by class and decision with the notable ones, the review feed (Mark reviewed, Flag, and Undo where reversible), pending approvals, steps waiting for a person and setup questions. Business shows the same across seeds. **Acceptance.** 1. One write leaves a complete audit row. 2. Refused, pending, unset and self-escalation calls are audited. 3. The Agents page's counts by class and decision equal the audit rows on a fixture week. 4. The review feed lists exactly the calls decided as review; Mark reviewed records the person, and Undo restores a reversible one. 5. Filtering by agent or class lists only those rows, and export includes every field. 6. Removing the agent keeps its rows and its name. 7. The Agents page works at 1440 and 390 with no serious or critical axe findings. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: Declared MCP calls and resource reads have ordered policy audit with differs_from_policy zero. The tax-clear retry retains its approval decision instead of becoming an unrecorded review; fresh standard identity writes create a real review item. Legacy API policy migration and additional native family attribution remain owed.
<!-- contract-docs:end BASE-AGENT-009 -->

<!-- contract-docs:begin BASE-AGENT-010 -->
- **BASE-AGENT-010 — Agents can follow changes** (partial). *Tier:* Agent surface **Requirement.** The seed emits a typed event for every record change and for every approval, review and policy decision. Each event carries a stable id, a type, the record URI, the actor (a person, or an agent acting for a person) and a time. Events never carry secrets or more than the subscriber may read. Agents can read events three ways: `subscriptions / listen`, an `events.list` tool with a cursor, and signed webhooks from Base `integrations` using the same ids. Every channel delivers at least once and filters by access at delivery. **Acceptance.** 1. A subscribed record changed in the UI produces a notification within 10 seconds. 2. `events.list` returns the same event id the webhook carries. 3. Replaying from a cursor returns the same ids in order. 4. After access is revoked, no channel delivers events about that record. 5. A failed webhook is visible and replays without duplicate effects. 6. `approval.pending`, `approval.decided`, `review.flagged` and `policy.adopted` carry the class and decision and nothing the subscriber may not read. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: Successful configuration writes emit the native tool name and changed resource URI through Base's compulsory event surface, attributed to the agent and filtered by current native resource visibility. Pending approvals, reads and saved retries add no record change. Subscription delivery, resource refresh and the remaining native event families are undeclared and unproved.
<!-- contract-docs:end BASE-AGENT-010 -->

<!-- contract-docs:begin BASE-AGENT-011 -->
- **BASE-AGENT-011 — Limits are policy, and Pause stops everything** (partial). *Tier:* Agent surface **Requirement.** Business limits are rules in the company's policy: per-call and per-day thresholds on any class's measure, such as money moved, outside recipients or items destroyed; spend caps on provider cost (models, SMS, email) per seed, specialist or agent, which setup asks with the classes; "no cap" is an answer. Tools with provider cost declare an estimate before they run, and an exhausted cap returns `budget_exhausted` before any partial effect. The seed's capacity limits (request rate, body and byte sizes) protect the installation: they bound rate and size, never daily business volume, are documented and are not policy. A grant carries budgets only when the person granting it sets them. A **Pause agents** control in the seed, and Pause all agents in Business when paired, refuses every agent token within 60 seconds until a person resumes; browser sessions and devices keep working. **Acceptance.** 1. A rate overrun returns 429 with `Retry-After`. 2. A per-day cap of three outside recipients sends the fourth to the rule that applies past the cap. 3. An exhausted spend cap returns `budget_exhausted` with no partial effect and shows the spend. 4. Under the answer "no cap", a spending call runs and its spend shows in usage; a call that spends nothing is unaffected by any cap. 5. The usage view shows calls, decisions by class, money moved and provider spend per agent. 6. Pause and Pause all agents each stop the next call within 60 seconds, and resume restores access. 7. An agent token cannot resume. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; SEED_VERIFY_SHARD=typecheck npx -y @runeditrun/rer verify (2317/2322 points; five recorded failures); native touched journeys: 3/3; pnpm typecheck and rer build pass Gap: Pause is exercised for every declared tool. UNDECLARED families: provider spend, byte budgets, long jobs and external mail edges; no spend enforcement is claimed.
<!-- contract-docs:end BASE-AGENT-011 -->

<!-- contract-docs:begin BASE-AGENT-012 -->
- **BASE-AGENT-012 — Writes are idempotent and conflict-safe** (partial). *Tier:* Agent surface **Requirement.** Every mutating tool requires an idempotency key and takes an optional expected revision. The same key with the same arguments returns the first outcome for at least 24 hours; the same key with different arguments returns `idempotency_conflict`; a stale revision returns `revision_conflict` with the current revision. Long work returns a job handle and a status tool, with no dependence on the Tasks extension. **Acceptance.** 1. Two calls with one key give one effect and equal results. 2. A retry with a new JSON-RPC id and the same key, after a dropped stream, returns the recorded outcome. 3. The same key with different arguments returns a conflict and no effect. 4. A stale revision returns a conflict naming the current revision. 5. A job handle used by another person's token reads as not found. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: Native writes, replay and current-admission checks are exercised. The atomic native clinic-identity risk receipt preserves the sensitivity of an operation that removed an SSN; the shared pipeline can return its original approval receipt without re-executing it. Fresh retry keys classify current state; conflicting arguments and a newly blocking policy refuse. Remaining native families and complete concurrent authority coverage are unfinished.
<!-- contract-docs:end BASE-AGENT-012 -->

<!-- contract-docs:begin BASE-AGENT-013 -->
- **BASE-AGENT-013 — Manifest, docs and the conformance journey** (partial). *Tier:* Agent surface **Requirement.** `server / discover` instructions and an on-site `/docs/agents` page are generated from the action registry. The page lists tools by job, with each tool's classes, the test that adds each computed class, its scopes, resource templates, event types, capacity limits and error codes, and the specialist role. `prompts / list` carries the specialist's jobs. Base ships the conformance journey, a harness that `rer verify` runs against `rer dev` and seeds run in CI. It is an MCP client; a signed-in test person takes a person's steps (setup answers, approvals, review marks, resume) through the URLs the door returns, and the same browser leg runs the UI-parity actions and the page checks at 1440 and 390. It runs every acceptance point of BASE-AGENT-001 to 012 and of the seed's SURFACE clauses under two company policies: *all autonomous* (`*`), and *held* (standard review, every other class the seed declares approval, which the test person grants), plus the single-class variants a point names. A point that names no disposition passes under both. **Acceptance.** 1. The docs list exactly the names in `tools / list` and `resources / templates / list`. 2. Each tool's classes, and the test behind each computed one, are documented. 3. The harness fails on any of: a tool without a schema; an effect under approval or blocked, or before setup is complete; a computed class that differs from its fixture; a flag that changes a class or completes a person's step; a role-parity mismatch; a wrong-audience token being accepted; a duplicate effect on retry. 4. Every acceptance point runs under both policies, every decision matches the policy in force, and under all autonomous no call waits for a person or is refused by policy. 5. A stranger agent given only the seed URL completes the specialist journey through MCP. Evidence: `agent-surface.json`; `tests/initialize-agent-owner.mjs`; `tests/agent-door-browser.mjs`; `tests/integ.test.mjs` (BASE-AGENT native identity approval, real review and once-only effects via `tests/agent-configuration-journey.mjs`); node scripts/verify-ci.mjs runtime (17 commands and 2337/2337 conformance points, exit 0); pnpm run typecheck; pnpm run check --profile first-party Gap: The configuration registry, generated docs and browser journey exist. The unchanged pinned conformance suite now passes 2337/2337 points: successful tax-clear execution enables additional output, resource and audit checks beyond the former 2317/2322 result. The ct full clinic-week journey and remaining native families are unproved.
<!-- contract-docs:end BASE-AGENT-013 -->
