demo:
  id: restaurant-discovery
  title: Restaurant Discovery Demo
  domain: local_discovery
  purpose: >
    Demonstrates how SMA enriches standard Google Places data with semantic
    fields that can be resolved through either declared avatars or headless
    scoring contracts.

semantic_contract:
  name: restaurant_discovery_contract
  principle: Same venue data, different declared meaning, different ranking and UI treatment.
  sma_pattern: signal_meaning_action

deployment:
  type: semantic_interface
  modes:
    default: headless
    supported:
      - headless
      - avatar_driven
  entry_signal:
    headless: selected_filters_and_weighted_preferences
    avatar_driven: declared_visit_context
  identity_model:
    headless: data_driven_no_avatar
    avatar_driven: declared_identity
  note: >
    This is the cleanest proof that SMA does not require avatars. Meaning can
    be resolved through a scoring contract alone; avatars refine the meaning layer.

source_signals:
  provider: Google Places API
  default_fields:
    - name
    - formatted_address
    - rating
    - user_ratings_total
    - price_range
    - location
    - types

sma_enrichment:
  fields:
    wifi_quality:
      label: Wifi
      group: situational
      type: score
      range: 0_to_1
      meaning: Signal quality for work, communication, and device-dependent use.
    outlet_access:
      label: Outlets
      group: situational
      type: score
      range: 0_to_1
      meaning: Access to power for laptops and long sessions.
    noise_level:
      label: Noise
      group: situational
      type: score
      range: 0_to_1
      meaning: Acoustic volume. Can be positive or negative depending on context.
    parking_access:
      label: Parking
      group: situational
      type: score
      range: 0_to_1
      meaning: Ease of arrival by car.
    ambience:
      label: Ambience
      group: qualia
      type: score
      range: 0_to_1
      meaning: Design intentionality and atmospheric commitment, not personal taste.
    energy_level:
      label: Energy
      group: qualia
      type: score
      range: 0_to_1
      meaning: Quality of the room's aliveness, separate from volume.
    lighting_warmth:
      label: Lighting
      group: qualia
      type: score
      range: 0_to_1
      meaning: Warmth, softness, and intentionality of the lighting.

headless_scoring:
  description: >
    No identity is declared. The user's filter behavior becomes the meaning layer.
  controls:
    - wifi_quality
    - outlet_access
    - quiet
    - parking_access
    - ambience
    - energy_level
    - lighting_warmth
  scoring_contract:
    wifi_quality: higher_better
    outlet_access: higher_better
    quiet: derived_from_inverse_noise_level
    parking_access: higher_better
    ambience: higher_better
    energy_level: higher_better
    lighting_warmth: higher_better
  output: ranked_venue_results_with_filter_explanation

avatars:
  remote_worker:
    meaning: Needs reliable wifi, outlets, and quiet conditions.
    ux_mode: explore
    scoring:
      wifi_quality: 0.35
      outlet_access: 0.25
      noise_level: 0.15
      parking_access: 0.10
      ambience: 0.05
      energy_level: 0.05
      lighting_warmth: 0.05
    directions:
      wifi_quality: higher_better
      outlet_access: higher_better
      noise_level: lower_better
      parking_access: higher_better
      ambience: higher_better
      energy_level: lower_better
      lighting_warmth: higher_better
    ipc:
      rule: High noise is a friction signal and should demote ranking.
      forbidden_behaviors:
        - surface high-noise venues without warning
        - treat wifi and outlet access as secondary if remote worker is active
        - change card dimensions when emphasizing top results

  date_night:
    meaning: Prioritizes ambience, positive energy, warm lighting, and mood.
    ux_mode: focus
    scoring:
      ambience: 0.35
      energy_level: 0.20
      lighting_warmth: 0.20
      noise_level: 0.15
      parking_access: 0.10
      wifi_quality: 0.00
      outlet_access: 0.00
    directions:
      ambience: higher_better
      energy_level: higher_better
      lighting_warmth: higher_better
      noise_level: lower_better
      parking_access: higher_better
      wifi_quality: neutral
      outlet_access: neutral
    ipc:
      rule: Wifi and outlet fields are muted because they do not define this experience.
      forbidden_behaviors:
        - rank a venue highly for utility fields alone
        - expose outlet access as a primary date-night signal
        - confuse loudness with positive energy

  family_dinner:
    meaning: Prioritizes comfort, parking, liveliness, and tolerance for kids.
    ux_mode: balanced
    scoring:
      noise_level: 0.30
      parking_access: 0.25
      energy_level: 0.20
      ambience: 0.10
      lighting_warmth: 0.05
      wifi_quality: 0.05
      outlet_access: 0.05
    directions:
      noise_level: higher_better
      parking_access: higher_better
      energy_level: higher_better
      ambience: higher_better
      lighting_warmth: neutral
      wifi_quality: neutral
      outlet_access: neutral
    ipc:
      rule: Noise becomes a comfort signal, not a warning.
      forbidden_behaviors:
        - treat all noise as negative
        - suppress parking access from the top field group
        - prioritize intimacy over group comfort

projections:
  human_ui:
    - venue cards
    - Google default field filters
    - SMA enriched fields
    - avatar toggle
    - headless scoring sliders
    - score bars
    - star ratings
  structured_data:
    type: restaurant_semantics
    format:
      - JSON
      - JSON-LD
      - YAML contract
  agent_response:
    behavior: ranked_results_with_reasoning

proof_points:
  - Same source data resolves differently by avatar.
  - Headless filters create meaning without declared identity.
  - IPC changes field interpretation before ranking.
  - UI exposes both Google-native data and SMA-enriched meaning.
