routes/platform.php keeps clinic switching, onboarding, lifecycle, memberships, and platform health outside tenant middleware.
routes/self-serve.php adds public plans, signup, SSO redirect and callback, owner onboarding, and Twilio delivery callbacks without forking the tenancy model.
Existing module routes stay on the tenant side with selected.clinic and tenant.context middleware, including scorecard, Smart Insights, AI, communications, and Plan & Limits.
routes/communications.php now covers both the outbound hub and first-class communication templates.
routes/api.php mirrors the split with central platform endpoints and clinic-scoped private endpoints for scorecards, templates, AI review metadata, and queue actions.
Dynamic settings are re-applied after tenancy initialization so branding, timezone, and AI defaults remain clinic-specific.
Queued jobs and scheduled commands iterate clinic contexts explicitly rather than assuming a single operational database.
Acceptance
Release Gate Contract
npm run release:gate is the repo-local release contract and should be treated as the last local proof step before a buyer-facing release.
The gate is intentionally sequential: platform-admin smoke flow, self-serve owner smoke flow, evidence capture, docs generation, docs coverage, then targeted Laravel suites.
Tenant-heavy acceptance work is kept sequential so tenant database creation, switching, and cleanup do not collide during smoke runs.
The highest-signal regression additions for the current hardening pass are InstallerFinishReadinessTest and LaunchCompatibilityTest.