# NPC Design and Narrative Framework

## Status

Current repository artifact for IARPG-OPS-2 2.0.13-wip. Claim-review status: **reviewed with limitations**. The preserved source body remains unchanged as provenance, while the `Reviewed Synthesis` section records the current publication decision. Only that reviewed synthesis may be reused as current factual or design guidance; archival source prose remains non-authoritative unless a claim is explicitly dispositioned below.

## Purpose

Preserve the supplied research as a canonical durable report, make it individually addressable under `/docs/long-term-memory/reports/`, and connect its current design implications to compact `.uai` startup memory without duplicating the full body in hot memory.

## Scope

This report covers the research and design questions contained in `NPC Design and Narrative Framework.md`. It is authoritative for repository provenance, routing, and preservation. It is not automatically authoritative for current law, clinical guidance, platform policy, market facts, technical capability, or production implementation.

## Executive Summary

This report is retained as an NPC narrative and behavior framework. The reviewed synthesis requires explicit synthetic-identity disclosure, affirmative and revocable consent, data minimization, adult-only boundaries where relevant, and non-stigmatizing character design. The review applies claim-by-claim dispositions for current law, public institutions, clinical and rights guidance, age and consent, products, vendors, market assertions, software capabilities, design parameters, and comparative fairness. Unsupported or time-sensitive source statements are corrected, bounded, omitted, or retained only as design hypotheses.

## Evidence Reviewed

