- golden-diff restores committed file even on cargo test failure - Wire checklist-validate into pre-pr-content gate - Fix schema description: condition IDs are globally unique, not per-file; document room_id prefix naming convention - Add schema file missing error handling in validate-checklist - Add scope discriminator field (per_room/cross_room) to schema - Check pyyaml and jsonschema packages in setup-tooling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
136 lines
5.1 KiB
JSON
136 lines
5.1 KiB
JSON
{
|
|
"$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)" }
|
|
}
|
|
}
|
|
}
|
|
}
|