Knowledge Portal · engineering documentation

Skip to content

Federated from workspace · PRD-001 · Dental Clinic Revenue Operating System/docs/technical/CONVERSATION_BEHAVIOR_ENGINE.md Do not edit canonical truth here — update the source repo, then re-run npm run docs:sync.


Conversation Behavior Engine ​

Status: Implemented (2026-07-05)
Authority: App\Modules\AI\Application\Conversation

Purpose ​

Social and conversational turns are not capabilities. They must never enter PL-003 runtime (CapabilityMatcher → Planner → Tools).

Large-product pattern:

User message
    ↓
Conversation Behavior Engine   ← greeting, thanks, small talk, etc.
    ↓ (response, stop)
Intent Understanding Engine    ← operational / guidance intents only
    ↓
Capability Matcher → Planner → Execution

Behaviors ​

BehaviorExamplesEnters runtime?
Greetinghello, hiNo
Social talkhow are youNo
Thanksthank youNo
Goodbyebye, see youNo
Acknowledgementgood, ok, okayNo
Small talknice, coolNo
Confirmationyes, go ahead (short)No
Clarification / Unknownwhat?, asdfghNo
Cancellationcancel itNo
Continuationexplain moreOnly if prior turn was operational — then passes resolved message to Intent Engine

Components ​

ComponentRole
ClinicConversationBehaviorEnginePrimary entry — evaluate message + context
ClinicConversationBehaviorDetectorClassifies behavior (no capability keywords)
ClinicConversationBehaviorResponseBuilderBuilds response without tools
ClinicConversationBehaviorResultDTO with exitsRuntime() gate

Configuration ​

env
CLINIC_CONVERSATION_BEHAVIOR_ENABLED=true

Tests ​

bash
php artisan test app/Modules/AI/Tests/Unit/ClinicConversationBehaviorEngineTest.php
php artisan test tests/Feature/ClinicAgentIntentAcceptanceTest.php

Intent coverage testing ​

See CLINIC_CAPABILITY_COVERAGE_TESTING.md.

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin