JSON Schema (draft 2020-12) for content validation: district, location, npc-profile, dialogue-pool, monologue-pool, triangle, routine, and fact-catalog. NPC schema uses if/then conditional for FRIEND pattern validation. Implements ticket #386. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
107 lines
3.3 KiB
JSON
107 lines
3.3 KiB
JSON
{
|
|
"$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: {location_slug}_d_{###}"
|
|
},
|
|
"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": "string",
|
|
"enum": [
|
|
"arrival", "shift_start", "shift_end", "shift_transition",
|
|
"bar_evening", "night_shift", "investigation", "confrontation",
|
|
"social", "alone", "emergency", "routine", "observation"
|
|
],
|
|
"description": "Situation context when this line can fire"
|
|
},
|
|
"topic": {
|
|
"type": "string",
|
|
"enum": [
|
|
"colleague", "routine", "cargo", "money", "trust",
|
|
"danger", "institution", "personal", "investigation"
|
|
],
|
|
"description": "Topic tag for selection weighting"
|
|
},
|
|
"mood": {
|
|
"type": "string",
|
|
"enum": [
|
|
"fond", "comfortable", "worried", "suspicious",
|
|
"analytical", "conflicted", "concerned", "relieved"
|
|
],
|
|
"description": "Mood tag for selection weighting"
|
|
},
|
|
"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",
|
|
"properties": {
|
|
"fact_id": { "type": "string" },
|
|
"confidence": {
|
|
"type": "string",
|
|
"enum": ["suspects", "knows_of", "knows_details", "direct"]
|
|
}
|
|
},
|
|
"required": ["fact_id", "confidence"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|