Skip to content

Conversation Factory — Phase 3 Completion

Source: Call 34 (3-3), Call 35 (3-18) Existing plan: itheraputix/symlink_docs/plans/26-3-16_conversation-factory.md Status: Phase 1-2 done, Phase 3 in progress Priority: Tier 1 — must ship before 3/25 visit


What Phase 3 Does

When staff-reported conversations FAIL validation (protocol can't handle the call), the system: 1. Diagnoses WHY (which component is missing or incomplete) 2. Proposes specific protocol changes 3. Staff confirms → pushes to Protocol Management for doctor approval 4. Doctor approves → protocol updated → scenario re-validates → regression test created

The closed loop: Every unnecessary call that reaches the office makes the product better at preventing the next one.


Requirements From Bawa (3-18)

Failure-driven learning model (KB #128)

Bawa: "So each failure is essentially an opportunity for improvement, right?"

Each failed conversation is an opportunity to improve the protocol. The system should surface what's missing and propose fixes.

No repeat failures (KB #129)

Bawa: "It shouldn't fail on the same thing twice."

Once a failure is addressed and the protocol is updated, that scenario must pass. Regression testing ensures this.

Protocol consistency (3-18, Chris presenting)

The protocol had 3 different conclusions for DVT — one said monitor, one said go to ER, one said tell the doc. This conflicted with itself. Phase 3's gap diagnosis catches exactly this kind of inconsistency.


Requirements From Lauryn (3-18)

Common repetitive questions (KB #119)

Lauryn: "Consistently swelling, consistently pain, consistently medication questions... activity questions... over and over and over again."

These are the highest-value scenarios to capture in the factory. Even though answers exist in printed literature, patients call instead.

Specific activity FAQs (KB #120)

Lauryn: "Can I do this? Can I not do this? Am I, can I get a massage? Can I use a sauna?"

These are concrete scenario types to seed into the factory at the 3/25 visit. Rapid-fire capture with Lauryn.


Requirements From Bawa (3-3)

Adaptive protocol evolution

Bawa (3-3): "Can the software just kind of recompile itself? Can it dynamically adapt to do a new thing?"

Phase 3 is the answer: staff describes what's missing → system proposes protocol change → doctor approves → product adapts.

Catch-all triage for unknown activities

Bawa (3-3): Activity restrictions are detailed but there's no mechanism for questions the protocol doesn't cover (e.g., paragliding). Need a catch-all triage workflow.

Phase 3's gap diagnosis handles this: unknown activity → FAIL → gap report → propose new restriction or triage rule.


3/25 Visit Plan

Format: mic on Lauryn's lapel, rapid-fire Q&A. - Cover as many call types as possible - Each one becomes a Conversation Factory scenario - Passing scenarios → regression tests - Failing scenarios → Phase 3 gap reports for Bawa to review at 5pm

This is the factory in action — the visit IS the training session.


Implementation

See existing plan: itheraputix/symlink_docs/plans/26-3-16_conversation-factory.md (Phase 3 section)

Key files: - backend/app/services/gap_analyzer.py — diagnose protocol gaps, propose fixes - backend/app/services/scenario_assembler.py — extended with gap diagnosis prompt, transaction creation - frontend/src/components/bcc/ConversationFactoryPage.tsx — gap report inline, "Propose Change" action