chore(docs): remove content-converter and content-ron Makefile target

The YAML→RON converter and its make target are v0.1 artifacts superseded
by the v0.2 RON-first generator pipeline. content-ron/ was already
gitignored; this removes the tool that generated it.

Closes #667.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 15:00:46 +01:00
co-authored by Claude Opus 4.6
parent dfcd7bc96d
commit 453983ffd2
30 changed files with 3 additions and 3562 deletions
+1 -6
View File
@@ -2,7 +2,7 @@ GODOT := $(shell command -v godot4 2>/dev/null || command -v godot 2>/dev/null)
.PHONY: help setup build check-protocol client server game stop test lint ci ci-client ci-server clean \
decisions-sync decisions-coverage decisions-active decisions-orphan \
db-backup db-install validate-content content-ron check-fact-ids setup-hooks \
db-backup db-install validate-content check-fact-ids setup-hooks \
pre-pr pre-pr-lint pre-pr-build pre-pr-test pre-pr-validate pre-pr-fixtures \
pre-pr-server pre-pr-client pre-pr-content \
fixtures-client fixtures-gauntlet golden-diff golden-update \
@@ -47,7 +47,6 @@ help:
@echo " make decisions-orphan Decisions without implementing tickets"
@echo " make validate-content Validate content YAML against schemas"
@echo " make check-fact-ids Check fact_id references against knowledge catalogs"
@echo " make content-ron Convert content YAML to RON (build-time)"
@echo " make fixtures-client Generate GDScript->Rust cross-encoder fixtures (#475)"
@echo " make golden-diff Show diff if golden file output has changed"
@echo " make golden-update Regenerate golden file and stage for commit"
@@ -382,10 +381,6 @@ test-voice-real:
cd server && cargo test --test voice_pipeline -- --nocapture
@echo "Results: .tmp/voice-test/results.txt"
content-ron:
cd tooling/content-converter && cargo build --release
tooling/content-converter/target/release/content-converter --input content --output content-ron --verbose
# --- Clean ---
clean:
-50
View File
@@ -1,50 +0,0 @@
# Content Infrastructure
Directories prefixed with `_` are infrastructure, not game content. The server content loader skips directories starting with `_` when scanning for content files.
- `_meta/` — Infrastructure metadata (this directory)
- `_schema/` — JSON Schema validation files (draft 2020-12)
## Directory Hierarchy
Content is organized hierarchically to match the game universe:
```
content/
content.yaml # Manifest: campaign list, glob discovery patterns
global/ # Cross-campaign shared content (factions, enums, knowledge)
campaigns/
{campaign}/ # e.g., "main"
campaign.yaml
systems/
{system}/ # e.g., "krenn"
system.yaml
stations/
{station}/ # e.g., "sova"
station.yaml
districts/
{district}/ # e.g., "transit"
district.yaml
npcs/
locations/
triangles/
dialogue/
monologue/
routines/
templates/
```
## Canonical ID Derivation
Identity is derived from directory path at load time — no redundant ID fields in YAML.
- **District:** `{system}.{station}.{district}` (e.g., `krenn.sova.transit`)
- **NPC (within district):** `npc:{slug}` (e.g., `npc:kael-davan`)
- **NPC (cross-district):** `npc:{district}.{slug}` (e.g., `npc:transit.kael-davan`)
- **Location:** `{system}.{station}.{district}.location.{slug}`
## Content Discovery
The loader reads `content.yaml` for enabled campaigns and their glob patterns.
District discovery uses `systems/**/districts/*/district.yaml` — no per-district
manifest entry needed. Adding a district = creating a directory with district.yaml.
-954
View File
@@ -1,954 +0,0 @@
# NPC Authoring Style Guide
**The Settled Reach** | v0.1 Content Authoring Handbook
**Ticket:** #379 | **Sprint:** 5
**Authors:** Gestalt (mechanical constraints), Mellanie (voice rules), Paula (tier templates, relationship design), Ozzie (anchor lines)
**Cross-references:** D-024, D-025, D-028, D-029, D-032, D-034, D-035, D-036, D-039, D-050, D-056, D-059
**Schemas:** `content/_schema/npc-profile.schema.json`, `dialogue-pool.schema.json`, `monologue-pool.schema.json`
---
## 1. Purpose
This document is the single reference for all NPC content authoring in The Settled Reach. Every dialogue line, monologue line, NPC profile, and content pack must conform to the rules here. The guide is used by:
- **Content authors** writing dialogue pools, monologue pools, NPC profiles, and content packs
- **Reviewers** checking tag compliance, voice consistency, and mechanical correctness
- **The generation pipeline** (v0.2+) as the style constraint set for expanded content
- **Future content authors** (including AI-assisted generation) as the specification they must satisfy
**If it's not in this guide, it's not a rule. If it contradicts a decision document, the decision document wins.**
---
## 2. Content Tiers
Every NPC has a tier (D-023, D-024). The tier determines content depth and authoring budget.
### Tier 1: Conspiracy-Entangled (Full Depth)
| Attribute | Value |
|-----------|-------|
| **Pattern** | FRIEND, MIRROR, or CATALYST |
| **Motivation** | Any |
| **Line budget** | 70-100 lines (FRIEND), 50-70 lines (MIRROR/CATALYST) |
| **Profile depth** | Full 10-axis, all fields populated |
| **Relationship arcs** | Multi-phase (3-5 phases for FRIEND), stable-deep for MIRROR |
| **Dual-lens notes** | Required on profile and every 5th dialogue line minimum |
| **FRIEND content** | Hand-authored only. No generation expansion. |
| **Triangle membership** | 1-3 triangles |
| **Trust-gated dialogue** | All three tiers (surface, real, secret) populated |
**v0.1 Tier 1 NPCs:** Kael Davan (FRIEND/OPERATOR), Sera Venn (FRIEND/WITNESS), Naia Tamm (MIRROR/CIVILIAN)
### Tier 2: Template-Situated (Social Context)
| Attribute | Value |
|-----------|-------|
| **Pattern** | ANCHOR, THRESHOLD, SYSTEM, GHOST, or REMNANT |
| **Motivation** | Any |
| **Line budget** | 20-40 lines |
| **Profile depth** | Full 10-axis, supporting fields optional |
| **Relationship arcs** | Single phase, stable. Access tier shifts possible but not required. |
| **Dual-lens notes** | Required on profile; optional on individual lines |
| **Triangle membership** | 1-2 triangles |
| **Trust-gated dialogue** | Surface required. Real recommended. Secret optional. |
**v0.1 Tier 2 NPCs (D-050 canonical):** Voss (SYSTEM/OPERATOR), Lera Sessik (ANCHOR/OPERATOR), Torek Lintar (CATALYST/CIVILIAN), Devra (THRESHOLD/HANDLER), Maret Korr (WITNESS/SKEPTIC), Resha (CATALYST/CIVILIAN), Drin (SYSTEM/TURNCOAT), Renn (THRESHOLD/OPERATOR), Pell (CATALYST/TURNCOAT), Harek (ANCHOR/HANDLER)
### Tier 3: Filler (Atmosphere)
| Attribute | Value |
|-----------|-------|
| **Pattern** | NOBODY |
| **Motivation** | CIVILIAN |
| **Line budget** | 5-10 lines |
| **Profile depth** | Minimal: canonical_id, display_name, tier, pattern, motivation, want, routine |
| **Relationship arcs** | None |
| **Dual-lens notes** | Not required |
| **Triangle membership** | None |
| **Trust-gated dialogue** | Surface only |
**v0.1 Tier 3 NPCs (D-050 canonical):** Sess (ANCHOR/CIVILIAN), Olin (CATALYST/CIVILIAN), Sabel (GHOST/OPERATOR), Tav (SYSTEM/CIVILIAN)
**Off-stage:** Nils Davan (GHOST/HANDLER) — referenced in dialogue, effects visible through other NPCs, rarely or never directly encountered.
**Design note:** The 30% flat population (D-029) is the noise floor. These NPCs make investigation signal meaningful. One memorable trait per Tier 3 NPC. Write the trait, write 5 greeting/routine lines, stop. But write them as real people — Tav worries about his first real responsibility. Sess remembers how the district used to be. Their genuineness is what makes the noise floor believable.
---
## 3. NPC Patterns (System A)
Patterns define an NPC's narrative archetype. Each pattern has specific authoring rules.
### FRIEND
The emotional centerpiece. Full contradiction arc, multi-phase relationship, maximum content depth. D-034 is the specification.
| Rule | Detail |
|------|--------|
| **Phases** | 3-5 phases: warmth -> trust -> doubt -> conflict -> new equilibrium |
| **Contradiction** | Must be observable through player observation, NOT told through dialogue |
| **Sympathetic motivation** | THE FRIEND isn't evil. Concealment comes from care or fear. |
| **No clean resolution** | Every player choice (confront, ignore, exploit, protect) has consequences |
| **Tell progression** | 3+ tells that escalate across phases |
| **Dialogue shift** | Pre-discovery and post-discovery pools must feel different |
| **Dual-lens resonance** | The other character's playthrough recontextualizes FRIEND behavior |
| **No generation expansion** | All FRIEND content is hand-authored |
**Content budget:** 70-100 lines per FRIEND NPC:
- 25-35 dialogue (greetings, shift talk, casual, deflection, confrontation)
- 15-20 trust-gated (insider ring talk, close warmth, secret-tier hints)
- 5-8 unprompted (NPC volunteers info early, warnings/deflections late)
- 10-15 monologue per character (bonded character + opposite character)
- 5-8 tell observation lines
- 3-5 contradiction discovery lines
### MIRROR
The honest character. No contradiction arc, no deception tells, no secrets. Full emotional depth despite mechanical simplicity.
| Rule | Detail |
|------|--------|
| **No tells** | Empty tells array. Behavioral markers (visible stress, coping) are NOT deception tells. |
| **No contradiction arc** | No phases, no color shift, no betrayal moment |
| **No secret-tier revelation** | Trust progression reveals deeper FEELING, not deeper SECRETS |
| **Absence as content** | The player's observation pipeline flags the LACK of tells as notable |
| **Emotional vulnerability** | MIRROR wears their worry visibly. Transparency is load-bearing. |
**Content budget:** 50-70 lines per MIRROR NPC. No contradiction discovery content. No tell observation content.
### ANCHOR
Stabilizing community presence. Protects the status quo.
| Rule | Detail |
|------|--------|
| **Social gatekeeper** | Controls information flow through social position, not power |
| **Protective reflex** | Shields regulars and community members from outsiders |
| **Tells signal vigilance** | Not deception — watchfulness, redirection, protective silence |
### THRESHOLD
Controls access between social worlds.
| Rule | Detail |
|------|--------|
| **Gatekeeper mechanic** | Cooperation or opposition shapes player options |
| **Access tier is the tool** | THRESHOLD decides who gets insider access |
| **Pressurable** | The player can earn or force cooperation |
### GHOST
Absent figure whose influence is felt through others.
| Rule | Detail |
|------|--------|
| **Minimal direct content** | Referenced in dialogue, rarely seen |
| **Off-screen pressure** | Effects visible through other NPCs' behavior changes |
| **Content is in OTHER NPCs' lines** | Ghost's impact authored through relationship stubs |
### SYSTEM, CATALYST, REMNANT, NOBODY
See `content/global/enums/patterns.yaml` for definitions. Each follows the general tier rules above.
---
## 4. Functional Motivations (System B)
Motivations define the NPC's role relative to the conspiracy. Combined with pattern to produce the full NPC identity.
| Motivation | Relationship to Ring | Content Implication |
|------------|---------------------|---------------------|
| **HANDLER** | Manages ring operations | Authority dialogue, operational language, power dynamics |
| **WITNESS** | Knows something, possibly unwittingly | Information gates, trust-progression reveals |
| **TURNCOAT** | Wavering loyalty | Pressurable, flip conditions, dual-access content |
| **CIVILIAN** | Genuinely uninvolved | Mundane substrate, noise floor, honest responses |
| **OPERATOR** | Active ring participant | Operational jargon, insider access content, complicity |
| **SKEPTIC** | Questions status quo | Uncomfortable questions, institutional criticism |
**Composition examples:**
- FRIEND + OPERATOR (Kael): "I was your friend AND your co-conspirator"
- FRIEND + WITNESS (Sera): "I was your friend AND I was hiding evidence"
- MIRROR + CIVILIAN (Naia): "The one person not lying, surrounded by liars"
- ANCHOR + OPERATOR (Lera): "Profitable blindness — is this enough? Yes, if I don't look"
- SYSTEM + OPERATOR (Voss): "The system works — for the wrong people"
- WITNESS + SKEPTIC (Maret): "I see the discrepancies. I can't pretend I don't"
- SYSTEM + TURNCOAT (Drin): "The institution made me vulnerable, and the ring exploited it"
**Authoring guidance:** When writing any NPC, start from the pattern+motivation tension. Every line should be legible as coming from that specific combination. An ANCHOR+OPERATOR speaks differently from an ANCHOR+CIVILIAN — the first maintains normalcy as active concealment, the second maintains normalcy because that's genuinely all they have.
---
## 4b. The 5 Key Axis Interactions
The 10 axes (D-024) don't exist in isolation. These 5 axis interactions generate the contradictions that drive gameplay. When authoring an NPC, identify which interactions are active — they determine what content to write.
| Interaction | What It Creates | Example |
|-------------|----------------|---------|
| **Want x Secret** | The contradiction between what they pursue and what they hide | Kael wants safety but his exit attempt is the biggest security risk. Sera wants connection but her concealment isolates her. |
| **Routine x Secret** | Observable deviations from normal behavior | Sera leaves the bar every time Torek arrives — the avoidance IS the tell. Kael lingers in restricted corridors during off-hours. |
| **Tolerance x Relationships** | When pressure on one relationship breaks another | Voss's compliance with Nils corrodes his authority over Kael. Naia's worry about Kael triggers Sera's unauthorized compliance check. |
| **Want x Relationships** | When personal desires conflict with social bonds | Kael's desire to protect Naia requires lying to the smuggler — the friend he sees every day. |
| **Personality x Tolerance** | How stress changes observable behavior | Kael goes quiet and checks exits. Sera redirects and overcompensates with helpfulness. Voss gets procedural and avoids the break room. |
**For each Tier 1 NPC, all 5 interactions must be active and authored.** For Tier 2, at least 2 interactions should be authored. Tier 3 NPCs need at minimum the Want x Routine interaction (what they want shapes their observable daily life).
---
## 4c. Triangle Content Requirements
Triangles (3 NPCs with conflicting interests) are the atomic unit of social intrigue (D-024, D-025). Every Tier 1 and Tier 2 NPC belongs to at least one triangle.
### v0.1 Triangles
| # | Name | Members | Type | Core Tension |
|---|------|---------|------|-------------|
| T1 | **Hub Power** | Voss - Kael - Nils (off-stage) | Active fork | Voss has the title, Nils has the power, Kael is caught between |
| T2 | **Worried Knowledge** | Maret - Drin - Voss | Active fork | Maret sees discrepancies, Drin is compromised, Voss needs silence |
| T3 | **Bar Tensions** | Lera - Torek - Harek | Passive tension | Torek's spending draws attention, Lera protective, Harek watching |
| T4 | **Worried Partner** | Naia - Kael - Sera | Active fork | Naia worries about Kael, confides in Sera, Sera discovers evidence |
| T5 | **Informant Question** | Naia - Devra - Drin | Passive tension | Cross-template — potential unraveling vectors |
### What Authors Must Provide per Triangle
1. **Observable signals:** What the player can see that indicates triangle pressure (behavioral changes, spatial avoidance, tonal shifts in dialogue)
2. **Smuggler relevance:** How the smuggler reads this triangle — what they know, what they worry about
3. **Detective relevance:** How the detective reads this triangle — what they observe, what it suggests
4. **Pressure points:** What player actions could escalate or de-escalate the tension
5. **Dialogue shift lines:** At least 2-3 lines per triangle member that change when the triangle is under pressure vs. at rest
### Triangle Rules
- **Self-contained in v0.1 (D-053).** No cross-triangle cascade. Pressure in T1 does not automatically affect T3. Cross-triangle cascade is a v0.2 storyteller feature.
- **Observable, not narrated.** Triangle tension must be visible through NPC behavior (tells, routine deviations, tonal shifts), not explained through dialogue exposition.
- **Dual-lens mandatory.** Every triangle must read differently through smuggler and detective perspectives.
---
## 4d. Access Tier Shift Paths
Access tiers change during gameplay based on player actions and story progression. Content authors must provide dialogue for both the starting state and the shifted state.
| Social Site | Character | Starting Tier | Likely Shift | Trigger |
|-------------|-----------|---------------|-------------|---------|
| Logistics Hub | Smuggler | insider + peer | insider > hostile | Cover blown — seen with detective, or ring member reports suspicion |
| Logistics Hub | Detective | authority | authority > peer | Earns trust by keeping a minor infraction quiet |
| Bar | Smuggler | insider (regular) | insider > hostile | Social contamination from hub events |
| Bar | Detective | public | public > insider | Repeated visits (3-4), earns regular status |
| Ring spaces | Smuggler | insider + peer | peer > hostile | Suspected of cooperation with detective |
| Ring spaces | Detective | public (doesn't know ring exists) | public > hostile | Stumbles into ring awareness — NPCs react defensively |
**Authoring implication:** For every access tier in the table above, content packs must include dialogue that works at that tier. When a shift happens (e.g., smuggler goes from insider to hostile at the hub), the *absence* of insider-tier lines IS the emotional payload — the player notices that Kael no longer shares operational details, that the warmth is gone. This means `public` and `hostile` tier lines must be authored with enough depth to carry the post-shift experience.
---
## 5. Dialogue Authoring Rules
### The Tag Taxonomy (D-035)
Every dialogue line requires 6 structural tags + up to 3 selection tags.
#### Structural Tags (Required)
| Tag | Type | Format | Description |
|-----|------|--------|-------------|
| `id` | string | `{npc-slug}_d_{###}` | Stable line ID. Machine-parseable. Never reused. NPC-scoped per D-035 Sprint 15 amendment. |
| `text` | string | The line | The authored dialogue text |
| `role` | enum | lowercase-slug | Template role, not NPC name. NPCs fill roles at runtime. |
| `access` | list | `[public, insider, ...]` | D-028 Layer 1 hard filter. Who can hear this. |
| `trust` | enum | `surface\|real\|secret` | D-028 Layer 3 hard filter. What trust level unlocks this. |
| `situation` | list | `[arrival, routine, ...]` | D-028 Layer 2 context filter. When this line can fire. |
#### Selection Tags (Recommended)
| Tag | Type | Format | Description |
|-----|------|--------|-------------|
| `topic` | list | `[colleague, cargo, ...]` | D-028 Layer 4 weighted selection. Defaults to `[routine]`. |
| `mood` | list | `[content, anxious, ...]` | D-028 Layer 4 weighted selection. Defaults to untagged (neutral). |
| `tags` | list | freeform strings | Escape hatch for author intent. |
#### Authoring-Only Tags (Not Consumed by Engine)
| Tag | Type | Description |
|-----|------|-------------|
| `dual_lens` | map | Per-character interpretation notes |
| `notes` | string | Design notes for reviewers |
| `knowledge_grant` | object | What the player learns from hearing this line |
### The Four-Layer Pipeline
Content authors must understand how the engine selects lines. A line must pass ALL layers to fire.
```
Layer 1: ACCESS (hard filter)
Does the player's current access tier match the line's access list?
If no -> line is invisible. The player never knows it exists.
Layer 2: SITUATION (context filter)
Is the current situation in the line's situation list?
If no -> line is ineligible for this encounter.
Layer 3: TRUST (hard filter)
Has the player reached the required trust level with this NPC?
If no -> line is invisible.
Layer 4: MOOD + TOPIC (weighted selection)
From the eligible pool, weight by mood and topic match.
Higher match = more likely to be selected.
```
**Authoring implication:** A line tagged `access: [insider], trust: secret, situation: [confrontation]` will ONLY fire when:
1. The player has insider access (smuggler at the hub, not detective)
2. The player has earned secret-level trust (deep relationship)
3. The situation is a confrontation (triangle pressure escalated)
If any layer fails, the line is invisible. Tag conservatively.
### Access Tier Rules
| Tier | Who Gets It | Authoring Guidance |
|------|-------------|-------------------|
| `public` | Everyone | Safe topics. Greetings. Shift small talk. What you'd say to a stranger. |
| `insider` | Group members | Ring operational talk. Close colleague warmth. What you'd say to someone who belongs. |
| `authority` | Institutional figures | Formal responses to power. Careful language. What you'd say to a cop. |
| `peer` | Earned personal trust | Real conversation. Honest opinions. What you'd say to someone you actually like. |
| `hostile` | Broken relationship | Accusations. Threats. Defensive walls. What you'd say to someone you no longer trust. |
**Critical rules:**
- `access` is a **list**. A line can be eligible for multiple tiers: `[public, peer]`.
- The smuggler starts with `insider` + `peer` at the hub. The detective starts with `authority`.
- When Kael transitions from Friendly to PersonOfInterest, `insider` and `peer` lines **lock out**. That absence IS the emotional payload.
- Never tag a line `access: [insider, authority]` unless you mean "ring members AND institutional figures hear the same line." That's almost never correct.
### Trust Tier Rules
| Tier | What It Gates | Authoring Guidance |
|------|--------------|-------------------|
| `surface` | Default | Safe, non-committal. The public face. Most dialogue is here. |
| `real` | Earned through repeated positive interaction | Genuine opinions, workplace complaints, personal concerns. The real person. |
| `secret` | Highest tier | Information they'd normally hide. Ring involvement, fears, leverage. For MIRROR NPCs: deepest emotional vulnerability, NOT plot secrets. |
### Situation Assignment
Tag lines with situations they're appropriate for. The engine decides which situations are currently active.
**Common mistakes:**
- Tagging everything `[routine]`. If the line is specific to a time or context, tag it specifically.
- Omitting `observation` from lines that make sense when the player is watching from a distance.
- Using `confrontation` for any tense moment. `confrontation` means triangle pressure has escalated past threshold. Most tension is `investigation` or `social`.
---
## 6. Monologue Authoring Rules
### Hard Partition (D-032)
Internal monologue is **completely separate** per playable character. The `character` tag is a hard partition, not a filter. The smuggler and detective have independent monologue pools. **No shared lines.**
Same trigger, different pool. That's how mirror moments work.
### Monologue-Specific Tags
| Tag | Type | Description |
|-----|------|-------------|
| `id` | string | `{npc-slug}_m_{s\|d}_{###}``s` for smuggler, `d` for detective. NPC-scoped per D-035 Sprint 15 amendment. |
| `text` | string | The monologue line (160 char max) |
| `character` | enum | `smuggler` or `detective` |
| `trigger` | enum | What causes this line to fire (see trigger types below) |
| `prerequisites` | object | AND-only knowledge gates (facts, entity attributes, relationship state) |
| `priority` | int 0-10 | Selection weight. Default 5. Higher = more likely to fire. |
| `cooldown` | int | Minimum ticks before line can fire again |
| `tags` | list | Freeform tags |
### Trigger Types
| Trigger | When It Fires | Authoring Guidance |
|---------|--------------|-------------------|
| `enter_location` | Player enters new area | First impressions, atmosphere, spatial awareness |
| `observe_npc` | Player sees an NPC doing something notable | Body language, activity, posture, tell |
| `hear_sound` | Sound event from fog edge | Interpretation of what the player can't see |
| `observe_anomaly` | NPC deviates from known routine | Requires prerequisite knowledge of normal pattern |
| `post_conversation` | After dialogue ends | Reflection on what was said, what wasn't, what felt off |
| `discover_evidence` | Player examines informational object | Interpretation of found evidence |
| `witness_interaction` | Player sees two NPCs interacting | Social observation, body language reading |
| `time_idle` | Player hasn't acted for a while | Ambient thoughts, rumination, noticing background |
| `return_visit` | Player returns to visited area | Changed perspective, comparison to last time |
### Display Constraints (Hard Ceiling)
| Constraint | Value | Implication |
|------------|-------|-------------|
| **Max length** | 160 characters | Hard ceiling. Most lines 80-120 characters. |
| **Max visual lines** | 2 | If it wraps to 3, cut it. |
| **Display time** | 4-6 seconds (length-adjusted) | Target: 15-25 words per line. |
| **Self-contained** | Each line stands alone | A line must make sense even if the previous one didn't display. |
| **25-word rule** | If over 25 words, it must be the most important line in the pool | Most lines: 10-18 words. Average target: 14 words. |
### Prerequisite Authoring
Monologue lines can gate on knowledge state. Use sparingly — most lines should fire on trigger alone.
```yaml
prerequisites:
facts:
- fact_id: "contraband.ring_exists"
min_confidence: "knows_of"
entity_attributes:
- entity: "npc:kael-davan"
key: "behavior_flags"
value: "nervous"
relationship:
target: "npc:kael-davan"
state: "friendly"
```
**Confidence hierarchy (D-041):**
- `suspects` — heard a rumor, gut feeling
- `knows_of` — has evidence something exists
- `knows_details` — understands specifics
- `direct` — personally witnessed
**Rule:** Gate on the MINIMUM confidence needed. If a monologue line works at `suspects`, don't gate it at `knows_details`. More gates = fewer fires = less content the player experiences.
---
## 7. Regional Culture: Krenn System / Sova Transit District (D-036)
All NPC dialogue and monologue must carry the Sova cultural substrate. This is not decoration — it's the baseline voice.
### Krenn Naming Conventions
- **First-name-primary.** Compact, consonant-heavy. First names in all social contexts.
- **Surnames exist for records, not conversation.** Using a surname signals formality or institutional distance.
- **Exception:** The detective uses surnames for targets and unknowns. The shift to first-name IS a relationship marker.
**Canonical Krenn names (v0.1):** Kael, Voss, Lera, Torek, Drin, Maret, Naia, Sera, Nils, Renn, Harek, Pell, Tav, Olin, Resha, Sess, Sabel, Devra
### Sova Atmosphere
The voice of Sova Transit District is **"quotidian-with-undertow"** — comfortable enough to be complacent, tight enough that extra income is tempting.
| Element | Application |
|---------|------------|
| **Sensory palette** | Span gate hum, industrial lubricant, recycled air, cargo machinery, metal grating underfoot |
| **Economic tone** | Working-class pragmatic. Money is tight. Grey-market spending is a lifeline, not a crime spree. |
| **Social fabric** | Regulars, shift crews, bar habits, "the usual." Community defined by routine co-presence. |
| **Institutional relationship** | The Commission is distant, resented, tolerated. Station admin is bureaucracy. Nobody trusts institutions to help. |
| **Trade jargon** | Containers, manifests, shifts, routes, transition windows, temp storage, freight bay. Native vocabulary for dock workers — never explain or annotate. |
### What Sova Voice Is NOT
- Not grimdark. People laugh, drink, complain about their shifts, look forward to the bar.
- Not polished sci-fi. No one says "atmospheric recycling unit." They say "recycled air."
- Not exposition. Characters know where they live. They don't describe it to themselves.
- Not uniform. Lera's bartender warmth differs from Voss's terse authority. Culture is substrate, not script.
---
## 8. Dual-Lens Coordination
### The Core Test (Every Line, Every Time)
1. Does this line make sense if the **smuggler** experiences it?
2. Does this line make sense if the **detective** experiences it?
3. Does this line reveal **something different** to each character?
4. Is the **access tier correct** for both characters?
5. Does this line advance at least one character's **emotional arc**?
If 1 or 2 fails, the line is broken. If 3 fails, the line isn't dual-lens — it's generic.
### Three Types of Dual-Lens Difference
**Type 1: Access Difference.** The smuggler hears a line the detective doesn't (or vice versa). Enforced by `access` tag.
**Type 2: Interpretation Difference.** Both characters hear the same dialogue, but their monologue reactions interpret it differently. Enforced by separate monologue pools.
**Type 3: Emotional Weight Difference.** Relationship history creates different emotional stakes for the same observation.
### The `dual_lens` Field
On dialogue lines and NPC profiles, use the authoring-only `dual_lens` field to document the split:
```yaml
dual_lens:
smuggler: "Operational context -- part of ring pipeline. 'Backed up' is cover."
detective: "Anomaly -- overnight exceeds procedure. Flag for investigation."
```
This field is never consumed by the engine. It exists for reviewers and future authors.
---
## 9. Voice Register Quick Reference
Full voice specifications live in:
- **Voice patterns (complete):** `docs/design/voice-patterns.md` (#310) — sentence-level execution rules, contraction patterns, punctuation, stress markers, verbal tics
- **Smuggler voice card:** `docs/design/smuggler-voice-card.md` — full smuggler voice reference + moral arc
This section provides the quick-reference contrast. For authoring-level detail (contraction rules, sentence starters, stress markers), consult the voice patterns document directly.
### Smuggler Voice
| Parameter | Value |
|-----------|-------|
| **Sentence length** | Short. Fragments. Rarely more than 2 sentences. |
| **Vocabulary** | Concrete, physical, sensory. Trade jargon without explaining. No institutional language. |
| **Emotional register** | Feeling-first, analysis second. Gut before brain. |
| **Relationship mode** | First-name basis. People by connection, not role. |
| **Observation priority** | People > environment > objects |
| **Self-reference** | Rare. Through physical sensation, not emotional labels. |
**Smuggler anchor lines:**
1. *"Kael's already at the dock. Good. The day's better when he's on shift."* (warm)
2. *"Shift transition in thirty minutes. If Voss kept the schedule thin, the route's clear."* (operational)
3. *"Kael keeps checking his lattice. Waiting for a message? Not like him to be jumpy."* (concerned)
4. *"He looked left. He always looks left when he's making something up. Two years I've known that tell."* (hurt)
5. *"Morning shift. Recycled air and cargo lubricant. Home sweet home."* (atmospheric)
### Detective Voice
| Parameter | Value |
|-----------|-------|
| **Sentence length** | Complete sentences. Structured. Occasional fragments for emphasis. |
| **Vocabulary** | Institutional layer over plain speech. "Noted," "flagged," "filing it." |
| **Emotional register** | Analysis-first, personal second. When personal breaks through, it's notable. |
| **Relationship mode** | Surname-first for targets. First-name for allies. The shift IS a marker. |
| **Observation priority** | Patterns > people > environment |
| **Self-reference** | More common than smuggler. Through professional lens. |
**Detective anchor lines:**
1. *"Logistics hub. Standard prefab, heavy foot traffic. Let's see what the shift change tells me."* (clinical)
2. *"That's the third time. Sera leaves when Torek arrives. Three different excuses, same result."* (pattern)
3. *"Good to see Sera. She always was the reliable one. At least someone speaks my language."* (personal leak)
4. *"Same booth. Same warm smile. Same offer to buy me a drink. ...Everything except whatever she's not saying."* (conflicted)
5. *"Grain spirit and low conversation. Only place that doesn't smell like freight lubricant."* (atmospheric)
---
## 10. FRIEND Relationship Phase Mapping
THE FRIEND arc is the emotional centerpiece of v0.1. Both FRIEND NPCs follow a multi-phase relationship progression with distinct mechanical expressions at each phase.
### Kael Davan (Smuggler's FRIEND)
**Arc:** comfort -> crack -> observation -> confrontation -> contaminated trust
| Phase | Timing | RelationshipState | Access Available | Monologue Register | Tell State | Content Types |
|-------|--------|------------------|-----------------|-------------------|------------|---------------|
| **1: Comfort** | 0-10 min | Friendly (green) | insider, peer | Fond, casual | None (baseline) | Greeting, shift talk, bar casual, ring coordination |
| **2: First Crack** | 10-15 min | Friendly (green) | insider, peer | Mild concern | Lattice checking, shortened interactions | Distracted dialogue, early worry monologue |
| **3: The Observation** | 15-20 min | PersonOfInterest (amber) | **insider/peer lock out** | Alarm + confusion | Spatial: wrong place, wrong time | Contradiction discovery monologue (3-5 lines) |
| **4: Confrontation** | 20-25 min | PersonOfInterest (amber) | public, hostile | Betrayal crystallizing | Looks-left tell confirmed | Deflection dialogue, evasion, the tell |
| **5: Contaminated Trust** | 25-30 min | PersonOfInterest (amber) | public | Conflicted | Every warm interaction suspicious | Surface-normal dialogue, doubt monologue |
**Mechanical triggers for phase transitions:**
- Phase 1->2: Time-based. Behavioral flags begin accumulating after ~10 minutes.
- Phase 2->3: Spatial trigger. Smuggler enters Corridor B-7, directly observes unauthorized meeting.
- Phase 3->4: Player-initiated. Smuggler chooses to ask Kael about the observation.
- Phase 4->5: Automatic. Post-confrontation, trust is structurally damaged regardless of dialogue choice.
**Key authoring constraint:** At Phase 3, `insider` and `peer` dialogue **locks out**. Kael still talks to the smuggler, but only `public` + `surface` lines remain. That absence IS the emotional payload. Authors must provide enough `public/surface` lines for Phases 3-5 to feel populated but noticeably colder than Phases 1-2.
### Sera Venn (Detective's FRIEND)
**Arc:** trust -> background data -> pattern recognition -> the question -> contaminated trust
| Phase | Timing | RelationshipState | Access Available | Monologue Register | Tell State | Content Types |
|-------|--------|------------------|-----------------|-------------------|------------|---------------|
| **1: Trust** | 0-10 min | Friendly (green) | peer | Professional + warmth | None (baseline) | Bar greeting, district orientation, institutional background |
| **2: Background Data** | 10-15 min | Friendly (green) | peer | Noting connections | Social: relationships outside institutional channels | Naia introduction, community context |
| **3: The Pattern** | 15-20 min | PersonOfInterest (amber) | peer, **authority unlocks** | Suspicion activating | Avoidance: leaves when Torek arrives (3x) | Pattern recognition monologue, avoidance observation |
| **4: The Question** | 20-25 min | PersonOfInterest (amber) | peer, authority | Professional + personal conflict | Controlled deflection, quick warmth recovery | Confrontation dialogue, evasion |
| **5: Contaminated Trust** | 25-30 min | PersonOfInterest (amber) | peer, authority | Analytical doubt | Overcompensation helpfulness | Surface-helpful dialogue, evaluating monologue |
**Mechanical triggers for phase transitions:**
- Phase 1->2: Time-based + social triggers. Sera introduces detective to bar regulars.
- Phase 2->3: Observation accumulation. Third departure when Torek arrives triggers pattern recognition.
- Phase 3->4: Player-initiated. Detective chooses to ask about Torek.
- Phase 4->5: Automatic. Post-question, trust is contaminated regardless of Sera's response.
**Key authoring contrast with Kael:** Sera's `peer` access does NOT lock out at Phase 3. Instead, `authority` access **opens**. The detective gains institutional leverage while personal warmth remains but is contaminated. The content shift is additive (more dialogue available) rather than subtractive (Kael's loss of insider content).
---
## 11. Tag Taxonomy Complete Reference
### Access Tiers (5 values)
`public`, `insider`, `authority`, `peer`, `hostile`
See `content/global/enums/access-tiers.yaml` for full descriptions.
### Trust Tiers (3 values)
`surface`, `real`, `secret`
See `content/global/enums/trust-tiers.yaml`.
### Situations (13 values)
`arrival`, `shift_start`, `shift_end`, `shift_transition`, `bar_evening`, `night_shift`, `investigation`, `confrontation`, `social`, `alone`, `emergency`, `routine`, `observation`
See `content/global/enums/situations.yaml`.
### Topics (9 values)
`colleague`, `routine`, `cargo`, `money`, `trust`, `danger`, `institution`, `personal`, `investigation`
See `content/global/enums/topics.yaml`. Note: `crime` is deliberately excluded. NPCs think of smuggling as `cargo` or `money`, not crime.
### Moods (8 values)
`anxious`, `frustrated`, `content`, `suspicious`, `warm`, `hostile`, `relieved`, `focused`
See `content/global/enums/moods.yaml`. (Updated Sprint 14 amendment to D-035.)
### Monologue Triggers (9 values)
`enter_location`, `observe_npc`, `hear_sound`, `observe_anomaly`, `post_conversation`, `discover_evidence`, `witness_interaction`, `time_idle`, `return_visit`
See `content/global/enums/triggers.yaml`.
### NPC Patterns (9 values)
`FRIEND`, `MIRROR`, `ANCHOR`, `GHOST`, `CATALYST`, `THRESHOLD`, `REMNANT`, `SYSTEM`, `NOBODY`
See `content/global/enums/patterns.yaml`.
### Functional Motivations (6 values)
`HANDLER`, `WITNESS`, `TURNCOAT`, `CIVILIAN`, `OPERATOR`, `SKEPTIC`
See `content/global/enums/motivations.yaml`.
---
## 12. Mechanical Validation Checklist
Before submitting any content, run through these checks. Items marked **HARD** will be enforced by schema validation. Items marked **SOFT** require reviewer judgment.
### Dialogue Lines
- [ ] **HARD:** `id` matches pattern `{npc-slug}_d_{###}` (e.g. `kael-davan_d_001`) — NPC-scoped per D-035 Sprint 15 amendment
- [ ] **HARD:** `role` is a valid lowercase slug matching a template role
- [ ] **HARD:** `access` is a non-empty list of valid access tier enums
- [ ] **HARD:** `trust` is one of `surface`, `real`, `secret`
- [ ] **HARD:** `situation` is a non-empty list of valid situation enums
- [ ] **SOFT:** `topic` and `mood` are populated (defaults apply if empty, but explicit is better)
- [ ] **SOFT:** Line passes dual-lens test (both characters, or correctly tier-gated)
- [ ] **SOFT:** `access` list makes sense (no `[insider, authority]` unless intentional)
- [ ] **SOFT:** `trust` tier matches content sensitivity (don't put ring talk at `surface`)
- [ ] **SOFT:** Line advances character, relationship, or narrative (no filler)
### Monologue Lines
- [ ] **HARD:** `id` matches pattern `{npc-slug}_m_{s|d}_{###}` (e.g. `pc-smuggler_m_s_001`) — NPC-scoped per D-035 Sprint 15 amendment
- [ ] **HARD:** `text` is 160 characters or fewer
- [ ] **HARD:** `trigger` is a valid trigger enum
- [ ] **HARD:** Character partition: smuggler lines in smuggler files, detective in detective files
- [ ] **SOFT:** Under 25 words (or the most important line in the pool if over)
- [ ] **SOFT:** Self-contained (makes sense without context from previous line)
- [ ] **SOFT:** Voice register matches character (smuggler fragments, detective sentences)
- [ ] **SOFT:** Prerequisites gate on MINIMUM confidence needed (don't over-gate)
- [ ] **SOFT:** Trigger matches content (don't use `enter_location` for NPC observations)
### NPC Profiles
- [ ] **HARD:** `canonical_id` matches `npc:{slug}` pattern
- [ ] **HARD:** `tier` is 1, 2, or 3
- [ ] **HARD:** `pattern` is a valid pattern enum
- [ ] **HARD:** `motivation` is a valid motivation enum
- [ ] **HARD:** FRIEND pattern requires `friend_arc` field
- [ ] **SOFT:** All 10 axes populated for Tier 1 and 2 (optional fields for Tier 3)
- [ ] **SOFT:** `tells` array empty for MIRROR pattern
- [ ] **SOFT:** `dual_lens` notes present for Tier 1 and 2
- [ ] **SOFT:** `trust_levels` descriptions provided for all populated tiers
- [ ] **SOFT:** `information.knows` uses valid `category.topic` fact IDs
### Content Packs (Per NPC)
- [ ] **SOFT:** Line count within tier budget
- [ ] **SOFT:** Access tier distribution covers the NPC's expected encounters
- [ ] **SOFT:** Trust progression has content at each populated tier
- [ ] **SOFT:** Situation coverage: not everything tagged `routine`
- [ ] **SOFT:** Dual-lens notes on profile and every 5th line minimum (Tier 1)
- [ ] **SOFT:** FRIEND content covers all phases with distinct voice/mood shifts
- [ ] **SOFT:** Monologue for BOTH characters exists (Tier 1 minimum)
---
## 13. File Structure and Schema Reference
### Directory Hierarchy
Dialogue is organized by **location + role**, not by NPC. This is deliberate — roles belong to templates, NPCs fill roles at runtime (D-025, D-028). Monologue is organized by **character + location** per the hard partition rule (D-032).
```
content/campaigns/main/systems/krenn/stations/sova/districts/transit/
district.yaml # District metadata
pools.yaml # Seed-time pool definitions
npcs/
kael-davan.yaml # NPC profile (npc-profile.schema.json)
sera-venn.yaml
voss.yaml
...
locations/
the-terminal.yaml # Location definition (location.schema.json)
the-last-shift.yaml
maintenance-corridors.yaml
dialogue/
the-terminal/ # Dialogue pools by location + role
dock-worker.yaml # (dialogue-pool.schema.json)
shift-supervisor.yaml
scheduler.yaml
new-hire.yaml
courier.yaml
the-last-shift/
bar-owner.yaml
bar-regular.yaml
bartender.yaml
maintenance-corridors/
ring-operative.yaml
monologue/
smuggler/ # Hard character partition (D-032)
general.yaml # Location-independent lines
the-terminal.yaml # Location-specific lines
the-last-shift.yaml
maintenance-corridors.yaml
detective/
general.yaml
the-terminal.yaml
the-last-shift.yaml
maintenance-corridors.yaml
triangles/
hub-power.yaml # Triangle definition (triangle.schema.json)
worried-knowledge.yaml
bar-tensions.yaml
worried-partner.yaml
informant-question.yaml
routines/
schedules.yaml # NPC daily schedules (routine.schema.json)
templates/
logistics-hub.yaml # Social site template (D-025)
bar.yaml
smuggling-ring.yaml
ticker/
the-last-shift.yaml # News ticker content
```
**Key convention:** Dialogue pools belong to `dialogue/{location}/{role}.yaml`, never `dialogue/{npc-name}.yaml`. The NPC assigned to a role is determined at runtime. FRIEND NPCs (Kael, Sera) are the exception — their content is NPC-specific because the FRIEND pattern is inherently character-bound, but the files still follow the location+role structure to maintain consistency.
### Schema Validation
All YAML content files must validate against their JSON Schema:
| Content Type | Schema File |
|-------------|-------------|
| NPC profiles | `content/_schema/npc-profile.schema.json` |
| Dialogue pools | `content/_schema/dialogue-pool.schema.json` |
| Monologue pools | `content/_schema/monologue-pool.schema.json` |
| Triangles | `content/_schema/triangle.schema.json` |
| Routines | `content/_schema/routine.schema.json` |
### Line ID Convention
| Content Type | Pattern | Example |
|-------------|---------|---------|
| Dialogue | `{npc-slug}_d_{###}` | `kael-davan_d_001` |
| Monologue (smuggler) | `{npc-slug}_m_s_{###}` | `pc-smuggler_m_s_001` |
| Monologue (detective) | `{npc-slug}_m_d_{###}` | `pc-detective_m_d_001` |
IDs are stable identifiers. Once assigned, never reused or reassigned. Number gaps are acceptable.
### Naming Conventions
- File names: `lowercase-hyphenated.yaml`
- Role slugs: `lowercase-hyphenated` (e.g., `dock-worker`, `bar-owner`)
- NPC slugs: `lowercase-hyphenated` (e.g., `kael-davan`, `sera-venn`)
- Location slugs: `lowercase-hyphenated` (e.g., `sova-transit`)
- Fact IDs: `category.topic` (e.g., `contraband.ring_exists`, `relationship.kael_naia_connection`)
---
## 14. Anti-Patterns
### Dialogue Anti-Patterns
**Expository NPC.** The NPC explains the world to the player.
- Bad: *"The Commission regulates all trade through Sova Transit. Manifests must be filed within 8 hours."*
- Fix: *"Manifests are late again. Maret's going to catch heat."* (Character knows the rules. Show the consequence, not the rule.)
**Universal access.** A line tagged `[public]` contains insider information.
- Bad: `access: [public]`, text: *"Container 4471 is flagged for rerouting during transition."*
- Fix: Tag `access: [insider]` or rewrite for public consumption.
**Trust mismatch.** A `surface`-trust line reveals deep personal information.
- Bad: `trust: surface`, text: *"I'm trying to get out of the ring. Don't tell Nils."*
- Fix: That's `trust: secret` content. Gate it correctly.
**Crime vocabulary.** NPCs use the word "crime" or "smuggling" in casual conversation.
- Bad: *"The smuggling operation runs during shift transitions."*
- Fix: *"The cargo moves during transitions. When oversight's thin."* NPCs think in their own terms.
### Monologue Anti-Patterns
**Wrong voice register.** Smuggler uses detective vocabulary or vice versa.
- Bad (smuggler): *"I should investigate this anomaly further."*
- Fix: *"That's not right. I need to see what's going on."*
- Bad (detective): *"Kael's here. Good."*
- Fix: *"Davan's on shift. Standard."*
**Explaining the already-known.** Character tells themselves something they already know.
- Bad (smuggler): *"According to the manifest, container 4471 should weigh 240 kilograms."*
- Fix: *"4471's heavy. Too heavy."*
**Over-gating.** Prerequisite blocks a line that would work without the gate.
- Bad: prerequisite requires `knows_details` when the line only needs `suspects`
- Fix: Gate on minimum confidence. More fires = more content = better experience.
**Breaking the partition.** A smuggler monologue line that sounds like the detective, or shared content between pools.
- Rule: If you can swap `character: smuggler` to `character: detective` and the line still works, it's not character-specific enough. Rewrite.
### Profile Anti-Patterns
**MIRROR with tells.** A MIRROR NPC profile lists deception tells.
- Rule: MIRROR tells array must be empty. Behavioral markers (visible stress, coping mechanisms) are NOT tells.
**FRIEND without phases.** A FRIEND NPC profile omits the `friend_arc.phases` field.
- Rule: FRIEND pattern requires 3-5 phases with distinct triggers and routine deviations.
**Tier 3 overwriting.** A Tier 3 filler NPC with 40 dialogue lines.
- Rule: Tier 3 budget is 5-10 lines. One memorable trait. Write it, stop. Content budget is finite.
---
## 15. Generation Expansion Rules
Tier 2 and Tier 3 dialogue is expanded 4x from authored base lines (D-028: "write 10, generate 40"). The authored lines are the style anchors — generation must reproduce, not reinvent.
### What Generation Can Do
- **Vary phrasing** of the same semantic content ("Shift's running smooth" -> "Smooth shift so far" -> "Nothing out of the ordinary today")
- **Vary topic/mood tags** within the same access and trust tier
- **Combine** elements from two base lines into a single generated line
- **Add** environmental color within the Sova sensory palette (span gate hum, recycled air, cargo sounds)
### What Generation Cannot Do
- **Introduce new information.** Generated lines never reveal facts, names, or relationships not present in the base lines.
- **Change access or trust tier.** A generated line inherits the access and trust constraints of its base line(s).
- **Break voice register.** Generated lines must match the NPC's personality voice exactly — sentence length, contraction patterns, vocabulary level.
- **Cross the character partition.** Generated monologue lines stay in the correct character pool.
- **Add knowledge grants.** Only hand-authored lines can grant knowledge to the player.
- **Create FRIEND content.** All FRIEND NPC content is hand-authored. No generation expansion.
### Generation Validation
Every generated line must pass:
1. **Voice test:** Read aloud. Does it sound like the same NPC who said the base lines?
2. **Dual-lens test:** Does it read differently through each character's perspective? (If the base line passes this test, the generated line must also.)
3. **Tag inheritance:** Are access, trust, situation, topic, and mood tags consistent with the base line?
4. **No new information:** Does the line reveal anything the base lines don't already establish?
5. **Display constraint:** Under 160 characters for monologue. Self-contained.
---
## 16. Worked Example: Writing a Dialogue Line
**Context:** Writing a line for Kael Davan at the Logistics Hub during a routine morning shift.
### Step 1: Write the Line
*"Morning. Voss kept the rotation thin -- we've got a clear window after 14:00."*
### Step 2: Assign Tags
```yaml
- id: kael-davan_d_076
text: "Morning. Voss kept the rotation thin -- we've got a clear window after 14:00."
role: dock-worker
access: [insider]
trust: real
situation: [shift_start]
topic: [cargo, routine]
mood: [content]
tags: [ring-operational]
```
### Step 3: Validate
- `id`: `kael-davan_d_076` -- valid pattern (NPC-scoped per D-035 Sprint 15 amendment). Continues from kael-davan's terminal sequence (_034-_075).
- `role`: `dock-worker` -- valid slug.
- `access: [insider]` -- only ring members hear this. Detective never sees it. Correct.
- `trust: real` -- requires earned trust. Not surface-level small talk. Correct for operational ring dialogue.
- `situation: [shift_start]` -- morning shift context. Correct.
- `topic: [cargo, routine]` -- covers both operational and schedule content. Correct.
- `mood: [content]` -- Phase 1, baseline warm. Correct.
### Step 4: Dual-Lens Check
```yaml
dual_lens:
smuggler: "Operational confirmation. The window is clear. Routine ring coordination."
detective: "Never hears this line. Insider access only."
```
### Step 5: Voice Check
- Uses first name (Voss). Correct for smuggler context.
- Short, operational. Fragment + sentence. Matches smuggler's colleague register.
- Trade jargon without explanation ("rotation thin," "clear window"). Correct for Krenn substrate.
- No institutional vocabulary. No analysis. Correct.
Line passes all checks.
---
## Appendix A: Decision Cross-Reference
| Decision | Title | Relevance to This Guide |
|----------|-------|------------------------|
| D-023 | Three-tier content model | Tier structure, content budgets |
| D-024 | 10-axis NPC model | Profile structure, tell system, triangle model |
| D-025 | Social site as template unit | NPC-to-location relationship, functional clusters |
| D-027 | Vertical slice criteria | Success criteria that FRIEND content must satisfy |
| D-028 | Dialogue architecture | Four-layer pipeline, tagged line pools, generation expansion |
| D-029 | Population entanglement 30/50/20 | Tier distribution, noise floor |
| D-032 | Separate monologue pools | Hard character partition |
| D-034 | THE FRIEND pattern | Production-level NPC specification |
| D-035 | Converged tag taxonomy | All tag definitions, pipeline layers |
| D-036 | Sova Transit District setting | Regional culture, naming, atmosphere |
| D-037 | Contraband specification | What NPCs are smuggling and why |
| D-039 | v0.1 wow moments | Content that must exist for wow moments to fire |
| D-041 | Knowledge graph data model | Prerequisite confidence hierarchy |
| D-047 | v0.1 triangles | 3 active forks, 2 passive tensions |
| D-050 | NPC pattern/motivation mapping | Canonical v0.1 NPC assignments (System A + B) |
| D-053 | Self-contained triangle forks | No cross-triangle cascade in v0.1 |
| D-056 | PC voice registers | Smuggler feeling-first, detective analysis-first |
| D-059 | Monologue display constraints | 160 char max, 2-line max, priority ordering |
## Appendix B: Content Budget Summary (v0.1)
**Validated scope (v0.1 Content Scoping Workshop):** ~695 authored content items.
| Content Type | Authored | Generation-Expanded | Total |
|-------------|---------|-------------------|-------|
| Tier 1 FRIEND dialogue (x2) | 150-200 | 0 | 150-200 |
| Tier 1 MIRROR dialogue (x1) | 50-70 | 0 | 50-70 |
| Tier 2 NPC dialogue (x10) | 200-350 | 800-1400 | 1000-1750 |
| Tier 3 NPC dialogue (x4) | 20-40 | 80-160 | 100-200 |
| Monologue (smuggler pool) | ~100 | 0 | ~100 |
| Monologue (detective pool) | ~100 | 0 | ~100 |
| Environmental text | ~50 | 0 | ~50 |
| News ticker | ~20 | 0 | ~20 |
| UI microcopy | ~50 | 0 | ~50 |
| PC-as-NPC content (x2) | ~25 | 0 | ~25 |
| **Total authored** | **~695-1005** | | |
| **Total with generation** | | | **~1545-2565** |
FRIEND content (hand-authored, no expansion) represents ~20-30% of all authored lines. This is where voice consistency matters most. Monologue is hand-authored only — the character voice is too precise for generation expansion in v0.1.
---
**End NPC Authoring Style Guide v0.1**
-22
View File
@@ -1,22 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "campaign.schema.json",
"title": "Campaign Metadata",
"description": "Campaign definition file — one per campaign directory (D-003).",
"type": "object",
"required": ["display_name", "description"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"version": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
}
}
}
-135
View File
@@ -1,135 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "checklist.schema.json",
"title": "Gauntlet QA Checklist",
"description": "Per-room QA checklist with conditions evaluable from ObserverSnapshot (D-030). Feeds into #503 auto-checklist progress tracking.",
"type": "object",
"required": ["conditions"],
"additionalProperties": false,
"properties": {
"room_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$",
"description": "Room identifier matching constants.rs room name"
},
"room_name": {
"type": "string",
"minLength": 1,
"description": "Human-readable room name"
},
"scope": {
"type": "string",
"enum": ["per_room", "cross_room"],
"description": "Checklist scope: per_room (default) or cross_room"
},
"description": {
"type": "string"
},
"conditions": {
"type": "array",
"items": {
"oneOf": [
{ "$ref": "#/$defs/player_near" },
{ "$ref": "#/$defs/player_facing" },
{ "$ref": "#/$defs/entity_present" },
{ "$ref": "#/$defs/entity_absent" },
{ "$ref": "#/$defs/expected_monologue" },
{ "$ref": "#/$defs/expected_dialogue" },
{ "$ref": "#/$defs/expected_interaction_verb" }
]
},
"minItems": 1
}
},
"$defs": {
"condition_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*$",
"description": "Globally unique condition identifier across all checklists. Use room_id prefix (e.g., inv-item-present, occ-wall-visible)."
},
"player_near": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "x", "y", "radius"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "player_near" },
"x": { "type": "integer", "description": "Target X coordinate (absolute sim tiles)" },
"y": { "type": "integer", "description": "Target Y coordinate (absolute sim tiles)" },
"radius": { "type": "number", "minimum": 0, "description": "Proximity radius in tiles" }
}
},
"player_facing": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "direction"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "player_facing" },
"direction": {
"type": "string",
"enum": ["North", "South", "East", "West"],
"description": "Expected player facing direction"
}
}
},
"entity_present": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "entity_id"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "entity_present" },
"entity_id": { "type": "integer", "minimum": 0, "description": "StableId of expected entity" }
}
},
"entity_absent": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "entity_id"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "entity_absent" },
"entity_id": { "type": "integer", "minimum": 0, "description": "StableId of entity that should NOT be visible" }
}
},
"expected_monologue": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "contains"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "expected_monologue" },
"contains": { "type": "string", "minLength": 1, "description": "Substring expected in current_monologue text" }
}
},
"expected_dialogue": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "contains"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "expected_dialogue" },
"contains": { "type": "string", "minLength": 1, "description": "Substring expected in dialogue_response text" }
}
},
"expected_interaction_verb": {
"type": "object",
"additionalProperties": false,
"required": ["id", "description", "condition_type", "entity_id", "verb"],
"properties": {
"id": { "$ref": "#/$defs/condition_id" },
"description": { "type": "string" },
"condition_type": { "const": "expected_interaction_verb" },
"entity_id": { "type": "integer", "minimum": 0, "description": "StableId of target entity" },
"verb": { "type": "string", "minLength": 1, "description": "Expected interaction verb (e.g., Talk, Pickup, Examine)" }
}
}
}
}
-288
View File
@@ -1,288 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "dialogue-line.schema.json",
"title": "Dialogue Line — canonical D-035 tag taxonomy",
"description": "Canonical single-line schema for dialogue and monologue pools. Implements the converged tag taxonomy from D-035 (6 structural + 3 selection + 2 authoring-only tags). Monologue-specific additions (character, trigger, prerequisite) are defined in $defs/monologue_extension. Mood vocabulary renamed Sprint 14 to match voice guide (anxious/frustrated/content/suspicious/warm/hostile/relieved/focused).",
"type": "object",
"required": ["id", "text", "role", "access", "trust", "situation"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*_(d|m)_[0-9]{3}$",
"description": "Stable machine-parseable line ID: {npc-slug}_{d|m}_{###} (e.g. kael-davan_d_001, pc-detective_m_d_001). d = dialogue, m = monologue. NPC-scoped per D-035 Sprint 15 amendment — each NPC has an independent sequence starting at _001."
},
"text": {
"type": "string",
"minLength": 1,
"description": "The authored line text."
},
"role": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Template-defined role slug (e.g. dock-worker, bar-owner, player_character). Not NPC name — NPC assignment is runtime."
},
"access": {
"type": "array",
"items": {
"type": "string",
"enum": ["public", "insider", "authority", "peer", "hostile"]
},
"minItems": 1,
"uniqueItems": true,
"description": "D-028 Layer 1: access tiers this line is eligible for. List — a line can be eligible for multiple tiers. Hard filter."
},
"trust": {
"type": "string",
"enum": ["surface", "real", "secret"],
"description": "D-028 Layer 3: minimum trust tier required. Hard filter. Ordering: surface < real < secret."
},
"situation": {
"type": "array",
"items": {
"type": "string",
"enum": [
"arrival",
"shift_start",
"shift_end",
"shift_transition",
"bar_evening",
"night_shift",
"investigation",
"confrontation",
"social",
"alone",
"emergency",
"routine",
"observation",
"greeting"
]
},
"minItems": 1,
"uniqueItems": true,
"description": "D-028 Layer 2: situations in which this line can fire. 14 v0.1 values (13 original + greeting added Sprint 8 for PC dialogue initial contact lines). NOTE: 'greeting' is not yet in server/src/content/line_pool.rs — lines using it will be skipped until Rust is updated."
},
"topic": {
"type": "array",
"items": {
"type": "string",
"enum": [
"colleague",
"routine",
"cargo",
"money",
"trust",
"danger",
"institution",
"personal",
"investigation"
]
},
"uniqueItems": true,
"description": "D-028 Layer 4: topic tags for weighted selection. 9 v0.1 values. Optional — defaults to empty if omitted. Note: 'crime' deliberately excluded; NPCs think of it as 'cargo' or 'money'."
},
"mood": {
"type": "array",
"items": {
"type": "string",
"enum": [
"anxious",
"frustrated",
"content",
"suspicious",
"warm",
"hostile",
"relieved",
"focused"
]
},
"uniqueItems": true,
"description": "D-028 Layer 4: mood tags for weighted selection. 8 v0.1 values. Neutral mood = omit tag (untagged lines are always eligible). Renamed Sprint 14 to match voice guide vocabulary."
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Freeform escape hatch for author intent not covered by the structured taxonomy. Not consumed by the engine selection pipeline."
},
"knowledge_grant": {
"type": "object",
"description": "Knowledge the player gains from hearing this line. Feeds into the knowledge graph (D-041).",
"required": ["fact_id", "confidence"],
"additionalProperties": false,
"properties": {
"fact_id": {
"type": "string",
"description": "FactId from the knowledge vocabulary (#368)."
},
"confidence": {
"type": "string",
"enum": ["suspects", "knows_of", "knows_details", "direct"],
"description": "D-041 confidence tier granted."
}
}
},
"dual_lens": {
"type": "object",
"description": "Authoring-only: per-character notes for content with different resonance for smuggler vs detective. NOT consumed by the engine.",
"additionalProperties": false,
"properties": {
"smuggler": { "type": "string" },
"detective": { "type": "string" }
}
},
"notes": {
"type": "string",
"description": "Authoring-only: freeform author notes, context, or intent documentation. NOT consumed by the engine."
}
},
"$defs": {
"monologue_extension": {
"title": "Monologue-specific additions (D-035)",
"description": "Additional required fields for monologue lines. Applied ON TOP OF the base dialogue line schema. Pool-level character partitioning (D-032) is enforced at the pool root, not per-line.",
"type": "object",
"required": ["trigger"],
"properties": {
"character": {
"type": "string",
"enum": ["smuggler", "detective"],
"description": "D-032: hard partition tag. Which playable character this line belongs to. Must match the parent pool's character field."
},
"trigger": {
"type": "string",
"enum": [
"enter_location",
"observe_npc",
"hear_sound",
"observe_anomaly",
"post_conversation",
"discover_evidence",
"witness_interaction",
"time_idle",
"return_visit"
],
"description": "What causes this monologue line to fire. 9 v0.1 trigger types."
},
"prerequisite": {
"description": "Knowledge state gate. null = unconditional (fires whenever triggered). Conditions are AND-evaluated. Uses FactIds from the knowledge vocabulary (#368, D-041).",
"oneOf": [
{ "type": "null" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"facts": {
"type": "array",
"items": { "$ref": "#/$defs/fact_prerequisite" }
},
"entity_attributes": {
"type": "array",
"items": { "$ref": "#/$defs/attribute_prerequisite" }
},
"relationship": {
"type": "object",
"required": ["target", "state"],
"additionalProperties": false,
"properties": {
"target": { "type": "string" },
"state": {
"type": "string",
"enum": ["unknown", "known", "friendly", "person_of_interest", "hostile"]
}
}
}
}
}
]
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 5,
"description": "Selection priority. Higher = more likely to fire when multiple lines are eligible. Default: 5."
},
"cooldown": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Minimum simulation ticks before this line can fire again. Default: 0 (no cooldown)."
}
}
},
"fact_prerequisite": {
"type": "object",
"required": ["fact_id", "min_confidence"],
"additionalProperties": false,
"properties": {
"fact_id": {
"type": "string",
"description": "FactId from the knowledge vocabulary (#368, D-041)."
},
"min_confidence": {
"type": "string",
"enum": ["suspects", "knows_of", "knows_details", "direct"],
"description": "Minimum D-041 confidence level required for this fact."
}
}
},
"attribute_prerequisite": {
"type": "object",
"required": ["entity", "key", "value"],
"additionalProperties": false,
"properties": {
"entity": { "type": "string" },
"key": { "type": "string" },
"value": { "type": "string" }
}
},
"situation_enum": {
"type": "string",
"enum": [
"arrival",
"shift_start",
"shift_end",
"shift_transition",
"bar_evening",
"night_shift",
"investigation",
"confrontation",
"social",
"alone",
"emergency",
"routine",
"observation",
"greeting"
],
"description": "14 v0.1 situation values (D-035 + Sprint 8 amendment)."
},
"topic_enum": {
"type": "string",
"enum": [
"colleague",
"routine",
"cargo",
"money",
"trust",
"danger",
"institution",
"personal",
"investigation"
],
"description": "9 v0.1 topic values (D-035)."
},
"mood_enum": {
"type": "string",
"enum": [
"anxious",
"frustrated",
"content",
"suspicious",
"warm",
"hostile",
"relieved",
"focused"
],
"description": "8 v0.1 mood values. Renamed Sprint 14 to match voice guide vocabulary. Neutral = untagged."
}
}
}
-134
View File
@@ -1,134 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "dialogue-pool.schema.json",
"title": "Dialogue Line Pool",
"description": "Tagged dialogue lines scoped by location + role (D-028, D-035).",
"type": "object",
"required": ["location", "role", "lines"],
"additionalProperties": false,
"properties": {
"location": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Location slug this dialogue pool belongs to"
},
"role": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Template role slug (e.g. dock-worker, bar-owner)"
},
"lines": {
"type": "array",
"items": { "$ref": "#/$defs/dialogue_line" },
"minItems": 1
}
},
"$defs": {
"dialogue_line": {
"type": "object",
"required": ["id", "text", "role", "access", "trust", "situation"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*_d_[0-9]{3}$",
"description": "Stable line ID: {npc-slug}_d_{###} (e.g. kael-davan_d_001). NPC-scoped per D-035 Sprint 15 amendment — each NPC has an independent sequence starting at _001."
},
"text": {
"type": "string",
"minLength": 1
},
"role": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Template role this line belongs to"
},
"access": {
"type": "array",
"items": {
"type": "string",
"enum": ["public", "insider", "authority", "peer", "hostile"]
},
"minItems": 1,
"uniqueItems": true,
"description": "Access tiers this line is available at (multi-tier eligibility)"
},
"trust": {
"type": "string",
"enum": ["surface", "real", "secret"],
"description": "Minimum trust level required"
},
"situation": {
"type": "array",
"items": {
"type": "string",
"enum": [
"arrival", "shift_start", "shift_end", "shift_transition",
"bar_evening", "night_shift", "investigation", "confrontation",
"social", "alone", "emergency", "routine", "observation",
"greeting"
]
},
"minItems": 1,
"uniqueItems": true,
"description": "Situation contexts when this line can fire (D-035: list<enum>). greeting added Sprint 8 for PC dialogue pools"
},
"topic": {
"type": "array",
"items": {
"type": "string",
"enum": [
"colleague", "routine", "cargo", "money", "trust",
"danger", "institution", "personal", "investigation"
]
},
"uniqueItems": true,
"description": "Topic tags for selection weighting (D-035: list<enum>)"
},
"mood": {
"type": "array",
"items": {
"type": "string",
"enum": [
"anxious", "frustrated", "content", "suspicious",
"warm", "hostile", "relieved", "focused"
]
},
"uniqueItems": true,
"description": "Mood tags for selection weighting (D-035: list<enum>). 8 v0.1 values, renamed Sprint 14 to match voice guide vocabulary. Neutral = untagged."
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Freeform tags for additional filtering"
},
"knowledge_grant": {
"type": "object",
"description": "Knowledge the player gains from hearing this line",
"required": ["fact_id", "confidence"],
"additionalProperties": false,
"properties": {
"fact_id": { "type": "string" },
"confidence": {
"type": "string",
"enum": ["suspects", "knows_of", "knows_details", "direct"]
}
}
},
"dual_lens": {
"type": "object",
"description": "Authoring-only: per-character resonance notes (NOT consumed by engine)",
"additionalProperties": false,
"properties": {
"smuggler": { "type": "string" },
"detective": { "type": "string" }
}
},
"notes": {
"type": "string",
"description": "Authoring-only: freeform author notes (NOT consumed by engine)"
}
}
}
}
}
-52
View File
@@ -1,52 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "district.schema.json",
"title": "District Metadata",
"description": "District definition file — one per district directory (D-036). Identity derived from directory path.",
"type": "object",
"required": ["display_name", "description", "locations", "npc_count"],
"additionalProperties": false,
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^[a-z]+\\.[a-z]+\\.[a-z-]+$",
"description": "Deprecated — derived from directory path at load time. If present, must match {system}.{station}.{district}."
},
"display_name": {
"type": "string",
"minLength": 1
},
"system": {
"type": "string",
"pattern": "^[a-z]+$",
"description": "Deprecated — derived from directory path."
},
"station": {
"type": "string",
"pattern": "^[a-z]+$",
"description": "Deprecated — derived from directory path."
},
"district": {
"type": "string",
"pattern": "^[a-z-]+$",
"description": "Deprecated — derived from directory path."
},
"description": {
"type": "string",
"minLength": 1
},
"locations": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"minItems": 1,
"uniqueItems": true
},
"npc_count": {
"type": "integer",
"minimum": 0
}
}
}
-73
View File
@@ -1,73 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "fact-catalog.schema.json",
"title": "Fact Catalog",
"description": "Fact definitions — one file per fact category in global/knowledge/ (D-035).",
"type": "object",
"required": ["category", "facts"],
"additionalProperties": false,
"properties": {
"category": {
"type": "string",
"description": "Fact category matching the filename"
},
"facts": {
"type": "array",
"items": { "$ref": "#/$defs/fact" },
"minItems": 1
}
},
"$defs": {
"fact": {
"type": "object",
"required": ["fact_id", "description", "discoverable_by"],
"additionalProperties": false,
"properties": {
"fact_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*$",
"description": "Stable unique fact identifier"
},
"description": {
"type": "string",
"minLength": 1
},
"discoverable_by": {
"type": "array",
"items": {
"type": "string",
"enum": ["smuggler", "detective"]
},
"minItems": 1,
"uniqueItems": true,
"description": "Which playable characters can discover this fact"
},
"abstract": {
"type": "boolean",
"default": false,
"description": "If true, fact cannot reach Direct confidence (only inferred)"
},
"progression": {
"type": "array",
"items": { "$ref": "#/$defs/confidence_level" },
"description": "Confidence level descriptions in ascending order"
}
}
},
"confidence_level": {
"type": "object",
"required": ["confidence", "text"],
"additionalProperties": false,
"properties": {
"confidence": {
"type": "string",
"enum": ["suspects", "knows_of", "knows_details", "direct"]
},
"text": {
"type": "string",
"description": "Player-facing description at this confidence level"
}
}
}
}
}
-54
View File
@@ -1,54 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "location.schema.json",
"title": "Location Definition",
"description": "Location metadata — one file per location (D-025, D-036).",
"type": "object",
"required": ["canonical_id", "display_name"],
"additionalProperties": false,
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^[a-z]+\\.[a-z]+\\.[a-z-]+\\.location\\.[a-z][a-z0-9-]*$",
"description": "Full canonical ID: {system}.{station}.{district}.location.{slug}"
},
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"tile_bounds": {
"type": "object",
"description": "Rectangular tile bounds for this location",
"properties": {
"x_min": { "type": "integer" },
"y_min": { "type": "integer" },
"x_max": { "type": "integer" },
"y_max": { "type": "integer" },
"z": { "type": "integer" }
},
"required": ["x_min", "y_min", "x_max", "y_max", "z"]
},
"sightlines": {
"type": "object",
"description": "Sightline properties for LOS computation",
"properties": {
"open": {
"type": "boolean",
"description": "True if the location is open-plan (no internal walls)"
},
"notes": { "type": "string" }
}
},
"ambient_sound": {
"type": "string",
"description": "Reference to ambient sound asset"
},
"social_site": {
"type": "string",
"description": "Social site template this location belongs to"
}
}
}
-234
View File
@@ -1,234 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "monologue-pool.schema.json",
"title": "Monologue Line Pool",
"description": "Tagged monologue lines, hard-partitioned by character (D-032, D-035). Monologue lines carry all 6 D-035 structural tags for schema compliance, but role/access/trust are fixed constants for player-character internal voice (role=player_character, access=[public], trust=surface). The engine does not gate monologue on access or trust — these tags exist for taxonomy uniformity only.",
"type": "object",
"required": ["character", "location", "lines"],
"additionalProperties": false,
"properties": {
"character": {
"type": "string",
"enum": ["smuggler", "detective"],
"description": "Playable character this pool belongs to (hard partition per D-032). All lines in this pool belong to this character."
},
"location": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Location slug, or 'general' for location-independent lines."
},
"lines": {
"type": "array",
"items": { "$ref": "#/$defs/monologue_line" },
"minItems": 1
}
},
"$defs": {
"monologue_line": {
"type": "object",
"required": ["id", "text", "role", "access", "trust", "situation", "trigger"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*_m_[sd]_[0-9]{3}$",
"description": "Stable line ID: {npc-slug}_m_{s|d}_{###} (e.g. pc-smuggler_m_s_001, pc-detective_m_d_001). s = smuggler, d = detective. NPC-scoped per D-035 Sprint 15 amendment — each NPC has an independent sequence starting at _001."
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Line text — 256 char hard cap, aim for ≤160 to avoid line wrap"
},
"role": {
"type": "string",
"const": "player_character",
"description": "D-035 structural tag — always player_character for monologue. Monologue is the player character's internal voice."
},
"access": {
"type": "array",
"items": { "const": "public" },
"minItems": 1,
"maxItems": 1,
"description": "D-035 structural tag — always [public] for monologue. No access gating applies to internal voice."
},
"trust": {
"type": "string",
"const": "surface",
"description": "D-035 structural tag — always surface for monologue. No trust gating applies to internal voice."
},
"situation": {
"type": "array",
"items": {
"type": "string",
"enum": [
"arrival",
"shift_start",
"shift_end",
"shift_transition",
"bar_evening",
"night_shift",
"investigation",
"confrontation",
"social",
"alone",
"emergency",
"routine",
"observation",
"greeting",
"triangle_activated"
]
},
"minItems": 1,
"uniqueItems": true,
"description": "D-035 structural tag: situations in which this monologue line is contextually appropriate. 15 v0.1 values (triangle_activated added Sprint 24). The engine selects using trigger; situation provides additional authoring context for filtering by the caller. NOTE: 'greeting' and 'triangle_activated' are not yet in server/src/content/line_pool.rs Situation enum."
},
"trigger": {
"type": "string",
"enum": [
"enter_location",
"observe_npc",
"hear_sound",
"observe_anomaly",
"post_conversation",
"discover_evidence",
"witness_interaction",
"time_idle",
"return_visit"
],
"description": "What causes this line to fire. 9 v0.1 trigger types (D-035 monologue-specific tag)."
},
"prerequisites": {
"description": "Knowledge state gate (D-035 monologue-specific tag). null or omitted = unconditional. Conditions are AND-evaluated. Uses FactIds from the knowledge vocabulary (#368, D-041).",
"oneOf": [
{ "type": "null" },
{
"type": "object",
"additionalProperties": false,
"properties": {
"facts": {
"type": "array",
"items": { "$ref": "#/$defs/fact_prerequisite" }
},
"entity_attributes": {
"type": "array",
"items": { "$ref": "#/$defs/attribute_prerequisite" }
},
"relationship": {
"type": "object",
"required": ["target", "state"],
"additionalProperties": false,
"properties": {
"target": { "type": "string" },
"state": {
"type": "string",
"enum": ["unknown", "known", "friendly", "person_of_interest", "hostile"]
}
}
},
"npc_in_los": {
"type": "boolean",
"description": "Gate: line only fires when the triggering NPC is in the player's line of sight. Added Sprint 24 for triangle_activated observe_npc lines."
}
}
}
]
},
"topic": {
"type": "array",
"items": {
"type": "string",
"enum": [
"colleague",
"routine",
"cargo",
"money",
"trust",
"danger",
"institution",
"personal",
"investigation"
]
},
"uniqueItems": true,
"description": "D-035 selection tag: topic tags for weighted selection. 9 v0.1 values. Optional."
},
"mood": {
"type": "array",
"items": {
"type": "string",
"enum": [
"anxious",
"frustrated",
"content",
"suspicious",
"warm",
"hostile",
"relieved",
"focused"
]
},
"uniqueItems": true,
"description": "D-035 selection tag: mood tags for weighted selection. 8 v0.1 values, renamed Sprint 14 to match voice guide vocabulary. Neutral = untagged."
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 5,
"description": "Selection priority (higher = more likely to fire when multiple lines are eligible). Default: 5."
},
"cooldown": {
"type": "integer",
"minimum": 0,
"default": 0,
"description": "Minimum simulation ticks before this line can fire again. Default: 0."
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "D-035 selection tag: freeform tags. Not consumed by the selection pipeline."
},
"dual_lens": {
"type": "object",
"description": "Authoring-only: notes on how this line reads differently for smuggler vs detective. NOT consumed by engine.",
"additionalProperties": false,
"properties": {
"smuggler": { "type": "string" },
"detective": { "type": "string" }
}
},
"notes": {
"type": "string",
"description": "Authoring-only: freeform author notes. NOT consumed by engine."
}
}
},
"fact_prerequisite": {
"type": "object",
"required": ["fact_id", "min_confidence"],
"additionalProperties": false,
"properties": {
"fact_id": {
"type": "string",
"description": "FactId from the knowledge vocabulary (#368, D-041)."
},
"min_confidence": {
"type": "string",
"enum": ["suspects", "knows_of", "knows_details", "direct"],
"description": "Minimum D-041 confidence level required."
}
}
},
"attribute_prerequisite": {
"type": "object",
"required": ["entity", "key", "value"],
"additionalProperties": false,
"properties": {
"entity": { "type": "string" },
"key": { "type": "string" },
"value": { "type": "string" }
}
}
}
}
-209
View File
@@ -1,209 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "npc-profile.schema.json",
"title": "NPC Profile",
"description": "10-axis NPC model profile — one file per NPC (D-024, D-034).",
"type": "object",
"required": ["canonical_id", "display_name", "tier", "pattern", "motivation"],
"additionalProperties": false,
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^npc:([a-z][a-z0-9-]+\\.)?[a-z][a-z0-9-]*$",
"description": "Canonical ID: npc:{slug} (within district) or npc:{district}.{slug} (cross-district)"
},
"display_name": {
"type": "string",
"minLength": 1
},
"tier": {
"type": "integer",
"enum": [1, 2, 3],
"description": "NPC tier: 1 = conspiracy (full depth), 2 = template (social context), 3 = filler (atmosphere)"
},
"pattern": {
"type": "string",
"enum": ["FRIEND", "MIRROR", "ANCHOR", "GHOST", "CATALYST", "THRESHOLD", "REMNANT", "SYSTEM", "NOBODY"],
"description": "Thematic pattern — System A (D-050)"
},
"motivation": {
"type": "string",
"enum": ["HANDLER", "WITNESS", "TURNCOAT", "CIVILIAN", "OPERATOR", "SKEPTIC"],
"description": "Functional motivation — System B (D-050)"
},
"description": {
"type": "string"
},
"want": {
"type": "object",
"description": "Primary want/need driving this NPC",
"properties": {
"primary": { "type": "string", "enum": ["Wealth", "Safety", "Knowledge", "Connection", "Power", "Freedom", "Justice", "Revenge", "Happiness"] },
"intensity": { "type": "integer", "minimum": 0, "maximum": 10 },
"description": { "type": "string" }
},
"required": ["primary"]
},
"secret": {
"type": "string",
"description": "The NPC's hidden truth — what they don't want the player to know"
},
"relationships": {
"type": "array",
"items": { "$ref": "#/$defs/relationship" },
"description": "Named relationships to other NPCs"
},
"tolerance": {
"type": "object",
"description": "Stress tolerance threshold",
"properties": {
"threshold": { "type": "integer" },
"description": { "type": "string" }
}
},
"routine": {
"type": "object",
"description": "Summary of daily routine (full schedule in routines/schedules.yaml)",
"properties": {
"summary": { "type": "string" }
}
},
"information": {
"type": "object",
"description": "What this NPC knows",
"properties": {
"knows": {
"type": "array",
"items": { "type": "string" },
"description": "Fact IDs this NPC knows"
},
"access_tier": {
"type": "string",
"enum": ["public", "insider", "authority", "peer", "hostile"]
}
}
},
"contentment": {
"type": "object",
"properties": {
"level": { "type": "integer", "minimum": -10, "maximum": 10 },
"description": { "type": "string" }
}
},
"personality": {
"type": "object",
"description": "Personality traits and behavioral tendencies",
"additionalProperties": { "type": "string" }
},
"tells": {
"type": "array",
"items": { "$ref": "#/$defs/tell" },
"description": "Observable behavioral tells (D-024)"
},
"skills": {
"type": "object",
"description": "Skill set and combat capability",
"properties": {
"combat_trained": { "type": "boolean" },
"skills": {
"type": "object",
"additionalProperties": { "type": "integer", "minimum": 0, "maximum": 10 }
}
}
},
"triangle_membership": {
"type": "array",
"items": { "type": "string" },
"description": "Triangle slugs this NPC participates in"
},
"trust_levels": {
"type": "object",
"description": "What the NPC reveals at each trust level",
"properties": {
"surface": { "type": "string" },
"real": { "type": "string" },
"secret": { "type": "string" }
}
},
"friend_arc": {
"type": "object",
"description": "FRIEND arc data — only valid on FRIEND-pattern Tier 1 NPCs (D-034)",
"properties": {
"bonded_character": {
"type": "string",
"enum": ["smuggler", "detective"]
},
"phases": {
"type": "array",
"items": { "$ref": "#/$defs/friend_phase" }
}
},
"required": ["bonded_character", "phases"]
},
"dual_lens": {
"type": "object",
"description": "Authoring-only: how smuggler vs detective perceives this NPC",
"properties": {
"smuggler": { "type": "string" },
"detective": { "type": "string" }
}
},
"notes": {
"type": "string",
"description": "Authoring-only: design notes"
}
},
"if": {
"properties": { "pattern": { "const": "FRIEND" } }
},
"then": {
"required": ["friend_arc"]
},
"$defs": {
"relationship": {
"type": "object",
"required": ["target", "kind"],
"additionalProperties": false,
"properties": {
"target": {
"type": "string",
"pattern": "^npc:([a-z][a-z0-9-]+\\.)?[a-z][a-z0-9-]*$"
},
"kind": {
"type": "string",
"enum": ["colleague", "friend", "rival", "romantic", "family", "superior", "subordinate"]
},
"trust": {
"type": "integer",
"minimum": -10,
"maximum": 10
},
"notes": { "type": "string" }
}
},
"tell": {
"type": "object",
"required": ["trigger", "behavior"],
"additionalProperties": false,
"properties": {
"trigger": { "type": "string" },
"behavior": { "type": "string" },
"visible_to": {
"type": "string",
"enum": ["forward", "peripheral", "any"]
}
}
},
"friend_phase": {
"type": "object",
"required": ["phase", "description"],
"additionalProperties": false,
"properties": {
"phase": { "type": "integer", "minimum": 1, "maximum": 5 },
"description": { "type": "string" },
"trigger": { "type": "string" },
"routine_deviation": { "type": "string" }
}
}
}
}
-103
View File
@@ -1,103 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "routine.schema.json",
"title": "NPC Routine Schedules",
"description": "Daily routine schedules — all NPCs in one file per district for cross-NPC validation (D-034).",
"type": "object",
"required": ["district", "schedules"],
"additionalProperties": false,
"properties": {
"district": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "District slug this routine file belongs to"
},
"schedules": {
"type": "array",
"items": { "$ref": "#/$defs/npc_schedule" },
"minItems": 1
}
},
"$defs": {
"npc_schedule": {
"type": "object",
"required": ["npc", "entries"],
"additionalProperties": false,
"properties": {
"npc": {
"type": "string",
"pattern": "^npc:[a-z][a-z0-9-]*$",
"description": "NPC short-form canonical ID"
},
"entries": {
"type": "array",
"items": { "$ref": "#/$defs/routine_entry" },
"minItems": 1
},
"deviations": {
"type": "array",
"items": { "$ref": "#/$defs/deviation" },
"description": "Conditional schedule overrides (FRIEND arc staging, etc.)"
}
}
},
"routine_entry": {
"type": "object",
"required": ["phase", "location"],
"additionalProperties": false,
"properties": {
"phase": {
"type": "string",
"enum": ["morning", "afternoon", "evening", "night"],
"description": "Day phase for this entry"
},
"location": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Location slug"
},
"tile": {
"type": "object",
"properties": {
"x": { "type": "integer" },
"y": { "type": "integer" }
},
"required": ["x", "y"],
"description": "Specific tile coordinates within the location"
},
"activity": {
"type": "string",
"description": "What the NPC is doing at this location/time"
}
}
},
"deviation": {
"type": "object",
"required": ["trigger", "location"],
"additionalProperties": false,
"properties": {
"trigger": {
"type": "string",
"description": "Condition that activates this deviation"
},
"phase": {
"type": "string",
"enum": ["morning", "afternoon", "evening", "night"]
},
"location": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"tile": {
"type": "object",
"properties": {
"x": { "type": "integer" },
"y": { "type": "integer" }
},
"required": ["x", "y"]
},
"activity": { "type": "string" }
}
}
}
}
-26
View File
@@ -1,26 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "station.schema.json",
"title": "Station Metadata",
"description": "Station definition file — one per station directory (D-036).",
"type": "object",
"required": ["display_name"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"districts": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"uniqueItems": true
}
}
}
-26
View File
@@ -1,26 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "system.schema.json",
"title": "Star System Metadata",
"description": "System definition file — one per system directory (D-036).",
"type": "object",
"required": ["display_name"],
"additionalProperties": false,
"properties": {
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"stations": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$"
},
"uniqueItems": true
}
}
}
-99
View File
@@ -1,99 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "triangle.schema.json",
"title": "Triangle Definition",
"description": "3-NPC relationship triangle — self-contained forks, no cross-triangle cascade in v0.1 (D-024, D-047).",
"type": "object",
"required": ["canonical_id", "display_name", "members"],
"additionalProperties": false,
"properties": {
"canonical_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]*$",
"description": "Triangle slug"
},
"display_name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"members": {
"type": "array",
"items": { "$ref": "#/$defs/member" },
"minItems": 3,
"maxItems": 3,
"description": "Exactly 3 NPC members"
},
"forks": {
"type": "array",
"items": { "$ref": "#/$defs/fork" },
"description": "Possible fork points in this triangle"
},
"resolution_states": {
"type": "array",
"items": { "$ref": "#/$defs/resolution" },
"description": "Terminal states this triangle can reach"
}
},
"$defs": {
"member": {
"type": "object",
"required": ["npc", "role"],
"additionalProperties": false,
"properties": {
"npc": {
"type": "string",
"pattern": "^npc:[a-z][a-z0-9-]*$",
"description": "NPC short-form canonical ID"
},
"role": {
"type": "string",
"description": "This NPC's role within the triangle"
}
}
},
"fork": {
"type": "object",
"required": ["id", "condition"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*$"
},
"condition": {
"type": "string",
"description": "What triggers this fork"
},
"outcomes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"description": { "type": "string" },
"effects": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
}
},
"resolution": {
"type": "object",
"required": ["id", "description"],
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]*$"
},
"description": { "type": "string" }
}
}
}
}
-349
View File
@@ -1,349 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "anstream"
version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]]
name = "anstyle-parse"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys",
]
[[package]]
name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "bitflags"
version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
dependencies = [
"serde_core",
]
[[package]]
name = "clap"
version = "4.5.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
[[package]]
name = "colorchoice"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
[[package]]
name = "content-converter"
version = "0.1.0"
dependencies = [
"clap",
"ron",
"serde",
"serde_yaml",
"thiserror",
"walkdir",
]
[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "hashbrown"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "indexmap"
version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "itoa"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "once_cell_polyfill"
version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
dependencies = [
"proc-macro2",
]
[[package]]
name = "ron"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
dependencies = [
"base64",
"bitflags",
"serde",
"serde_derive",
]
[[package]]
name = "ryu"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_yaml"
version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
"indexmap",
"itoa",
"ryu",
"serde",
"unsafe-libyaml",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.115"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-ident"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
[[package]]
name = "unsafe-libyaml"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "walkdir"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
]
[[package]]
name = "winapi-util"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys",
]
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
-17
View File
@@ -1,17 +0,0 @@
[package]
name = "content-converter"
version = "0.1.0"
edition = "2021"
description = "Build-time converter: reads content YAML, emits RON for faster runtime deserialization."
[[bin]]
name = "content-converter"
path = "src/main.rs"
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.9"
ron = "0.8"
clap = { version = "4", features = ["derive"] }
walkdir = "2"
thiserror = "2"
-286
View File
@@ -1,286 +0,0 @@
//! content-converter: reads content YAML, emits RON.
//!
//! Build-time tool for converting authored YAML content files into RON (Rusty Object Notation)
//! for faster runtime deserialization. Not on v0.1 critical path — engine consumes YAML directly.
//! RON is future-proofing for runtime performance.
use clap::Parser;
use std::path::{Path, PathBuf};
use walkdir::WalkDir;
mod types;
use types::ContentFile;
#[derive(Parser)]
#[command(name = "content-converter", about = "Convert content YAML to RON")]
struct Cli {
/// Path to the content directory (default: content/)
#[arg(short, long, default_value = "content")]
input: PathBuf,
/// Path to write RON output (default: content-ron/)
#[arg(short, long, default_value = "content-ron")]
output: PathBuf,
/// Only convert files matching this content type
#[arg(short = 't', long)]
content_type: Option<ContentTypeFilter>,
/// Print what would be converted without writing files
#[arg(long)]
dry_run: bool,
/// Print verbose conversion details
#[arg(short, long)]
verbose: bool,
}
#[derive(Clone, Debug)]
enum ContentTypeFilter {
Npc,
Dialogue,
Monologue,
Triangle,
Location,
Routine,
District,
Faction,
}
impl std::str::FromStr for ContentTypeFilter {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"npc" => Ok(Self::Npc),
"dialogue" => Ok(Self::Dialogue),
"monologue" => Ok(Self::Monologue),
"triangle" => Ok(Self::Triangle),
"location" => Ok(Self::Location),
"routine" => Ok(Self::Routine),
"district" => Ok(Self::District),
"faction" => Ok(Self::Faction),
_ => Err(format!(
"Unknown content type: {s}. Valid: npc, dialogue, monologue, triangle, location, routine, district, faction"
)),
}
}
}
fn main() {
let cli = Cli::parse();
if !cli.input.exists() {
eprintln!(
"Error: content directory not found: {}",
cli.input.display()
);
std::process::exit(1);
}
let mut converted = 0u32;
let mut skipped = 0u32;
let mut errors = 0u32;
for entry in WalkDir::new(&cli.input)
.into_iter()
.filter_map(|e| e.ok())
.filter(|e| {
e.path()
.extension()
.is_some_and(|ext| ext == "yaml" || ext == "yml")
})
.filter(|e| !is_schema_or_meta(e.path()))
{
let path = entry.path();
let content_type = classify_file(path);
if let Some(ref filter) = cli.content_type {
if !matches_filter(&content_type, filter) {
continue;
}
}
match convert_file(
path,
&cli.input,
&cli.output,
&content_type,
cli.dry_run,
cli.verbose,
) {
Ok(true) => converted += 1,
Ok(false) => skipped += 1,
Err(e) => {
eprintln!("Error converting {}: {e}", path.display());
errors += 1;
}
}
}
println!(
"Content conversion complete: {converted} converted, {skipped} skipped, {errors} errors"
);
if errors > 0 {
std::process::exit(1);
}
}
fn is_schema_or_meta(path: &Path) -> bool {
let path_str = path.to_string_lossy();
path_str.contains("_schema") || path_str.contains("_meta")
}
#[derive(Debug)]
enum ContentType {
NpcProfile,
DialoguePool,
MonologuePool,
Triangle,
Location,
Routine,
District,
Campaign,
System,
Station,
ContentManifest,
Faction,
Enum,
KnowledgeCatalog,
Unknown,
}
fn classify_file(path: &Path) -> ContentType {
let path_str = path.to_string_lossy();
if path_str.contains("/npcs/") {
ContentType::NpcProfile
} else if path_str.contains("/dialogue/") {
ContentType::DialoguePool
} else if path_str.contains("/monologue/") {
ContentType::MonologuePool
} else if path_str.contains("/triangles/") {
ContentType::Triangle
} else if path_str.contains("/locations/") {
ContentType::Location
} else if path_str.contains("/routines/") {
ContentType::Routine
} else if path_str.contains("/factions/") {
ContentType::Faction
} else if path_str.contains("/enums/") {
ContentType::Enum
} else if path_str.contains("/knowledge/") {
ContentType::KnowledgeCatalog
} else if path_str.ends_with("district.yaml") {
ContentType::District
} else if path_str.ends_with("station.yaml") {
ContentType::Station
} else if path_str.ends_with("system.yaml") {
ContentType::System
} else if path_str.ends_with("campaign.yaml") {
ContentType::Campaign
} else if path_str.ends_with("content.yaml") {
ContentType::ContentManifest
} else {
ContentType::Unknown
}
}
fn matches_filter(content_type: &ContentType, filter: &ContentTypeFilter) -> bool {
matches!(
(content_type, filter),
(ContentType::NpcProfile, ContentTypeFilter::Npc)
| (ContentType::DialoguePool, ContentTypeFilter::Dialogue)
| (ContentType::MonologuePool, ContentTypeFilter::Monologue)
| (ContentType::Triangle, ContentTypeFilter::Triangle)
| (ContentType::Location, ContentTypeFilter::Location)
| (ContentType::Routine, ContentTypeFilter::Routine)
| (ContentType::District, ContentTypeFilter::District)
| (ContentType::Faction, ContentTypeFilter::Faction)
)
}
fn convert_file(
path: &Path,
input_root: &Path,
output_root: &Path,
content_type: &ContentType,
dry_run: bool,
verbose: bool,
) -> Result<bool, Box<dyn std::error::Error>> {
let yaml_str = std::fs::read_to_string(path)?;
// Skip stub files (comment-only, no real YAML content)
let trimmed = yaml_str
.lines()
.filter(|l| !l.trim_start().starts_with('#') && !l.trim().is_empty())
.collect::<Vec<_>>()
.join("\n");
if trimmed.is_empty() {
if verbose {
println!(" skip (stub): {}", path.display());
}
return Ok(false);
}
let content_file = parse_yaml(&trimmed, content_type)?;
let ron_config = ron::ser::PrettyConfig::default()
.struct_names(true)
.enumerate_arrays(false);
let ron_str = ron::ser::to_string_pretty(&content_file, ron_config)?;
// Compute output path: replace input root with output root, .yaml -> .ron
let rel_path = path.strip_prefix(input_root)?;
let mut out_path = output_root.join(rel_path);
out_path.set_extension("ron");
if dry_run {
println!(
" would convert: {} -> {}",
path.display(),
out_path.display()
);
return Ok(true);
}
if verbose {
println!(" convert: {} -> {}", path.display(), out_path.display());
}
if let Some(parent) = out_path.parent() {
std::fs::create_dir_all(parent)?;
}
std::fs::write(&out_path, ron_str)?;
Ok(true)
}
fn parse_yaml(
yaml_str: &str,
content_type: &ContentType,
) -> Result<ContentFile, Box<dyn std::error::Error>> {
let file = match content_type {
ContentType::NpcProfile => {
ContentFile::NpcProfile(Box::new(serde_yaml::from_str(yaml_str)?))
}
ContentType::DialoguePool => ContentFile::DialoguePool(serde_yaml::from_str(yaml_str)?),
ContentType::MonologuePool => ContentFile::MonologuePool(serde_yaml::from_str(yaml_str)?),
ContentType::Triangle => ContentFile::Triangle(serde_yaml::from_str(yaml_str)?),
ContentType::Location => ContentFile::Location(serde_yaml::from_str(yaml_str)?),
ContentType::Routine => ContentFile::Routine(serde_yaml::from_str(yaml_str)?),
ContentType::District => ContentFile::District(serde_yaml::from_str(yaml_str)?),
ContentType::Campaign => ContentFile::Campaign(serde_yaml::from_str(yaml_str)?),
ContentType::System | ContentType::Station => {
ContentFile::Metadata(serde_yaml::from_str(yaml_str)?)
}
ContentType::ContentManifest => ContentFile::Manifest(serde_yaml::from_str(yaml_str)?),
ContentType::Faction => ContentFile::Generic(serde_yaml::from_str(yaml_str)?),
ContentType::Enum | ContentType::KnowledgeCatalog => {
ContentFile::Generic(serde_yaml::from_str(yaml_str)?)
}
ContentType::Unknown => ContentFile::Generic(serde_yaml::from_str(yaml_str)?),
};
Ok(file)
}
-443
View File
@@ -1,443 +0,0 @@
//! Content types mirroring the JSON Schema definitions in content/_schema/.
//!
//! These types are used for YAML deserialization and RON serialization.
//! They do NOT need to match the server's ECS component types — this is a
//! build-time conversion tool, not runtime code.
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
/// Top-level enum wrapping all content file types for RON output.
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ContentFile {
NpcProfile(Box<NpcProfile>),
DialoguePool(DialoguePool),
MonologuePool(MonologuePool),
Triangle(Triangle),
Location(Location),
Routine(RoutineFile),
District(District),
Campaign(Campaign),
Manifest(ContentManifest),
Metadata(GenericMetadata),
Generic(serde_yaml::Value),
}
// --- NPC Profile (npc-profile.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct NpcProfile {
pub canonical_id: String,
pub display_name: String,
pub tier: u8,
pub pattern: String,
pub motivation: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub want: Option<Want>,
#[serde(skip_serializing_if = "Option::is_none")]
pub secret: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub relationships: Vec<Relationship>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tolerance: Option<Tolerance>,
#[serde(skip_serializing_if = "Option::is_none")]
pub routine: Option<RoutineSummary>,
#[serde(skip_serializing_if = "Option::is_none")]
pub information: Option<Information>,
#[serde(skip_serializing_if = "Option::is_none")]
pub contentment: Option<Contentment>,
#[serde(skip_serializing_if = "Option::is_none")]
pub personality: Option<BTreeMap<String, String>>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub tells: Vec<Tell>,
#[serde(skip_serializing_if = "Option::is_none")]
pub skills: Option<Skills>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub triangle_membership: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_levels: Option<TrustLevels>,
#[serde(skip_serializing_if = "Option::is_none")]
pub friend_arc: Option<FriendArc>,
#[serde(skip_serializing_if = "Option::is_none")]
pub dual_lens: Option<DualLens>,
#[serde(skip_serializing_if = "Option::is_none")]
pub notes: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Want {
pub primary: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub intensity: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Relationship {
pub target: String,
pub kind: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub trust: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub notes: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Tolerance {
#[serde(skip_serializing_if = "Option::is_none")]
pub threshold: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct RoutineSummary {
#[serde(skip_serializing_if = "Option::is_none")]
pub summary: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Information {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub knows: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub access_tier: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Contentment {
#[serde(skip_serializing_if = "Option::is_none")]
pub level: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Tell {
pub trigger: String,
pub behavior: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub visible_to: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Skills {
#[serde(skip_serializing_if = "Option::is_none")]
pub combat_trained: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub skills: Option<BTreeMap<String, i32>>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TrustLevels {
#[serde(skip_serializing_if = "Option::is_none")]
pub surface: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub real: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub secret: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FriendArc {
pub bonded_character: String,
pub phases: Vec<FriendPhase>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FriendPhase {
pub phase: u8,
pub description: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub trigger: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub routine_deviation: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct DualLens {
#[serde(skip_serializing_if = "Option::is_none")]
pub smuggler: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub detective: Option<String>,
}
// --- Dialogue Pool (dialogue-pool.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct DialoguePool {
pub location: String,
pub role: String,
pub lines: Vec<DialogueLine>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct DialogueLine {
pub id: String,
pub text: String,
pub role: String,
pub access: Vec<String>,
pub trust: String,
pub situation: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub topic: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub mood: Vec<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub knowledge_grant: Option<KnowledgeGrant>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct KnowledgeGrant {
pub fact_id: String,
pub confidence: String,
}
// --- Monologue Pool (monologue-pool.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct MonologuePool {
pub character: String,
pub location: String,
pub lines: Vec<MonologueLine>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MonologueLine {
pub id: String,
pub text: String,
pub trigger: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub prerequisites: Option<Prerequisites>,
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cooldown: Option<i32>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub tags: Vec<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Prerequisites {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub facts: Vec<FactPrerequisite>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub entity_attributes: Vec<AttributePrerequisite>,
#[serde(skip_serializing_if = "Option::is_none")]
pub relationship: Option<RelationshipPrerequisite>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct FactPrerequisite {
pub fact_id: String,
pub min_confidence: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct AttributePrerequisite {
pub entity: String,
pub key: String,
pub value: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct RelationshipPrerequisite {
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
// --- Triangle (triangle.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct Triangle {
pub canonical_id: String,
pub display_name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
pub members: Vec<TriangleMember>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub forks: Vec<Fork>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub resolution_states: Vec<Resolution>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TriangleMember {
pub npc: String,
pub role: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Fork {
pub id: String,
pub condition: String,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub outcomes: Vec<ForkOutcome>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ForkOutcome {
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub effects: Vec<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Resolution {
pub id: String,
pub description: String,
}
// --- Location (location.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct Location {
pub canonical_id: String,
pub display_name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tile_bounds: Option<TileBounds>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sightlines: Option<Sightlines>,
#[serde(skip_serializing_if = "Option::is_none")]
pub ambient_sound: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub social_site: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TileBounds {
pub x_min: i32,
pub y_min: i32,
pub x_max: i32,
pub y_max: i32,
pub z: i32,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Sightlines {
#[serde(skip_serializing_if = "Option::is_none")]
pub open: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub notes: Option<String>,
}
// --- Routine (routine.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct RoutineFile {
pub district: String,
pub schedules: Vec<NpcSchedule>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct NpcSchedule {
pub npc: String,
pub entries: Vec<RoutineEntry>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub deviations: Vec<Deviation>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct RoutineEntry {
pub phase: String,
pub location: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub tile: Option<TileCoord>,
#[serde(skip_serializing_if = "Option::is_none")]
pub activity: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Deviation {
pub trigger: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub phase: Option<String>,
pub location: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub tile: Option<TileCoord>,
#[serde(skip_serializing_if = "Option::is_none")]
pub activity: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TileCoord {
pub x: i32,
pub y: i32,
}
// --- District (district.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct District {
pub display_name: String,
pub description: String,
pub locations: Vec<String>,
pub npc_count: u32,
#[serde(skip_serializing_if = "Option::is_none")]
pub canonical_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub system: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub station: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub district: Option<String>,
}
// --- Campaign (campaign.schema.json) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct Campaign {
pub display_name: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
// --- Content manifest (content.yaml) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct ContentManifest {
pub version: String,
pub campaigns: Vec<CampaignRef>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct CampaignRef {
pub id: String,
pub path: String,
pub enabled: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub discovery: Option<Discovery>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Discovery {
#[serde(skip_serializing_if = "Option::is_none")]
pub districts: Option<String>,
}
// --- Generic metadata (system.yaml, station.yaml) ---
#[derive(Debug, Serialize, Deserialize)]
pub struct GenericMetadata {
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(flatten)]
pub extra: BTreeMap<String, serde_yaml::Value>,
}
@@ -7,8 +7,8 @@
**Status:** Draft — narrative framing complete; Mellanie to supply example lines per section
**Cross-references:**
- [Monologue Content Architecture](monologue-content-architecture.md) — the authoring contract this document extends
- [Voice Patterns](voice-patterns.md) — sentence-level execution (contractions, punctuation, sentence length)
- [Monologue Content Architecture](../../docs/design/monologue-content-architecture.md) — the authoring contract this document extends
- [Voice Patterns](../../docs/design/voice-patterns.md) — sentence-level execution (contractions, punctuation, sentence length)
- [Dual Lens Authoring Guide](dual-lens-authoring-guide.md) — Chapter 7 (base voice registers)
- D-024: NPC triangle model — PersonalityTraits list (10 axes)
- D-035: tag taxonomy — mood enum (8+1 moods)