Skip to main content
Status: Canon baseline
Checkpoint: hybrid intent assist layer and weather context utility validation snapshot Branch: build/engine-v0.1.3.5-focus-ops-v0.2
Validation: 47/47 strict eval pass
Primary runtime owner: engine-v0.1.3.5-focus-ops-v0.2/src/lucia/operatorFocusBrain.js

Purpose

The Lucia Intent Layer is the first explicit runtime layer responsible for helping Lucia understand what the operator means, not merely what phrase the operator typed. This matters because Lucia is not a generic chatbot and not a dashboard wrapper. Lucia must combine:
  • Operational intelligence — route the operator toward the right work.
  • Emotional containment — reduce pressure, preserve calm, and avoid making the operator feel managed by a machine.
  • Truth-state discipline — never claim facts, weather, actions, or completion states beyond what the system actually knows.
The intent layer exists to make Lucia more forgiving, more natural, and more intelligent without weakening operational boundaries.

Core doctrine

Lucia should understand the user’s goal before deciding the response posture. The correct loop is:
user languagedeterministic routingsemantic assist when ambiguousconfidence / arbitrationsafe routeoperational, human, or clarification response
The wrong loop is:
hard-code every phrase the user might sayhope enough phrases were anticipatedfall back to generic capability copy when not
Phrase lists may exist as scaffolding, but they are not Lucia’s mind.

What changed in v1

This checkpoint added a hybrid intent-assist layer to Focus Ops. Lucia now has:
  1. Deterministic routing remains primary
    • Strong known cases still route without model interpretation.
    • Hard off-role boundaries still win.
    • Known operational categories still use explicit routing.
  2. Semantic assist for ambiguous cases
    • Model-assisted intent classification runs only when deterministic routing is weak or follow-up context is unresolved.
    • The assist layer uses structured JSON, not free-form prose.
    • The output is sanitized and arbitrated before it can affect runtime behavior.
  3. Confidence-gated arbitration
    • Lucia accepts semantic assist only when confidence is high enough for the class of decision.
    • Low-confidence assist does not override deterministic behavior.
  4. Context hints
    • follow_up
    • social_recent
    • fresh
  5. Bounded weather-context utility
    • Weather is no longer treated as generic unrelated chat.
    • Weather is treated as potentially operational because it can affect arrivals, concierge, weddings, outdoor plans, maintenance, and guest readiness.
    • Lucia clarifies whether the user means their current location or a managed property.
    • Lucia does not invent or provide forecast data in this pass.
  6. Safe social language handling
    • Greetings, check-ins, gratitude, jokes within bounds, and valedictions are valid human utility interactions.
    • Lucia no longer treats benign human language as misuse.

Runtime files

Primary behavior owner

src/lucia/operatorFocusBrain.js
Owns:
  • deterministic routing
  • human utility routing
  • follow-up state
  • intent-assist schema
  • confidence thresholds
  • arbitration
  • weather-context utility response
  • debug export for intent assist

Route entry point

src/routes/adminOperatorFocus.js
Now calls the async hybrid wrapper:
buildOperatorFocusResponseWithIntentAssist(...)

Model gateway

src/lucia/luciaModelGateway.js
Owns:
  • OpenAI client creation
  • JSON task calls
  • diagnostics-capable JSON task path

Model config

src/lucia/luciaModelConfig.js
Includes explicit task support for:
focus_ops_intent_assist

Eval harness

scripts/luciaBrainQualityEval.js
Now:
  • loads .env directly
  • runs the hybrid intent-assist path
  • supports shared session_group
  • supports synthetic time movement through advance_ms

Debug harness

scripts/luciaIntentAssistDebug.js
Outputs:
  • deterministic classification
  • pending follow-up state
  • deterministic strength
  • context hint
  • gateway diagnostics
  • raw assist JSON
  • sanitized assist result
  • arbitration decision
  • final routed intent

Deterministic strength model

Lucia assigns deterministic confidence before asking for semantic help.

Strong

Examples:
  • hard off-role prompts
  • clear human utility
  • tiny factual
  • explicit operational lanes like payment risk, arrivals, maintenance, concierge
Strong deterministic routing should usually not be overridden.

Medium

Examples:
  • broad general focus prompts
  • weaker but still operational signals
Medium cases may not need assist unless follow-up state is unresolved.

Weak

Examples:
  • generic off-role fallback
  • ambiguous follow-up language
  • short compressed launch phrases
  • semantic property-context questions
Weak cases are eligible for assist.

Intent-assist schema

The assist layer returns strict JSON with fields like:
intent_type
follow_up_choice
operational_intent
utility_intent
confidence
reason_codes

