# Demo 6 — Grandpa Tam: Then and Now (KS2 English, engine smoke)
# Source: docs/demo-pack/demos/06-grandpa-tam-primary.md
id: demo-6-grandpa-tam
title: "Grandpa Tam: Then and Now"
mode: guided
language: en
length_minutes: 5
edb:
  subject: English Language
  level: KS2
  module: Changes
  unit: Now and then, a changing world, technology
  objectives:
    - compare objects, people and places now and then
    - develop empathy and gratitude
    - interview using simple present and simple past

cast:
  student:
    id: pip
    username: Pip
    persona: pip
    http_port: 3005
    viewer_port: 3007
    body: mineflayer
  npc:
    id: grandpa_tam
    username: GrandpaTam
    http_port: 3006
    viewer_port: 3008
    body: mineflayer
  # Private coach lane: its own body in spectator mode (invisible, parked above the set), so
  # whispers come from "Coach", never from an in-story character. Falls back to Tam's bot.
  coach:
    id: coach
    username: Coach
    http_port: 3009
    body: mineflayer

briefing: >
  Grandpa Tam has lived in the village for 70 years. Find out how life was then
  and how it is now. Ask him at least 3 questions. At the end, thank him in your own way.

world:
  set_pieces:
    - old_wooden_boat
    - new_iron_boat
    - lantern_then
    - redstone_lamp_now
    - photo_frame_item_frame
    - journal_lectern
    - sign_making_table
  # LIVE harbour pad (MC Mod 2026-10-07) — Paper seed 42 beach ~32,71,32.
  # Source of truth: docs/film-prep/demo6-harbour-coords.json (mirrored from harness-notes)
  # Keys stable for Director / run.sh bots. Soft NBT parked.
  spawns:
    # Pip body spawn (run.sh bots → HTTP 3005 / viewer 3007)
    pip: { x: 32, y: 70, z: 32 }
    # GrandpaTam body spawn (run.sh bots → HTTP 3006 / viewer 3008)
    grandpa_tam: { x: 34, y: 70, z: 32 }
  # journal lectern (read_lectern /act)
  lectern: { x: 36, y: 70, z: 32 }
  # thank-you sign target (place_sign /act) — air against wall at 34,71,30
  thank_you_sign_target: { x: 34, y: 71, z: 31 }
  # CAM A harbour wide (Creative look mark — not a shoot GO)
  cam_a_harbour_wide: { x: 34, y: 73, z: 38 }
  boats:
    old_wooden: { x: 32, y: 68, z: 28 }   # oak_boat in water
    new_iron: { x: 36, y: 69, z: 28 }     # oak_boat on iron dock stand-in
  lantern_then: { x: 31, y: 71, z: 30 }  # lantern on oak_fence
  redstone_lamp_now: { x: 37, y: 70, z: 30 }
  photo_frame: { x: 36, y: 71, z: 31 }    # item_frame Facing south
  sign_making_table: { x: 37, y: 70, z: 32 }  # crafting_table

# Blocking (live only): per beat, each actor's steps run in order; actors run in parallel;
# all finish before the beat's dialogue. Steps: move_to [x,y,z] (walk only, no dig) ·
# look_at <actor id> | [x,y,z] · tp [x,y,z] (RCON) · wait <ms>. Feet y=70 on the pad.
# Walkable: plaza x31-38 z31-35, dock z29 x31-37, gap through the wall line only at x32.
staging:
  B0_greeting:            # Pip walks in from the plaza corner to meet Tam
    pip: [ { tp: [31, 70, 35] }, { look_at: grandpa_tam }, { move_to: [33, 70, 33] }, { look_at: grandpa_tam } ]
    grandpa_tam: [ { wait: 1500 }, { look_at: pip } ]
  B2_open_school:
    pip: [ { look_at: grandpa_tam } ]
    grandpa_tam: [ { look_at: pip } ]
  B3_compare:             # then (lantern) vs now (redstone lamp)
    pip: [ { look_at: [31.5, 71.5, 30.5] }, { wait: 1200 }, { move_to: [35, 70, 33] }, { look_at: [37.5, 70.5, 30.5] }, { wait: 1200 }, { look_at: grandpa_tam } ]
  B4_market:              # Tam walks to the pad edge and gazes toward the far-away market
    grandpa_tam: [ { move_to: [38, 70, 34] }, { look_at: [70, 72, 34] } ]
    pip: [ { wait: 1500 }, { move_to: [37, 70, 33] }, { look_at: grandpa_tam } ]
  B4a_open_fishing:       # down to the dock, by the old wooden boat
    grandpa_tam: [ { move_to: [33, 70, 29] }, { look_at: [32.5, 68.5, 28.5] } ]
    pip: [ { move_to: [35, 70, 29] }, { look_at: grandpa_tam } ]
  B5_feelings:            # Tam looks at the boat while remembering the storm
    grandpa_tam: [ { look_at: [32.5, 68.5, 28.5] } ]
    pip: [ { look_at: grandpa_tam } ]
  B6_gratitude:           # back up to the plaza
    grandpa_tam: [ { move_to: [35, 70, 33] }, { look_at: pip } ]
    pip: [ { wait: 800 }, { move_to: [33, 70, 33] }, { look_at: grandpa_tam } ]
  B7_thank_you_sign:      # Pip steps up to Tam's wall to put up the sign
    pip: [ { move_to: [34, 70, 32] }, { look_at: [34.5, 71.5, 30.5] } ]
    grandpa_tam: [ { look_at: [34.5, 71.5, 31] } ]
  B8_journal:             # Pip writes in the journal at the lectern
    pip: [ { move_to: [35, 70, 32] }, { look_at: [36.5, 70.9, 32.5] } ]
    grandpa_tam: [ { look_at: pip } ]

# Camera (live film viewer, ?cam): per beat, an opening shot and a dialogue style
# (ots = over the listener's shoulder onto the speaker [default] · close · two · hold).
# Defaults: follow whoever walks, two-shot when blocking ends, close-up on coach whispers.
# $student / $npc resolve to this run's usernames. Shot fields: bot/patches/rainbow-camera.js.
shots:
  B0_greeting:
    start: { mode: wide, pos: [34.5, 74, 41], look: [33.5, 70, 32], cut: true,
             title: { text: "Grandpa Tam: Then and Now", sub: "Interview with $student", ms: 3500 } }
  B3_compare:
    dialogue: two
  B4_market:
    start: { mode: follow, target: $npc, dist: 6, height: 3, angle: 140 }
  B4a_open_fishing:
    start: { mode: wide, pos: [34.5, 73, 38], look: [33.5, 69.5, 28.5], label: "CAM A · the dock" }
  B5_feelings:
    dialogue: close
  B6_gratitude:
    dialogue: two

npc:
  public_persona: "Grandpa Tam, the village's oldest fisherman. Kind, slow, loves stories."
  voice: "short past-tense sentences; models target language; no slang"
  goal: "be remembered"
  feeling: "a little lonely; brightens when asked about his feelings and memories"
  emotion:
    start: 1
    up_on: []
    down_on: [ASKED_ABOUT_FEELINGS, EXPRESSED_GRATITUDE, RESPONDED_TO_CONTENT]
    bands:
      0-1: warm
      2-3: thoughtful
      4: quiet
      5: withdrawn
  facts:
    T1:
      text: "School was a one-room hut. We sat on the floor."
      reveal_when: "ASKED_OPEN_QUESTION about school/then"
      fallback_line: "One room. We sat on the floor."
    T2:
      text: "He walked 2 hours to market."
      reveal_when: "ASKED_OPEN_QUESTION about market/travel"
      fallback_line: "Two hours on foot. My legs were tired."
    T3:
      text: "He lost his first boat in a storm; friends helped build a new one."
      reveal_when: "ASKED_ABOUT_FEELINGS about boat/loss"
      fallback_line: "Sad. But my friends helped me build a new one."
    T4:
      text: "He's proud the young people fish safely now."
      reveal_when: "COMPARED_THEN_NOW OR after T1+T2 revealed"
      fallback_line: "Now the young ones fish safely. That makes me proud."
  prohibited:
    - reveal sad details beyond T3
    - any scoring
    - mention rubrics, hints, or the coach
  fallback_lines:
    warm: "Ask me about then, child. I remember."
    thoughtful: "Hmm. What do you want to know?"
    quiet: "..."

