Files
VianoBugAnalysis/src/viano_bug_analysis/schemas/case-interpretation-v1.schema.json
T

673 lines
17 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"format_version": {
"type": "integer",
"const": 1
},
"interpreter_version": {
"const": "1"
},
"prompt_version": {
"enum": [
"case_interpretation_v1",
"case_interpretation_resolved_v1",
"case_interpretation_resolved_v2",
"case_interpretation_resolved_v3",
"case_interpretation_resolved_v4",
"case_interpretation_resolved_v5",
"case_interpretation_resolved_v6",
"case_interpretation_resolved_v7",
"case_interpretation_resolved_v8",
"case_plan_v1",
"case_plan_interpretation_repair_v1"
]
},
"case_id": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"package_id": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"analysis_revision": {
"type": "integer",
"minimum": 1
},
"case_ref": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"case_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"context_ref": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"context_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"llm_result_ref": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"format": {
"const": "viano-case-interpretation"
},
"expected_behavior_completeness": {
"enum": [
"missing",
"unspecified",
"reported_complete",
"reported_partial",
"conflicting",
"researched_complete",
"researched_partial"
]
},
"expected_behavior_provenance": {
"enum": [
"tester",
"none",
"external_research",
"combined"
]
},
"llm_metadata": {
"type": "object",
"properties": {
"provider": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"model": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"prompt_version": {
"enum": [
"case_interpretation_v1",
"case_interpretation_resolved_v1",
"case_interpretation_resolved_v2",
"case_interpretation_resolved_v3",
"case_interpretation_resolved_v4",
"case_interpretation_resolved_v5",
"case_interpretation_resolved_v6",
"case_interpretation_resolved_v7",
"case_interpretation_resolved_v8",
"case_plan_v1",
"case_plan_interpretation_repair_v1"
]
},
"input_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"output_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"estimated_cost": {
"type": [
"number",
"null"
],
"minimum": 0
},
"cost_currency": {
"type": [
"string",
"null"
]
},
"elapsed_seconds": {
"type": "number",
"minimum": 0
},
"attempts": {
"type": "array",
"items": {
"type": "object",
"required": [
"provider",
"code"
],
"properties": {
"provider": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"code": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
}
},
"additionalProperties": false
}
},
"cached_input_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"uncached_input_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"reasoning_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"cache_created_tokens": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"estimated_input_cost": {
"type": [
"number",
"null"
],
"minimum": 0
},
"estimated_cached_input_cost": {
"type": [
"number",
"null"
],
"minimum": 0
},
"estimated_output_cost": {
"type": [
"number",
"null"
],
"minimum": 0
},
"estimated_cache_storage_cost": {
"type": [
"number",
"null"
],
"minimum": 0
},
"cache_status": {
"enum": [
null,
"disabled",
"below_minimum",
"created",
"reused",
"fallback"
]
}
},
"required": [
"provider",
"model",
"prompt_version",
"input_tokens",
"output_tokens",
"estimated_cost",
"cost_currency",
"elapsed_seconds",
"attempts"
],
"additionalProperties": false
},
"interpretation": {
"type": "object"
}
},
"required": [
"format_version",
"interpreter_version",
"prompt_version",
"case_id",
"package_id",
"analysis_revision",
"case_ref",
"case_sha256",
"context_ref",
"context_sha256",
"llm_result_ref",
"format",
"expected_behavior_completeness",
"expected_behavior_provenance",
"llm_metadata",
"interpretation"
],
"additionalProperties": false,
"$defs": {
"statement": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"source_ids": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
}
}
},
"required": [
"text",
"source_ids"
],
"additionalProperties": false
}
},
"allOf": [
{
"if": {
"anyOf": [
{
"properties": {
"prompt_version": {
"enum": [
"case_interpretation_resolved_v3",
"case_interpretation_resolved_v4",
"case_interpretation_resolved_v5",
"case_interpretation_resolved_v6",
"case_interpretation_resolved_v7",
"case_interpretation_resolved_v8"
]
}
}
},
{
"properties": {
"prompt_version": {
"enum": [
"case_plan_v1",
"case_plan_interpretation_repair_v1"
]
},
"interpretation": {
"required": [
"described_behavior"
]
}
}
}
]
},
"then": {
"properties": {
"interpretation": {
"type": "object",
"properties": {
"observed_behavior": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"expected_behavior": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"tester_assumptions": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"confirmed_technical_facts": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"contradictions": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"unknowns": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"investigation_direction": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"behavior_gap": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"first_known_divergence": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"failure_stage": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"relevant_entities": {
"type": "array",
"items": {
"type": "object",
"required": [
"entity_id",
"reason",
"source_ids"
],
"properties": {
"entity_id": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
},
"reason": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"source_ids": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
}
}
},
"additionalProperties": false
}
},
"interpretation_summary": {
"$ref": "#/$defs/statement"
},
"described_behavior": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"source_ids": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
}
},
"basis": {
"const": "local_description"
},
"verification": {
"const": "not_independently_verified"
}
},
"required": [
"text",
"source_ids",
"basis",
"verification"
],
"additionalProperties": false
}
},
"provisional_behavior_gap": {
"anyOf": [
{
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"source_ids": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
}
},
"basis": {
"const": "local_description"
},
"status": {
"const": "provisional"
}
},
"required": [
"text",
"source_ids",
"basis",
"status"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"observed_behavior",
"expected_behavior",
"tester_assumptions",
"confirmed_technical_facts",
"contradictions",
"unknowns",
"investigation_direction",
"behavior_gap",
"first_known_divergence",
"failure_stage",
"relevant_entities",
"interpretation_summary",
"described_behavior",
"provisional_behavior_gap"
],
"additionalProperties": false
}
}
},
"else": {
"properties": {
"interpretation": {
"type": "object",
"properties": {
"observed_behavior": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"expected_behavior": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"tester_assumptions": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"confirmed_technical_facts": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"contradictions": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"unknowns": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"investigation_direction": {
"type": "array",
"items": {
"$ref": "#/$defs/statement"
}
},
"behavior_gap": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"first_known_divergence": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"failure_stage": {
"anyOf": [
{
"$ref": "#/$defs/statement"
},
{
"type": "null"
}
]
},
"relevant_entities": {
"type": "array",
"items": {
"type": "object",
"required": [
"entity_id",
"reason",
"source_ids"
],
"properties": {
"entity_id": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
},
"reason": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"source_ids": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[A-Z][0-9]{4,}$"
}
}
},
"additionalProperties": false
}
},
"interpretation_summary": {
"$ref": "#/$defs/statement"
}
},
"required": [
"observed_behavior",
"expected_behavior",
"tester_assumptions",
"confirmed_technical_facts",
"contradictions",
"unknowns",
"investigation_direction",
"behavior_gap",
"first_known_divergence",
"failure_stage",
"relevant_entities",
"interpretation_summary"
],
"additionalProperties": false
}
}
}
}
]
}