Law Welcome + Intake Contract
The law line is auth-first for returning callers, but intake-first for useful lead capture. Caller ID may select the returning path; the saved profile facts are not copied into intake slots until the SMS code succeeds.
Path Diagram
New caller
welcome_firstintake_guest_gateintake_name_askintake_legal_topics_askintake_sms_optin_gateintake_send_linkif SMS consent is yesintake_verify_codeif a code was sentintake_pre_save- silent bridgeintake_saveintake_confirmthen menu
Known caller with SMS consent
welcome_backwelcome_send_follow_alongwelcome_follow_along_sentwelcome_auth_choice: link or code verifies; 0/skip is guestwelcome_verify_codeafter explicit verify/code retrywelcome_unlock_grantedon correct codeintake_verified_prefillintake_legal_topics_askintake_sms_optin_gateskips re-asking consentintake_pre_savethenintake_save
Invariant: opening the unique link or giving the correct four-digit code authenticates the session.
0, skip, or guest continues without authentication.
Why It Regressed
- The welcome-auth gate was added, but successful verification reused the old generic option-0 profile entry.
- The old entry had no post-auth prefill state, so verified callers could be routed through stale name/SMS prompts or toward the menu.
- Code handling was not narrow enough; the regression test now proves codes are accepted only in verification-code states.
Tests
TestLegalWelcomeEntryPathSim::test_known_caller_security_code_requires_zero_before_unlockTestLegalProfileIntakeCompileShape::test_welcome_module_authenticates_returning_callers_before_intakeTestLegalProfileIntakeCompileShape::test_sms_consent_gate_skips_only_for_verified_on_file_consent
Markdown source: docs/superpowers/specs/2026-07-07-law-welcome-intake-contract.md.