{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "grounded-answer.schema.json", "title": "GroundedAnswer", "description": "An answer whose every claim points at citations inside the authorized pack. A valid id proves only that the reference exists in the pack, not that it supports the claim; semantic support is judged by evidence and evaluation.", "type": "object", "additionalProperties": false, "required": ["schema_version", "answer_id", "request_id", "pack_id", "claim_refs", "citation_refs", "abstentions", "tool_receipt_ids", "execution_receipt_id", "status"], "properties": { "schema_version": { "$ref": "common.schema.json#/$defs/schema_version" }, "answer_id": { "$ref": "common.schema.json#/$defs/id" }, "request_id": { "$ref": "common.schema.json#/$defs/id" }, "pack_id": { "$ref": "common.schema.json#/$defs/id" }, "claim_refs": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["claim_id", "text", "kind", "citation_ids"], "properties": { "claim_id": { "$ref": "common.schema.json#/$defs/id" }, "text": { "type": "string", "minLength": 1, "maxLength": 1200 }, "kind": { "enum": ["observed", "interpretation", "scenario"] }, "citation_ids": { "type": "array", "uniqueItems": true, "items": { "$ref": "common.schema.json#/$defs/id" } } } } }, "citation_refs": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["citation_id", "evidence_id", "source_url"], "properties": { "citation_id": { "$ref": "common.schema.json#/$defs/id" }, "evidence_id": { "$ref": "common.schema.json#/$defs/id" }, "source_url": { "$ref": "common.schema.json#/$defs/https_url" }, "span": { "type": "string", "maxLength": 600 } } } }, "abstentions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["reason"], "properties": { "reason": { "enum": ["insufficient_evidence", "reserved_before_lock", "rights_refused", "stale_source", "tool_failed", "out_of_scope"] }, "detail": { "type": "string", "maxLength": 300 } } } }, "tool_receipt_ids": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/id" } }, "execution_receipt_id": { "type": ["string", "null"], "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$" }, "status": { "enum": ["complete", "partial", "insufficient", "interrupted", "error"] } } }