| { |
| "$schema": "https://json-schema.org/draft/2020-12/schema", |
| "title": "Murdle Dataset Schema", |
| "description": "Schema for a dataset of Murdle puzzles, supporting variable categories (including optional motives), element counts (3-5), and flexible facts/solutions.", |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "id": { |
| "type": "string", |
| "description": "Unique identifier for the puzzle" |
| }, |
| "difficulty": { |
| "type": "string", |
| "enum": [ |
| "easy", |
| "medium", |
| "hard" |
| ], |
| "description": "Difficulty level of the puzzle" |
| }, |
| "state": { |
| "type": "object", |
| "properties": { |
| "original": { |
| "type": "boolean", |
| "description": "Whether the puzzle is in its original state" |
| }, |
| "simplified_category": { |
| "type": "string", |
| "enum": [ |
| "suspects", |
| "weapons", |
| "locations", |
| "facts", |
| "solution" |
| ], |
| "description": "The category where the puzzle was simplified (only present when original is false)" |
| }, |
| "description": { |
| "type": "string", |
| "description": "Description of the simplification (only present when original is false)" |
| } |
| }, |
| "required": [ |
| "original" |
| ], |
| "if": { |
| "properties": { |
| "original": { |
| "const": false |
| } |
| } |
| }, |
| "then": { |
| "required": [ |
| "simplified_category", |
| "description" |
| ] |
| }, |
| "additionalProperties": false, |
| "description": "State of the puzzle. When original is false, simplified_category and description indicate where/how the puzzle was simplified." |
| }, |
| "element_count": { |
| "type": "integer", |
| "minimum": 3, |
| "description": "Number of elements in each category (e.g., 3, 4 or more)" |
| }, |
| "categories": { |
| "type": "array", |
| "items": { |
| "type": "string", |
| "enum": [ |
| "suspects", |
| "weapons", |
| "locations", |
| "motives" |
| ] |
| }, |
| "minItems": 3, |
| "uniqueItems": true, |
| "description": "List of categories in the puzzle; 'motives' is optional" |
| }, |
| "elements": { |
| "type": "object", |
| "additionalProperties": false, |
| "description": "Object with keys matching categories, each containing an array of element objects. Suspects, weapons, and locations are always present; motives are optional.", |
| "required": [ |
| "suspects", |
| "weapons", |
| "locations" |
| ], |
| "properties": { |
| "suspects": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "description": { |
| "type": "string" |
| }, |
| "features": { |
| "type": "object", |
| "properties": { |
| "height": { |
| "type": "string" |
| }, |
| "handedness": { |
| "type": "string", |
| "enum": [ |
| "right", |
| "left" |
| ] |
| }, |
| "eye_color": { |
| "type": "string" |
| }, |
| "hair_color": { |
| "type": "string" |
| }, |
| "zodiac_sign": { |
| "type": "string", |
| "enum": [ |
| "aries", |
| "taurus", |
| "gemini", |
| "cancer", |
| "leo", |
| "virgo", |
| "libra", |
| "scorpio", |
| "sagittarius", |
| "capricorn", |
| "aquarius", |
| "pisces" |
| ] |
| } |
| }, |
| "required": [ |
| "height", |
| "handedness", |
| "eye_color", |
| "hair_color" |
| ], |
| "additionalProperties": false |
| } |
| }, |
| "required": [ |
| "name", |
| "description", |
| "features" |
| ], |
| "additionalProperties": false |
| } |
| }, |
| "weapons": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "description": { |
| "type": "string" |
| }, |
| "features": { |
| "type": "object", |
| "properties": { |
| "weight": { |
| "type": "string", |
| "enum": [ |
| "light", |
| "medium", |
| "heavy" |
| ] |
| }, |
| "material": { |
| "type": "string" |
| } |
| }, |
| "required": [ |
| "weight" |
| ], |
| "additionalProperties": false |
| } |
| }, |
| "required": [ |
| "name", |
| "description", |
| "features" |
| ], |
| "additionalProperties": false |
| } |
| }, |
| "locations": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string" |
| }, |
| "description": { |
| "type": "string" |
| }, |
| "setting": { |
| "type": "string", |
| "enum": [ |
| "outdoors", |
| "indoors" |
| ] |
| } |
| }, |
| "required": [ |
| "name", |
| "description", |
| "setting" |
| ], |
| "additionalProperties": false |
| } |
| }, |
| "motives": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| } |
| } |
| } |
| }, |
| "facts": { |
| "type": "array", |
| "items": { |
| "type": "string" |
| }, |
| "description": "Array of fact strings; variable length" |
| }, |
| "solution": { |
| "type": "array", |
| "items": { |
| "type": "object", |
| "properties": { |
| "suspect": { |
| "type": "string" |
| }, |
| "weapon": { |
| "type": "string" |
| }, |
| "location": { |
| "type": "string" |
| }, |
| "motive": { |
| "type": "string" |
| }, |
| "is_accused": { |
| "type": "boolean", |
| "description": "Whether this solution object represents the accused. Exactly one solution object must have is_accused: true." |
| } |
| }, |
| "additionalProperties": false |
| }, |
| "description": "Array of solution mappings; length must match element_count. Exactly one object must have is_accused: true.", |
| "allOf": [ |
| { |
| "description": "Exactly one solution object must have is_accused: true", |
| "contains": { |
| "properties": { |
| "is_accused": { |
| "const": true |
| } |
| } |
| } |
| } |
| ] |
| } |
| }, |
| "required": [ |
| "id", |
| "difficulty", |
| "element_count", |
| "categories", |
| "elements", |
| "facts", |
| "solution" |
| ], |
| "additionalProperties": false |
| } |
| } |