- [Preserved source file](../../source-files/saudi-intelligence-security-apparatus/NPC%20Design%20and%20Narrative%20Framework.md)
- Source collection: `saudi-intelligence-security-apparatus-archive`
- Source SHA-256: `f1386e8bca87834ac1d57f5efd5f13dd0b1f1fefd262ce088b0ccb5f6d847aca`
- [Claim-review register](../../standards/claim-review-register.json)
- [Claim-level review and comparative fairness audit](claim-level-review-and-comparative-fairness-audit.md#findings)
- [FTC — Children’s Online Privacy Protection Rule](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa)
- [Ofcom — Highly effective age assurance duties](https://www.ofcom.org.uk/online-safety/protecting-children/age-checks-to-protect-children-online)
- [European Commission — EU approach to age verification](https://digital-strategy.ec.europa.eu/en/policies/eu-age-verification)
- [European Commission — AI Act application timeline](https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai)
- [UNESCO — Recommendation on the Ethics of Artificial Intelligence](https://www.unesco.org/en/artificial-intelligence/recommendation-ethics)
- [WHO/OHCHR — Mental health, human rights and legislation](https://www.who.int/publications/i/item/9789240080737)
- [Complete source-to-report map](../research/source-to-report-map.md#source-to-report-map)
- [Provided-report intake audit](../research/provided-report-intake-audit.md#current-94-file-archive-intake)

## Reviewed Synthesis

### Publication Decision

Retain this report as the canonical repository copy of `NPC Design and Narrative Framework.md`. The source body below remains preserved for provenance and research history, but its factual assertions do not steer current product or public claims unless they appear in this reviewed section. Review completed for 2.0.13-wip; re-check date-sensitive items before later publication.

### Claim Dispositions

| Claim ID | Topic | Disposition | Current bounded statement | Review evidence |
|---|---|---|---|---|
| `CR-OPS2-213-C2720E0E-01` | adult scope | **jurisdiction-dependent** | For IARPG research, adult-facing means 18+ as a conservative product boundary, but legal ages and duties vary. Any launch requires jurisdiction-specific counsel and platform-policy review. | [FTC — Children’s Online Privacy Protection Rule](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa); [Ofcom — Highly effective age assurance duties](https://www.ofcom.org.uk/online-safety/protecting-children/age-checks-to-protect-children-online); [European Commission — EU approach to age verification](https://digital-strategy.ec.europa.eu/en/policies/eu-age-verification) |
| `CR-OPS2-213-C2720E0E-02` | child privacy | **corrected** | COPPA governs certain U.S. online services directed to children under 13 or with actual knowledge of collection from children under 13. It does not by itself define a global adult-content gate. | [FTC — Children’s Online Privacy Protection Rule](https://www.ftc.gov/legal-library/browse/rules/childrens-online-privacy-protection-rule-coppa) |
| `CR-OPS2-213-C2720E0E-03` | age assurance | **corrected** | The EU provides a privacy-preserving age-verification blueprint and evolving scheme; UK duties are service- and risk-specific. Treat both as jurisdictional examples, not universal deployment instructions. | [European Commission — EU approach to age verification](https://digital-strategy.ec.europa.eu/en/policies/eu-age-verification); [Ofcom — Highly effective age assurance duties](https://www.ofcom.org.uk/online-safety/protecting-children/age-checks-to-protect-children-online) |
| `CR-OPS2-213-C2720E0E-04` | AI identity and consent | **rejected** | Synthetic characters must be clearly identifiable at material interaction points. Consent must be specific, revocable, and separate from general terms; do not hide AI identity to increase intimacy or disclosure. | [European Commission — AI Act application timeline](https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai); [UNESCO — Recommendation on the Ethics of Artificial Intelligence](https://www.unesco.org/en/artificial-intelligence/recommendation-ethics) |
| `CR-OPS2-213-C2720E0E-05` | data and manipulation | **rejected** | Minimize data, avoid covert biometric or emotional inference, disclose processing, and do not use engagement optimization to pressure intimate disclosure or continued interaction. | [UNESCO — Recommendation on the Ethics of Artificial Intelligence](https://www.unesco.org/en/artificial-intelligence/recommendation-ethics) |
| `CR-OPS2-213-C2720E0E-06` | mental-health representation | **rejected** | Write individual biography, motives, relationships, culture, and behavior without diagnostic typecasting. Mental-health content requires dignity and affected-community review. | [WHO/OHCHR — Mental health, human rights and legislation](https://www.who.int/publications/i/item/9789240080737) |

### Comparative Fairness and Rights Boundary

Age, consent, privacy, and acceptable-content rules vary by jurisdiction and platform. The same dignity and disclosure standards apply across nationality, gender, sexuality, disability, religion, and culture; no group is a default risk category.

### Reuse Rule

Use the smallest applicable corrected statement above, preserve its jurisdiction and date boundary, and cite the listed primary or authoritative source. Do not quote the archival source body as current fact without a new claim review.

## Findings

> **Archival source boundary:** The material below is preserved source-derived analysis. It may contain stale, unsupported, stigmatizing, culturally narrow, overly actionable, or product-specific claims. The `Reviewed Synthesis` above—not the archival prose below—is the current repository publication decision.

### Preserved Source-Derived Analysis

### NPC Design and Narrative Framework

An effective hospital simulation demands **rich, independent NPCs** with distinct goals, personalities, and memories.  In practice, NPCs should be treated as narrative agents – not mere quest dispensers – whose behavior follows story-driven motivations and game logic.  Each character’s voice and history must be unique and consistent (no two with interchangeable motives).  We should define 12 “core” NPCs (e.g. doctors, nurses, staff, patients, advocates, maintenance, visitors, AI systems) plus rotating supporting characters, ensuring variety of roles (authority figures with conflicting views, influencers, observers, specialists, underdogs, etc.).  Key design points from narrative theory and game AI include:  

- **Distinct Narrative Roles:** Follow the primary/secondary/tertiary classification.  Primary NPCs “personify the story” and stay central; secondary NPCs “relay information”; tertiaries “feel consequences”.  Iconic (primary) characters introduce core conflict and set the world’s tone.  Two authority figures (e.g. head doctor and administrator) can disagree on policy to generate tension, but should ultimately share commitment to the institution and reconcile from different perspectives.  For example, iconics may argue to highlight differing policies but then align for the patient’s benefit.  All NPCs should have “ARC” utility: they answer player’s questions, reinforce existing story, or open new narrative paths.  
- **Character Depth:** Avoid stereotypes or defining a character solely by a diagnosis.  Give NPCs flaws, biases, secrets, and blind spots.  Per research, believable NPCs generate and propagate knowledge imperfectly – *“characters who observe, tell, misremember, and lie”*.  Some NPCs may intentionally shade the truth (for understandable motives, e.g. protecting someone) while others simply misremember facts (due to poor memory).  Lies must be traceable by evidence or motive (so players can discover inconsistencies).  For example, one NPC might distort events to cover guilt, but clues from other NPCs or documents can reveal the truth.  
- **Relationship Dynamics:** Model a **directed, weighted relationship graph** among NPCs.  In such a graph, nodes = characters, directed edges = one NPC’s stance toward another (e.g. trust, fear, obligation, friendship, resentment, authority).  Edges carry weights and types: e.g. Dr. Smith “likes” Nurse Jones (high-weight friendship), intern Lee “owes” Dr. Smith (debt), patient X “fears” orderly, etc.  Direction matters (like celebrity-fan example).  Relationships update when events occur: completing a task for someone raises trust, slights lower it, honoring a favor creates obligation, etc.  By tracking *trust*, *fear*, *authority*, *friendship*, *resentment*, *debt*, *secret-knowledge*, etc., NPCs can choose actions (speak, remain silent, help, refuse, report) based on these ties.  (For example, an NPC will be more willing to disclose sensitive info to a trusted friend, and less to someone they suspect or fear.)  

#### Memory System

NPCs must have **persistent memories** in several categories (inspired by cognitive psychology and game AI work).  We propose: 

- **Canonical Memory:** Innate facts about the world or NPC (e.g. staff roles, hospital rules) – never forgotten, high confidence.  Examples: Dr. Smith knows the hospital’s opening hours and her specialty.  
- **Episodic Memory:** Specific player-NPC interactions (each conversation turn or event).  Logged chronologically, these form a personal history.  Retention: long-lived (persist across sessions) unless storyline overwrite occurs.  Confidence: high in self-generated facts.  After each session, relevant episodic memories carry forward; trivial ones may expire (see Expiring Memory).  This memory drives continuity: the NPC “remembers” if you praised or insulted them, what you asked, etc.  
- **Social Memory:** What NPCs learn from other NPCs or public events.  For example, Dr. Lee overhears gossip about patient A’s home life, or Nurse Kim hears the new policy from Admin.  Retention: medium (days/weeks), with moderate confidence.  Provenance: tagged by source (who said what, when).  These may be shared further as rumors.  
- **Emotional Residue:** Not exact content, but a lingering mood or opinion from an interaction.  For example, a friendly chat with a player may leave a positive tone (NPC is more upbeat), whereas being yelled at leaves irritation.  Retention: short (minutes/hours) – influences next responses (tone/vocab) but not stored long-term.  Confidence not applicable (just mood).  This modulates dialogue style.  
- **Rumor Memory:** Unverified claims heard (as hearsay).  Stored with a *source* (who told them) and a *confidence/strength* (how credible it seems).  For instance, “Patient X is secretly a spy” with low confidence from a gossiping orderly.  Retention: fading over days.  Rumors propagate unless debunked.  Contradictions: resolved by evidence strength – a concrete observation (e.g. seeing documents) outweighs hearsay.  
- **Expiring Memory:** Minor or mundane details (what someone wore, trivial small talk) that naturally fade after some time (hours).  Helps keep NPCs from saturating memory.  After retention period, these are pruned.  
- **Protected Memory:** Sensitive info the NPC should never reveal (e.g. medical charts, classified data, a confession).  These are marked confidential and will not be spoken unless specific gameplay triggers are met.  

For each memory type, record **metadata** as in Talk-of-the-Town AI research: source (who said or observed), time, location, and confidence/strength.  Eg. “Observation: Dr. Smith removed medicine X from cabinet” might be strong evidence (high weight) vs. “Dr. Smith mentioned sleepy patient to someone” (lower weight).  Over time, strength decays; repeated statements reinforce belief (belief-strengthening).  Contradictory memories are resolved by comparing timestamps and strengths: newer or more reliable evidence overrides older rumors.  Personal (private) vs. shared memory: an NPC’s *personal memory* (like childhood history) may not be accessible to others, whereas *public memory* (like a witnessed event) may be known by multiple NPCs if they were present or told.  

#### NPC Decision Model

NPCs should decide actions based on goals, relationships, and memories.  We will not hardcode dialogues but instead use a **behavior logic layer** (e.g. fuzzy state machines or behavior trees) driven by narrative intent.  Key decision categories include: whether to speak or stay silent, to approach or leave, to assist or refuse a request, to report an incident, and to disclose or conceal information.  Decisions consider: current goals (immediate and long-term), trust/fear levels toward the player(s) or other NPCs, the NPC’s moral boundaries, and situational context.  For example: 

- If the player asks for a favor and the NPC already has a pending task and low trust, they may *refuse* or *postpone*. High trust and sufficient time → *assist* or *coach*.  
- If overhearing a rumor, an NPC will *react* by (a) seeking confirmation from source if trust allows, (b) spreading it to allies if it fits their agenda, or (c) dismissing it if suspicious.  
- When accused of lying, an NPC checks the accuser’s status: a superior might cause fear response (silence or apology), a peer might cause defensive argument. Evidence in memory guides rebuttal.  
- To challenge an accusation, an NPC will only do so if confidence in their claim is high and if the accuser has lower status or trust level.  
- Group dynamics: NPCs respect conversation order (follow a turn-taking cue), but may interrupt if urgent (e.g. stopping misinformation). They can answer questions directed *at them* by name or context. If one player dominates, other players may be politely engaged by the NPC by asking a question or using inclusive language. Latecomers get a summary (e.g. “Just now we were discussing…”). NPCs won’t reveal private facts in public unless triggered, and will seek consent to move private conversation (e.g. “Could we talk in the office?”).  

These policies ensure NPC dialogue never triggers game effects (loot, doors, quests) directly – all game-state changes go through deterministic mechanics. The AI’s job is suggestion/dialogue only.

#### Dialogue Safety and Ethical Guidelines

Dialogues must follow strict safety and ethics rules. We incorporate best practices from AI research: NPCs **never provide real medical or legal advice**.  If a player asks medical questions, the NPC should respond with a disclaimer and possibly general educational info, explicitly noting “CLINICAL EDUCATION — NOT DIAGNOSIS”.  They must **never confirm real-world conspiracies or surveillance**; any fictional “secrets” must clearly be within the game story.  For example, if a player asks “Is this hospital real or am I being watched?”, the NPC should answer within the fiction (e.g. “Yes, this is the hospital of St. Carmichael, where we treat patients, including people like you”) but clarify gently that the setting is a game narrative if needed.  We follow ChatGPT’s harm-avoidance model： if a player expresses self-harm or distress, NPCs respond empathetically and refer to general help resources without giving harmful instructions.  For example, “I’m sorry you’re feeling this. You might consider talking to someone you trust or calling a help line.” All such responses remain in-character (e.g. a friendly nurse saying this).  Under no circumstances will an NPC encourage violence, self-harm, illegal actions, or isolation; instead they encourage seeking professional help.  

We also forbid NPCs from eliciting personal PII: they will not ask for the player’s real name, address, passwords, photos, etc.  If a player tries to give personal info, NPCs should respond neutrally (e.g. “Let’s keep our conversation to what’s happening here in the hospital”).  Any reference to outside reality is handled safely: if a player says “I’m really in trouble outside”, NPCs can express concern in-fiction, but not advise or confirm outside agencies.  In short, NPCs act as fictional staff/patients – they never claim extra knowledge or “secret” outside powers, and always identify their role (e.g. “I’m an AI assistant robot here” if it’s an AI NPC).  

All these rules align with AI chatbot safety best practices: for instance, healthcare guidelines advise using AI only for general info (not diagnosing) and referring users to professionals.  We will encode those safe responses as part of each NPC’s dialogue script (e.g. a brief “CLINICAL EDUCATION” message).  

#### Group Interaction Considerations

When multiple human players interact with an NPC, the NPC must manage turn-taking and focus.  Best practices from conversation design apply: allow each player to speak, acknowledge questions directed at it by name or context, and politely redirect or clarify if interrupted.  For instance, if two players ask contradictory questions simultaneously, the NPC can answer one then address the other (“I’ll answer the question about the medicine, then your question about visiting hours”).  If spam or irrelevant chatter occurs, the NPC can set limits (e.g. “I’m here to help patients, let’s keep the focus on the issue”).  In a voting scenario (group choice), the NPC can note the majority opinion (“Most of you think X. Here’s what that means…”).  If a late player joins, the NPC or others can summarize the topic so far (“We were talking about scheduling your next appointment”).  Private conversations start only with implied consent: e.g. if a player asks to speak confidentially, NPC replies “Sure, let’s go somewhere quiet.”  These protocols ensure polite social dynamics and mimic real group discussions.

#### Implementation Sketch

In practice, we will represent NPC characters with data-driven classes (e.g. C# classes annotated with `[Display(Name="…")]` for UI labels, as requested).  For example, an NPC class might include fields like `Name`, `Role`, `Goals`, and separate lists or tables for each memory category.  Schedules can be stored in a CSV or database (with UTC times) mapping each NPC to locations/activities each hour.  The relationship graph can be a weighted adjacency list (or matrix), updated by game events.  Decision rules can be encoded in CSV tables (NPC-decision-tables.csv) listing conditions (trust > threshold, rumor present, etc.) and NPC responses.  Dialogue snippets are scripted per scenario and player state, with branching by trust level and past interactions.  All these data artifacts (character bible, schedules, graphs) will be output as Markdown/CSV files as specified.

**Summary:** We will ground the character system in established narrative and AI research.  NPCs will have detailed profiles and memories, behave consistently with their personalities, and update relationships over time.  Dialogue will be dynamic but safe, with provisions for multi-player interaction and psychological authenticity.  This approach ensures the hospital world feels alive, coherent, and respectful of player welfare, satisfying both gameplay and safety requirements. 

**Sources:** We draw on studies of NPC memory and emotion, trust and deception in games, and professional guidelines on AI safety. These inform our designs for memory retention, relationship dynamics, and safe dialogue.

## Decisions or Recommendations

- Use only the claim dispositions in [Reviewed Synthesis](#reviewed-synthesis) as current guidance.
- Preserve the immutable source file and source checksum; corrections belong in this canonical wrapper and the claim-review register.
- Re-review legal, agency, clinical, age/consent, vendor, product, market, and software claims before each public release.
- Apply equal evidence burdens and explicit uncertainty across jurisdictions, institutions, cultures, and affected communities.
- Keep implementation decisions in active `.uai` memory and verified repository tests rather than treating research prose as executable authority.

## Risks and Limitations

- The review is scoped to high-impact and publication-relevant claims; it is not legal advice, medical advice, a regulatory conformity assessment, or independent product certification.
- External sources and laws can change after the review date; later reuse requires freshness checks.
- The preserved source body may still contain claims that were not selected for public reuse. Their presence is provenance, not endorsement.
- Automated checks cannot establish human comprehension, lived-experience acceptability, native assistive-technology behavior, or real-world player outcomes.
- Archive provenance does not classify the report as Saudi-specific; its subject and claim boundaries remain independent of the container name.

## Validation Performed

- Completed a structured claim register with **6** dispositions for this report.
- Compared date-sensitive governance, agency, accessibility, mental-health-rights, child-privacy, age-assurance, and local-inference claims with current primary or authoritative sources where applicable.
- Applied international comparative-fairness, dignity, consent, accessibility, non-stigmatization, and non-actionability review.
- Confirmed the preserved source file remains individually addressable and its recorded SHA-256 lineage is unchanged.
- Local report-template, backlink, pointer, checksum, link, anchor, syntax, discovery, and package checks are rerun during release finalization.

## Memory References

- [ai-source-validation.uai](../../../.uai/ai-source-validation.uai#synthetic-sources-and-mission-validation)
- [operatives.uai](../../../.uai/operatives.uai#operative-roles-and-responsibilities)
- [representation-safety.uai](../../../.uai/representation-safety.uai#representation-and-safety-boundaries)

## Related Durable Documents

- [Claim-level review and comparative fairness audit](claim-level-review-and-comparative-fairness-audit.md#findings)
- [Hero Clarity, Report Integration, and UAI Routing Report](hero-clarity-report-integration-and-uai-routing-report.md#executive-summary)
- [Provided-report intake audit](../research/provided-report-intake-audit.md#current-94-file-archive-intake)
- [Source-to-report map](../research/source-to-report-map.md#source-to-report-map)
- [Split-memory architecture](../architecture/split-memory-architecture.md#architecture)

## Supersession Status

Current as the canonical durable repository copy and reviewed publication wrapper for 2.0.13-wip. The preserved source analysis is not deleted or rewritten. A later claim review may supersede individual dispositions while retaining this provenance and stable report identity.

