From f5a866fc4d73327c44184238956a341a8b777cb9 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Tue, 24 Feb 2026 12:05:16 +0100 Subject: [PATCH] =?UTF-8?q?fix(content):=20PR=20#61=20round=202=20?= =?UTF-8?q?=E2=80=94=20schema=20fields,=20cooldown,=20CHANGELOG=20sections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contradiction files: - Add role/access/trust back to all lines (schema-required) - prerequisite: → prerequisites: (plural, matching schema) - Remove cooldown entirely — fire-once enforced by trigger semantics (contradiction_detected fires once per KG state change), not magic numbers Tutorial files: - Remove cooldown: -1 — same reasoning, first_* triggers are one-time Server: - Document cooldown: Option on MonologueLine — None means no per-line cooldown, fire-once relies on trigger design CHANGELOG: - Move displaced entries from ### Fixed back to ### Changed Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 13 ++-- .../detective/contradiction-detected.yaml | 59 +++++++++++++------ .../transit/monologue/detective/tutorial.yaml | 23 ++++---- .../smuggler/contradiction-detected.yaml | 59 +++++++++++++------ .../transit/monologue/smuggler/tutorial.yaml | 23 ++++---- server/src/content/types.rs | 3 + 6 files changed, 117 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 299536adf..831596004 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,12 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). - Line variety tracker wiring — DialogueCooldownTracker prevents repeat lines within 600-tick window (#338) - DialogueResponse cross-language fixture for GDScript testing - Sprint team lifecycle through PR review — teams stay alive for commit → push → review → fix loop → approve → shutdown +- Zone_id extraction in game_state.gd optimized from O(N) tile scan to O(1) dictionary lookup — builds _tile_by_coord from member visible_tiles covering both test and live paths (#543) +- Shared run_dialogue_pipeline() helper eliminates ~60 lines of duplication between Talk and DialogueResponse systems +- Dialogue and monologue line IDs migrated from location-scoped (the-terminal_d_039) to NPC-scoped (kael-davan_d_001) namespace — each NPC has an independent sequence per D-035 (#542) +- DialogueCooldownTracker documented as per-player-global by design (NPC-scoped line IDs per D-035 prevent collision) +- CONFRONTATION_LINES marked TODO for migration to D-028/D-035 content pipeline +- pr-push and pr-review skills updated with team lifecycle awareness ### Fixed - PR #59 review: stale mood vocabulary updated in line-pool-format.md, style-guide, and content-directory-structure.md to post-Sprint 14 values @@ -44,13 +50,6 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). - assert!(false) → panic!() in serialization tests (clippy) - SetFacing and TeleportToHub added to roundtrip test coverage -- Zone_id extraction in game_state.gd optimized from O(N) tile scan to O(1) dictionary lookup — builds _tile_by_coord from member visible_tiles covering both test and live paths (#543) -- Shared run_dialogue_pipeline() helper eliminates ~60 lines of duplication between Talk and DialogueResponse systems -- Dialogue and monologue line IDs migrated from location-scoped (the-terminal_d_039) to NPC-scoped (kael-davan_d_001) namespace — each NPC has an independent sequence per D-035 (#542) -- DialogueCooldownTracker documented as per-player-global by design (NPC-scoped line IDs per D-035 prevent collision) -- CONFRONTATION_LINES marked TODO for migration to D-028/D-035 content pipeline -- pr-push and pr-review skills updated with team lifecycle awareness - ## [v0.1.15] — 2026-02-23 ### Added diff --git a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/contradiction-detected.yaml b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/contradiction-detected.yaml index b59a930d2..1f12ed12b 100644 --- a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/contradiction-detected.yaml +++ b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/contradiction-detected.yaml @@ -21,7 +21,8 @@ lines: # Prerequisite: Phase 2 + Sera's avoidance pattern has fired (three departures logged). # # ID discriminator: _con_ marks contradiction lines per Q-028 pending resolution. - # cooldown: -1 — these are one-time events. Should not repeat. + # cooldown: omitted — fire-once enforced by trigger semantics (contradiction_detected + # fires once per KG state change), not by a cooldown value. # # Note: contradiction_detected is a new trigger type — requires server-side implementation # in monologue.rs (ticket #550). Secondary beat lines use lower priority for sequencing; @@ -33,12 +34,15 @@ lines: - id: pc-detective_m_d_con_001 text: "Sera said Kael was at the dock intake during second shift. I'm looking at him in corridor B-7 right now." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 10 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -53,12 +57,15 @@ lines: - id: pc-detective_m_d_con_002 text: "Venn said Kael was at dock intake through second shift. Kael is in B-7. Those aren't compatible." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -73,12 +80,15 @@ lines: - id: pc-detective_m_d_con_003 text: "She placed Kael at the dock. He's not at the dock." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -97,12 +107,15 @@ lines: - id: pc-detective_m_d_con_004 text: "One of them is wrong. Sera, or what I'm seeing. Or I'm missing something I don't have yet." + role: player_character + access: [public] + trust: surface situation: [investigation, alone] trigger: contradiction_detected mood: [anxious, focused] priority: 7 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -119,12 +132,15 @@ lines: - id: pc-detective_m_d_con_005 text: "File it. Don't close it. Either Venn's information was wrong when she gave it, or it was wrong on purpose. That's a different question." + role: player_character + access: [public] + trust: surface situation: [investigation, alone] trigger: contradiction_detected mood: [focused] priority: 6 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -144,12 +160,15 @@ lines: - id: pc-detective_m_d_con_006 text: "Sera told me Kael doesn't make mistakes. He's not where she said he'd be. And she's been avoiding Lintar for three weeks." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 10 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -167,12 +186,15 @@ lines: - id: pc-detective_m_d_con_007 text: "Two facts: Venn placed Kael at dock intake, second shift. Kael is in B-7. One new observation: Venn leaves every time Lintar enters the bar. Worth seeing if those connect." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -190,12 +212,15 @@ lines: - id: pc-detective_m_d_con_008 text: "Venn's been managing her exits around Lintar. And she put Kael somewhere he isn't. Let's see what sits at the intersection of those two." + role: player_character + access: [public] + trust: surface situation: [investigation, alone] trigger: contradiction_detected mood: [focused] priority: 8 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted diff --git a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/tutorial.yaml b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/tutorial.yaml index a51d0add9..a1fa58e0e 100644 --- a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/tutorial.yaml +++ b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/detective/tutorial.yaml @@ -18,7 +18,8 @@ lines: # Voice: analytical, procedure-oriented, careful. No contractions in analytical mode. # Colon usage for categorization. 'Let's see what...' and 'Worth flagging' verbal tics. # ID discriminator: _tut_ per sprint briefing. - # cooldown: -1 — fire once, never repeat. + # cooldown: omitted — fire-once enforced by trigger semantics (first_* triggers + # fire once per game), not by a cooldown value. # priority: 8 (primary, one per trigger type), 6 (secondary variant, mood-weighted alternate). # # Schema corrections (Gestalt review, Sprint 17): @@ -45,7 +46,7 @@ lines: trigger: first_move mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, movement, navigation, analytical] notes: > Detective version of the 'check the signage' tutorial. Colon usage for the signage @@ -63,7 +64,7 @@ lines: trigger: first_new_section mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, movement, navigation, analytical] notes: > Fires on entering a new section for the first time. 'Commission briefing had the @@ -85,7 +86,7 @@ lines: trigger: first_fog_encounter mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, fog, perception, analytical] notes: > Detective fog tutorial — analytical register throughout. 'Visual range terminates at' @@ -104,7 +105,7 @@ lines: trigger: first_fog_edge mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, fog, perception, analytical] notes: > Second fog encounter line — fires at a fog zone boundary. 'Going around is the @@ -127,7 +128,7 @@ lines: trigger: first_sound_heard mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, sound, perception, analytical] notes: > Detective sound tutorial — analytical framing of the briefing's example. 'Source count @@ -146,7 +147,7 @@ lines: trigger: first_off_screen_sound mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, sound, perception, analytical] notes: > Second sound tutorial — fires on an off-screen audio source. The detective parses @@ -169,7 +170,7 @@ lines: trigger: first_npc_proximity mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, npc, interaction, analytical] notes: > Detective NPC tutorial — procedural, method-as-principle. 'Civilians in range' is @@ -189,7 +190,7 @@ lines: trigger: first_npc_face_read mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, npc, observation, analytical, authority] notes: > Fires when the player observes an NPC at close range. The detective's asymmetry: @@ -212,7 +213,7 @@ lines: trigger: first_insert_open mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, insert, hud, analytical] notes: > Detective insert tutorial. Colon usage: catalogs what the overlay contains. 'Commission- @@ -231,7 +232,7 @@ lines: trigger: first_insert_contact_flag mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, insert, hud, lattice, investigation] notes: > Fires when the insert first populates with flagged entities. Count given precisely diff --git a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/contradiction-detected.yaml b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/contradiction-detected.yaml index 19843e244..466d5ba61 100644 --- a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/contradiction-detected.yaml +++ b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/contradiction-detected.yaml @@ -24,7 +24,8 @@ lines: # Prerequisite: Phase 2 + Kael's behavioral anomalies observed (count >= 2). # # ID discriminator: _con_ marks contradiction lines per Q-028 pending resolution. - # cooldown: -1 — one-time events. Should not repeat. + # cooldown: omitted — fire-once enforced by trigger semantics (contradiction_detected + # fires once per KG state change), not by a cooldown value. # # Note: contradiction_detected is a new trigger type — requires server-side implementation # in monologue.rs (ticket #550). Secondary beat lines use lower priority for sequencing; @@ -36,12 +37,15 @@ lines: - id: pc-smuggler_m_s_con_001 text: "Kael said second shift was clear. He's in B-7. With someone I don't know." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 10 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -54,12 +58,15 @@ lines: - id: pc-smuggler_m_s_con_002 text: "That's Kael. Restricted corridor. Unrecognized contact. Kael doesn't come to B-7." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -72,12 +79,15 @@ lines: - id: pc-smuggler_m_s_con_003 text: "He's in B-7. He told me he'd be heading home after shift. One of those isn't the case." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -96,12 +106,15 @@ lines: - id: pc-smuggler_m_s_con_004 text: "Maybe there's a reason. There's always a reason. But Kael knows better than to run a meeting in a maintenance corridor without telling me." + role: player_character + access: [public] + trust: surface situation: [investigation, alone] trigger: contradiction_detected mood: [focused, anxious] priority: 7 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -117,12 +130,15 @@ lines: - id: pc-smuggler_m_s_con_005 text: "Don't assume. Could be he's running something for Nils I wasn't told about. Could be something else. The second thing is the problem." + role: player_character + access: [public] + trust: surface situation: [investigation, alone] trigger: contradiction_detected mood: [focused] priority: 6 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -141,12 +157,15 @@ lines: - id: pc-smuggler_m_s_con_006 text: "He's been distracted for three days. Lattice checks every few minutes, leaving lunch early. Now a B-7 meeting with someone outside the ring. Kael's working an angle he hasn't told me about." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused, anxious] priority: 10 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -163,12 +182,15 @@ lines: - id: pc-smuggler_m_s_con_007 text: "Kael doesn't run his own contacts. Devra handles external. So either Devra knows about this, or Kael's outside protocol. Neither's good." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [focused] priority: 9 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted @@ -183,12 +205,15 @@ lines: - id: pc-smuggler_m_s_con_008 text: "He's been somewhere else in his head all week. Now I know why. Whoever that was — not ring. Kael's looking for a way out." + role: player_character + access: [public] + trust: surface situation: [investigation, observation] trigger: contradiction_detected mood: [anxious] priority: 8 - cooldown: -1 - prerequisite: + + prerequisites: entities: - id: "npc:kael-davan" state: Contradicted diff --git a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/tutorial.yaml b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/tutorial.yaml index 913bd3207..2c48f043a 100644 --- a/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/tutorial.yaml +++ b/content/campaigns/main/systems/krenn/stations/sova/districts/transit/monologue/smuggler/tutorial.yaml @@ -18,7 +18,8 @@ lines: # Voice: observational, street-smart, practical. Fragments. Standalone "Good." as tic. # No analytical distance — the smuggler reads, reacts, files, moves on. # ID discriminator: _tut_ per sprint briefing. - # cooldown: -1 — fire once, never repeat. + # cooldown: omitted — fire-once enforced by trigger semantics (first_* triggers + # fire once per game), not by a cooldown value. # priority: 8 (primary, one per trigger type), 6 (secondary variant, mood-weighted alternate). # # Schema corrections (Gestalt review, Sprint 17): @@ -46,7 +47,7 @@ lines: trigger: first_move mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, movement, navigation] notes: > Directly from the sprint briefing example. First move teaches navigation: the district @@ -63,7 +64,7 @@ lines: trigger: first_new_section mood: [content] priority: 6 - cooldown: -1 + tags: [tutorial, movement, navigation, operational] notes: > Fires on entering a new section for the first time. 'Route's in the muscle' — the @@ -84,7 +85,7 @@ lines: trigger: first_fog_encounter mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, fog, perception] notes: > Directly from the sprint briefing example. First fog boundary. Restated as habit: @@ -101,7 +102,7 @@ lines: trigger: first_fog_edge mood: [focused] priority: 6 - cooldown: -1 + tags: [tutorial, fog, perception] notes: > Second fog encounter line — fires when the player reaches the boundary of a fog zone @@ -122,7 +123,7 @@ lines: trigger: first_sound_heard mood: [focused] priority: 8 - cooldown: -1 + tags: [tutorial, sound, perception] notes: > Directly from the sprint briefing example. First sound heard that's not immediately @@ -140,7 +141,7 @@ lines: trigger: first_off_screen_sound mood: [content] priority: 6 - cooldown: -1 + tags: [tutorial, sound, perception, operational] notes: > Second sound line — fires when audio from an off-screen source is detected. The @@ -162,7 +163,7 @@ lines: trigger: first_npc_proximity mood: [content] priority: 8 - cooldown: -1 + tags: [tutorial, npc, interaction, social] notes: > Directly from the sprint briefing example. First time in range of an NPC. The smuggler @@ -180,7 +181,7 @@ lines: trigger: first_npc_face_read mood: [content] priority: 6 - cooldown: -1 + tags: [tutorial, npc, observation, social] notes: > Fires when the player observes an NPC at close range (face visible). The smuggler @@ -201,7 +202,7 @@ lines: trigger: first_insert_open mood: [content] priority: 8 - cooldown: -1 + tags: [tutorial, insert, hud, operational] notes: > Directly from the sprint briefing example. First insert/HUD open. The smuggler's @@ -218,7 +219,7 @@ lines: trigger: first_insert_contact_flag mood: [content, warm] priority: 6 - cooldown: -1 + tags: [tutorial, insert, hud, kael, friend-arc] notes: > Fires when the insert first flags a known contact (here: Kael, the FRIEND NPC). diff --git a/server/src/content/types.rs b/server/src/content/types.rs index 0d67cc99e..0536e358c 100644 --- a/server/src/content/types.rs +++ b/server/src/content/types.rs @@ -517,6 +517,9 @@ pub struct MonologueLine { pub prerequisites: Option, #[serde(default)] pub priority: Option, + /// Per-line cooldown in ticks. `None` (omitted in YAML) means no per-line + /// cooldown — fire-once lines rely on trigger semantics instead (e.g., + /// `first_*` and `contradiction_detected` triggers fire once by design). #[serde(default)] pub cooldown: Option, #[serde(default)]