coach:
  channel: whisper   # private only — never public chat
  mode: guided
  hint_ladder:
    - level: 1
      text: "Try a question that starts with 'What was...' or 'How did...'."
    - level: 2
      text: "Ask about school, the market, or how he felt about something hard."
    - level: 3
      text: "You could ask: 'How did you feel when you lost your boat?'"
  rules:
    - speak only on talking-stick release / student /help
    - never give the full task answer before L3
    - never judge the person; talk about behaviour only
    - never speak in public chat

student_persona:
  id: pip
  sliders:
    assert: 0.30
    ask: 0.50
    ack: 0.60
    invite: 0.50
    commit: 0.50
    help: 0.90
    verify: 0.40
    warm: 0.80
    uptake: 0.70
  default_pattern: "calls /help within first 2 turns; follows hints"
  vocabulary: primary-age simpler

talking_stick:
  order: [pip, grandpa_tam]
  turn_timeout_ms: 15000

beats:
  - id: B0_greeting
    pin: true
    actor: pip
    expect: closed_question_name
    fallback_say: "Hello! What is your name?"
    npc_fallback: "Tam. Everyone calls me Grandpa."
  - id: B1_help_hint
    pin: false
    actor: pip
    optional_help: true
    coach_level: 1
    event: HINT_REQUESTED
  - id: B2_open_school
    pin: true
    actor: pip
    expect: open_question
    topic: school
    event: ASKED_OPEN_QUESTION
    reveal: T1
    fallback_say: "What was school like?"
    npc_fallback: "One room. We sat on the floor."
  - id: B3_compare
    pin: true
    actor: pip
    expect: then_now_contrast
    event: COMPARED_THEN_NOW
    fallback_say: "Now we sit on chairs and we have computers!"
  - id: B4_market
    pin: true
    actor: pip
    expect: open_question
    topic: market
    event: ASKED_OPEN_QUESTION
    reveal: T2
    fallback_say: "How did you go to the market?"
    listen_followup:
      event: RESPONDED_TO_CONTENT
      fallback_say: "Two hours? Your legs were tired!"
  # Third distinct open ask (feelings stay ASKED_ABOUT_FEELINGS — does not count toward open_questions ≥3).
  - id: B4a_open_fishing
    pin: true
    actor: pip
    expect: open_question
    topic: fishing
    event: ASKED_OPEN_QUESTION
    fallback_say: "What was fishing like then?"
    npc_fallback: "Hard work. Wooden boats. We watched the weather."
  - id: B5_feelings
    pin: true
    no_hint: true
    actor: pip
    expect: feelings_question
    event: ASKED_ABOUT_FEELINGS
    reveal: T3
    fallback_say: "How did you feel when you lost your boat?"
    npc_fallback: "Sad. But my friends helped me build a new one."
  - id: B6_gratitude
    pin: true
    actor: pip
    expect: gratitude
    event: EXPRESSED_GRATITUDE
    fallback_say: "Thank you for telling me."
  - id: B7_thank_you_sign
    pin: true
    actor: pip
    expect: place_sign
    sign_text:
      - "Dear Grandpa Tam,"
      - "Thank you for your story."
      - "You were brave."
      - "- Pip"
    npc_fallback: "I'll keep this."
  - id: B8_journal
    pin: false
    actor: pip
    expect: journal_write
    companion_hint: "Look at 'walk'. Is that about long ago or now? Which form shows the past?"
    event: LANGUAGE_SELF_CORRECTION

success_criteria:
  ASKED_OPEN_QUESTION: { min: 3 }
  RESPONDED_TO_CONTENT: { min: 1 }
  ASKED_ABOUT_FEELINGS: { min: 1 }
  EXPRESSED_GRATITUDE: { min: 1 }

debrief:
  strength: "You asked how Grandpa Tam felt, and he told you something special."
  improve: "Next time, try asking a 'why' question too."
  transfer: "Your card made him smile. Who else could you thank this week?"

observer_events:
  - ASKED_OPEN_QUESTION
  - ASKED_CLOSED_QUESTION
  - COMPARED_THEN_NOW
  - RESPONDED_TO_CONTENT
  - ASKED_ABOUT_FEELINGS
  - EXPRESSED_GRATITUDE
  - PLACE_SIGN
  - HINT_REQUESTED
  - HINT_GIVEN
  - LANGUAGE_SELF_CORRECTION
  - FACT_REVEALED
  - SCENARIO_COMPLETED
  - REFLECTION_SUBMITTED
