Business · Product · Technology · AI

Make AI handoff guidance match the conversation’s actual scope

A Movo-X implementation case connecting clinic and general conversation selectors to localized prompt guidance, explicit sharing and authoritative submission boundaries.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: one assistant supports two different destinations

A conversation associated with a clinic and a general health check can use the same AI request builder while offering different next actions. A clinic conversation has a destination for review. A general conversation belongs to a selected household person and can be shared with a clinic through a separate choice. Copy that treats those situations identically can promise a handoff that the workflow has not performed.

The inspected Movo-X implementation makes conversation scope an input to provider-request construction. Three isolated tests check the resulting instructions and route selection. The useful engineering question is how product state reaches the wording, and where wording stops being authoritative.

Derive scope from a validated selector shape

The route accepts a general selector containing a person identifier, or a clinic selector containing both facility and patient identifiers, with an optional person identifier. Its scope validation rejects partial clinic selectors instead of interpreting every request with a person field as general.

After validation, absence of both clinic selectors selects general scope. Presence of the clinic pair selects clinic scope. This matters when a clinic conversation also carries a household person identifier: that additional relationship does not erase the clinic destination. The selected dispatch fixture exercises a person-only request and a clinic-pair request using synthetic identifiers.

Pass the scope through the shared request builder

The route passes its derived scope to the provider adapter. In the reviewed source, both ordinary and streaming reply calls receive that argument, and both use the shared request-body builder. The builder substitutes a scope-specific guidance section into the system instructions.

The executed route case covers ordinary response construction. Source tracing establishes the streaming argument and shared builder, but these three cases do not execute a streaming response. Keeping those claims separate makes it possible to identify an appropriate regression test without presenting one transport fixture as comprehensive coverage of both.

Keep general guidance consistent with a later sharing choice

For a general conversation, the inserted instruction identifies the check as independent of a clinic. It tells the model to avoid references to buttons and offers later sharing as the patient’s choice when clinician involvement is appropriate. It also distinguishes sharing from immediate review.

The first fixture captures the outgoing system text for English, Bahasa Melayu and Urdu. It checks the corresponding localized phrase, the button-related instruction and removal of the template placeholder. This is a deterministic construction test. It does not ask a real model to follow the instruction or verify the availability of every app control.

Describe clinic submission without promising review time

For a clinic conversation, the inserted guidance describes sending the conversation to the doctor for review through the app’s send action. It explicitly avoids guaranteeing immediate review. The second fixture captures the clinic wording in the same three supported languages and checks that the general-sharing phrase is not substituted.

The adapter defaults to clinic scope when called without an explicit scope. The route supplies its selected scope rather than relying on that default. A future caller added outside the route should make this input deliberate; otherwise a general conversation could inherit wording intended for a clinic-linked workflow.

Use authoritative operations to enforce the actual handoff

The pinned database function has a separate boundary: a general session’s submit operation returns a forbidden result. General sharing delegates to an explicit share operation. A clinic submit branch checks for a summary and unresolved patient messages before recording submitted state; a repeated already-submitted request has its own return path.

Those branches were inspected in source without database execution. Their significance is architectural: changing prompt wording cannot grant submission permission, and mentioning a send action cannot prove that submission occurred. A model-generated sentence must not become the event that records a clinician handoff.

Treat localization coverage as a defined input contract

The adapter supports English, Bahasa Melayu and Urdu and validates the requested language before constructing the request. Its language instructions cover headings, questions, summary fields and warning text, while the handoff phrase is selected from a scope-and-language map.

The fixtures establish selected strings and scope distinctions across those three inputs. They do not measure translation quality, cultural appropriateness, right-to-left rendering or clinical comprehension. Those require language review and interface evaluation. When adding another language, update the supported input contract, scoped wording and acceptance evidence together rather than appending one translated sentence.

Test request construction separately from generated behaviour

The provider dependency in these cases returns a synthetic structured reply. Capturing its request allows the test to inspect the exact instructions sent without external network traffic, patient records or provider charges. The route fixture additionally injects reservation and completion responses so it can focus on selector-to-prompt propagation.

An evaluation of generated behaviour is a different exercise. It should examine whether actual replies invent a button, claim a conversation was sent, imply review has happened or promise a response time. A prompt assertion supplies a reproducible prerequisite for that evaluation, rather than replacing it.

A practical handoff consistency review

Review the selector shape, persisted session scope, available user actions, outgoing instructions and authoritative operation as one product contract. Exercise both destinations in every supported language. Keep the distinction between an offered action, an accepted submission and a completed clinician review visible in the interface and event model.

For a CTO, this case demonstrates how a small wording decision depends on explicit application state and server authority. The pinned implementation and three executed cases establish the construction boundary. Live model adherence, installed database behaviour, delivery to a clinic and actual review remain separate acceptance questions.

Compare the reviewed boundaries

Evidence required at each handoff boundary

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

BoundaryReviewed evidenceFurther acceptance
Conversation selectionPerson-only and clinic-pair route fixturesPersisted session and authorization checks
Localized instructionsCaptured request text in three languagesReal model and language review
Submission authorityPinned SQL branches inspectedDatabase execution and current permissions
Clinic reviewNo timing guarantee in guidanceActual recipient delivery and review events

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

scope = validate_and_classify_conversation_selectors(input)
guidance = localized_handoff_guidance(scope, language)
request = build_provider_request(turns, guidance)

# A generated offer to send is not a submission event.
submission = explicit_authorized_operation(session, user_action)

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