Supported intent types

follow_up_acceptance
operational_request
weather_context_request
social
off_role
unclear

Supported follow-up choices

top_item
quick_rundown
start_action

Supported operational intents

general_focus
priority_triage
arrivals_snapshot
defer_work
payment_risk
concierge_readiness
maintenance_focus
overwhelm_support

Supported utility intents

greeting
valediction
social_checkin
gratitude
acknowledge

Arbitration principles

Semantic assist is not allowed to freely steer Lucia. The arbiter decides whether assist output can affect routing.

Hard boundaries

If the prompt matches a hard true off-role category, that boundary remains intact. Examples:
  • sports news
  • recipes
  • stock market
  • unrelated creative requests

Follow-up acceptance

If a pending follow-up exists and the user responds with compressed intent like:
  • “Let’s do this”
  • “All right, let’s begin”
  • “Start me there”
  • “Take me into it”
Lucia may use semantic assist to interpret the response as follow-up acceptance.

Social recent / soft-entry

When a recent human/social moment exists, Lucia may treat natural launch language as a soft entry into operations, but only within the allowed window and confidence rules.

Weather-context utility

Weather is not open-domain chat in Lucia. Weather is treated as a bounded property-context utility when the user asks about:
  • weather conditions
  • rain
  • outdoor plans
  • ceremony/dinner viability
  • guest readiness implications
  • arrival/concierge planning
Lucia should clarify scope before giving weather data.

Weather-context doctrine

Weather can be operationally relevant. Lucia should not answer weather requests as generic weather chat yet. Lucia should ask a bounded clarification such as:
Do you mean your current location or Villa Valentin?
or, in a future multi-property posture:
Do you mean your current location or one of the properties you manage?

Weather behavior allowed now

  • classify weather and implied outdoor viability as property_context_utility
  • clarify location/property scope
  • avoid generic off-topic fallback
  • preserve boundedness

Weather behavior not yet allowed

  • inventing forecasts
  • providing weather data without a source/tool
  • implying integrated weather API execution
  • treating unrelated weather trivia as operational fact

Human utility doctrine

Lucia should be able to handle safe human language naturally. Examples:
  • “Good morning”
  • “How are you?”
  • “Thanks Lucia”
  • “Nice to see you”
  • “Good night”
  • “Sleep well”
  • “See you tomorrow”
  • “Tell me a joke” within bounded hospitality context
Safe human language should not fall into generic capability fallback.

What this layer does not mean

This layer does not make Lucia a general-purpose chatbot. Lucia still should not drift into:
  • generic open-domain assistant behavior
  • unrestricted weather answers
  • sports/news/recipe/trivia mode
  • fake operational certainty
  • fake action completion
  • model-driven behavior without arbitration

Observability standard

Intent work must be observable. Every ambiguous or semantic-routing failure should be diagnosed through:
scripts/luciaIntentAssistDebug.js
Before changing thresholds or routing logic, inspect:
  • Was the model enabled?
  • Did the gateway return ok, api_error, parse_error, or client_disabled?
  • What raw JSON did the model return?
  • Did sanitization preserve it?
  • Did arbitration accept or reject it?
  • What final intent was routed?
No more guessing. No more superstition patches.

Validation snapshot

At this validation checkpoint, Lucia passed:
node scripts/luciaBrainQualityEval.js --strict
Result:
Quality eval pass: 47/47
This is the first checkpoint where the hybrid intent layer is validated across:
  • social follow-up compression
  • valedictions
  • weather-context utility
  • hard off-role preservation
  • semantic property/weather prompts
  • strict eval harness using the hybrid route

Known follow-up improvements

These are not blockers for the checkpoint, but should be tracked.

1. Stronger eval expectation grouping

The current eval harness does not support multiple required-any groups. Weather evals currently use a looser single required_summary_any_terms list. Future improvement:
  • require one user-location phrase
  • require one property phrase
  • keep these as separate expectation groups

2. Admin session IDs

Admin currently posts prompts to Engine. Multi-turn behavior is improved by explicit x-operator-session support. Future work should ensure the Admin UI passes stable session IDs so live testing is deterministic.

3. Real weather integration

Weather-context utility currently clarifies scope only. A later pass should add a real weather data source/tool and a truth-state policy for forecasts.

Canon summary

Lucia Intent Layer v1 is the first working hybrid layer that lets Lucia interpret ambiguous human language through a bounded semantic assist path while preserving deterministic safety, operational truth, and emotional containment. This is not the finished moat. It is the first real foundation of the moat.